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

script request (rep)+

Code:
function onSay(cid, words, param, channel)
	local cfg = {
		level = 100,
		vocs = { 5, 6, 7, 8 },
		cost = 100000
	}
	if getPlayerLevel(cid) >= cfg.level then
		if isInArray(cfg.vocs, getPlayerVocation(cid)) then
			if doPlayerRemoveMoney(cid, cfg.cost) then
				return setPlayerPromotionLevel(cid, getPlayerPromotionLevel(cid) + 1) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been promoted.")
			else
				return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need ".. cfg.cost .." gold coins to purchase the second promotion.")
			end
		else
			 return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Sorry, you cannot get the second promotion.")
		end
	else
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Only characters of level ".. cfg.level .." or above, may purchase the second promotion.")
	end

	return true
end
 
Back
Top