kaleudd 200 Posted September 10, 2017 Report Share Posted September 10, 2017 Gostaria de ajuda,queria saber como faço para quando a bike se mover soltasse um efeito atras dela,toda vez que andasse sairia efeito atras,tipo o fogo de uma bike fire Script usado ; Spoiler function onUse(cid, item, frompos, itemEx, topos) local bike = {lookType = 1394} --- LookType do player em cima da bike. homem local bike1 = {lookType = 1393} --- LookType do player em cima da bike. mulher local speed = 900 --- Velocidade que a bike terá. if getPlayerStorageValue(cid, 32001) == 1 then doRemoveCondition(cid, CONDITION_OUTFIT) doChangeSpeed(cid, -speed) doSendAnimatedText(getCreaturePosition(cid), 'Bike OFF!', 35) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'Você desmontou da bike.') setPlayerStorageValue(cid, 32001, 0) else if getPlayerSex(cid) == 1 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike, -1) doSendAnimatedText(getCreaturePosition(cid), 'Bike ON!', 32) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você montou na bike.') setPlayerStorageValue(cid, 32001, 1) elseif getPlayerSex(cid) == 0 then -- homem doChangeSpeed(cid, speed) doSetCreatureOutfit(cid, bike1, -1) doSendAnimatedText(getCreaturePosition(cid), 'Bike ON!', 32) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você montou na bike.') setPlayerStorageValue(cid, 32001, 1) end end return true end Link to post Share on other sites
Noninhouh 117 Posted September 13, 2017 Report Share Posted September 13, 2017 (edited) No creaturescripts deve ter alguma função tipo: Spoiler function onMove(cid, fromPosition, toPosition) Procura no creaturescripts.xml por "move", e vê qual o lua... No código adicione essa linha: Spoiler if isPlayer(cid) and getPlayerStorageValue(cid, 32001) == 1 then doSendMagicEffect(fromPosition, iddoeffect) end Edited September 13, 2017 by Noninhouh Link to post Share on other sites
kaleudd 200 Posted September 13, 2017 Author Report Share Posted September 13, 2017 22 horas atrás, Noninhouh disse: No creaturescripts deve ter alguma função tipo: Mostrar conteúdo oculto function onMove(cid, fromPosition, toPosition) Procura no creaturescripts.xml por "move", e vê qual o lua... No código adicione essa linha: Mostrar conteúdo oculto if isPlayer(cid) and getPlayerStorageValue(cid, 32001) == 1 then doSendMagicEffect(fromPosition, iddoeffect) end Não tem nenhum .lua usando a função OnMove Link to post Share on other sites
Noninhouh 117 Posted September 15, 2017 Report Share Posted September 15, 2017 Então vamos criar um kk Em creaturescripts.xml coloque uma linha assim: Spoiler <event type="move" name="Bike" event="script" value="bike.lua"/> Crie um bike.lua no creaturescripts e cole isso: Spoiler function onMove(cid, fromPosition, toPosition) if isPlayer(cid) and getPlayerStorageValue(cid, 32001) == 1 then doSendMagicEffect(fromPosition, iddoeffect) end return true end Não tenho certeza se isso essa função já vem nos servidores de tibia, mas tente... Link to post Share on other sites
kaleudd 200 Posted September 15, 2017 Author Report Share Posted September 15, 2017 11 horas atrás, Noninhouh disse: Então vamos criar um kk Em creaturescripts.xml coloque uma linha assim: Ocultar conteúdo <event type="move" name="Bike" event="script" value="bike.lua"/> Crie um bike.lua no creaturescripts e cole isso: Ocultar conteúdo function onMove(cid, fromPosition, toPosition) if isPlayer(cid) and getPlayerStorageValue(cid, 32001) == 1 then doSendMagicEffect(fromPosition, iddoeffect) end return true end Não tenho certeza se isso essa função já vem nos servidores de tibia, mas tente... Nada aconteceu,sem erros,mais nada de efeito '-' Link to post Share on other sites
Noninhouh 117 Posted September 15, 2017 Report Share Posted September 15, 2017 Esqueci uma coisinha kk Em /creaturescripts/scripts/login.lua coloque isso: Spoiler registerCreatureEvent(cid, "Bike") Link to post Share on other sites
kaleudd 200 Posted September 15, 2017 Author Report Share Posted September 15, 2017 registrei e continua igual,sem erros mais tmb sem efeito ao andar Link to post Share on other sites
Administrador Frenvius 202 Posted November 29, 2017 Administrador Report Share Posted November 29, 2017 A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. Link to post Share on other sites
Stigal 582 Posted November 29, 2017 Report Share Posted November 29, 2017 A questão neste tópico de suporte foi encerrada por falta de resposta. Este tópico está fechado e foi movido para Suporte - Tópicos Sem Resposta. Link to post Share on other sites
Recommended Posts