Ir para conteúdo
  • 0

Change outfit Tile


Creatserv

Pergunta

Eu vir aki perdi se tem como deixa esse script aki

 

 

 

function onStepIn(cid, item, pos)

local vocation = getPlayerVocation(cid)
local sex = getPlayerSex(cid)
local outfit1 = {lookType = 267} --- entre colchetes, os LookTypes correspondentes a cada outfit
local outfitfemale1
= {lookType = 267}
local outfit2 = {lookType = 268}
local outfitfemale2 = {lookType = 268}
local outfit3 = {lookType = 269}
local outfitfemale3 = {lookType = 269}


if item.actionid == 0000 --- ActionId do tile em que o player irá pisar.
then
if vocation == 1 then
doSendMagicEffect
(getCreaturePosition(cid), 29) --- Efeito que aparecerá quando o player pisar no tile.
doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) --- Mensagem animada que aparecerá assim que a outfit for trocada
if sex == 0 then
doPlayerAddOutfit
(cid, outfitfemale1)
else
doPlayerAddOutfit(cid, outfit1)

end


elseif vocation
== 2 then
doSendMagicEffect
(getCreaturePosition(cid), 29) --- Efeito que aparecerá quando o player pisar no tile.
doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) --- Mensagem animada que aparecerá assim que a outfit for trocada
if sex == 0 then
doPlayerAddOutfit
(cid, outfitfemale2)
else
doPlayerAddOutfit(cid, outfit2)

end

elseif vocation
== 3 then
doSendMagicEffect
(getCreaturePosition(cid), 29) --- Efeito que aparecerá quando o player pisar no tile.
doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) --- Mensagem animada que aparecerá assim que a outfit for trocada
if sex == 0 then
doPlayerAddOutfit
(cid, outfitfemale3)
else
doPlayerAddOutfit(cid, outfit3)

end
end
end

return true
end

 

Pra cada vocaçao tem seu proprio Outfit ao pisa tile. tipo:

 

 

 

local table = {
[1] = 125, --[vocation] = id do Outift
[10] = 522,
[130] = 852,
[150] = 922,
[160] = 292,
[170] = 36,
[180] = 29,
[250] = 28,
[260] = 2859,
[140] = 2859,
[90] = 2816,
[200] = 2856,
[220] = 2915,
[280] = 2917,
[110] = 2888,
[190] = 2898
}

 

Espero Resposta.

Link para o comentário
Compartilhar em outros sites

10 respostass a esta questão

Posts Recomendados

  • 0

Isso ja ta feito no seu script, e so colocar o addOutfit dentro do If.

 

Exemplo:

if vocation == 1 then
doSendMagicEffect(getCreaturePosition(cid), 29) --- Efeito que aparecerá quando o player pisar no tile.
doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255)) --- Mensagem animada que aparecerá assim que a outfit for trocada
if sex == 0 then
doPlayerAddOutfit(cid, outfitfemale1)
else
doPlayerAddOutfit(cid, outfit1)

Ele vai da a outfit doPlayerAddOutfit(cid, outfitfemale1) se o player for daquele vocação id = 1

Editado por Shoguns
Link para o comentário
Compartilhar em outros sites

  • 0

AHHHHH, mais o meu server tem mais de 200 voc vaii ficar muito grande assim n.

e n tem esse negocio de male e female.

Editado por Creatserv
Link para o comentário
Compartilhar em outros sites

  • 0


--[vocation]{outfit, efeito}

local config = {

[1] = { {look = 510, efeito = 50} },

[2] = { {look = 510, efeito = 50} },

[3] = { {look = 510, efeito = 50} },

[4] = { {look = 510, efeito = 50} },

[5] = { {look = 510, efeito = 50} },

[6] = { {look = 510, efeito = 50} },

[7] = { {look = 510, efeito = 50} },

[8] = { {look = 510, efeito = 50} },

[9] = { {look = 510, efeito = 50} },

}

 

function onStepIn(cid, item, pos)

 

local vocation = config[getPlayerVocation(cid)]

for i = 1, #vocation do

if vocation then

local outfit = {lookType = vocation.look}

doPlayerAddOutfit(cid, outfit)

doSendMagicEffect(getCreaturePosition(cid), vocation.efeito)

doSendAnimatedText(getPlayerPosition(cid),"Wooaahh!", math.random(01,255))

else

doSendMagicEffect(getCreaturePosition(cid), 1)

end

end

return true

end

 

Editado por lucasromero
Link para o comentário
Compartilhar em outros sites

  • 0

Não vou nem falar nada...

vai no movements, cria um script lua e poe oque eu te passei la dentro, depois vai em movements.xml
poe essa tag
<movevent type="StepIn" actionid="ESCOLHEACTIONID" event="script" value="nomedoscript.lua"/>
depois vai no map editor, coloque o actionid q vc escolheu no tile e pronto.

Link para o comentário
Compartilhar em outros sites

×
×
  • Criar Novo...