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

{8.6} Promotion Command

Code:
local config = {promotion = 1,minLevel = 20,cost = 20000,premium = "yes"}
local disabledVocations = {0}
config.premium = getBooleanFromString(config.premium)
function onSay(cid,words,param)
if (isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
elseif (config.premium == TRUE and isPremium(cid) == FALSE) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"Sorry, you do not have Premium account.")
elseif (getPlayerPromotionLevel(cid) >= config.promotion) then
elseif (getPlayerLevel(cid) < config.minLevel) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"Musisz posiadac "..config.minLevel.." poziom lub wyzszy.")
elseif (doPlayerRemoveMoney(cid, config.cost) ~= TRUE) then
doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_RED,"Sorry, you do not have enough money.")
else
setPlayerPromotionLevel(cid,config.promotion)
doPlayerSendTextMessage(cid,19,'You bought promotion! Now your profession is '..getVocationInfo(getPlayerVocation(cid)).name..'.')
doSendMagicEffect(getCreaturePosition(cid),14)
doPlayerSave(cid)
end
return TRUE
end
 
Back
Top