Postado Março 3, 2019 6 anos Autor 2 minutos atrás, Reds disse: Eu faço quando estiver em casa, é só salvar em storages a outfit e cores do cara e usar um stepOut Ok vou aguardar obrigado espero você.
Postado Março 4, 2019 6 anos local config = { [1] = 113, -- [Vocation] = 71 = Roupa [2] = 114, -- Naruto } function onStepIn(cid, item, pos) setPlayerStorageValue(cid, 29102901, getCreatureOutfit(cid).looktype) if (config[getPlayerVocation(cid)]) then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) elseif (config[getPlayerVocation(cid)]) then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) end doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) return true end function onStepOut(cid, item, position, fromPosition) local oldOutfit = getPlayerStorageValue(cid, 29102901) doCreatureChangeOutfit (cid, {lookType = oldOutfit}) return true end testa ai Editado Março 4, 2019 6 anos por Reds (veja o histórico de edições) Toda terça-feira um tópico novo: Descanso para curar mana (Spell): https://tibiaking.com/forums/topic/94615-spell-descanso-para-curar-mana/ Peça sua spell (Suporte): https://tibiaking.com/forums/topic/84162-peça-sua-spell/ Chuva de flechas (Spell): https://tibiaking.com/forums/topic/72232-chuva-de-flechas-spell/ Doom (Spell): https://tibiaking.com/forums/topic/51622-doom-spell/ Utilização do VS Code (Infra): https://tibiaking.com/forums/topic/94463-utilizando-o-visual-studio-code-notepad-nunca-mais/ SD com Combo (Spell): https://tibiaking.com/forums/topic/94520-sd-modificada/ Alteração attack speed (C++): https://tibiaking.com/forums/topic/94714-c-attack-speed-spells-itens-e-onde-você-quiser/ Bônus de Speed (NPC): https://tibiaking.com/forums/topic/94809-npc-concede-bônus-aos-players/
Postado Março 4, 2019 6 anos Autor 50 minutos atrás, Reds disse: local config = { [1] = 113, -- [Vocation] = 71 = Roupa [2] = 114, -- Naruto } function onStepIn(cid, item, pos) setPlayerStorageValue(cid, 29102901, getCreatureOutfit(cid).looktype) if (config[getPlayerVocation(cid)]) then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) elseif (config[getPlayerVocation(cid)]) then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) end doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) return true end function onStepOut(cid, item, position, fromPosition) local oldOutfit = getPlayerStorageValue(cid, 29102901) doCreatureChangeOutfit (cid, {lookType = oldOutfit}) return true end testa ai Ok @Reds deu debug mano. quando pisa no tile. é tipo quero que quando ele entre no tile ganha a outfit e quando saia volte a normal isso para cada vocação não sei se intendeu. é o mesmo script só coloca pra remove a outfit se sair do tile.
Postado Março 4, 2019 6 anos @KR3 local config = { [1] = 71, -- [Vocation] = 71 = Roupa [2] = 84, -- Naruto } local storage = 548754 function onStepIn(cid, item, frompos, topos) if (config[getPlayerVocation(cid)]) and getPlayerStorageValue(cid, storage) <= 0 then doCreatureChangeOutfit (cid, {lookType = config[getPlayerVocation(cid)]}) doSendMagicEffect(getThingPos(cid), 2) doSendAnimatedText(getPlayerPosition(cid),"Que Frio!", math.random(01,255)) setPlayerStorageValue(cid, storage, getCreatureOutfit(cid).lookType) end return true end function onStepOut(cid, item, frompos, topos) if isPlayer(cid) and getPlayerStorageValue(cid, storage) > 1 then doCreatureChangeOutfit(cid, {lookType = getPlayerStorageValue(cid, storage)}) setPlayerStorageValue(cid, storage, -1) end return true end TAG <movevent type="StepIn" actionid="16530" event="script" value="nome do seu script .lua"/> <movevent type="StepOut" actionid="16530" event="script" value="nome do seu script.lua"/> ai coloca no aid do tlle = 16530 [*Ninguém será digno do sucesso se não usar suas derrotas para conquistá-lo.*] DISCORD: vodkart#6090
Postado Março 4, 2019 6 anos Autor @Vodkart funciona até funcionou porem não remove a outfit. ganhei ela mas quero que se sair do tile saia a outfit.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.