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

promotion scroll

agomez

Member
Joined
Jan 28, 2009
Messages
211
Reaction score
5
how can i make only premium players can use this scroll:

function onUse(cid, item, fromPosition, itemEx, toPosition)


doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_RED)
doPlayerSetPromotionLevel(cid, 2)
doPlayerSave(cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations! You have been promoted to '.. getPlayerVocationName(cid)..'!!')

local pos = getThingPos(cid)
for i = 1, 15 do
doSendDistanceShoot({x = pos.x + math.random(-4, 4), y = pos.y + math.random(-4, 4), z = pos.z}, pos, CONST_ANI_SMALLHOLY)
end
return true
end
 
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerPremiumDays(cid) > 0 then
doRemoveItem(item.uid, 1)
doSendMagicEffect(fromPosition, CONST_ME_FIREWORK_RED)
doPlayerSetPromotionLevel(cid, 2)
doPlayerSave(cid)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'Congratulations! You have been promoted to '.. getPlayerVocationName(cid)..'!!')
else
	doPlayerSendCancel(cid,"You need a premuim account to use this")
end

local pos = getThingPos(cid)
for i = 1, 15 do
doSendDistanceShoot({x = pos.x + math.random(-4, 4), y = pos.y + math.random(-4, 4), z = pos.z}, pos, CONST_ANI_SMALLHOLY)
end
return true
end
 
Back
Top