• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Promotion guy "crying damson"

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) npcHandler:eek:nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end
function onThink() npcHandler:eek:nThink() 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())""""""
 
I'm having the same problem, I tried the post above but no luck...
When I changed the promotion.lua and a player wanted to promote he had no vocation and I had the following error:

[19/02/2009 00:40:21] Warning: [Vocations::getVocation] Vocation 4294967295 not found.

Hope someone can help to find a solution...
 
Back
Top