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

Help NPC

Dyker

New Member
Joined
Sep 12, 2008
Messages
97
Reaction score
1
Code:
local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)



-- OTServ event handling functions start
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
-- OTServ event handling functions end


-- Don't forget npcHandler = npcHandler in the parameters. It is required for all StdModule functions!
local travelNode = keywordHandler:addKeyword({'sniper'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Really you want to be an {Sniper}?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 20, vocation = 3, cost = 2000, destination = {x=991, y=967, z=7} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Noob, you need more money to enter here.'})
local travelNode = keywordHandler:addKeyword({'shooter'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Really you want to be a {Shooter}?'})
	travelNode:addChildKeyword({'yes'}, StdModule.travel, {npcHandler = npcHandler, premium = true, level = 0, vocation = 3, cost = 2000, destination = {x=997, y=969, z=7} })
	travelNode:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, reset = true, text = 'Noob, you need more money to enter here.'})

keywordHandler:addKeyword({'promote'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Hi! I can offer you 2 kind of promotion, make your choose: {Sniper} or {Shooter}'})

-- Makes sure the npc reacts when you say hi, bye etc.
npcHandler:addModule(FocusModule:new())

Could someone put me on this script that only vocation = 3 could do it and if you aren't vocation 3 tells Sorry you cant enter on our guild or you are alredy in
 
Back
Top