hello
many ppl asking about a promotion npc, reason (its not working).
but i think the soulution incl. the script and they don't know it,
check following first:
in red color (promot) and its work fine when i say hi, promot, yes.
but most of player don't try this always keep say hi,promotion,yes.
so when i change the word to promotion, and say hi,promotion (npc says: I can promote you for 20000 gold coins. Do you want me to promote you?)
when i say yes nothing happen. so can someone help me ?
--------------------------------------------------------------------------------------------------------------
in the same time all rings and amulet with charges not working (wont disappear). anyone have idea?
many ppl asking about a promotion npc, reason (its not working).
but i think the soulution incl. the script and they don't know it,
check following first:
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[COLOR="red"]({'promot'},[/COLOR] 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})
--[[
local node2 = keywordHandler:addKeyword({'epic'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 200000 gold coins. Do you want me to epicize you?'})
node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 200000, level = 120, promotion = 2, text = 'Congratulations! You are now epicized.'})
node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})
]]--
npcHandler:addModule(FocusModule:new())
but most of player don't try this always keep say hi,promotion,yes.
so when i change the word to promotion, and say hi,promotion (npc says: I can promote you for 20000 gold coins. Do you want me to promote you?)
when i say yes nothing happen. so can someone help me ?
--------------------------------------------------------------------------------------------------------------
in the same time all rings and amulet with charges not working (wont disappear). anyone have idea?