Jump to content

Shoot rune on target.


shz0r

Recommended Posts

local healthToCast = 100
local player = g_game.getLocalPlayer()
if g_game.isAttacking() and player:getHealthPercent() <= healthToCast then
  g_game.useInventoryItemOnCreature(3198, g_game.getAttackingCreature())
  sleep(900, 1100)
end
auto(100)

 

(HMM) Rune ID: 3198

Change for whatever ID the rune you want.

Link to comment
Share on other sites

Why do you have the health to Cast % at 100%?

Seems unnecessary, but if you wanted to have it so you only shoot at over 80%hp or something you should change that "<" sign to ">" otherwise you will only shoot the rune when you are below that HP%.

 

local healthToCast = 80
local player = g_game.getLocalPlayer()
if g_game.isAttacking() and player:getHealthPercent() >= healthToCast then
  g_game.useInventoryItemOnCreature(3198, g_game.getAttackingCreature())
  sleep(900, 1100)
end
auto(100)

 

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...