Postado Fevereiro 24, 2013 12 anos NPC's não vendem blesse ocorre o seguinte erro. [23/2/2013 21:42:0] [Error - NpcScript Interface] [23/2/2013 21:42:0] data/npc/scripts/Eremo.lua:onCreatureSay [23/2/2013 21:42:0] Description: [23/2/2013 21:42:0] data/npc/lib/npcsystem/modules.lua:146: attempt to compare nil with number [23/2/2013 21:42:0] stack traceback: [23/2/2013 21:42:0] data/npc/lib/npcsystem/modules.lua:146: in function 'callback' [23/2/2013 21:42:0] data/npc/lib/npcsystem/keywordhandler.lua:42: in function 'processMessage' [23/2/2013 21:42:0] data/npc/lib/npcsystem/keywordhandler.lua:177: in function 'processNodeMessage' [23/2/2013 21:42:0] data/npc/lib/npcsystem/keywordhandler.lua:129: in function 'processMessage' [23/2/2013 21:42:0] data/npc/lib/npcsystem/npchandler.lua:453: in function 'onCreatureSay' [23/2/2013 21:42:0] data/npc/scripts/Eremo.lua:10: in function <data/npc/scripts/Eremo.lua:10> Troquei o scripts dos NPC's e o erro persiste. Um dos 5 NPC's bless. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) -- OTServ event handling functions start function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end -- OTServ event handling functions end -- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions! local travelNode = keywordHandler:addKeyword({'cormaya'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Should I teleport you back to Pemaret?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=33287, y=31956, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Maybe later.'}) local travelNode = keywordHandler:addKeyword({'back'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Should I teleport you back to Pemaret?'}) travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = false, level = 0, cost = 0, destination = {x=33287, y=31956, z=6} }) travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Maybe later.'}) ------------- local node1 = keywordHandler:addKeyword({'wisdom of solitude'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Here on the Eremo Island you may receive the blessing The Wisdom of Solitude 2000 gold. Are you still interested?'}) node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, number = 1, premium = true, cost = 2000}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Oh. You do not have enough money.'}) npcHandler:addModule(FocusModule:new())
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.