Tudo que gabrielzika postou
-
(Resolvido)PEDIDO ACTION OU MOVEMENTS QUE REMOVE X LEVEL DE PLAYER
@Gnius pequeno vacilo meu, ve se vai agora! local pos = {x = 32345, y = 32222, z = 7} -- Onde sera teleportado local level = 300 -- level necessario function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerLevel(cid) < level then return true end db.executeQuery("UPDATE `players` SET `level` = `level` - 30 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `health` = `health` - 1800 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `health` = `healthmax` - 1800 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `experience` = `experience` - 25650 WHERE `id` = " .. getPlayerGUID(cid) .. ";") doTeleportThing(cid, pos) addEvent(doRemoveCreature, 2000, cid) return true end
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 if wands1 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
-
[PEDIDO] Como Resolver Bug Account Manager Derrubando o Servidor
@hallanehallex Registrou os Efeitos novos na LIB?
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk Ve se assim vai... function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wandid2 = 7736 -- ID da Wand 2 local wandid3 = 7737 -- ID da Wand 3 local wandid4 = 7738 -- ID da Wand 4 local wandid5 = 7739 -- ID da Wand 5 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).uid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).uid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2 local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3 local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4 local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5 if wands1 or wands2 or wands3 or wands4 or wands5 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk testa com essas 5 se funciona... se funcionar me fala! function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 13743 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 13744 ItemPoison = 13745 ItemDeath = 13746 ItemEnergy = 13747 ItemPhysical = 13748 ItemHoly = 13749 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wandid2 = 7736 -- ID da Wand 2 local wandid3 = 7737 -- ID da Wand 3 local wandid4 = 7738 -- ID da Wand 4 local wandid5 = 7739 -- ID da Wand 5 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2 local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3 local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4 local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5 if wands1 or wands2 or wands3 or wands4 or wands5 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
-
(Resolvido)PEDIDO ACTION OU MOVEMENTS QUE REMOVE X LEVEL DE PLAYER
@Gnius ve se funciona local pos = {x = 32345, y = 32222, z = 7}, -- Onde sera teleportado local level = 300 function onStepIn(cid, item, position, fromPosition) if not isPlayer(cid) then return true end if getPlayerLevel(cid) < level then return true end -- level para necessario passar.. db.executeQuery("UPDATE `players` SET `level` = `level` - 30 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `health` = `health` - 1800 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `health` = `healthmax` - 1800 WHERE `id` = " .. getPlayerGUID(cid) .. ";") db.executeQuery("UPDATE `players` SET `experience` = `experience` - 25650 WHERE `id` = " .. getPlayerGUID(cid) .. ";") doTeleportThing(cid, pos) addEvent(doRemoveCreature, 2000, cid) return true end
-
Broadcast ao nascer um Shiny no mapa
@Theodorojose doBroadcastMessage("Nasceu um "..w.." no mapa, temos que pegalo!")
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk Diga
-
(Resolvido)PEDIDO ACTION OU MOVEMENTS QUE REMOVE X LEVEL DE PLAYER
@Gnius Passa os dados que dá pra te ajudar... Quantos de HP o Player ganha por Level?? Quantos de Experience ele Ganha Por Level?? Quantos Leveis você quer remover?
-
(Resolvido)PEDIDO ACTION OU MOVEMENTS QUE REMOVE X LEVEL DE PLAYER
@Gnius Remover apenas Level vai cagar Tudo os Chars dos caras....
-
(Resolvido)(PEDIDO) Adicionar tempo para usar o item novamente
@Andreeyyy time = 24 aqui??
-
Broadcast ao nascer um Shiny no mapa
@Theodorojose Ve se Funciona! local shinys = { "Venusaur", "Blastoise", "Butterfree", "Beedrill", "Pidgeot", "Rattata", "Raticate", "Raichu", "Golbat", "Paras", "Parasect", "Magmar", "Typhlosion", "Xatu", "Growlithe", "Arcanine", "Tentacruel", "Farfetch'd", "Gengar", "Krabby", "Tauros", "Kingler", "Cubone", "Horsea", "Seadra", "Weezing", "Scyther", "Pinsir", "Crobat", "Zubat", "Tentacool", "Feraligatr", "Machamp", "Meganium", "Alakazam", "Tangela", "Ampharos", "Electabuzz", "Jynx", "Charizard", "Voltorb", "Electrode"} local raros = {"Dragonair", "Dratini", "Giant Magikarp", "Gyarados", "Magmortar", "Electivire", "Salamence", "Mantine"} local specialSummon = { chance = 0.5, --Chance, em porcentagem, do pokémon especial nascer. pokes = { {"Shiny Alakazam", "Shiny Arcanine", "Shiny Ampharos", "Shiny Ariados", "Shiny Blastoise", "Shiny Charizard", "Shiny Venusaur", "Shiny Crobat", "Shiny Cubone", "Shiny Marowak", "Shiny Zubat", "Shiny Golbat", "Shiny Salamence", "Shiny Gyarados", "Shiny Tentacruel", "Shiny Raichu", "Shiny Dratini", "Shiny Dragonair", "Shiny Feraligatr", "Shiny Grimer", "Shiny Muk", "Shiny Jynx", "Shiny Machamp", "Shiny Magcargo", "Shiny Magmar", "Shiny Ninetales", "Shiny Tangela", "Shiny Electrode"}, --Pokémons que podem ser summonados. {"Ancient Alakazam", "Ancient Dragonite", "Ancient Meganium", "Ancient Onix", "Ancient Scyther", "Ancient Snorlax", "Aviator Pidgeot", "Banshee Misdreavus", "Bone Marowak", "Boxer Hitmonchan", "Brave Blastoise", "Brave Charizard", "Brave Nidoking", "Brave Nidoqueen", "Brave Noctwol", "Brave Venusaur", "Brute Farfetch'd", "Brute Rhydon", "Brute Ursaring", "Capoeira Hitmontop", "Charged Raichu", "Dark Crobat", "Dragon Machamp", "Elder Arcanine", "Elder Blastoise", "Elder Charizard", "Elder Electabuzz", "Elder Gengar", "Elder Jynx", "Elder Marowak", "Elder Muk", "Elder Pidgeot", "Elder Pinsir", "Elder Tangela", "Elder Raichu", "Elder Tentacruel", "Elder Tyranitar", "Enigmatic Girafarig", "Enraged Typhlosion", "Evil Cloyster", "Freezing Dewgong", "Furios Ampharos", "Furios Mantine", "Furios Murkrow", "Furious Sandslash", "Furious Scyther", "Gordo Snorlax", "Hard Golem", "Heavy Piloswine", "Iron Steelix", "Lava Magmar", "Iron Steelix", "Milch-Miltank", "Milch-Miltank", "Roll Donphan", "Tribal Feraligatr", "Tribal Xatu", "War Heracross", "Ancient Kingdra", "Hard Rhydon"}, --Pokémons que, quando spawnados, há chance de summonar um dos pokémons acima. }, } local function ShinyName(cid) if isCreature(cid) then if string.find(tostring(getCreatureName(cid)), "Shiny") then local newName = tostring(getCreatureName(cid)):match("Shiny (.*)") doCreatureSetNick(cid, newName) if isMonster(cid) then doSetCreatureDropLoot(cid, false) end end end end local function doSetRandomGender(cid) if not isCreature(cid) then return true end if isSummon(cid) then return true end local gender = 0 local name = getCreatureName(cid) if not newpokedex[name] then return true end local rate = newpokedex[name].gender if rate == 0 then gender = 3 elseif rate == 500 then gender = 4 elseif rate == -1 then gender = 0 elseif math.random(1, 500) <= rate then gender = 4 else gender = 3 end doCreatureSetSkullType(cid, gender) end local function doShiny(cid) if isCreature(cid) then if isSummon(cid) then return true end if getPlayerStorageValue(cid, 74469) >= 1 then return true end if getPlayerStorageValue(cid, 22546) >= 1 then return true end if isNpcSummon(cid) then return true end if getPlayerStorageValue(cid, 637500) >= 1 then return true end --alterado v1.9 if isInArray(shinys, getCreatureName(cid)) then --alterado v1.9 \/ chance = 1.0 --1% chance elseif isInArray(raros, getCreatureName(cid)) then --n coloquem valores menores que 0.1 !! chance = 0.5 --1% chance else return true end if math.random(1, 500) <= chance*10 then doSendMagicEffect(getThingPos(cid), 18) local name, pos = "Shiny ".. getCreatureName(cid), getThingPos(cid) doRemoveCreature(cid) doBroadcastMessage("Nasceu um "..name.." no mapa, temos que pegalo!") local shi = doCreateMonster(name, pos, false) setPlayerStorageValue(shi, 74469, 1) else setPlayerStorageValue(cid, 74469, 1) end --/\ else return true end end function onSpawn(cid) registerCreatureEvent(cid, "Experience") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "DirectionSystem") registerCreatureEvent(cid, "CastSystem") if isSummon(cid) then registerCreatureEvent(cid, "SummonDeath") return true end addEvent(function() if isCreature(cid) then if isInArray(specialSummon.pokes[2], getCreatureName(cid)) then if math.random(1, 100) <= specialSummon.chance then local position = getThingPos(cid) doRemoveCreature(cid) local w = specialSummon.pokes[1][math.random(#specialSummon.pokes[1])] doCreateMonster(w, position) doBroadcastMessage("Nasceu um "..w.." no mapa, temos que pegalo!") end end end end, 15) addEvent(doShiny, 10, cid) addEvent(ShinyName, 15, cid) addEvent(adjustWildPoke, 5, cid) return true end
-
Onde fica o script que usa as abilidades do poke f1,f2,f3
@Mbbred talkactions/scripts/move1.lua??
-
Ajuda no script
@Ckfox caso ele queira por mais de uma, olha o script dele!
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk <action itemid="12601;12602;12367;12383;12429;13748;12599" event="script" value="elementwand.lua" blockwalls="1"/> function onUse(cid, item, fromPos, itemEx, toPos) ItemFire = 12601 -- ID dos Itens que precisa pra cada efeito... by: garden ItemIce = 12429 ItemPoison = 12599 ItemDeath = 12367 ItemEnergy = 12383 ItemPhysical = 13748 ItemHoly = 12602 local types = { [ItemFire] = {effect = 1, name = "fire"}, -- [ItemID] = {effect = Numero do Efeito, name = Nome do Efeito} [ItemIce] = {effect = 2, name = "ice"}, [ItemPoison] = {effect = 3, name = "poison"}, [ItemDeath] = {effect = 4, name = "death"}, [ItemEnergy] = {effect = 5, name = "energy"}, [ItemPhysical] = {effect = 6, name = "energy"}, [ItemHoly] = {effect = 7, name = "holy"} } local wandid1 = 7735 -- ID da Wand 1 local wandid2 = 12671 -- ID da Wand 2 local wandid3 = 12672 -- ID da Wand 3 local wandid4 = 12673 -- ID da Wand 4 local wandid5 = 12674 -- ID da Wand 5 local wandid6 = 12675 -- ID da Wand 6 local wandid7 = 12676 -- ID da Wand 7 local wandid8 = 12677 -- ID da Wand 8 local wandid9 = 12678 -- ID da Wand 9 local wandid10 = 12679 -- ID da Wand 10 local wand_left = getPlayerSlotItem(cid, CONST_SLOT_LEFT).itemid local wand_right = getPlayerSlotItem(cid, CONST_SLOT_RIGHT).itemid local wands1 = wand_left ~= wandid1 and wand_right ~= wandid1 local wands2 = wand_left ~= wandid2 and wand_right ~= wandid2 local wands3 = wand_left ~= wandid3 and wand_right ~= wandid3 local wands4 = wand_left ~= wandid4 and wand_right ~= wandid4 local wands5 = wand_left ~= wandid5 and wand_right ~= wandid5 local wands6 = wand_left ~= wandid6 and wand_right ~= wandid6 local wands7 = wand_left ~= wandid7 and wand_right ~= wandid7 local wands8 = wand_left ~= wandid8 and wand_right ~= wandid8 local wands9 = wand_left ~= wandid9 and wand_right ~= wandid9 local wands10 = wand_left ~= wandid10 and wand_right ~= wandid10 if wands1 or wands2 or wands3 or wands4 or wands5 or wands6 or wands7 or wands8 or wands9 or wands10 then doPlayerSendCancel(cid, "Voce deve estar com a wand equipada para usar este efeito.") return true end status = getPlayerStorageValue(cid, 4561) if status == types[item.itemid].effect then doPlayerSendTextMessage(cid, 27, "Desculpe, mais você já está usando o efeito ".. types[item.itemid].name .. ".") return true end setPlayerStorageValue(cid, 4561, types[item.itemid].effect) doPlayerSendTextMessage(cid, 27 , "Você mudou o elemento da wand para ".. types[item.itemid].name .. ".") doRemoveItem(item.uid, 1) return true end
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk manda a id de todas as wands q você quer usar ai e os ids de todos os itens que dão efeitos... id do item mais o nome do efeito q ele dá na frente...
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk mais fácil, me manda todas alterações que você fez... xml e o arquivo lua
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk me manda a tag que vc colocou no arquivo .xml
-
(Resolvido)GlobalSave 0.3.6 8.54 Error
@Brunds verifique se você deu permissão para o arquivo! Para dar permissão. cd /otserv/data/globalvents/scripts chmod 777 -R globalsave ou pelo próprio WinSCP ou algo do tipo caso nem com permissão e nem do jeito que o amigo ai encima disse funcione. Tente esse. local timetoss = 5 --minutes function onTimer () return prepareShutdown(math.abs(math.ceil(timetoss))) end function prepareShutdown(minutes) if(minutes <= 0) then addEvent(close, 1*1000) addEvent(global, 10*1000) return false end if(minutes == 1) then doBroadcastMessage("Server is going down in " .. minutes .. " minute, please log out now!") elseif(minutes <= 3) then doBroadcastMessage("Server is going down in " .. minutes .. " minutes, please log out.") else doBroadcastMessage("Server is going down in " .. minutes .. " minutes.") end shutdownEvent = addEvent(prepareShutdown, 60000, minutes - 1) return true end function close() doSetGameState(GAMESTATE_CLOSED) end function global() doSetGameState(GAMESTATE_SHUTDOWN) end
-
(Resolvido)Mudar Elemento dá Wand por Item
@Gabrielk vc tem que estar com a wand equipada
-
(Resolvido)GlobalSave 0.3.6 8.54 Error
@Brunds qual script vc tá usando pro globalsave?
-
[PEDIDO] Baú Que de Pokemon Aleatorio
local t = { newpos = {x = 1034, y = 1035, z = 7}, effect = CONST_ME_TELEPORT, btype = "legendary", level = 800, } local pokes_name = {"Moltres", "Articuno", "Zapdos"} -- pokes storage = 243244 -- storage function onUse(cid, item, frompos, item2, topos) if pokemon == "" then return true end if getPlayerStorageValue(cid, storage) <= 0 then if getPlayerLevel(cid) < t.level then return doPlayerSendCancel(cid, "O level mínimo requerido é "..t.level.." .") end doTeleportThing(cid, t.newpos) doSendMagicEffect(t.newpos, t.effect) local gain = math.random (1,#pokes_name) addPokeToPlayer(cid, pokes_name[gain], 0, nil, t.btype) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Voce terminou a Quest Treis Aves Lendaras e Ganhou um "..pokes_name[gain].."!!") doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) doPlayerAddItem(cid, 2159, 3) setPlayerStorageValue(cid, storage, 1) else doPlayerSendCancel(cid, "Você já pegou seu Pokémon") end return TRUE end @hallanehallex veja se funciona, não testei
-
[Help Cliente OLD] Problema ao trocar Ip client 7.72
@joaopedrodepaiva agora é só baixar, abrir pelo notepad++ e substituir o 11.111.111.11 pelo seu IP obs: clique em substituir todos! tibia.exe
-
[Help Cliente OLD] Problema ao trocar Ip client 7.72
@joaopedrodepaiva mais facil vc dizer quantos digitos tem o ip exemplo: 111111.11111.1111.111.1
-
(Resolvido)ERRO NA HORA DE COMPRAR ITEM NO SHOP!
@Wesley Alexandre2014 veja se o meu Shop funciona com Você! shop.lua 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, "You have received >> "..productn.." << from Shop.") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space on container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have a container to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..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, "You have received >> "..productn.." << from Shop.") db.executeQuery("UPDATE `shop_history` SET `processed`='1' WHERE id = " .. tid .. ";") else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough space to receive >> "..productn.." <<") end else doPlayerSendTextMessage(cid,19, "Sorry, you don't have enough capacity to receive >> "..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 xml <globalevent name="shop" interval="30" script="shop.lua"/>