pikachu rosa Posted April 15, 2020 Report Share Posted April 15, 2020 Pessoal, o script abaixo é do faramir, troca ring conforme % de hp, contudo, nao entendi direito como funciona... *********Alguem pode me ajudar a configurar pra deixar ring healing com hp acima de 70% e trocar para might ring abaixo de 69%de hp ************ Equipar item com HP < X e manter item com HP > Y: Este script é configurável, vc coloca o valor do lowhp para a quantidade de %HP que ira usar o item lowid, e no highhp a quantidade de %HP que ira usar o item, o ultimo parametro é o slot, que coloca o valor do slot referente ao jogador, 9 para ring, 2 para amuleto, etc.. No exemplo abaixo o script está configurado para trocar energy ring quando a vida chega a 30% e ira tentar manter o uso do might ring nos demais casos. (Este script necessita a versão 0.2 do script manager) Hide contents local lowhp, lowid, highhp, highid, slot = 30, {3051, 3088}, 90, 3048, 9 cycleEvent( function () if g_game.isOnline() then local player = g_game.getLocalPlayer() local equipped = player:getInventoryItem(slot) local equippedId = equipped and equipped:getId() or 0 local isLowId = false if type(lowid) == "table" then for i,v in pairs(lowid) do isLowId = isLowId or v == equippedId end else isLowId = lowid == equippedId end local isHighId = false if type(highid) == "table" then for i,v in pairs(highid) do isHighId = isHighId or v == equippedId end else isHighId = highid == equippedId end local hp = player:getHealthPercent() local equipId = 0 if equippedId == 0 then if hp <= highhp then equipId = lowid else equipId = highid end elseif isLowId and hp >= highhp then equipId = highid elseif not isLowId and hp <= lowhp then equipId = lowid elseif not isHighId and not isLowId then equipId = highid end if equipId ~= 0 then if type(equipId) == "table" then equipId = equipId[1] end sendEquipItem(equipId) end end end , 500) Link to comment Share on other sites More sharing options...
pikachu rosa Posted April 16, 2020 Author Report Share Posted April 16, 2020 up Link to comment Share on other sites More sharing options...
Kings Posted April 16, 2020 Report Share Posted April 16, 2020 Testa trocar a primeira linha pelo seguinte:local lowhp, lowid, highhp, highid, slot = 69, 3048, 70, 3098, 9 Não esquece de dar um feedback se funcionou. Link to comment Share on other sites More sharing options...
pikachu rosa Posted April 16, 2020 Author Report Share Posted April 16, 2020 3 horas atrás, GM Kings - Kendrick disse: Testa trocar a primeira linha pelo seguinte:local lowhp, lowid, highhp, highid, slot = 69, 3048, 70, 3098, 9 Não esquece de dar um feedback se funcionou. vo testa amanha e ti falo man Link to comment Share on other sites More sharing options...
pikachu rosa Posted April 17, 2020 Author Report Share Posted April 17, 2020 Em 16/04/2020 at 15:25, GM Kings - Kendrick disse: Testa trocar a primeira linha pelo seguinte:local lowhp, lowid, highhp, highid, slot = 69, 3048, 70, 3098, 9 Não esquece de dar um feedback se funcionou. deu certo, obg queridao 1 Link to comment Share on other sites More sharing options...
Recommended Posts