Back to "b" tags

Healing Loop - Only instant effects by Brozan (Syal)

Description: Does not do anything that can pause a character. Does not use cure pots

1# Clear sys messaages 
2clearsysmsg
3
4@setvar onABoat 0
5
6if not timerexists "healpot"
7    createtimer "healpot"
8    settimer "healpot" 8000
9endif
10if not timerexists "aid time"
11    createtimer "aid time"
12    settimer "aid time" 8000
13endif
14 
15if not timerexists "shroomy"
16    createtimer "shroomy"
17    settimer "shroomy" 61000
18endif
19
20if not timerexists "spyGlassPeek"
21    createtimer 'spyGlassPeek'
22    settimer 'spyGlassPeek' 0
23endif
24
25
26while not dead
27        
28    # If hidden, skip
29    if hidden
30        continue
31    endif
32    
33    #spyglass routine
34     
35        if onABoat = 1 and timer "spyGlassPeek" > 6500 and findtype 'spyglass' self 
36            gumpclose 2890020940
37            wait 250
38            gumpclose 2890020940
39            wait 250
40            dclicktype 'spyglass'
41            waitfortarget 1200
42            target 'self'
43            wait 350 
44            gumpresponse 4 2890020940
45            wait 350 
46            settimer "spyGlassPeek" 0
47        endif
48    
49    if insysmsg 'you cannot move!'
50        overhead 'Paralyzed!' 34
51        say [pouch
52    endif
53    
54    #Eat a magic mushroom if we have 
55    #25  less mana than full
56    if mana < 70 and skill 'Magery' > 50 and timer "shroomy" >= 61000
57        dclicktype '29012'
58        overhead 'Mushroom Power!'
59        settimer "shroomy" 0
60    endif
61
62    # Healing Survival
63    if skill 'Healing' > 1 and skill 'veterinary' < 1
64        if insysmsg 'You begin applying the bandages'
65            settimer 'aid time' 0
66        endif
67        if hits < maxhits and timer 'aid time' > 10250 
68            hotkey 'bandage self'
69            settimer 'aid time' 0
70        endif
71    endif
72
73 
74    if not findtype "Yellow Potion" backpack
75        overhead 'Out of heal potions!' 34
76        wait 200
77    endif
78    
79    //Heal drinker if below 45
80    if hp < 45
81        if findtype "Yellow Potion" backpack
82            if timer "healpot" >= 1000
83                    overhead 'Drinking heal!'
84                    potion "heal"
85                    wait 200
86                    settimer "healpot" 0
87            endif
88        endif
89     endif
90    
91
92     
93     wait 100
94endwhile