Tamiko
Member
- Joined
- Sep 1, 2014
- Messages
- 24
- Reaction score
- 0
Hi
I am using: The Forgotten Server Version: 0.2.15 Mystic Spirit
I have problem with promotion NPC..
I am lvl 20, I go buy promotion: I buy it and so on..
Queen Eloise: Congratulations! You are now promoted.
Then I am promoted.. but! I can speak to her again, over and over. Whenever I buy promotion again.. this is what happens:
You see yourself. You have no vocation.
How can I change so she sells promotion ONLY ONCE? and then whenever someone have been promoted she says: You are already promoted.. ?
This is my script:
Tamiko
I am using: The Forgotten Server Version: 0.2.15 Mystic Spirit
I have problem with promotion NPC..
I am lvl 20, I go buy promotion: I buy it and so on..
Queen Eloise: Congratulations! You are now promoted.
Then I am promoted.. but! I can speak to her again, over and over. Whenever I buy promotion again.. this is what happens:
You see yourself. You have no vocation.
How can I change so she sells promotion ONLY ONCE? and then whenever someone have been promoted she says: You are already promoted.. ?
This is my script:
PHP:
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'}, 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 = 'Alright then, come back when you are ready.', reset = true})
npcHandler:addModule(FocusModule:new())
Tamiko