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

The Outfit you have is your Vocation

Cola

New Member
Joined
Apr 4, 2010
Messages
4
Reaction score
0
K im looking for a script,

I want it to be like when you change your outfit you'll get that vocation that the outfits says for example hunter outfit> Paladin

Thank you,
 
basic i think you can edit
LUA:
function onThink(cid)
for _, pid in ipairs(getPlayersOnline()) do
 if getCreatureOutfit(pid).lookType == 129 then
   if getPlayerVocation(pid) ~= 3 then
      doPlayerSetVocation(pid, 3)
	  doPlayerSendTextMessage(pid,25,"You have changed you class to paladin")
    end
 end
end
return true
end
 
Actually i thought of using this first but but as i donno how it works ?
LUA:
function onOutfit(cid, old, current)
if current == 131

or somthng?
 
hope this does the trick
LUA:
local o = { --OUTFIT LOOKTYPE, VOCATION ID
    [130] = 1, --sorcerer
    [140] = 2, --druid
    [150] = 3, --paladin
    [160] = 4, --knight
}

function onOutfit(cid, old, current)
    if o[current.lookType] and getPlayerVocation(cid) ~= o[current.lookType] then
        doPlayerSetVocation(cid, o[current.lookType])
	doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have changed you class to '.. getPlayerVocationName(cid) ..'.')
    end
    return true
end

LUA:
<event type="outfit" name="vocation" event="script" value="outfit.lua"/>

LUA:
registerCreatureEvent(cid, "vocation")
 
Last edited:
well i'll upgrade it then
this one works, as you may notice, there are female and male outfits of each voc
LUA:
local o = { --OUTFIT LOOKTYPE, VOCATION ID
    --sorcerer
    [149] = 1,
    [145] = 1,
    --druid
    [148] = 2,
    [144] = 2,
    --paladin
    [137] = 3,
    [129] = 3,
    --knight
    [139] = 4,
    [131] = 4 
}

function onOutfit(cid, old, current)
    if old.lookType ~= current.lookType and o[current.lookType] then
        doPlayerSetVocation(cid, o[current.lookType])
        doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_GREEN)
        doPlayerSendTextMessage(cid, MESSAGE_EVENT_ADVANCE, 'You have changed you class to '.. getPlayerVocationName(cid) ..'.')
    end
    return true
end
 
Last edited:
Back
Top