Ir para conteúdo

Posts Recomendados

Alguém poderia me ajudar ou tem um script de promotion pra versão 8.40 o meu está dando erro .

 

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

 

local node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'})

node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, promotions = {[1] = 5, [2] = 6, [3] = 7, [4] = 8}, cost = 20000, level = 20, text = 'Congratulations! You are now promoted.'})

node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Allright then. Come back when you are ready.', reset = true})

 

 

npcHandler:addModule(FocusModule:new())

 

Da o seguinte erro no console

 

[01/03/2009 10:52:09] Lua Script Error: [Npc interface]

[01/03/2009 10:52:09] data\npc\scripts\King Tibianus.lua:onCreatureSay

 

[01/03/2009 10:52:09] data/npc/lib/npcsystem/modules.lua:80: attempt to compare nil with number

[01/03/2009 10:52:09] stack traceback:

[01/03/2009 10:52:09] data/npc/lib/npcsystem/modules.lua:80: in function 'callback'

[01/03/2009 10:52:09] data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'

[01/03/2009 10:52:09] data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'

[01/03/2009 10:52:09] data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'

[01/03/2009 10:52:09] data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'

[01/03/2009 10:52:09] data\npc\scripts\King Tibianus.lua:10: in function <data\npc\scripts\King Tibianus.lua:10>

 

 

Desde já obrigado.

Link para o comentário
https://xtibia.com/forum/topic/108707-promotion-error/
Compartilhar em outros sites

Visitante
Este tópico está impedido de receber novos posts.
×
×
  • Criar Novo...