rikaardo25
New Member
- Joined
- May 22, 2017
- Messages
- 10
- Reaction score
- 0
hello,
im having problem with a new npc that give a promotion, i already got promotion from the king but i want to get a second promotion from the new npc but everytime i ask him for the promotion, it tells me im already promoted...
this is the lua from npc
23:14 Johanna: Greetings, Rikaaa.
23:14 Rikaaa [75]: crusader
23:14 Johanna: I can promote you for 250000 gold coins. Do you want me to promote you?
23:14 Rikaaa [75]: yes
23:14 Johanna: You are already promoted!
also i had like him to check out the requirement if it fit to get promoted...
If anyone know, I appreciate your help
thanks in advance
im having problem with a new npc that give a promotion, i already got promotion from the king but i want to get a second promotion from the new npc but everytime i ask him for the promotion, it tells me im already promoted...
this is the lua from npc
Lua:
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({'crusader'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 250000 gold coins. Do you want me to promote you?'})
node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 250000, level = 150, promotion = 3, text = 'Congratulations! You have been promoted to a Crusader!.'})
node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
local node2 = keywordHandler:addKeyword({'templar'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 500000 gold coins. Do you want me to promote you?'})
node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 500000, level = 200, promotion = 4, text = 'Congratulations! You have been promoted to a Templar!.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you brave enough.', reset = true})
npcHandler:addModule(FocusModule:new())
23:14 Johanna: Greetings, Rikaaa.
23:14 Rikaaa [75]: crusader
23:14 Johanna: I can promote you for 250000 gold coins. Do you want me to promote you?
23:14 Rikaaa [75]: yes
23:14 Johanna: You are already promoted!
also i had like him to check out the requirement if it fit to get promoted...
If anyone know, I appreciate your help
thanks in advance