DanJ93
ElfBot Helper
- Joined
- Jan 18, 2009
- Messages
- 2,631
- Reaction score
- 200
Skrypt polega na tym ?e do ka?dej profesji mo?emy przypisa? sobie osobny outfit.
config.lua
data/creaturescripts/creaturescripts.xml
data/creaturescripts/scripts/login.lua
tworzymy outfitek.lua w data/creaturescripts/
[1], [2], [3] id profesji
121, 122, 123 outfit dla danej profesji
[1], [2], [3] id profesji
121, 122, 123 outfit dla m??czyzn
141, 142, 143 outfit dla kobiet
config.lua
PHP:
allowChangeOutfit = false
PHP:
<event type="login" name="Outfitek" event="script" value="outfitek.lua"/>
PHP:
registerCreatureEvent(cid, "Outfitek")
- v1
PHP:
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
121, 122, 123 outfit dla danej profesji
- v2
PHP:
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
121, 122, 123 outfit dla m??czyzn
141, 142, 143 outfit dla kobiet