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

Solved Script requested: Change voc on use

mernes

New Member
Joined
Jul 30, 2009
Messages
41
Reaction score
0
Hey!
I wonder if there is anyone that could do/send me a script that will change vocation when you use a specific item on yourself.

For example, if you have vocation id 3 (paladin) and use "this" item, your vocation id 7 (Royal Paladin).

Thanks in advance!


(Oh, and I'm using TFS 0.3.6)
 
Oh, I'm sorry. Thanks btw, but since I got an custom made vocation, and I'm using this script:
local promotion = 1
local itemId = 2159 -- here item id
local count = 100 -- how many items needed
local level = 200 -- level needed to use this item

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerPromotionLevel(cid) < promotion then
if getPlayerLevel(cid) >= level then
if doPlayerRemoveItem(cid, itemId, count) then
doPlayerSetPromotionLevel(cid, 1)
doCreatureSay(cid, "Promoted !", TALKTYPE_ORANGE_1)
else
doPlayerSendCancel(cid, "you need ".. count .. " of " .. getItemNameById(itemId) .. " to be promoted")
end
else
doPlayerSendCancel(cid, "you don't have enough level")
end
else
doPlayerSendCancel(cid, "You Already Promoted")
end
return true
end
How can it fix if I got lets say my custom voc is id 11 for Promoted RP, original Paladin is 3 and RP is 7, I can't have the script which only adds 4 vocation, because then it will only add to RP if I promote from paladin?
Thousands thanks if you can help me with this!
 
What exactly didn't work? do you get errors? Is there something it should do what it's not doing?
Also post how you added it in actions.xml.
 
What exactly didn't work? do you get errors? Is there something it should do what it's not doing?
Also post how you added it in actions.xml.
Oh, I really don't know since I changed everything now :(
But should I have Cost = itemid:2345 (didnt work) or something?
 
I mean with the action script.
like this?
<action itemid="2345" script="tools/Spyreport2.lua" />


Oh and, when I pressed Spy Report, I became promoted.. but to a vocation that didnt exist, when I looked at myseld it was "You are a ."

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, 4)
doCreatureSay(cid, 'You are now ' .. getVocationInfo(getPlayerVocation(cid)).description .. '!', TALKTYPE_ORANGE_1)
doRemoveItem(item.uid)
end
return true
end

here is my other script
 
This is for second promotion
Lua:
doPlayerSetPromotionLevel(cid, 2)

If you do it like this, you set it to the fourth promotion, if that doesn't exist in your vocations.xml you get "You are a .".
Lua:
doPlayerSetPromotionLevel(cid, 4)
 
Oh, okey. I got it now! :) Thanks <3

This thread has been solved. (And in future i'll most my Requests in the right forum)
 
This is for second promotion
Lua:
doPlayerSetPromotionLevel(cid, 2)

If you do it like this, you set it to the fourth promotion, if that doesn't exist in your vocations.xml you get "You are a .".
Lua:
doPlayerSetPromotionLevel(cid, 4)

sorry bro how i make sure that i have set fourth or fifth promotion in vocations.xml
i want to make fourth and fifth promotion could you help me please !??
 
sorry bro how i make sure that i have set fourth or fifth promotion in vocations.xml
i want to make fourth and fifth promotion could you help me please !??
Code:
data/xml/vocations.xml
standard  -> first promo     -> second promo  -> third promo     -> fourth promo
sorcerer  -> master sorcerer -> epic sorcerer -> spirit sorcerer -> necromantic sorcerer
fromvoc=1 -> fromvoc=1       -> fromvoc=5     -> fromvoc=9       -> fromvoc=13
 
Code:
data/xml/vocations.xml
standard  -> first promo     -> second promo  -> third promo     -> fourth promo
sorcerer  -> master sorcerer -> epic sorcerer -> spirit sorcerer -> necromantic sorcerer
fromvoc=1 -> fromvoc=1       -> fromvoc=5     -> fromvoc=9       -> fromvoc=13

thanks bro >>>
look i have another three custom vocations i need to make items for each one of them if you used it you become one of this vocations it will be get from Q
for example : name of vocation is : gangster
i want players use item id : 1985 get this voc
req level 50
i used this script for it
Lua:
local config = {
    promotion = 6,    -- promotion level,
    reqLevel = 50,    -- Level needed to buy promotion
    premium = "yes"  -- is premium needed to buy promotion?
}

local disabledVocations = {0}

config.premium = getBooleanFromString(config.premium)

function onUse(cid, item, frompos, item1, topos)
    if(isInArray(disabledVocations, getPlayerVocation(cid)) == TRUE) then
        doPlayerSendCancel(cid, "Your vocation cannot buy promotion.")
    elseif(config.premium == TRUE and isPremium(cid) == FALSE) then
        doPlayerSendCancel(cid, "You need a premium account.")
    elseif(getPlayerPromotionLevel(cid) >= config.promotion) then
    doPlayerSendTextMessage(cid,22,"You are already promoted.")
        doPlayerSendCancel(cid, "You are already promoted.")
    elseif(getPlayerLevel(cid) > config.reqLevel) then
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need " .. config.reqLevel .. " to be a Gangster.")
    elseif(getPlayerPromotionLevel(cid) <= config.promotion) then
        setPlayerPromotionLevel(cid, config.promotion)
            doPlayerSendTextMessage(cid,22,"+Gangster+")
    doSendMagicEffect(getPlayerPosition(cid), 27)     
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You have been succesful promoted to " .. getVocationInfo(getPlayerVocation(cid)).name .. ".")
          doRemoveItem(item.uid)
    end
    return TRUE
end
and my vocations.xml is :
XML:
<?xml version="1.0" encoding="UTF-8"?>
<vocations>
    <vocation id="0" name="None" description="none" needpremium="0" gaincap="5" gainhp="5" gainmana="5" gainhpticks="6" gainhpamount="1" gainmanaticks="6" gainmanaamount="1" manamultiplier="4.0" attackspeed="2000" soulmax="100" gainsoulticks="120" fromvoc="0" attackable="no">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.0" magDefense="1.0" armor="1.0"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="1" name="Sorcerer" description="a sorcerer" needpremium="0" gaincap="10" gainhp="8" gainmana="35" gainhpticks="6" gainhpamount="1" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="450" soulmax="100" gainsoulticks="120" fromvoc="1">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.1" magDefense="1.2" armor="1.1"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="2" name="Druid" description="a druid" needpremium="0" gaincap="10" gainhp="8" gainmana="35" gainhpticks="6" gainhpamount="1" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="450" soulmax="100" gainsoulticks="120" fromvoc="2">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.1" magDefense="1.2" armor="1.1"/>
        <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="3" name="Paladin" description="a paladin" needpremium="0" gaincap="20" gainhp="15" gainmana="30" gainhpticks="4" gainhpamount="1" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="450" soulmax="100" gainsoulticks="120" fromvoc="3">
        <formula meleeDamage="1.2" distDamage="1.2" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.1" magDefense="1.1" armor="1.1"/>
        <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="4" name="Knight" description="a knight" needpremium="0" gaincap="25" gainhp="33" gainmana="5" gainhpticks="3" gainhpamount="100" gainmanaticks="1" gainmanaamount="10" manamultiplier="3.2" attackspeed="450" soulmax="100" gainsoulticks="120" fromvoc="4">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.1" magDefense="1.0" armor="1.1"/>
        <skill fist="1.1" club="1.1" sword="1.1" axe="1.1" distance="1.4" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="5" name="Master Sorcerer" description="a master sorcerer" needpremium="1" gaincap="10" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="380" soulmax="200" gainsoulticks="15" fromvoc="1" lessloss="0">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.1" magDefense="1.2" armor="1.1"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="6" name="Elder Druid" description="an elder druid" needpremium="1" gaincap="10" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="380" soulmax="200" gainsoulticks="15" fromvoc="2" lessloss="50">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.2" magDamage="1.2" magHealingDamage="1.2" defense="1.1" magDefense="1.1" armor="1.1"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="7" name="Royal Paladin" description="a royal paladin" needpremium="1" gaincap="20" gainhp="20" gainmana="40" gainhpticks="3" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="380" soulmax="200" gainsoulticks="15" fromvoc="3" lessloss="0">
        <formula meleeDamage="1.2" distDamage="1.2" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.1" magDefense="1.1" armor="1.1"/>
        <skill fist="1.5" club="1.5" sword="1.5" axe="1.5" distance="2.0" shielding="1.5" fishing="1.5" experience="1.0"/>
    </vocation>
    <vocation id="8" name="Elite Knight" description="an elite knight" needpremium="1" gaincap="25" gainhp="33" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.2" attackspeed="380" soulmax="200" gainsoulticks="15" fromvoc="4" lessloss="0">
        <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.2" magDefense="1.0" armor="1.2"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.4" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="9" name="Wizard" description="a Wizard" needpremium="0" gaincap="10" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="270" soulmax="200" gainsoulticks="15" fromvoc="5" lessloss="0">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.5" magDamage="1.5" magHealingDamage="1.5" defense="1.4" magDefense="1.5" armor="1.4"/>
        <skill fist="1.5" club="2.0" sword="2.0" axe="2.0" distance="2.0" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="10" name="Cleric" description="a Cleric" needpremium="0" gaincap="10" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="270" soulmax="200" gainsoulticks="15" fromvoc="6" lessloss="0">
        <formula meleeDamage="1.0" distDamage="1.0" wandDamage="1.5" magDamage="1.5" magHealingDamage="1.5" defense="1.4" magDefense="1.5" armor="1.4"/>
        <skill fist="1.5" club="1.8" sword="1.8" axe="1.8" distance="1.8" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="11" name="Archer" description="an Archer" needpremium="0" gaincap="20" gainhp="20" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="270" soulmax="200" gainsoulticks="15" fromvoc="7" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.5" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.4" magDefense="1.4" armor="1.4"/>
        <skill fist="1.2" club="1.2" sword="1.2" axe="1.2" distance="1.1" shielding="1.1" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="12" name="Weapon Master" description="a Weapon Master" needpremium="0" gaincap="25" gainhp="33" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.2" attackspeed="270" soulmax="200" gainsoulticks="15" fromvoc="8" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="13" name="Magus" description="a Magus" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="220" soulmax="200" gainsoulticks="15" fromvoc="9" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="14" name="Priest" description="a Priest" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="220" soulmax="200" gainsoulticks="15" fromvoc="10" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="15" name="Sharp Shooter" description="a Sharp Shooter" needpremium="0" gaincap="25" gainhp="20" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="220" soulmax="200" gainsoulticks="15" fromvoc="11" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="16" name="Barbarian" description="a Barbarian" needpremium="0" gaincap="25" gainhp="33" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.2" attackspeed="220" soulmax="200" gainsoulticks="15" fromvoc="12" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="17" name="Necromancer" description="a Necromancer" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="160" soulmax="200" gainsoulticks="15" fromvoc="13" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="18" name="Shaman" description="a Shaman" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="160" soulmax="200" gainsoulticks="15" fromvoc="14" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="19" name="Mercnary" description="a Mercnary" needpremium="0" gaincap="25" gainhp="20" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="160" soulmax="200" gainsoulticks="15" fromvoc="15" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.5" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="20" name="Ninja" description="a Ninja" needpremium="0" gaincap="25" gainhp="33" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.2" attackspeed="160" soulmax="200" gainsoulticks="15" fromvoc="16" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="21" name="Lightbringer" description="a Lightbringer" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="125" soulmax="200" gainsoulticks="15" fromvoc="17" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="22" name="Holy Priest" description="a Holy Priest" needpremium="0" gaincap="25" gainhp="8" gainmana="35" gainhpticks="4" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.6" attackspeed="125" soulmax="200" gainsoulticks="15" fromvoc="18" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="23" name="Holy Archer" description="a Holy Archer" needpremium="0" gaincap="25" gainhp="20" gainmana="20" gainhpticks="3" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="2.0" attackspeed="125" soulmax="200" gainsoulticks="15" fromvoc="19" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="24" name="Guardian" description="a Guardian" needpremium="0" gaincap="25" gainhp="33" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="3.2" attackspeed="125" soulmax="200" gainsoulticks="15" fromvoc="20" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="25" name="Gangster" description="a Gangster" needpremium="0" gaincap="25" gainhp="7" gainmana="7" gainhpticks="2" gainhpamount="10" gainmanaticks="1" gainmanaamount="100" manamultiplier="1.8" attackspeed="30" soulmax="200" gainsoulticks="15" fromvoc="24" lessloss="100">
        <formula meleeDamage="0.4" distDamage="0.4" wandDamage="0.4" magDamage="0.4" magHealingDamage="0.4" defense="0.4" magDefense="0.4" armor="0.4"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="26" name="Sissy" description="a Sissy" needpremium="0" gaincap="25" gainhp="45" gainmana="5" gainhpticks="2" gainhpamount="10" gainmanaticks="25" gainmanaamount="100" manamultiplier="3.3" attackspeed="2500" soulmax="200" gainsoulticks="15" fromvoc="24" lessloss="0">
        <formula meleeDamage="2.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="3.5" magDefense="2.0" armor="3.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="5.5" fishing="1.1" experience="1.0"/>
    </vocation>
    <vocation id="27" name="Demi-God" description="a Demi-God" needpremium="0" gaincap="25" gainhp="60" gainmana="60" gainhpticks="1" gainhpamount="800" gainmanaticks="1" gainmanaamount="800" manamultiplier="1.7" attackspeed="20" soulmax="200" gainsoulticks="15" fromvoc="24" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
        <vocation id="30" name="The Owner" description="The Owner" needpremium="0" gaincap="25" gainhp="60" gainmana="60" gainhpticks="1" gainhpamount="800" gainmanaticks="1" gainmanaamount="800" manamultiplier="1.7" attackspeed="1" soulmax="200" gainsoulticks="15" fromvoc="0" lessloss="0">
        <formula meleeDamage="1.5" distDamage="1.0" wandDamage="1.0" magDamage="1.0" magHealingDamage="1.0" defense="1.5" magDefense="1.0" armor="1.5"/>
        <skill fist="1.1" club="1.5" sword="1.5" axe="1.5" distance="1.5" shielding="1.5" fishing="1.1" experience="1.0"/>
    </vocation>
</vocations>
and id edit 031-vocations.lua in lib folder to be like that :
Lua:
function isSorcerer(cid)
    return isInArray({1, 5, 9, 13, 17, 21, 25, 26, 27}, getPlayerVocation(cid))
end

function isDruid(cid)
    return isInArray({2, 6, 10, 14, 18, 22, 25, 26, 27}, getPlayerVocation(cid))
end

function isPaladin(cid)
    return isInArray({3, 7, 11, 15, 19, 23, 25, 26, 27}, getPlayerVocation(cid))
end

function isKnight(cid)
    return isInArray({4, 8, 12, 16, 20, 24, 25, 26, 27}, getPlayerVocation(cid))
end

function isRookie(cid)
    return isInArray({0}, getPlayerVocation(cid))
end
but when i use it i got non vocation : 18:15 You see yourself. You are .
--update--
i want if any vocation(druid , sorcerer, paladin, knight) use this item become gangster vocation
--update--
i tryed this script and the character become gangster vocation but once i log out vocation changed to 5th promotion from sorcerer vocation and if log out again it change again to 4th promotion and ....etc till character become sorcerer without any promotions !!!?
 
Last edited:
Back
Top