Ir para conteúdo

Erro No Npc De Promotion - Ajudem-Me


Mehahbr

Posts Recomendados

Meu npc de promotion bless e addon criado por mim no Otserver 8.5 esta dando erro no servidor 8.6 ...

Na hora de você dizer "yes" pra comprar as coisas ele nao vende e nao fala as frases...

O que pode ser?

 

 

ele é feito assim

 

 

 


local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

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

local node1 = keywordHandler:addKeyword({'promotion'}, 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, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node2 = keywordHandler:addKeyword({'first addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first addons set for 150000 gold coins?'})
node2:addChildKeyword({'yes'}, buyAddons, {npcHandler = npcHandler, cost = 15000000, addon = 1, text = 'Congratulations! You are have a First Addon.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node3 = keywordHandler:addKeyword({'second addon'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Would you like to buy the second addons set for 300000 gold coins?'})
node2:addChildKeyword({'yes'}, buyAddons, {npcHandler = npcHandler, cost = 30000000, addon = 1, text = 'Congratulations! You are a Second Addon.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})

local node4 = keywordHandler:addKeyword({'primeira bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the first blessing for 10000 gold?'})
node1:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 1, premium = true, cost = 10000})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node5 = keywordHandler:addKeyword({'segunda bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the second blessing for 10000 gold?'})
node2:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 2, premium = true, cost = 10000})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node6 = keywordHandler:addKeyword({'terceira bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the third blessing for 10000 gold?'})
node3:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 3, premium = true, cost = 10000})
node3:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node7 = keywordHandler:addKeyword({'quarta bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fourth blessing for 10000 gold?'})
node4:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 4, premium = true, cost = 10000})
node4:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})

local node8 = keywordHandler:addKeyword({'quinta bless'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Do you want to buy the fifth blessing for 10000 gold?'})
node5:addChildKeyword({'yes'}, StdModule.bless, {npcHandler = npcHandler, bless = 5, premium = true, cost = 10000})
node5:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Too expensive, eh?'})



npcHandler:addModule(FocusModule:new())

 

O que esta de errado nele? Obrigado

Link para o comentário
Compartilhar em outros sites

Vou testar no Crystal pra ver.

 

edit

Esse é o erro?

[22/1/2012 19:43:22] data/npc/lib/npcsystem/modules.lua:150: attempt to compare nil with number

[22/1/2012 19:43:22] stack traceback:

[22/1/2012 19:43:22] data/npc/lib/npcsystem/modules.lua:150: in function 'callback'

[22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:41: in function 'processMessage'

[22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:176: in function 'processNodeMessage'

[22/1/2012 19:43:22] data/npc/lib/npcsystem/keywordhandler.lua:128: in function 'processMessage'

[22/1/2012 19:43:22] data/npc/lib/npcsystem/npchandler.lua:426: in function 'onCreatureSay'

[22/1/2012 19:43:22] data/npc/scripts/bless.lua:7: in function <data/npc/scripts/bless.lua:7>

Editado por Tryller
Link para o comentário
Compartilhar em outros sites

Promotion funcionou aqui

Estou vendo agroa os outros 2

Se possivel poderia apstar a pasta npc com apenas o npc denttro e as libs?? para eu testar com susas libs no crystal e ver oq ta acontecendo

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...