• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Second Promotion

knighters god

Active Member
Joined
Feb 14, 2009
Messages
166
Solutions
1
Reaction score
40
I want an npc that sells a second promotion to you, but you need to have the first one to be able to get the second one.
Help would be appreciated, Thank you.
 
first
Go To Data/Npc/Create a new Xml file and add this
LUA:
<?xml version="1.0" encoding="UTF-8"?>
<npc name="Second Promotion" script="secondpromotion.lua" walkinterval="2000" floorchange="0">
	<health now="100" max="100"/>
	<look type="50" head="0" body="0" legs="0" feet="0" addons="0"/>
</npc>
then goto >>Data/Npc/Scripts
and simply create a new xml Called:secondpromotion
add this
LUA:
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, promotion = 2, 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())

Don't forget to change the number with red else don't edit it

- - - Updated - - -

Rep++ if it worked .. i tested it on 0.3.6Tfs V8
 
Back
Top