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

multi vocation change

donacool

Mapper Scripter Ot Owner
Joined
Jan 15, 2010
Messages
97
Reaction score
0
i made a script that when you get certain levels:

Lua:
function onAdvance(cid, skill, oldLevel, newLevel)
local normal = 1
local leutnant = 2
local elite = 3
local captain = 4
local coronel = 5
local war master = 6
local war assasin = 7
local war legend = 8
local war king = 9
local war god = 10
local message = doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Now you are a "..getPlayerVocationName(cid)..". Congratulations!")
	if getPlayerPremiumDays(cid) > 0 then
		if getPlayerPromotionLevel(cid) == normal and skill == SKILL_LEVEL and newLevel >= 50 then
			doPlayerSetPromotionLevel(cid, leutnant)
			message
		elseif getPlayerPromotionLevel(cid) == leutnant and skill == SKILL_LEVEL and newLevel >= 100 then
			doPlayerSetPromotionLevel(cid, elite)
			message
		elseif getPlayerPromotionLevel(cid) == elite and skill == SKILL_LEVEL and newLevel >= 150 then
			doPlayerSetPromotionLevel(cid, captain)
			message
		elseif getPlayerPromotionLevel(cid) == captain and skill == SKILL_LEVEL and newLevel >= 200 then
			doPlayerSetPromotionLevel(cid, coronel)
			message
		elseif getPlayerPromotionLevel(cid) == coronel and skill == SKILL_LEVEL and newLevel >= 250 then
			doPlayerSetPromotionLevel(cid, war master)
			message
		elseif getPlayerPromotionLevel(cid) == war master and skill == SKILL_LEVEL and newLevel >= 300 then
			doPlayerSetPromotionLevel(cid, war assasin)
			message
		elseif getPlayerPromotionLevel(cid) == war assasin and skill == SKILL_LEVEL and newLevel >= 350 then
			doPlayerSetPromotionLevel(cid, war legend)
			message
		elseif getPlayerPromotionLevel(cid) == war legend and skill == SKILL_LEVEL and newLevel >= 400 then
			doPlayerSetPromotionLevel(cid, war king)
			message
		elseif getPlayerPromotionLevel(cid) == war king and skill == SKILL_LEVEL and newLevel >= 450 then
			doPlayerSetPromotionLevel(cid, war god)
			message
		end
		return true
	else
		doPlayerSendCancel(cid, "You need to be premium if you want that your vocation changes to a better one")
	end
	return true
end
return true

but it tells me in the server that '=' expected near 'elseif'

what do i maked wrong?
 
Bumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbump
bumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbump
bumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbump
bumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbump
bumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbumpbump
 
Back
Top