• 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!

Need help with promoter

Piterro

New Member
Joined
Mar 25, 2008
Messages
93
Reaction score
0
Hello.

So , when i say to npc who should sell promotion like :

X: promotion
Orlan: I can see that you are ready to get promoted, I will take a fee of 20.000 gold coins aswell, are you absolutely sure?
X: yes
X: no
Orlan: Alright then. Come back when you are ready.



In console



[02/04/2009 16:59:37] Lua Script Error: [Npc interface]
[02/04/2009 16:59:37] data/npc/scripts/Promotion.lua:eek:nCreatureSay

[02/04/2009 16:59:37] data/npc/lib/npcsystem/modules.lua:88: attempt to compare nil with number
[02/04/2009 16:59:37] stack traceback:
[02/04/2009 16:59:37] data/npc/lib/npcsystem/modules.lua:88: in function 'callback'
[02/04/2009 16:59:37] data/npc/lib/npcsystem/keywordhandler.lua:40: in function 'processMessage'
[02/04/2009 16:59:37] data/npc/lib/npcsystem/keywordhandler.lua:168: in function 'processNodeMessage'
[02/04/2009 16:59:37] data/npc/lib/npcsystem/keywordhandler.lua:122: in function 'processMessage'
[02/04/2009 16:59:37] data/npc/lib/npcsystem/npchandler.lua:371: in function 'onCreatureSay'
[02/04/2009 16:59:37] data/npc/scripts/Promotion.lua:7: in function <data/npc/scripts/Promotion.lua:7>

Promotion.lua
Code:
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({'promot', 'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can see that you are ready to get promoted, I will take a fee of 20.000 gold coins aswell, are you absolutely sure?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, text = 'You are now promoted.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then. Come back when you are ready.', reset = true})

npcHandler:addModule(FocusModule:new())

Orlan.xml

Code:
<?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>


What should i do ? Waiting for help .
 
Back
Top