Vá em data/creaturescripts/scripts crie um arquivo chamado stamina_loose.lua e adicione dentro:
function onAttack(cid) if getPlayerStamina(cid) <= 39 * 60 * 60 * 1000 and getPlayerStamina(cid) >= 35 * 60 * 60 * 1000 then doChangeSpeed(cid, getCreatureSpeed(cid) - 5) doPlayerSendTextMessage(cid, 20, "Loose stamina, loose 5 of speed!") return true end if getPlayerStamina(cid) <= 34 * 60 * 60 * 1000 and getPlayerStamina(cid) >= 25 * 60 * 60 * 1000 then doChangeSpeed(cid, getCreatureSpeed(cid) - 10) doPlayerSendTextMessage(cid, 20, "Loose stamina, loose 10 of speed!") return true end if getPlayerStamina(cid) <= 24 * 60 * 60 * 1000 and getPlayerStamina(cid) >= 15 * 60 * 60 * 1000 then doChangeSpeed(cid, getCreatureSpeed(cid) - 15) doPlayerSendTextMessage(cid, 20, "Loose stamina, loose 15 of speed!") return true end if getPlayerStamina(cid) <= 14 * 60 * 60 * 1000 and getPlayerStamina(cid) >= 10 * 60 * 60 * 1000 then doChangeSpeed(cid, getCreatureSpeed(cid) - 20) doPlayerSendTextMessage(cid, 20, "Loose stamina, loose 20 of speed!") return true end if getPlayerStamina(cid) <= 9 * 60 * 60 * 1000 and getPlayerStamina(cid) >= 1000 then doChangeSpeed(cid, getCreatureSpeed(cid) - 30) doPlayerSendTextMessage(cid, 20, "Loose stamina, loose 30 of speed!") end return true end
Agora em creaturescripts.xml adicione essa tag:
<event type="attack" name="AttackStamina" event="script" value="stamina_loose.lua"/>




info
Grupo: Artesão
Registrado: 28/09/08
Posts: 110
Reputação: +38
Gênero: Masculino
Char no Tibia: ...
Olá pessoal, bem, eu estava com uma ideia e queria pedir ajuda de vocês!
Gostaria de um script que diminuice a velocidade do character dependendo da stamina EX:
Versão 8.54 0.3.6Pl1