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

Second Promotion Please Help !!

aleks87

New Member
Joined
Jul 29, 2011
Messages
13
Reaction score
0
Hey i need scrypt that if i use like orshabaal's brain that gives Epic promotion Please if anyone knows how to do it please post here.
Thanks alot.









Peace, Love and Rock'n roll
 
This could've been done in so many more easy ways but meh, it killed some time.

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local playerVoc = getPlayerVocation(cid)
	local item = 1000 -- Change Item ID too whatever you want
		if playerVoc < 5 then
			doPlayerSendCancel(cid, "You\'re not of the required class to use this item!")
			doPlayerSendMagicEffect(getCreaturePostion(cid), CONST_ME_POOF)
		elseif playerVoc > 4 then
			if doPlayerRemoveItem(cid, item, 1)
				if playerVoc == 5 then -- Master Sorcerer
					doPlayerSetVocation(cid, 9)
					doPlayerSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS_RED)
					doPlayerSay(cid, "Epic Master Sorcerer", TALKTYPE_ORANGE_1)
				elseif playerVoc == 6 then -- Elder Druid
					doPlayerSetVocation(cid, 10)
					doPlayerSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS_RED)
					doPlayerSay(cid, "Epic Elder Druid", TALKTYPE_ORANGE_1)
				elseif playerVoc == 7 then -- Royal Paladin
					doPlayerSetVocation(cid, 11)
					doPlayerSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS_RED)
					doPlayerSay(cid, "Epic Royal Paladin", TALKTYPE_ORANGE_1)
				elseif playerVoc == 8 then -- Elite Knight
					doPlayerSetVocation(cid, 12)
					doPlayerSendMagicEffect(getCreaturePosition(cid), CONST_ME_FIREWORKS_RED)
					doPlayerSay(cid, "Epic Elite Knight", TALKTYPE_ORANGE_1)
				end
			end
		end
	return true
end
 
Last edited by a moderator:
Very nice Korrex :P


Code:
[08/08/2011 14:53:30] [Error - Action Interface] 
[08/08/2011 14:53:30] data/actions/scripts/SecondPromo.lua:onUse
[08/08/2011 14:53:30] Description: 
[08/08/2011 14:53:30] data/actions/scripts/SecondPromo.lua:4: attempt to compare function with number
[08/08/2011 14:53:30] stack traceback:
[08/08/2011 14:53:30] 	data/actions/scripts/SecondPromo.lua:4: in function <data/actions/scripts/SecondPromo.lua:1>
 
Last edited:
Here's a smaller one released by Cyko

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	local a = getPlayerPromotionLevel(cid)
	if a == 0 then
		doPlayerSendCancel(cid, 'You need to be promoted in order to use this item.')
	elseif a == 2 then
		doPlayerSendCancel(cid, 'Your\'re already promoted!')
	else
		doPlayerSetPromotionLevel(cid, 2)
		doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid)
	end
	return true
end
 
Back
Top