Ola Pessoal Queria Uma Script De Quando Chegar Um Certo Lvl O Player Mudar De Outfit
Pf Se Eu Postei Na Area Errada So Mande Para Outro Lugar
Ola Pessoal Queria Uma Script De Quando Chegar Um Certo Lvl O Player Mudar De Outfit
Pf Se Eu Postei Na Area Errada So Mande Para Outro Lugar
O local correto seria
http://www.xtibia.com/forum/forum/86-pedidos-e-duvidas-scripting/
Local Incorreto.
Tópico Movido
local config = {
[1] = {level = 100, roupa = 240},
[2] = {level = 150, roupa = 245},
[3] = {level = 200, roupa = 250},
}
function onAdvance(cid, skill, oldLevel, newLevel)
if skill ~= 8 then return true end
for _,x in pairs(config) do
if newLevel == x.level then
doSetCreatureOutfit(cid, {lookType = x.roupa}, -1)
end
end
end
não tive tempo pra testa mais acho que esta certo, ficou bem fácil de ser editado, mesmo assim vou explicar:
local config = {
[1] = {level = 100, roupa = 240},
[2] = {level = 150, roupa = 245},
[3] = {level = 200, roupa = 250},
}
[1][2][3] = um contador se for por outro coloque na sequencia [4], [5] em diante
level = o level necessário para o jogar trocar de roupa no caso se ele for level 99 quando upar 100 muda outfit
roupa = apenas lookType da outfit
Se for adicionar novos não se esqueça das ( , ).
Atenciosamente: TopMaster.
Servidor que recomendo a todos jogarem Versão 8.60 Full Global Dedicado em Linux, sem lag e sem corrupção visite e confira: site/ip: silenthill.servegame.com
Sou aprendiz de Scripter, se te ajudei não custará nada você me reputar dando REP+
Clique na imagem acima e curta nossa pagina no facebook.
Aguardem, em breve!
Melhor empresa para hospedar o seu servidor, ótimo suporte e produtos, não deixe de conferir!!
Melhor empresa para hospedar o seu servidor, ótimo suporte e produtos, não deixe de conferir!!
queria um por vocaçao
tipo druid virar dark aprendice
E Tbm Qeria Saber Onde colokar a script
Crie um arquivo chamado outfits.lua em data/creaturescripts/scripts. Cole o código abaixo:
local outfits = {
[1] = {
[25] = 86,
[50] = 98,
[100] = 122
},
[2] = {
[25] = 91,
[50] = 103,
[100] = 127
},
[3] = {
[25] = 96,
[50] = 108,
[100] = 132
},
[4] = {
[25] = 101,
[50] = 113,
[100] = 137
}
}
function onLogin(cid)
registerCreatureEvent(cid, "Outfits")
return true
end
function onAdvance(cid, skill, fromLevel, toLevel)
if not outfits[getPlayerVocation(cid)] then
return true
end
local tmp = outfits[getPlayerVocation(cid)]
if not tmp[toLevel] then
return true
end
local looktype = tmp[toLevel]
doSetCreatureOutfit(cid, looktype, -1)
return true
end
Adicione essas linhas em seu creaturescripts.xml
<event type="login" name="PlayerLogin37" event="script" value="outfits.lua"/> <event type="advance" name="Outfits" event="script" value="outfits.lua"/>
Só configurar essa parte aqui a seu gosto
local outfits = {
[1] = {
[25] = 86,
[50] = 98,
[100] = 122
},
[2] = {
[25] = 91,
[50] = 103,
[100] = 127
},
[3] = {
[25] = 96,
[50] = 108,
[100] = 132
},
[4] = {
[25] = 101,
[50] = 113,
[100] = 137
}
}
Seguindo sempre o modelo
local outfits = {
[1] = {
[25] = 86,
[50] = 98,
[100] = 122,
[NEW_LEVEL] = NEW_OUTFIT
},
[2] = {
[25] = 91,
[50] = 103,
[100] = 127,
[NEW_LEVEL] = NEW_OUTFIT
},
[3] = {
[25] = 96,
[50] = 108,
[100] = 132,
[NEW_LEVEL] = NEW_OUTFIT
},
[4] = {
[25] = 101,
[50] = 113,
[100] = 137,
[NEW_LEVEL] = NEW_OUTFIT
},
[NEW_VOCATION_ID] = {
[NEW_LEVEL] = NEW_OUTFIT,
[NEW_LEVEL] = NEW_OUTFIT
}
}
Abraços.
Cara Esse Ai Nao Funciono O Char Nao Vira Nada Ele Continua Do Msm Jeito
Meu Ot é 8.54
Pf Ve Ai Se Vc Consegui