dannx
New Member
- Joined
- May 24, 2008
- Messages
- 62
- Reaction score
- 0
Hello everybody, i got this problem with my NPC promotion guy, I get this error
"""""""data/npc/lib/npcsystem/modules.lua:79: in function 'callback'
data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'
data/npc/scripts/Promotion.lua:8: in function <data/npc/scripts
/Promotion.lua:8>"""""""
Here is the npc """""<?xml version="1.0" encoding="UTF-8"?>
<npc name="Orlan" script="data/npc/scripts/Promotion.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="131" head="79" body="79" legs="89" feet="89" addons="3"/>
</npc>"""""
Here is the lua """""local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() 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, 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())""""""
"""""""data/npc/lib/npcsystem/modules.lua:79: in function 'callback'
data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'
data/npc/scripts/Promotion.lua:8: in function <data/npc/scripts
/Promotion.lua:8>"""""""
Here is the npc """""<?xml version="1.0" encoding="UTF-8"?>
<npc name="Orlan" script="data/npc/scripts/Promotion.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="131" head="79" body="79" legs="89" feet="89" addons="3"/>
</npc>"""""
Here is the lua """""local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
-- OTServ event handling functions start
function onCreatureAppear(cid) npcHandlernCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandlernCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandlernCreatureSay(cid, type, msg) end
function onThink() npcHandlernThink() 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, 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())""""""