Auto healer assistant (Bandage + Potion) by Pickleback

Description: I run this script all the time when I'm out. It puts healing on auto-pilot.

1# This script keeps you alive.
2# Starts bandaging fast, falls back to GH potions.
3# Doesn't waste a potion timer if the bandage is about to land.
4# Tweak as you like!
5
6clearsysmsg
7
8if not timerexists "healpot"
9    createtimer "healpot"
10    settimer "healpot" 11000
11endif
12if not timerexists "bandage"
13    createtimer "bandage"
14    settimer "bandage" 11000
15endif
16if not timerexists "warning"
17    createtimer "warning"
18    settimer "warning" 31000
19endif
20if not timerexists "curepot"
21    createtimer "curepot"
22    settimer "curepot" 11000
23endif
24
25
26while not dead
27
28    if hidden
29        continue
30    endif
31
32    if poisoned and timer 'curepot' > 11000
33        potion 'cure'
34        wait 200
35        settimer 'curepot' 0
36    endif
37
38    if poisoned or hp < maxhits
39       if targetexists
40          continue
41       endif
42       if timer 'bandage' > 10250
43              hotkey 'Use Bandage (No Timer)'
44              wft 200
45              hotkey 'Target Self'
46       endif
47    endif
48
49    if insysmsg 'You begin applying the bandages'
50        settimer 'bandage' 0
51    endif
52
53    if not findtype 'Yellow Potion' backpack and timer 'warning' > 30000
54        overhead 'No heal pots!' 34
55        wait 200
56        settimer 'warning' 0
57    endif
58
59    if hp < 39 and timer 'bandage' < 8000
60        if findtype "Yellow Potion" backpack
61            if timer "healpot" > 11000
62                    overhead 'Drinking heal!'
63                    wait 200
64                    potion "heal"
65                    wait 200
66                    settimer "healpot" 0
67            endif
68        endif
69     endif
70
71wait 100
72endwhile