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

Outfit from vocation

jajo776

New Member
Joined
Aug 27, 2015
Messages
40
Reaction score
2
Hi,
I have problem because when i press button set outfit then there are outfits from outfit.xml but i need it to take from vocation.xml.
<vocation id="3" name="Paladin" outfit="20" description="a paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="4" gainhpamount="250" gainmanaticks="4" gainmanaamount="250" manamultiplier="1.4" attackspeed="1300" soulmax="150" gainsoulticks="50" fromvoc="3">
Could anyone help me please?
Thank you !
 
Idk if you can do this way using vocations.xml, but, you can set all outfits(or the ones you want) to unlock only by quests and do a creaturescripts onLogin to give the outfit based on vocation
 
Idk if you can do this way using vocations.xml, but, you can set all outfits(or the ones you want) to unlock only by quests and do a creaturescripts onLogin to give the outfit based on vocation
There is problem because i already done in creaturescripts newtype onlogin but it doesnt show that one which i want. I dont know how to explain but when i log in my newtype is 24 but it doesnt show up on set outfit if you know what i mean.
 
There is problem because i already done in creaturescripts newtype onlogin but it doesnt show that one which i want. I dont know how to explain but when i log in my newtype is 24 but it doesnt show up on set outfit if you know what i mean.
Post your outfits.xml and your creaturescripts
 
function onLogin(cid)
local voc = {
--Rebirthorius--
[4] = 417,
[126] = 410,

--Bardock--
[18] = 222,
[130] = 319,

--Son Goku--
[24] = 24,
[134] = 156,

--Vegeta--
[30] = 63,
[138] = 129,

--Son Gohan--
[36] = 209,
[142] = 463,

--Trunks--
[42] = 54,
[146] = 131,

--Buu--
[48] = 90,
[150] = 233,

--Brolly--
[54] = 186,
[154] = 144,

--C16--
[60] = 445,
[158] = 301,

--C17--
[66] = 176,
[162] = 100,

--C18--
[166] = 292,
[72] = 293,

--Cell--
[78] = 4,
[170] = 127,

--Cooler--
[84] = 11,
[174] = 248,

--Dende--
[90] = 5,
[178] = 225,

--Freeza--
[96] = 179,
[182] = 9,

--Piccolo--
[102] = 50,
[186] = 458,

--TSUFUL--
[108] = 38,
[190] = 81,

--Son Goten--
[114] = 34,
[194] = 250,

--Chibi Trunks--
[116] = 61,
[196] = 405,

--Janemba--
[304] = 574,
[310] = 583,

--Master Roshi--
[290] = 452,
[296] = 439,

--Black Goku--
[367] = 841,

--Beerus--
[353] = 642,

--Tapion--
[339] = 619,
[345] = 611,

--Shin--
[401] = 630,
[407] = 626,

--Krillin--
[417] = 1114,
[423] = 1119,



}
if (not voc[getPlayerVocation(cid)]) then
return true
end
doSetCreatureOutfit(cid, {lookType = voc[getPlayerVocation(cid)]}, -1)
return TRUE
end
Post automatically merged:

Post your outfits.xml and your creaturescript
outfit.xml its empty because i want to do that each vocation have different outfit
Post automatically merged:

Post your outfits.xml and your creaturescripts
for example Paladin's vocation is 24 and his outfit is 25 and i just want that he only can on that vocation use 25 outfit
 
Post automatically merged:


outfit.xml its empty because i want to do that each vocation have different outfit
Post automatically merged:


for example Paladin's vocation is 24 and his outfit is 25 and i just want that he only can on that vocation use 25 outfit
I think you need the outfits in outfits.xml, set them "default 0" and give the player according to vocation

For exmple:
XML:
<outfit id="15" premium="yes" default="0">
        <list gender="0" lookType="158" name="Shaman"/>
        <list gender="1" lookType="154" name="Shaman"/>
    </outfit>

Lua:
function onLogin(cid)
   if getPlayerVocation(cid) == 1 then
       If getPlayerStorageValue(cid, 151515) ~= 1 then
          doPlayerAddOutfit(cid,  158, 0) -- give the player the outfit
          setPlayerStorageValue(cid, 151515, 1) -- storage to not keep giving outfit all the time, since you gave the player the outfit
          doSetCreatureOutfit(cid, {lookType = 158}, -1) -- wear the outfit you just won
       end

   elseif getPlayerVocation(cid) == 2 then
      If getPlayerStorageValue(cid, 151515) ~= 1 then
          doPlayerAddOutfit(cid,  154, 0)
          setPlayerStorageValue(cid, 151515, 1)
          doSetCreatureOutfit(cid, {lookType = 154}, -1)
       end
   end
return true
end

In this code, you'll give the outfit and set the outfit, so the player owns the outfit, it's simple, just for you to have a base.
 
Last edited:
I think you need the outfits in outfits.xml, set them "default 0" and give the player according to vocation

For exmple:
XML:
<outfit id="15" premium="yes" default="0">
        <list gender="0" lookType="158" name="Shaman"/>
        <list gender="1" lookType="154" name="Shaman"/>
    </outfit>

Lua:
function onLogin(cid)
   if getPlayerVocation(cid) == 1 then
       If getPlayerStorageValue(cid, 151515) ~= 1 then
          doPlayerAddOutfit(cid,  158, 0)
          setPlayerStorageValue(cid, 151515, 1)
          doSetCreatureOutfit(cid, {lookType = 158}, -1)
       end

   elseif getPlayerVocation(cid) == 2 then
      If getPlayerStorageValue(cid, 151515) ~= 1 then
          doPlayerAddOutfit(cid,  154, 0)
          setPlayerStorageValue(cid, 151515, 1)
          doSetCreatureOutfit(cid, {lookType = 154}, -1)
       end
   end
return true
end

In this code, you'll give the outfit and set the outfit, so the player owns the outfit, it's simple, just for you to have a base.
i will check thank you!
 
Back
Top