Postado Agosto 15, 2015 9 anos Galera, Meu shopguild ele não envia o item, fica no shop_guild_history status WAIT, mas não envia. Alguem poderia ajudar?
Postado Agosto 15, 2015 9 anos Aparece algum erro na distro? O personagem pelo qual você está enviando o item, tem o nick grande? As vezes o shop da problema por causa disso também.
Postado Agosto 15, 2015 9 anos Apenas faça isso em seu ot, na psta globalevents abra globalevents.xml e adicione uma tagzinha:<globalevent name="shop" interval="30" script="shop.lua"/>e nas pasta scripts, crie um arquivo chamado shop.lua e add isso dentro: -- ### 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) thenwhile(true) doid = 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 thenlocal 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 = 0local full_weight = 0if add_item_type == 'container' thencontainer_weight = getItemWeightById(container_id, 1)if isItemRune(itemtogive_id) == TRUE thenitems_weight = container_count * getItemWeightById(itemtogive_id, 1)elseitems_weight = container_count * getItemWeightById(itemtogive_id, itemtogive_count)endfull_weight = items_weight + container_weightelsefull_weight = getItemWeightById(itemtogive_id, itemtogive_count)if isItemRune(itemtogive_id) == TRUE thenfull_weight = getItemWeightById(itemtogive_id, 1)elsefull_weight = getItemWeightById(itemtogive_id, itemtogive_count)endendlocal free_cap = getPlayerFreeCap(cid)if full_weight <= free_cap thenif add_item_type == 'container' thenlocal new_container = doCreateItemEx(container_id, 1)local iter = 0while iter ~= container_count dodoAddContainerItem(new_container, itemtogive_id, itemtogive_count)iter = iter + 1endreceived_item = doPlayerAddItemEx(cid, new_container)elselocal new_item = doCreateItemEx(itemtogive_id, itemtogive_count)received_item = doPlayerAddItemEx(cid, new_item)endif received_item == RETURNVALUE_NOERROR thendoPlayerSendTextMessage(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 .. ";")elsedoPlayerSendTextMessage(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.')endelsedoPlayerSendTextMessage(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.')endendif not(result_plr:next()) thenbreakendendresult_plr:free()endreturn TRUEend MELHOR SERVIÇO DE HOST " CLICK AQUi o melhor site de download; click aqui
Postado Agosto 15, 2015 9 anos Desculpa não entendi o que quis dizer com isso. Repetindo, aparece algum erro na sua distro?
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.