Odp: 7.92 Po zalogowaniu ustawia profesji dany looktype
Spr?buj takiego zastosowania.
W data/creaturescripts/reaturescripts.xml dodaj:
[xml] <event type="login" name="Outfitek" event="script" value="outfitek.lua"/>[/xml]
W data/creaturescripts/scripts/login.lua dodaj:
[lua]registerCreatureEvent(cid, "Outfitek") [/lua]
Stw?rz outfitek.lua w data/creaturescripts w nim to:
[lua]function onLogin(cid)
local jakisoutfit = {lookType = 122}
if getPlayerVocation(cid) == X then
doSetCreatureOutfit(cid, jakisoutfit, -1)
end
return true
end[/lua]
Je?li chcesz na wi?cej profesji,
u?yj: (nie testowane, ale powinno dzia?a?)
[lua]function onLogin(cid)
local outfity = {
[1] = {121}
[2] = {122}
[3] = {123}
}
for i = 1, #outfity
if getPlayerVocation(cid) == outfity then
doSetCreatureOutfit(cid, outfity[1], -1)
end
return true
end[/lua]
[1], [2], [3] id profesji
121, 122, 123 przyporz?dkowany outfit do danej profesji.