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

Super vocation doll request.

leeebux

Awsome
Joined
May 18, 2009
Messages
116
Reaction score
17
Location
Sweden
I need a doll, that makes you "super elite knight" or "super master sorcerer", so i should work something like this, if you are a Elite knight, you get super, and as master sorcerer, you get also super master sorcerer but from the doll.

Hope you all did understand my request and Rep++ to the one thats make one for me
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerVocation(cid) == 5 then
        setPlayerPromotionLevel(cid, 2)
        doCreatureSay(cid, "You are now a Super Sorcerer!", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    elseif getPlayerVocation(cid) == 6 then
        setPlayerPromotionLevel(cid, 2)
        doCreatureSay(cid, "You are now a Super Druid!", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    elseif getPlayerVocation(cid) == 7 then
        setPlayerPromotionLevel(cid, 2)
        doCreatureSay(cid, "You are now a Super Paladin!", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    elseif getPlayerVocation(cid) == 8 then
        setPlayerPromotionLevel(cid, 2)
        doCreatureSay(cid, "You are now a Super Knight!", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You need to be promoted to use this item.")
    end
end

this should work x)
 
Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if getPlayerPromotionLevel(cid) == 1 then
		doPlayerSetPromotionLevel(cid,2)
		doPlayerSendTextMessage(cid,20,'You have been promoted to' ..getPlayerVocation(cid)..'!')
	elseif getPlayerPromotionLevel(cid) > 1 then
		doPlayerSendCancel(cid,'You can\'t get the same promotion twice.')
	else
		doPlayerSendCancel(cid,'You have to get your first promotion first.')
	return true
	end
end
 
LUA:
<action itemid="11137" event="script" value="Script Name.lua"/>
this is used with Demon teddy!

LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
        local i = getPlayerVocation(cid)
		if i == 5 then
			vocation = "Vocation Name"
		elseif i == 6 then
			vocation = "Vocation Name"
		elseif i == 7 then
			vocation = "Vocation Name"
		elseif i == 8 then
			vocation = "Vocation Name"
		end	
		
	if getPlayerPromotionLevel(cid) == 1 then
		setPlayerPromotionLevel(cid, 2)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_BIGCLOUDS)
		doCreatureSay(cid, "You are now a "..vocation.."", TALKTYPE_ORANGE_1)
		doRemoveItem(item.uid, 1)
	else
		doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
	end
end
 
Shortly
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
    if getPlayerPromotionLevel(cid) == 1 then
        setPlayerPromotionLevel(cid, 2)
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGICBLUE)
	local i = getPlayerVocation(cid)
        doCreatureSay(cid, "You are now a "..i.."", TALKTYPE_ORANGE_1)
        doRemoveItem(item.uid, 1)
    else
        doPlayerSendCancel(cid,"You need to be promoted to get Super Promotion.")
    end
end
 
you go to actions folder and open actions.xml and on a new line post

LUA:
<action itemid="11137" event="script" value="donator/medal.lua"/>

then go into the scripts folder and add this
LUA:
  function onUse(cid, item, fromPosition, itemEx, toPosition)
        local i = getPlayerVocation(cid)
                if i == 5 then
                        vocation = "Vocation Name"
                elseif i == 6 then
                        vocation = "Vocation Name"
                elseif i == 7 then
                        vocation = "Vocation Name"
                elseif i == 8 then
                        vocation = "Vocation Name"
                end    
               
        if getPlayerPromotionLevel(cid) == 1 then
                setPlayerPromotionLevel(cid, 2)
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_FIREAREA)
                doSendMagicEffect(getPlayerPosition(cid), CONST_ME_BIGCLOUDS)
                doCreatureSay(cid, "You are now a "..vocation.."", TALKTYPE_ORANGE_1)
                doRemoveItem(item.uid, 1)
        else
                doPlayerSendCancel(cid,"You need to be promoted in order to use this item.")
        end
end

change the name of the vocation in "vocation name" to the one its called

what ever you name this script post the name of it into your actions.xml where you added the first script
 
Last edited:
@wesoly,
mine is shorter, lol.

I advice you to use my script, since calum has a not working one, and he why the hell did you do this for, calum?
You can just use getPlayerVocation(cid)

Code:
        local i =  getPlayerVocation(cid)
                if i == 5 then
                        vocation = "Vocation Name"
                elseif i == 6 then
                        vocation = "Vocation Name"
                elseif i == 7 then
                        vocation = "Vocation Name"
                elseif i == 8 then
                        vocation = "Vocation Name"
                end

Anyways,

Add this in actions.xml
<action itemid="ITEM_ID" event="script" value="SCRIPT_NAME.lua"/>
 
mine does work ive used it where it says "vocation name" you change it to the name of the vocation you called it
example: super sorcer , super druid, super paladin, super knight
 
Back
Top