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

Lua How to make a promotion with click?

RaikND

facebook.xenoria.org
Joined
May 12, 2010
Messages
944
Reaction score
10
Location
Spain
I got this script
LUA:
function onUse(cid, item, frompos, item2, topos)
     doPlayerAddPremiumDays(cid, 30)
     doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You gained 30 premium days.")
     doSendMagicEffect(topos,27)
     doRemoveItem(item.uid,1)
end

But i dont got idea how i change for make it for promotion, any can help me? thanks
 
LUA:
function onUse(cid, item, frompos, item2, topos)
    
if getPlayerVocation(cid) < 5 then
		doPlayerSetVocation(cid,getPlayerVocation(cid)+4)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are promoted to "..getPlayerVocation..".")
		doSendMagicEffect(topos,27)
		doRemoveItem(item.uid,1)
    else
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You are already promoted.")
	end
		
end
 
Back
Top