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

Action who lose 3 promotion

GuHB

Member
Joined
Dec 14, 2009
Messages
630
Reaction score
9
Location
Brazil
Hello, i've in my otserver another promotion, for exemple: knight, elite knight, templar knight. The Templar Knight (3 promotion) is just for premium. But, when some player buy the 3 promotion and the premium days end, he dont lose the 3 promotion, i need a script who downgrade to de elite knight (2 promotion).
Thanks
 
In /data/creaturescripts/creaturescripts.xml paste this:
Code:
<event type="login" name="Promotion" event="script" value="promo.lua"/>
and create new file /data/creaturescripts/scripts/promo.lua with this inside:
Code:
function onLogin(cid)
 if getPlayerPremiumDays(cid) < 1 and getPlayerPromotionLevel(cid) > 1 then
        setPlayerPromotionLevel(cid, 1)
 end
     return TRUE
end
Tested in tfs 0.3.6

Rep me ++ if i helped you.
 
Back
Top