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

president vankk

Web Developer & AuraOT Owner
Joined
Jul 10, 2009
Messages
5,719
Solutions
9
Reaction score
339
I wanted a scripter, you get to the npc and talk.
'Hi'
'Vip promotion'
and he gets a new vocation Knight Poker, Poker Druid, Paladin Poker, Poker Sorcerer.
 
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({'vip promotion'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for free, do you want to buy the Vip promotion?'})
	node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 0, level = 400, promotion = 2, text = 'Congratulations! You are now using Vip promotion.'})
	node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then!', reset = true})

npcHandler:addModule(FocusModule:new())
 
Back
Top