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

NPC second AND third promo

evel

New Member
Joined
May 12, 2009
Messages
2
Reaction score
0
I made 4 new vocations (for third promotions) and players can get them by using a special item. But, King (NPC) gives third promotions as well as second promotion. How can I change it so that King can ONLY give out second promotion?
 
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 node2 = keywordHandler:addKeyword({'promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can epicize you for 100000 gold coins. Do you want me to epicize you?'})
	node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 100000, level = 80, promotion = 2, text = 'Congratulations! You are now promoted.'})
	node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true})


npcHandler:addModule(FocusModule:new())

i use this one for the promotion of the other 4 new vocs
 
@up

Umm, I don't need an NPC for my new 4 vocs. I can just use a special item, and then I get third promotion. I need a npc that will only give out second promotion and not third promotion.
 
Back
Top