DE
script

Alterar Outfit Nese Script

Por deadkiller, 01 de dez. de 2015 em Scripts

outfit
alterar
tibia
6
1.7k
deadkillerD
01 de dezembro de 2015 às 23:38

gostaria de perguntar uma coisa!Dado este Script:

local vocs = {

[0] = 11,

[5] = 9,

[2] = 10,

[6] = 10,

[3] = 11,

[7] = 11,

[4] = 12,

[8] = 12,

}

function onUse(cid, item, fromPosition, itemEx, toPosition)

if getPlayerStorageValue(cid, 1992) == 1 then

return doCreatureSay(cid, "Voce Ja ganhou a Armadura", TALKTYPE_ORANGE_1)

end

if getPlayerLevel(cid) < 20 then

return doCreatureSay(cid, "Voce deve ter level 20 ou mais para usar o Item!", TALKTYPE_ORANGE_1)

end

doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)])

doSendMagicEffect(fromPosition, 2)

doRemoveItem(item.uid, 1)

return setPlayerStorageValue(cid, 1992, 1)

end

qual comando faço pra colocar uma Outfit? Pra que a nova vocação, ganhe uma Nova Outfit Também?

Obrigado!

Luga03L
02 de dezembro de 2015 às 08:29

Pelo oque eu entendi é isso:

--[VOC] = {voc = NewVoc, looktype = looktype do outfit}
local vocs = {
[0] = {voc = 11, looktype = 231}, 
[5] = {voc = 9, looktype = 231},
[2] = {voc = 10, looktype = 231},
[6] = {voc = 10, looktype = 231},
[3] = {voc = 11, looktype = 231},
[7] = {voc = 11, looktype = 231},
[4] = {voc = 12, looktype = 231},
[8] = {voc = 12, looktype = 231},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 1992) == 1 then 
return doCreatureSay(cid, "Voce Ja ganhou a Armadura", TALKTYPE_ORANGE_1)
end
if getPlayerLevel(cid) < 20 then
return doCreatureSay(cid, "Voce deve ter level 20 ou mais para usar o Item!", TALKTYPE_ORANGE_1)
end
doCreatureChangeOutfit(cid, {lookType = vocs[getPlayerVocation(cid)].looktype})
doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)].voc)
doSendMagicEffect(fromPosition, 2)
doRemoveItem(item.uid, 1) 
return setPlayerStorageValue(cid, 1992, 1)
end


Para configurar muda apenas a tabela lá com o nome de looktype

deadkillerD
02 de dezembro de 2015 às 13:30

Ahh Obrigado Zet0! Era isso sim! Muito obrigado!

Ah, você sabe onde eu altero o Efeito que é pra sair quando usar o item?

Muito Obrigado Novamente!

Você é fera!

Luga03L
02 de dezembro de 2015 às 13:52

Atualize seu código para este:

 

 

local effect = 19 -- Para mudar o efeito mude apenas isso!
 
--[VOC] = {voc = NewVoc, looktype = looktype do outfit}
local vocs = {
[0] = {voc = 11, looktype = 231}, 
[5] = {voc = 9, looktype = 231},
[2] = {voc = 10, looktype = 231},
[6] = {voc = 10, looktype = 231},
[3] = {voc = 11, looktype = 231},
[7] = {voc = 11, looktype = 231},
[4] = {voc = 12, looktype = 231},
[8] = {voc = 12, looktype = 231},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 1992) == 1 then 
return doCreatureSay(cid, "Voce Ja ganhou a Armadura", TALKTYPE_ORANGE_1)
end
if getPlayerLevel(cid) < 20 then
return doCreatureSay(cid, "Voce deve ter level 20 ou mais para usar o Item!", TALKTYPE_ORANGE_1)
end
doSendMagicEffect(getCreaturePosition(cid), effect)
doCreatureChangeOutfit(cid, {lookType = vocs[getPlayerVocation(cid)].looktype})
doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)].voc)
doSendMagicEffect(fromPosition, 2)
doRemoveItem(item.uid, 1) 
return setPlayerStorageValue(cid, 1992, 1)
end
deadkillerD
02 de dezembro de 2015 às 15:40

Não tá fazendo o Efeito @Zet0

Mas de resto está funcionando.

O Efeito, só pega ro ID dele no ObjectBuilder né?

se for, fiz certinho, e não foi! :S

Mas é isso!

Luga03L
02 de dezembro de 2015 às 16:04

Qual efeito você está usando? Obs: quando for usar o efeito tem que coloca o id dele no object builder e somar + 1, por exemplo, o efeito do fogo é 14, ai dentro do script tem que colocar 15, para aparecer o efeito do fogo! tendeu?

 

tenta usar este script, e me diz oque aconteceu quando utilizou o efeito ok?

 

 

local effectin = 19 -- Para mudar o efeito mude apenas isso!
 
--[VOC] = {voc = NewVoc, looktype = looktype do outfit}
local vocs = {
[0] = {voc = 11, looktype = 231}, 
[5] = {voc = 9, looktype = 231},
[2] = {voc = 10, looktype = 231},
[6] = {voc = 10, looktype = 231},
[3] = {voc = 11, looktype = 231},
[7] = {voc = 11, looktype = 231},
[4] = {voc = 12, looktype = 231},
[8] = {voc = 12, looktype = 231},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerStorageValue(cid, 1992) == 1 then 
return doCreatureSay(cid, "Voce Ja ganhou a Armadura", TALKTYPE_ORANGE_1)
end
if getPlayerLevel(cid) < 20 then
return doCreatureSay(cid, "Voce deve ter level 20 ou mais para usar o Item!", TALKTYPE_ORANGE_1)
end
doSendMagicEffect(getCreaturePosition(cid), effectin)
print(1)
doCreatureChangeOutfit(cid, {lookType = vocs[getPlayerVocation(cid)].looktype})
doPlayerSetVocation(cid, vocs[getPlayerVocation(cid)].voc)
doSendMagicEffect(fromPosition, 2)
doRemoveItem(item.uid, 1) 
return setPlayerStorageValue(cid, 1992, 1)
end