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

help need to learn !promote

tsb0314

New Member
Joined
Oct 21, 2009
Messages
220
Reaction score
4
i have a 8.54 server and everyone is asking for the 1promote command. cqn someone give me the script for it or tell me how to get the script. i have been looking for days and couldnt find anything plz help
 
talkactions.xml
LUA:
	<talkaction words="!promote" event="script" value="promote.lua"/>
promote.lua
LUA:
function onSay(cid, words, param, channel)

	sorcerer = {
	cost = 20000,
	level = 20,
	text = "Promoted to Master Sorcerer",
	}
	druid = {
	cost = 20000,
	level = 20,
	text = "Promoted to Elder Druid",
	}
	paladin = {
	cost = 20000,
	level = 20,
	text = "Promoted to Royal Paladin",
	}
	knight = {
	cost = 20000,
	level = 20,
	text = "Promoted to Elite Knight",
	}

	if getPlayerVocation(cid) == 1 then
		voc = sorcerer
	elseif getPlayerVocation(cid) == 2 then
		voc = druid
	elseif getPlayerVocation(cid) == 3 then
		voc = paladin
	elseif getPlayerVocation(cid) == 4 then
		voc = knight
	else
		voc = nil
	end
	if voc ~= nil then
		if getPlayerLevel(cid) >= voc.level then
			if doPlayerRemoveMoney(cid,voc.cost) == TRUE then
				setPlayerPromotionLevel(cid, 1)
				doSendMagicEffect(getCreaturePosition(cid),14)
				doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
			else
				doPlayerSendTextMessage(cid,18,"You need "..voc.cost.." to promote.")
			end
		else
			doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
		end
	else
		doPlayerSendTextMessage(cid,18,"You already promoted.")
	end
	return TRUE
end
 
Back
Top