Created: 6 months ago on 05/18/2025, 07:46:05 PMUpdated: 6 months ago on 05/18/2025, 07:48:50 PM
Description: Bandage loop that activates when you have less then 100% health. Currently it's not smart enough to skip while bandaging, so it has a hard coded 13 second pause when it uses a bandage.
Messages.Overhead('Bandage Loop!', 123, Player.Serial)
while not Player.IsDead do
	Messages.Print('Bandage looping')
	if Player.Hits < Player.HitsMax then
		-- Find the item in a specific layer
		bandage = Items.FindByType(3617)
		if bandage == nil then
			Messages.Print('All out of bandages!')
		else
			Messages.Print('Found bandages!')
			Player.UseObject(bandage.Serial)
			if Targeting.WaitForTarget(2000) then
				Targeting.TargetSelf()
			end
			Pause(13000)
		end
	end
	Pause(2000)
end