• 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] Advanced Promotion (TFS 0.2/0.3)

justin234

New Member
Joined
Jan 22, 2008
Messages
999
Reaction score
4
I need a promotion script that will promote a player a second time.
I've been looking for this, couldnt find one that works...

I really need it,
Thanks!

Must Not Interfere With My Current Promote (First Promotion)
 
I dont understood what you want.

Do you want a npc that promote you again? or to another vocation?

If is the second choise then make more vocations and edit your promotion npc
 
get use lua functions:
getPlayerVocation(cid)
doPlayerSetVocation(cid, voc)
setPlayerStorageValue(cid, stor,value)
getPlayerStorageValue(cid, stor)
 
Lol, i think everyone wants it.. As do i. I would switch over to TFS V3, but when i transfer my stuff, i get a lot of errors. I've been working on my server for 3 months now, custom map 100%, custom sprite items/monsters and the smallest thing, 2nd promotion.. is the hardest :(.
 
Posted this on your other thread the next time try to be patient...

EDIT: I didn saw the tittle about "NPC" but anyway you can addapt that code to work on a npc...

Code:
function onSay(cid, words, param)
    if getPlayerVocation(cid) >= 9 then
	        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are already promoted.")
			elseif getPlayerVocation(cid) <= 4  then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be promoted.")
       else
            doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have been promoted!")
end

I didn tested it but should work...

Also you can try this one...
Code:
function onSay(cid, words, param)
--- Config
--\/ This one is for if you want the script to change from normal voc to promoted voc and custom promotion voc
multiplevoc = "yes"   --Just change it to "no" if you only want custom voc
removemoney = "yes" --Just change it to "no" if you wont to pay for vocations
amount = 20000 --The amount of money to remove




    if getPlayerVocation(cid) >= 9  then
	        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You are already promoted.")
			elseif multiplevoc == "no" and getPlayerVocation(cid) <= 4 then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need to be promoted.")
			elseif removemoney == "yes" and getPlayerMoney(cid) <= amount then
			doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need ".. amount .." to be promoted, And you have ".. getPlayerMoney(cid) .." in other words you need ".. amount -getPlayerMoney(cid) ..".")
			elseif removemoney == "yes" then
			doPlayerRemoveMoney(cid, amount)
			            doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have been promoted!")
elseif removemoney == "no" then
			            doPlayerSetVocation(cid, getPlayerVocation(cid) + 4)
            doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Congratulations, you have been promoted!")
end
end

Note: I didn tested them so im not sure if they will work!
 
Back
Top