Postado Outubro 12, 2015 9 anos Fala galera do TK. Então venho mais uma vez aqui pedir a ajuda de voces... Meu site nao está enviando os itens do shop, qnd é comprado no site... Porem não da erro na distro nada, apenas não envia! Gostaria que alguem me ajuda-se urgente nisso! Obrigado!Editado: A, tipo o change name... dias vips essas coisas funciona normal... só o envio de itens msm que n envia! Editado Outubro 12, 2015 9 anos por gutalo (veja o histórico de edições)
Postado Outubro 12, 2015 9 anos Poste aqui o seu globalevents.xml e o arquivo shop.lua do globalevents Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Outubro 12, 2015 9 anos Autor Poste aqui o seu globalevents.xml e o arquivo shop.lua do globalevents <?xml version="1.0" encoding="UTF-8"?><globalevents><globalevent name="save" interval="400000" event="script" value="save.lua"/> <globalevent name="clean" interval="700000" event="script" value="clean.lua"/> <globalevent name="shop" interval="1" event="script" value="shop.lua"/> <globalevent name="GlobalBattle" interval="60000" event="script" value="BattleGlobalEvents.lua"/> <globalevent name="lottery" interval="3600000" event="script" value="lottery.lua"/> <globalevent name="Teleports" interval="2500" script="info.lua" /> <globalevent name="ggn" time="15:00" event="script" value="ggn.lua"/> <globalevent name="invasion" interval="60" event="script" value="invasion.lua"/> <globalevent name="bloodstart" type="start" event="script" value="BloodGlobalStart.lua"/> <globalevent name="serverstart" type="start" event="script" value="start.lua"/> <globalevent name="playersrecord" type="record" event="script" value="record.lua"/> <globalevent name="CTFStart" type="start" event="script" value="CTFMax.lua"/><globalevent name="ZombieGlobalStartup" type="start" event="script" value="zombie/onstartup.lua"/> <globalevent name="AutoBroadcast" interval="200" script="autobradcast.lua"/> <globalevent name="Mensagem" interval="700000" script="mensagem.lua"/><globalevent name="GlobalBattle" interval="1000" event="script" value="BattleGlobalEvents.lua"/><globalevent name="Gran Tower" interval="60" event="script" value="Gran Tower.lua"/><globalevent name="Teleport Automatico" time="19:00" event="script" value="teleportautomatico.lua"/></globalevents>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 scriptSQL_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 doPlayerAddItemEx(cid, new_container) received_item = true else local new_item = doCreateItemEx(itemtogive_id, itemtogive_count) doPlayerAddItemEx(cid, new_item) received_item = true end if received_item then doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, 'You received >> '.. add_item_name ..' << from OTS shop.') 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 ..' << from OTS shop is waiting for you. Please make place for this item in your backpack/hands and wait about '.. SQL_interval ..' seconds to get it.') end else doPlayerSendTextMessage(cid, SHOP_MSG_TYPE, '>> '.. add_item_name ..' << from OTS shop is waiting for you. It weight is '.. full_weight ..' oz., you have only '.. free_cap ..' oz. free capacity. Put some items in depot and wait about '.. SQL_interval ..' seconds to get it.') end end if not result_plr:next() then break end end result_plr:free() end return trueend
Postado Outubro 12, 2015 9 anos Troque no XML por:<globalevent name="shop" interval="60" event="script" value="shop.lua"/>De reload e teste. Entenda tudo sobre VPS, DEDICADOS & HOSPEDAGENS. => Clique aqui Global Full Download 10.9x - TFS 1.2/FERUMBRAS/KRAILOS. => Clique aqui Muitos querem aquilo que você tem, mas vão desistir quando souberem o preço que você pagou. lu.lukinha [email protected]
Postado Outubro 12, 2015 9 anos Autor Troque no XML por:<globalevent name="shop" interval="60" event="script" value="shop.lua"/>De reload e teste. Vou testar e ja posto se deu certo!
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.