function Player.confirmOutfits(self)
local vocationOutfits = {
default = {
[1] = {male = 128, female = 136}, -- if the player is wearing an outfit their vocation can't use, it will set their outfit to this default outfit.
[2] = {male = 128, female = 136},
[3] = {male = 128, female = 136},
[4] = {male = 128, female = 136},
[5] = {male = 128, female = 136},
[6] = {male = 128, female = 136},
[7] = {male = 128, female = 136},
[8] = {male = 128, female = 136}
},
list = {
-- Female outfits
{looktype="136" , storage = 11111, vocations = {0} }, -- 0 means all vocations can use the outfit
{looktype="137" , storage = 11111, vocations = {1, 2, 5, 6} }, -- input as many vocations as you want who can wear this outfit
{looktype="138" , storage = 11111, vocations = {0} },
{looktype="139" , storage = 11111, vocations = {0} }, -- if storage > 0, then we assume the player has unlocked this outfit
{looktype="140" , storage = 11111, vocations = {0} },
{looktype="141" , storage = 11111, vocations = {0} },
{looktype="142" , storage = 11111, vocations = {0} },
{looktype="147" , storage = 11111, vocations = {0} },
{looktype="148" , storage = 11111, vocations = {0} },
{looktype="149" , storage = 11111, vocations = {0} },
{looktype="150" , storage = 11111, vocations = {0} },
{looktype="155" , storage = 11111, vocations = {0} },
{looktype="156" , storage = 11111, vocations = {0} },
{looktype="157" , storage = 11111, vocations = {0} },
{looktype="158" , storage = 11111, vocations = {0} },
{looktype="252" , storage = 11111, vocations = {0} },
{looktype="269" , storage = 11111, vocations = {0} },
{looktype="270" , storage = 11111, vocations = {0} },
{looktype="279" , storage = 11111, vocations = {0} },
{looktype="288" , storage = 11111, vocations = {0} },
{looktype="324" , storage = 11111, vocations = {0} },
{looktype="329" , storage = 11111, vocations = {0} },
{looktype="336" , storage = 11111, vocations = {0} },
{looktype="366" , storage = 11111, vocations = {0} },
{looktype="431" , storage = 11111, vocations = {0} },
{looktype="433" , storage = 11111, vocations = {0} },
{looktype="464" , storage = 11111, vocations = {0} },
{looktype="466" , storage = 11111, vocations = {0} },
{looktype="471" , storage = 11111, vocations = {0} },
{looktype="513" , storage = 11111, vocations = {0} },
{looktype="514" , storage = 11111, vocations = {0} },
{looktype="542" , storage = 11111, vocations = {0} },
{looktype="575" , storage = 11111, vocations = {0} },
{looktype="578" , storage = 11111, vocations = {0} },
{looktype="618" , storage = 11111, vocations = {0} },
{looktype="620" , storage = 11111, vocations = {0} },
{looktype="632" , storage = 11111, vocations = {0} },
{looktype="635" , storage = 11111, vocations = {0} },
{looktype="636" , storage = 11111, vocations = {0} },
{looktype="664" , storage = 11111, vocations = {0} },
{looktype="666" , storage = 11111, vocations = {0} },
{looktype="683" , storage = 11111, vocations = {0} },
{looktype="694" , storage = 11111, vocations = {0} },
{looktype="696" , storage = 11111, vocations = {0} },
{looktype="698" , storage = 11111, vocations = {0} },
{looktype="724" , storage = 11111, vocations = {0} },
{looktype="732" , storage = 11111, vocations = {0} },
{looktype="745" , storage = 11111, vocations = {0} },
{looktype="749" , storage = 11111, vocations = {0} },
{looktype="759" , storage = 11111, vocations = {0} },
{looktype="845" , storage = 11111, vocations = {0} },
{looktype="852" , storage = 11111, vocations = {0} },
{looktype="874" , storage = 11111, vocations = {0} },
{looktype="885" , storage = 11111, vocations = {0} },
{looktype="900" , storage = 11111, vocations = {0} },
{looktype="909" , storage = 11111, vocations = {0} },
{looktype="929" , storage = 11111, vocations = {0} },
{looktype="956" , storage = 11111, vocations = {0} },
{looktype="958" , storage = 11111, vocations = {0} },
{looktype="963" , storage = 11111, vocations = {0} },
{looktype="965" , storage = 11111, vocations = {0} },
{looktype="967" , storage = 11111, vocations = {0} },
{looktype="969" , storage = 11111, vocations = {0} },
{looktype="971" , storage = 11111, vocations = {0} },
{looktype="973" , storage = 11111, vocations = {0} },
{looktype="975" , storage = 11111, vocations = {0} },
{looktype="1020", storage = 11111, vocations = {0} },
{looktype="1024", storage = 11111, vocations = {0} },
{looktype="1043", storage = 11111, vocations = {0} },
{looktype="1050", storage = 11111, vocations = {0} },
{looktype="1057", storage = 11111, vocations = {0} },
{looktype="1070", storage = 11111, vocations = {0} },
{looktype="1095", storage = 11111, vocations = {0} },
{looktype="1103", storage = 11111, vocations = {0} },
{looktype="1128", storage = 11111, vocations = {0} },
{looktype="1147", storage = 11111, vocations = {0} },
{looktype="1162", storage = 11111, vocations = {0} },
{looktype="1174", storage = 11111, vocations = {0} },
{looktype="1187", storage = 11111, vocations = {0} },
{looktype="1203", storage = 11111, vocations = {0} },
{looktype="1205", storage = 11111, vocations = {0} },
{looktype="1207", storage = 11111, vocations = {0} },
{looktype="1211", storage = 11111, vocations = {0} },
{looktype="1244", storage = 11111, vocations = {0} },
{looktype="1246", storage = 11111, vocations = {0} },
{looktype="1252", storage = 11111, vocations = {0} },
{looktype="1271", storage = 11111, vocations = {0} },
{looktype="1280", storage = 11111, vocations = {0} },
{looktype="1283", storage = 11111, vocations = {0} },
{looktype="1289", storage = 11111, vocations = {0} },
{looktype="1293", storage = 11111, vocations = {0} },
{looktype="1323", storage = 11111, vocations = {0} },
{looktype="1332", storage = 11111, vocations = {0} },
{looktype="1339", storage = 11111, vocations = {0} },
{looktype="1372", storage = 11111, vocations = {0} },
{looktype="1383", storage = 11111, vocations = {0} },
{looktype="1385", storage = 11111, vocations = {0} },
{looktype="1387", storage = 11111, vocations = {0} },
{looktype="1416", storage = 11111, vocations = {0} },
{looktype="1437", storage = 11111, vocations = {0} },
{looktype="1445", storage = 11111, vocations = {0} },
{looktype="1450", storage = 11111, vocations = {0} },
{looktype="1456", storage = 11111, vocations = {0} },
{looktype="1461", storage = 11111, vocations = {0} },
{looktype="1490", storage = 11111, vocations = {0} },
{looktype="1501", storage = 11111, vocations = {0} },
{looktype="1569", storage = 11111, vocations = {0} },
{looktype="1576", storage = 11111, vocations = {0} },
{looktype="1582", storage = 11111, vocations = {0} },
{looktype="1598", storage = 11111, vocations = {0} },
-- Male outfits
{looktype="128" , storage = 11111, vocations = {0} },
{looktype="129" , storage = 11111, vocations = {0} },
{looktype="130" , storage = 11111, vocations = {0} },
{looktype="131" , storage = 11111, vocations = {0} },
{looktype="132" , storage = 11111, vocations = {0} },
{looktype="133" , storage = 11111, vocations = {0} },
{looktype="134" , storage = 11111, vocations = {0} },
{looktype="143" , storage = 11111, vocations = {0} },
{looktype="144" , storage = 11111, vocations = {0} },
{looktype="145" , storage = 11111, vocations = {0} },
{looktype="146" , storage = 11111, vocations = {0} },
{looktype="151" , storage = 11111, vocations = {0} },
{looktype="152" , storage = 11111, vocations = {0} },
{looktype="153" , storage = 11111, vocations = {0} },
{looktype="154" , storage = 11111, vocations = {0} },
{looktype="251" , storage = 11111, vocations = {0} },
{looktype="268" , storage = 11111, vocations = {0} },
{looktype="273" , storage = 11111, vocations = {0} },
{looktype="278" , storage = 11111, vocations = {0} },
{looktype="289" , storage = 11111, vocations = {0} },
{looktype="325" , storage = 11111, vocations = {0} },
{looktype="328" , storage = 11111, vocations = {0} },
{looktype="335" , storage = 11111, vocations = {0} },
{looktype="367" , storage = 11111, vocations = {0} },
{looktype="430" , storage = 11111, vocations = {0} },
{looktype="432" , storage = 11111, vocations = {0} },
{looktype="463" , storage = 11111, vocations = {0} },
{looktype="465" , storage = 11111, vocations = {0} },
{looktype="472" , storage = 11111, vocations = {0} },
{looktype="512" , storage = 11111, vocations = {0} },
{looktype="516" , storage = 11111, vocations = {0} },
{looktype="541" , storage = 11111, vocations = {0} },
{looktype="574" , storage = 11111, vocations = {0} },
{looktype="577" , storage = 11111, vocations = {0} },
{looktype="610" , storage = 11111, vocations = {0} },
{looktype="619" , storage = 11111, vocations = {0} },
{looktype="633" , storage = 11111, vocations = {0} },
{looktype="634" , storage = 11111, vocations = {0} },
{looktype="637" , storage = 11111, vocations = {0} },
{looktype="665" , storage = 11111, vocations = {0} },
{looktype="667" , storage = 11111, vocations = {0} },
{looktype="684" , storage = 11111, vocations = {0} },
{looktype="695" , storage = 11111, vocations = {0} },
{looktype="697" , storage = 11111, vocations = {0} },
{looktype="699" , storage = 11111, vocations = {0} },
{looktype="725" , storage = 11111, vocations = {0} },
{looktype="733" , storage = 11111, vocations = {0} },
{looktype="746" , storage = 11111, vocations = {0} },
{looktype="750" , storage = 11111, vocations = {0} },
{looktype="760" , storage = 11111, vocations = {0} },
{looktype="846" , storage = 11111, vocations = {0} },
{looktype="853" , storage = 11111, vocations = {0} },
{looktype="873" , storage = 11111, vocations = {0} },
{looktype="884" , storage = 11111, vocations = {0} },
{looktype="899" , storage = 11111, vocations = {0} },
{looktype="908" , storage = 11111, vocations = {0} },
{looktype="931" , storage = 11111, vocations = {0} },
{looktype="955" , storage = 11111, vocations = {0} },
{looktype="957" , storage = 11111, vocations = {0} },
{looktype="962" , storage = 11111, vocations = {0} },
{looktype="964" , storage = 11111, vocations = {0} },
{looktype="966" , storage = 11111, vocations = {0} },
{looktype="968" , storage = 11111, vocations = {0} },
{looktype="970" , storage = 11111, vocations = {0} },
{looktype="972" , storage = 11111, vocations = {0} },
{looktype="974" , storage = 11111, vocations = {0} },
{looktype="1021", storage = 11111, vocations = {0} },
{looktype="1023", storage = 11111, vocations = {0} },
{looktype="1042", storage = 11111, vocations = {0} },
{looktype="1051", storage = 11111, vocations = {0} },
{looktype="1056", storage = 11111, vocations = {0} },
{looktype="1069", storage = 11111, vocations = {0} },
{looktype="1094", storage = 11111, vocations = {0} },
{looktype="1102", storage = 11111, vocations = {0} },
{looktype="1127", storage = 11111, vocations = {0} },
{looktype="1146", storage = 11111, vocations = {0} },
{looktype="1161", storage = 11111, vocations = {0} },
{looktype="1173", storage = 11111, vocations = {0} },
{looktype="1186", storage = 11111, vocations = {0} },
{looktype="1202", storage = 11111, vocations = {0} },
{looktype="1204", storage = 11111, vocations = {0} },
{looktype="1206", storage = 11111, vocations = {0} },
{looktype="1210", storage = 11111, vocations = {0} },
{looktype="1243", storage = 11111, vocations = {0} },
{looktype="1245", storage = 11111, vocations = {0} },
{looktype="1251", storage = 11111, vocations = {0} },
{looktype="1270", storage = 11111, vocations = {0} },
{looktype="1279", storage = 11111, vocations = {0} },
{looktype="1282", storage = 11111, vocations = {0} },
{looktype="1288", storage = 11111, vocations = {0} },
{looktype="1292", storage = 11111, vocations = {0} },
{looktype="1322", storage = 11111, vocations = {0} },
{looktype="1331", storage = 11111, vocations = {0} },
{looktype="1338", storage = 11111, vocations = {0} },
{looktype="1371", storage = 11111, vocations = {0} },
{looktype="1382", storage = 11111, vocations = {0} },
{looktype="1384", storage = 11111, vocations = {0} },
{looktype="1386", storage = 11111, vocations = {0} },
{looktype="1415", storage = 11111, vocations = {0} },
{looktype="1436", storage = 11111, vocations = {0} },
{looktype="1444", storage = 11111, vocations = {0} },
{looktype="1449", storage = 11111, vocations = {0} },
{looktype="1457", storage = 11111, vocations = {0} },
{looktype="1460", storage = 11111, vocations = {0} },
{looktype="1489", storage = 11111, vocations = {0} },
{looktype="1500", storage = 11111, vocations = {0} },
{looktype="1568", storage = 11111, vocations = {0} },
{looktype="1575", storage = 11111, vocations = {0} },
{looktype="1581", storage = 11111, vocations = {0} },
{looktype="1597", storage = 11111, vocations = {0} }
}
}
local changeOutfit = false
local outfit = self:getOutfit()
local vocationId = self:getVocation():getId()
for k, v in pairs(vocationOutfits.list)
if self:getStorageValue(v.storage) <= 0 or (not table.contains(v.vocations, 0) and not table.contains(v.vocations, vocationId)) then
if outfit.lookType == v.looktype then
changeOutfit = true
end
if self:hasOutfit(v.looktype) then
self:removeOutfit(v.looktype)
end
else
if not self:hasOutfit(v.looktype) then
self:addOutfit(v.looktype)
end
end
end
if changeOutfit then
local sex = self:getSex() == 0 and "female" or "male"
outfit.lookType = vocationOutfits.default[vocationId][sex]
self:setOutfit(outfit)
end
return true
end