When i go to the King and ask for a promotion. Everything goes as it should be. i pay the money and he says i am promoted. and if i ask again he tells me i am already promoted.
But now to the problem. It doesnt changes from knight to elite knight.
What could be wrong?
Dunno how to post a code so i post everything in here instead. Sorry about that.
King:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="King Tibianus" script="data/npc/scripts/Sell/promotion.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="332" head="21" body="87" legs="107" feet="95" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hi there, how's it hanging, |PLAYERNAME|!"/>
<parameter key="message_farewell" value="Good bye, |PLAYERNAME|!"/>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="hail king;job;promotn;" />
<parameter key="keyword_reply1" value="I greet thee, my loyal subject |PLAYERNAME|." />
<parameter key="keyword_reply2" value="I am your sovereign, King Tibianus III, and it's my duty to provide justice and guidance for my subjects." />
<parameter key="keyword_reply3" value="Do you want to be promoted in your vocation for 20000 gold?" />
<parameter key="module_shop" value="1"/>
<parameter key="shop_sellable" value="" />
<parameter key="shop_buyable" value="" />
</parameters>
</npc>
promotion.lua
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler
nCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler
nCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler
nCreatureSay(cid, type, msg) end
function onThink() npcHandler
nThink() end
local node1 = keywordHandler:addKeyword({'promote'}, 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})
npcHandler:addModule(FocusModule:new())
using real server. 8.6 client.
Any ideas? :/
But now to the problem. It doesnt changes from knight to elite knight.
What could be wrong?
Dunno how to post a code so i post everything in here instead. Sorry about that.
King:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="King Tibianus" script="data/npc/scripts/Sell/promotion.lua" walkinterval="2000" floorchange="0">
<health now="100" max="100"/>
<look type="332" head="21" body="87" legs="107" feet="95" addons="0"/>
<parameters>
<parameter key="message_greet" value="Hi there, how's it hanging, |PLAYERNAME|!"/>
<parameter key="message_farewell" value="Good bye, |PLAYERNAME|!"/>
<parameter key="module_keywords" value="1" />
<parameter key="keywords" value="hail king;job;promotn;" />
<parameter key="keyword_reply1" value="I greet thee, my loyal subject |PLAYERNAME|." />
<parameter key="keyword_reply2" value="I am your sovereign, King Tibianus III, and it's my duty to provide justice and guidance for my subjects." />
<parameter key="keyword_reply3" value="Do you want to be promoted in your vocation for 20000 gold?" />
<parameter key="module_shop" value="1"/>
<parameter key="shop_sellable" value="" />
<parameter key="shop_buyable" value="" />
</parameters>
</npc>
promotion.lua
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)
function onCreatureAppear(cid) npcHandler
function onCreatureDisappear(cid) npcHandler
function onCreatureSay(cid, type, msg) npcHandler
function onThink() npcHandler
local node1 = keywordHandler:addKeyword({'promote'}, 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})
npcHandler:addModule(FocusModule:new())
using real server. 8.6 client.
Any ideas? :/