Postado Novembro 17, 2014 10 anos Ola hoje eu vim traser uma script que eu acho necessario por que tem muita jente falando que da erro.A script é do shop do seu website, exemplo vc compra um item no seu website e pra chegar nas accont tudo normal acho que vai precisar dessa script 8.54 tem muita jente falando que os items não para de chagar outras dão erro e hoje eu vo traser a do meu serve versão 8.54. 1° vai em data\globalevents e abra o arquivo globalevents.xml e cole essa tag: Mostrar conteúdo oculto <globalevent name="shopModernAcc" interval="30" event="script" value="shop.lua"/> 2° vai na pasta data\globalevents\scripts crie um arquivo chamado shop.lua e cole isso dentro: Mostrar conteúdo oculto function onThink(interval, lastExecution, thinkInterval) local result = db.getResult("SELECT * FROM shop_history WHERE `processed` = 0;") if(result:getID() ~= -1) then while(true) do cid = getCreatureByName(tostring(result:getDataString("player"))) product = tonumber(result:getDataInt("product")) itemr = db.getResult("SELECT * FROM shop_offer WHERE `id` = "..product..";") if isPlayer(cid) then local id = tonumber(itemr:getDataInt("item")) local tid = tonumber(result:getDataInt("id")) local count = tonumber(itemr:getDataInt("count")) local tipe = tonumber(itemr:getDataInt("type")) local productn = tostring(itemr:getDataString("name")) if isInArray({5,8},tipe) then if getPlayerFreeCap(cid) >= getItemWeightById(id, count) then if isContainer(getPlayerSlotItem(cid, 3).uid) then received = doAddContainerItem(getPlayerSlotItem(cid, 3).uid, id,count) if received then doPlayerSendTextMessage(cid,19, "Você recebeu >> "..productn.." << da nossa loja") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpe, você não tem espaço suficiente no recipiente para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpe, você não tem um recipiente para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpe, você não tem capacidade suficiente para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end elseif isInArray({6,7},tipe) then if tipe == 6 then bcap = 8 bid = 1987 elseif tipe == 7 then bcap = 20 bid = 1988 end if isItemRune(id) then count = 1 end if getPlayerFreeCap(cid) >= (getItemWeightById(1987, 1) + getItemWeightById(id,count * bcap)) then local bag = doCreateItemEx(bid, 1) for i = 1,bcap do doAddContainerItem(bag, id, count) end received = doPlayerAddItemEx(getPlayerSlotItem(cid, 3).uid, bag) if received == RETURNVALUE_NOERROR then doPlayerSendTextMessage(cid,19, "Você recebeu >> "..productn.." << da nossa loja") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Desculpe, você não tem espaço suficiente para receber >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Desculpe, você não tem capacidade suficiente para receber >> "..productn.." << (You need: "..getItemWeightById(id, count).." Capacity)") end end end itemr:free() if not(result:next()) then break end end result:free() end return true end Essa script veio no seu serve por tanto não sei de quem é os creditos intão fica sem creditos kk. Ajudei Rep+ Editado Novembro 17, 2014 10 anos por avalax (veja o histórico de edições)
Postado Novembro 17, 2014 10 anos Você esqueceu de colocar o código pra adicionar no SQL do Phpmyadmin, pros itens chegar. tá ai: Citar CREATE TABLE IF NOT EXISTS `z_ots_comunication` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, `type` varchar(255) NOT NULL, `action` varchar(255) NOT NULL, `param1` varchar(255) NOT NULL, `param2` varchar(255) NOT NULL, `param3` varchar(255) NOT NULL, `param4` varchar(255) NOT NULL, `param5` varchar(255) NOT NULL, `param6` varchar(255) NOT NULL, `param7` varchar(255) NOT NULL, `delete_it` int(2) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; Editado Novembro 17, 2014 10 anos por Dieguiin XP (veja o histórico de edições)
Postado Novembro 17, 2014 10 anos Autor desculpe kk é que eu uso essa ai Editado Novembro 20, 2014 10 anos por avalax (veja o histórico de edições)
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.