Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.

Join the forum, it's quick and easy

Tibia Mod
Forum zostało Przeniesione tutaj:
http://tibiamod.xaa.pl/

Zapraszam.
Tibia Mod
Czy chcesz zareagować na tę wiadomość? Zarejestruj się na forum za pomocą kilku kliknięć lub zaloguj się, aby kontynuować.

[creaturevent] Looktype dla danej profesji

Go down

[creaturevent] Looktype dla danej profesji Empty [creaturevent] Looktype dla danej profesji

Pisanie by darkes Czw Lis 15, 2012 8:52 pm

Skrypt polega na tym że do każdej profesji możemy przypisać sobie osobny outfit.

config.lua
Kod:
allowChangeOutfit = false
data/creaturescripts/creaturescripts.xml
Kod:
    <event type="login" name="Outfitek" event="script" value="outfitek.lua"/>
data/creaturescripts/scripts/login.lua
Kod:
    registerCreatureEvent(cid, "Outfitek")
Tworzymy outfitek.lua w data/creaturescripts/
v1
Kod:
function onLogin(cid)
local outfity = {
   [1] = {121},
   [2] = {122},
   [3] = {123}
            }
local i = 1, #outfity
if getPlayerVocation(cid) == outfity[i] then
doSetCreatureOutfit(cid, outfity[i][1], -1)
end
return true
end
[1], [2], [3] id profesji
121, 122, 123 outfit dla danej profesji

v2
Kod:
function onLogin(cid)
local outfity = {
   [1] = {121, 141},
   [2] = {122, 142},
   [3] = {123, 143}
            }
local i = 1, #outfity
if getPlayerVocation(cid) == outfity[i] then
if getPlayerSex(cid) == 1
doSetCreatureOutfit(cid, outfity[i][1], -1)
else
doSetCreatureOutfit(cid, outfity[i][2], -1)
end
return true
end
[1], [2], [3] id profesji
121, 122, 123 outfit dla mężczyzn
141, 142, 143 outfit dla kobiet

darkes
Uploader

Liczba postów : 27
Join date : 13/11/2012

Powrót do góry Go down

Powrót do góry

- Similar topics

 
Permissions in this forum:
Nie możesz odpowiadać w tematach