murilo103 42 Posted November 12, 2012 Report Share Posted November 12, 2012 (edited) Uma dúvida... Como ativo o Shop ?, Ele está dizendo que está em Manutenção!! Edited November 12, 2012 by murilo103 Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386251 Share on other sites More sharing options...
VictorWEBMaster 369 Posted November 13, 2012 Author Report Share Posted November 13, 2012 Bom dia amigo, eu baixei seu site e estou com 2 problemas nele. Estou utilizando o Crying ot 8.54. (Não sei se faz diferença) Enfim, no site acusa 2 erros, o primeiro é o Guild Wars que acusa erro de SQL faltando. O Segundo é que ele não acha nenhuma criatura no servidor. segue o site para análise http://www.tibiaextreme.com.br/ Obrigado pela compreensão... Abraço. Me desculpe, este website está disponível apenas a versão 8.60 a 9.70... Sim, da para criar, mas daqui a algum tempo vai começar a dar erros na sua database. Não erros básicos, erros de não salvar o banco de dados e ter perca de dados. Victor como eu edito o featured article do meu site ? Abra o latestnews.php Procura a seguinte linha : ///show news se situa na linha 207 caso nao tenha feito nenhuma alteração. Coloque apos isto, $main_content .= ' <div id="featuredarticle" class="Box"> <div class="Corner-tl" style="background-image:url('.$layout_name.'/images/content/corner-tl.gif);"></div> <div class="Corner-tr" style="background-image:url('.$layout_name.'/images/content/corner-tr.gif);"></div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="BorderTitleText" style="background-image:url('.$layout_name.'/images/content/title-background-green.gif);"></div> <img class="Title" src="'.$layout_name.'/images/strings/headline-featuredarticle.gif" alt="Contentbox headline" /> <div class="Border_2"> <div class="Border_3"> <div class="BoxContent" style="background-image:url('.$layout_name.'/images/content/scroll.gif);"> <div id=\'TeaserThumbnail\'><img src="'.$layout_name.'/images/news/features.jpg" width=150 height=100 border=0 alt="" /></div><div id=\'TeaserText\'><div style="position: relative; top: -2px; margin-bottom: 2px;" > <b>Tutaj wpisz tytul</b></div> tutaj wpisz tresc newsa<br> zdjecie laduje sie w <i>tibiacom/images/news/features.jpg</i><br> skad sie laduje mozesz zmienic linijke ponad komentarzem </div> </div> </div> </div> <div class="Border_1" style="background-image:url('.$layout_name.'/images/content/border-1.gif);"></div> <div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url('.$layout_name.'/images/content/corner-bl.gif);"></div></div> <div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url('.$layout_name.'/images/content/corner-br.gif);"></div></div> </div>'; Uma dúvida... Como ativo o Shop ?, Ele está dizendo que está em Manutenção!! Abra seu config/config.php. Procure a linha $config['site']['shop_system'] = 1; estará assim: $config['site']['shop_system'] = 0;.. Mude o 0 para 1, salve o arquivo e o seu shop estará ativo.. Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386442 Share on other sites More sharing options...
markim1986 2 Posted November 13, 2012 Report Share Posted November 13, 2012 (edited) Grande victor, de longe seu site é muito top, depois de muito custo consigui instalar, porem fica algumas duvidas.. 1- como faço para que o cadastro do pagseguro fique em minha conta? 2- os items do meu shop nao sao entregues aos playes, nao sei se isso é configuraçao de seu site ow do meu ot, que pra dizer a verdade nenhum site entregou os items para os players, admito que estou começando agora nao sei como funciona a entrega dos itens. 3- a versao do meu xampp é 1.6.5, isso gera alguma incompatibidade? Fico no aguardo meu amigo, abraços e agradeço desde ja Edited November 13, 2012 by markim1986 Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386606 Share on other sites More sharing options...
ewertonsilva157 5 Posted November 13, 2012 Report Share Posted November 13, 2012 (edited) Retirado Edited November 14, 2012 by caotic Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386607 Share on other sites More sharing options...
markim1986 2 Posted November 13, 2012 Report Share Posted November 13, 2012 http://tibiaking.com...em-com-escudos/ aconselho a cadastrar lá e ver passo a passo. aqui deu certo. edit: Porfavor, se voce conseguir solucionar seu problema poste aqui. ----- Victor, muito obrigado, deu certo agora consegui mudar o Featured Article. Obrigado mesmo Problema dar war sanado, vlw cara, sabe arrumar os outros problemas? Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386754 Share on other sites More sharing options...
ewertonsilva157 5 Posted November 13, 2012 Report Share Posted November 13, 2012 (edited) REMOVIDO. Edited November 13, 2012 by ewertonsilva157 Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1386833 Share on other sites More sharing options...
RHCP 24 Posted November 14, 2012 Report Share Posted November 14, 2012 Achei um p*ta de um bug... No shop, quando se compra algo, os points nao sao descontados. Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387268 Share on other sites More sharing options...
VictorWEBMaster 369 Posted November 14, 2012 Author Report Share Posted November 14, 2012 Achei um p*ta de um bug... No shop, quando se compra algo, os points nao sao descontados. Incompatibilidade com a versão do php. Instale a ultima versão e veja. Grande victor, de longe seu site é muito top, depois de muito custo consigui instalar, porem fica algumas duvidas.. 1- como faço para que o cadastro do pagseguro fique em minha conta? 2- os items do meu shop nao sao entregues aos playes, nao sei se isso é configuraçao de seu site ow do meu ot, que pra dizer a verdade nenhum site entregou os items para os players, admito que estou começando agora nao sei como funciona a entrega dos itens. 3- a versao do meu xampp é 1.6.5, isso gera alguma incompatibidade? Fico no aguardo meu amigo, abraços e agradeço desde ja #Shop Voce precisa fazer a instalação do sistema de entrega no seu servidor. -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') db.executeQuery("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.executeQuery("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. Por favor faça o local para este item em sua mochila e aguarde '.. SQL_interval ..' segundos para obte-lo.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. O peso do item e '.. full_weight ..' oz., Vc tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de '.. SQL_interval ..' segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Coloque isso no globalevents/scripts Adiciona a seguinte linha no globalevents,xml <globalevent name="shop" interval="10" event="script" value="shop.lua"/> Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387270 Share on other sites More sharing options...
LunnyTrix 0 Posted November 14, 2012 Report Share Posted November 14, 2012 Tem como você colocar a parte "Most powerfull guilds" no site ? e a pagina Guild wars, a onde aparece as guilds em batalha, nao pode ser colocado ? O site é otimo cara, só queria adicionar essas coisinhas msm, ai sim, fica perfeito ^^ vlw Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387413 Share on other sites More sharing options...
caotic 393 Posted November 14, 2012 Report Share Posted November 14, 2012 Você divulgou a concorrência ewertonsilva157 cuidado com este tipo de coisa. Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387471 Share on other sites More sharing options...
markim1986 2 Posted November 14, 2012 Report Share Posted November 14, 2012 rapaz, quase perfeito o sistema de entrega dos itens, o item de fato é realmente entregue, só que fica entregando infinitamente o mesmo item, fiz um test comprando apenas 1 boh, o char com 2 min deve ter umas 10 bohs, hehe, como resolvo isso?, abrigado Erro [14/11/2012 20:08:36] [Error - GlobalEvent Interface] [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:onThink [14/11/2012 20:08:36] Description: [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:56: attempt to call field 'executeQuery' (a nil value) [14/11/2012 20:08:36] stack traceback: [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7> [14/11/2012 20:08:36] [Error - GlobalEvents::think] Couldn't execute event: shop Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387479 Share on other sites More sharing options...
VictorWEBMaster 369 Posted November 15, 2012 Author Report Share Posted November 15, 2012 (edited) Tem como você colocar a parte "Most powerfull guilds" no site ? e a pagina Guild wars, a onde aparece as guilds em batalha, nao pode ser colocado ? O site é otimo cara, só queria adicionar essas coisinhas msm, ai sim, fica perfeito ^^ vlw Este sistema já é integrado na pagina Guilds. Pagina Guild Wars é só voce adicionar o query no phpmyadmin. rapaz, quase perfeito o sistema de entrega dos itens, o item de fato é realmente entregue, só que fica entregando infinitamente o mesmo item, fiz um test comprando apenas 1 boh, o char com 2 min deve ter umas 10 bohs, hehe, como resolvo isso?, abrigado Erro [14/11/2012 20:08:36] [Error - GlobalEvent Interface] [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:onThink [14/11/2012 20:08:36] Description: [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:56: attempt to call field 'executeQuery' (a nil value) [14/11/2012 20:08:36] stack traceback: [14/11/2012 20:08:36] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7> [14/11/2012 20:08:36] [Error - GlobalEvents::think] Couldn't execute event: shop Tenta usar este script -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..'.') db.Query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.Query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. Por favor faça o local para este item em sua mochila e aguarde '.. SQL_interval ..' segundos para obte-lo.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. O peso do item e '.. full_weight ..' oz., Vc tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de '.. SQL_interval ..' segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Edited November 15, 2012 by VictorWebMaster Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387697 Share on other sites More sharing options...
markim1986 2 Posted November 15, 2012 Report Share Posted November 15, 2012 (edited) Opa, rapaz, de antemão agradeço pela ajuda mas ainda sim eu estou tendo problema com o item mandando a cada 10 segundos.... segue abaixo o erro apos colocar o novo script [15/11/2012 00:56:26] [Error - GlobalEvent Interface] [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:onThink [15/11/2012 00:56:26] Description: [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:56: attempt to call field 'Query' (a nil value) [15/11/2012 00:56:26] stack traceback: [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7> [15/11/2012 00:56:26] [Error - GlobalEvents::think] Couldn't execute event: shop Edited November 15, 2012 by markim1986 Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387700 Share on other sites More sharing options...
llLuizll 0 Posted November 15, 2012 Report Share Posted November 15, 2012 (edited) Opa, rapaz, de antemão agradeço pela ajuda mas ainda sim eu estou tendo problema com o item mandando a cada 10 segundos.... segue abaixo o erro apos colocar o novo script [15/11/2012 00:56:26] [Error - GlobalEvent Interface] [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:onThink [15/11/2012 00:56:26] Description: [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:56: attempt to call field 'Query' (a nil value) [15/11/2012 00:56:26] stack traceback: [15/11/2012 00:56:26] data/globalevents/scripts/shop.lua:56: in function <data/globalevents/scripts/shop.lua:7> [15/11/2012 00:56:26] [Error - GlobalEvents::think] Couldn't execute event: shop verifica se o perssonagem que vai receber o iten esta com cap para receber o item, e posta aqui o conteudo do script shop.lua na pasta globalevents/scripts/ do seu ot e confira se em globalevents.xml contem a seguinte linha <globalevent name="shop" interval="30000" script="shop.lua"/> Edited November 15, 2012 by Sdhere Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387724 Share on other sites More sharing options...
markim1986 2 Posted November 15, 2012 Report Share Posted November 15, 2012 <globalevent name="shop" interval="10" event="script" value="shop.lua"/> -- ### CONFIG ### -- message send to player by script "type" (types you can check in "global.lua") SHOP_MSG_TYPE = 19 -- time (in seconds) between connections to SQL database by shop script SQL_interval = 30 -- ### END OF CONFIG ### function onThink(interval, lastExecution) local result_plr = db.getResult("SELECT * FROM z_ots_comunication WHERE `type` = 'login';") if(result_plr:getID() ~= -1) then while(true) do id = tonumber(result_plr:getDataInt("id")) action = tostring(result_plr:getDataString("action")) delete = tonumber(result_plr:getDataInt("delete_it")) cid = getCreatureByName(tostring(result_plr:getDataString("name"))) if isPlayer(cid) == TRUE then local itemtogive_id = tonumber(result_plr:getDataInt("param1")) local itemtogive_count = tonumber(result_plr:getDataInt("param2")) local container_id = tonumber(result_plr:getDataInt("param3")) local container_count = tonumber(result_plr:getDataInt("param4")) local add_item_type = tostring(result_plr:getDataString("param5")) local add_item_name = tostring(result_plr:getDataString("param6")) local received_item = 0 local full_weight = 0 if add_item_type == 'container' then container_weight = getItemWeightById(container_id, 1) if isItemRune(itemtogive_id) == TRUE then items_weight = container_count * getItemWeightById(itemtogive_id, 1) else items_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count) end full_weight = items_weight + container_weight else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) if isItemRune(itemtogive_id) == TRUE then full_weight = getItemWeightById(itemtogive_id, 1) else full_weight = getItemWeightById(itemtogive_id, itemtogive_count) end end local free_cap = getPlayerFreeCap(cid) if full_weight <= free_cap then if add_item_type == 'container' then local new_container = doCreateItemEx(container_id, 1) local iter = 0 while iter ~= container_count do doAddContainerItem(new_container, itemtogive_id, itemtogive_count) iter = iter + 1 end received_item = doPlayerAddItemEx(cid, new_container) else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) received_item = doPlayerAddItemEx(cid, new_item) end if received_item == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received '.. add_item_name ..'.') db.Query("DELETE FROM `z_ots_comunication` WHERE `id` = " .. id .. ";") db.Query("UPDATE `z_shop_history_item` SET `trans_state`='realized', `trans_real`=" .. os.time() .. " WHERE id = " .. id .. ";") else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. Por favor faça o local para este item em sua mochila e aguarde '.. SQL_interval ..' segundos para obte-lo.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << Seu item esta esperando por voce. O peso do item e '.. full_weight ..' oz., Vc tem no momento '.. free_cap ..' oz. de capacidade livre. Coloque alguns itens no deposito e espere cerca de '.. SQL_interval ..' segundos para obte-lo.') end end if not(result_plr:next()) then break end end result_plr:free() end return TRUE end Esse script foi o proprio victor que me passou, o item é realmente entregue mas fica dando um erro no ot, e o item fica enviando infinitamente ao player, segue abaixo o erro do ot. [15/11/2012 11:24:03] [Error - GlobalEvent Interface] [15/11/2012 11:24:03] data/globalevents/scripts/shop.lua:onThink [15/11/2012 11:24:03] Description: [15/11/2012 11:24:03] data/globalevents/scripts/shop.lua:58: attempt to call field 'Query' (a nil value) [15/11/2012 11:24:03] stack traceback: [15/11/2012 11:24:03] data/globalevents/scripts/shop.lua:58: in function <data/globalevents/scripts/shop.lua:9> [15/11/2012 11:24:03] [Error - GlobalEvents::think] Couldn't execute event: shop Link to comment https://xtibia.com/forum/topic/190279-gesior-victorwebmaster-2019v/page/8/#findComment-1387793 Share on other sites More sharing options...
Recommended Posts