Postado Novembro 11, 2014 10 anos Ola galera do TK queria fazer um pedido de Script,ele funciona assim,Player com o Level 30 irá correr com o Speed na velocidade 300 Supondo,PLayer do Level 300 irá correr na velocidade de 3000 Supondo,então no meu ot (uso centurion) os player Level 8 correm na mesma velocidade que um 300 queria mudar isso,aguardo respotas,Darei todas as informações necessarias para o esclarecimento de duvidas. REP+
Postado Novembro 11, 2014 10 anos Tem aqui olha: http://www.tibiaking.com/forum/topic/41998-creaturescript-level-speed-ao-atingir-determinado-level-reformulado/
Postado Novembro 11, 2014 10 anos Simplifiquei o script citado pelo membro acima.playerspeed.lua (data/creaturescripts/scripts): local ps = { [10] = {speed = 238}, [50] = {speed = 318}, [100] = {speed = 418}, [200] = {speed = 618}, [300] = {speed = 818}, [400] = {speed = 1018}, [500] = {speed = 1218}, [600] = {speed = 1418} } function onAdvance(cid, skill, oldLevel, newLevel) local s, l = getCreatureSpeed(cid), ps[getPlayerLevel(cid)] if skill == SKILL__LEVEL and newLevel >= l then doChangeSpeed(cid, (s - s) + l.speed) end return true end Registro do creature event no login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "PlayerSpeed") Tag - creaturescripts.xml (data/creaturescripts): <event type="advance" name="PlayerSpeed" event="script" value="playerspeed.lua"/> Editado Novembro 11, 2014 10 anos por Suicide (veja o histórico de edições)
Postado Novembro 11, 2014 10 anos Em 11/11/2014 em 19:57, Suicide disse: Simplifiquei o script citado pelo membro acima. playerspeed.lua (data/creaturescripts/scripts): local ps = { [10] = {speed = 238}, [50] = {speed = 318}, [100] = {speed = 418}, [200] = {speed = 618}, [300] = {speed = 818}, [400] = {speed = 1018}, [500] = {speed = 1218}, [600] = {speed = 1418} } function onAdvance(cid, skill, oldLevel, newLevel) local s, l = getCreatureSpeed(cid), ps[getPlayerLevel(cid)] if skill == SKILL__LEVEL and newLevel >= l then doChangeSpeed(cid, (s - s) + l.speed) end return true end Registro do creature event no login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "PlayerSpeed") Tag - creaturescripts.xml (data/creaturescripts): <event type="advance" name="PlayerSpeed" event="script" value="playerspeed.lua"/> Tibia já vem com o sistema de speed por lvl néh ? e qual a velocidade máxima permitida ?
Postado Novembro 11, 2014 10 anos Autor Em 11/11/2014 em 19:57, Suicide disse: Simplifiquei o script citado pelo membro acima. playerspeed.lua (data/creaturescripts/scripts): local ps = { [10] = {speed = 238}, [50] = {speed = 318}, [100] = {speed = 418}, [200] = {speed = 618}, [300] = {speed = 818}, [400] = {speed = 1018}, [500] = {speed = 1218}, [600] = {speed = 1418} } function onAdvance(cid, skill, oldLevel, newLevel) local s, l = getCreatureSpeed(cid), ps[getPlayerLevel(cid)] if skill == SKILL__LEVEL and newLevel >= l then doChangeSpeed(cid, (s - s) + l.speed) end return true end Registro do creature event no login.lua (data/creaturescripts/scripts): registerCreatureEvent(cid, "PlayerSpeed") Tag - creaturescripts.xml (data/creaturescripts): <event type="advance" name="PlayerSpeed" event="script" value="playerspeed.lua"/> Bom fiz tudo certo,mas o player não fica com o speed que eu coloquei,acho que coloquei essa tag no lugar errado do login.lua >>>registerCreatureEvent(cid, "PlayerSpeed") se precisar do meu login.lua me fala que passo ajuda ae.
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.