Postado Junho 11, 2015 10 anos Estou com um erro na their master's voice quest, após o player limpar todo o chão o aviso aparece só que na hora de sumonar os bixos aparece esse erro: Lua Script Error: [Action Interface] data/actions/scripts/their master's voice quest/slimeGobbler.lua:onUse luaAddEvent(). callback parameter should be a function. stack traceback: [C]: in function 'addEvent' ...ions/scripts/their master's voice quest/slimeGobbler.lua:59: in function <...ions/scripts/their master's voice quest/slimeGobbler.lua:50> alguem sabe o erro? segue abaixo a script completa , lembrando que uso tfs 1.0 local pos = { {x = 33313, y = 31852, z = 9}, {x = 33313, y = 31865, z = 9}, {x = 33313, y = 31881, z = 9}, {x = 33328, y = 31860, z = 9}, {x = 33328, y = 31873, z = 9}, {x = 33328, y = 31885, z = 9}, {x = 33308, y = 31873, z = 9}, {x = 33320, y = 31873, z = 9}, {x = 33335, y = 31873, z = 9}, {x = 33360, y = 31873, z = 9}, {x = 33336, y = 31914, z = 9}, {x = 33343, y = 31914, z = 9}, {x = 33353, y = 31914, z = 9}, {x = 33361, y = 31914, z = 9}, {x = 33345, y = 31900, z = 9}, {x = 33352, y = 31900, z = 9}, {x = 33355, y = 31854, z = 9}, {x = 33355, y = 31861, z = 9}, {x = 33355, y = 31885, z = 9}, {x = 33345, y = 31864, z = 9}, {x = 33345, y = 31881, z = 9}, {x = 33309, y = 31867, z = 9}, {x = 33317, y = 31879, z = 9}, {x = 33311, y = 31854, z = 9}, {x = 33334, y = 31889, z = 9}, {x = 33340, y = 31890, z = 9}, {x = 33347, y = 31889, z = 9}, } local creatures = { "iron servant", "golden servant", "diamond servant" } local function getFungusInArea(fromPos, toPos) for x = fromPos.x, toPos.x do for y = fromPos.y, toPos.y do for i = 13585, 13589 do if(getTileItemById({x = x, y = y, z = 9}, i).uid > 1) then return true end end end end return false end function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 13601) then if(isInArray({13585, 13586, 13587, 13588, 13589}, itemEx.itemid)) then if(getPlayerStorageValue(cid, 984) + 1 --[[* 1000]] < os.time()) then doTransformItem(itemEx.uid, 13590, 1) setPlayerStorageValue(cid, 984, os.time()) doSendMagicEffect(toPosition, CONST_ME_POFF) if(getFungusInArea({x = 33306, y = 31847}, {x = 33369, y = 31919}) == false) then for i = 1, #pos do addEvent(doSummonCrature, 5 * 1000, creatures[math.random(1, 3)], pos) addEvent(doSendMagicEffect, 5 * 1000, pos, CONST_ME_TELEPORT) end doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_RED) doCreatureSay(cid, "COME! My servants! RISE!", TALKTYPE_ORANGE_1) setGlobalStorageValue(985, 0) setGlobalStorageValue(984, 0) else doCreatureSay(cid, "The slime gobbler gobbles large chunks of the slime fungus with great satisfaction.", TALKTYPE_ORANGE_1) doPlayerAddExp(cid, 20, true, true) end end end end return true end
Postado Junho 11, 2015 10 anos oi local pos = { {x = 33313, y = 31852, z = 9}, {x = 33313, y = 31865, z = 9}, {x = 33313, y = 31881, z = 9}, {x = 33328, y = 31860, z = 9}, {x = 33328, y = 31873, z = 9}, {x = 33328, y = 31885, z = 9}, {x = 33308, y = 31873, z = 9}, {x = 33320, y = 31873, z = 9}, {x = 33335, y = 31873, z = 9}, {x = 33360, y = 31873, z = 9}, {x = 33336, y = 31914, z = 9}, {x = 33343, y = 31914, z = 9}, {x = 33353, y = 31914, z = 9}, {x = 33361, y = 31914, z = 9}, {x = 33345, y = 31900, z = 9}, {x = 33352, y = 31900, z = 9}, {x = 33355, y = 31854, z = 9}, {x = 33355, y = 31861, z = 9}, {x = 33355, y = 31885, z = 9}, {x = 33345, y = 31864, z = 9}, {x = 33345, y = 31881, z = 9}, {x = 33309, y = 31867, z = 9}, {x = 33317, y = 31879, z = 9}, {x = 33311, y = 31854, z = 9}, {x = 33334, y = 31889, z = 9}, {x = 33340, y = 31890, z = 9}, {x = 33347, y = 31889, z = 9}, } local creatures = { "iron servant", "golden servant", "diamond servant" } local function getFungusInArea(fromPos, toPos) for x = fromPos.x, toPos.x do for y = fromPos.y, toPos.y do for i = 13585, 13589 do if(getTileItemById({x = x, y = y, z = 9}, i).uid > 1) then return true end end end end return false end function onUse(cid, item, fromPosition, itemEx, toPosition) if(item.itemid == 13601) then if(isInArray({13585, 13586, 13587, 13588, 13589}, itemEx.itemid)) then if(getPlayerStorageValue(cid, 984) + 1 --[[* 1000]] < os.time()) then doTransformItem(itemEx.uid, 13590, 1) setPlayerStorageValue(cid, 984, os.time()) doSendMagicEffect(toPosition, CONST_ME_POFF) if(getFungusInArea({x = 33306, y = 31847}, {x = 33369, y = 31919}) == false) then for i = 1, #pos do addEvent(doSummonCreature, 5 * 1000, creatures[math.random(1, 3)], pos[i]) addEvent(doSendMagicEffect, 5 * 1000, pos[i], CONST_ME_TELEPORT) end doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREWORK_RED) doCreatureSay(cid, "COME! My servants! RISE!", TALKTYPE_ORANGE_1) setGlobalStorageValue(985, 0) setGlobalStorageValue(984, 0) else doCreatureSay(cid, "The slime gobbler gobbles large chunks of the slime fungus with great satisfaction.", TALKTYPE_ORANGE_1) doPlayerAddExp(cid, 20, true, true) end end end end return true end
Postado Junho 11, 2015 10 anos Autor kkk eu vi meu erro era no add event, summoncreature, tava assim summoncratura, bom sumonou os bixos normalmente n deu nenhum erro , so que quando se mata 1x o respaw ele para, e n da erro, era pra dar mais respaw e dps sumonar o boss mad mage...
Postado Junho 12, 2015 10 anos O tópico foi movido para a área correta, preste mais atenção da próxima vez!Leia as regras do fórum: http://tibiaking.com/forum/topic/1281-regras-gerais/?p=7680 Este tópico foi movido:De: "OTServ → Scripting → Geral"Para: "OTServ → Suporte OTServ → Suporte de Scripts" ➥ Regras | Seções OTServ | Seções BOT
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.