Spell Cycler by Brozan (Syal)
Description: One hotkey push for multiple spells
1#Script by Brozan
2#Spell Cycler to be used with
3# wizards grimoire special spells
4#Does not do timers since they can be so variable
5
6@createlist spellCycle
7
8if list spellCycle <= 0
9 @unsetvar 'destoyIt'
10 wait 200
11endif
12
13if not varexist 'destoyIt'
14 //Aquire a target
15 overhead 'New Target' 33
16 @setvar! 'destoyIt '
17 wait 100
18
19 //Load up the list
20 @clearlist spellCycle
21 @pushlist 'spellCycle' "Mana Drain"
22 @pushlist 'spellCycle' "Curse"
23 @pushlist 'spellCycle' "Magic Arrow"
24 @pushlist 'spellCycle' "Harm"
25 @pushlist 'spellCycle' "Fireball"
26 @pushlist 'spellCycle' "Lightning"
27
28endif
29
30 if inlist 'spellCycle' 'Mana Drain'
31 cast 'Mana Drain'
32 waitfortarget
33 target destoyIt
34 poplist 'spellCycle' 'front'
35 elseif inlist 'spellCycle' 'Curse'
36 cast 'Curse'
37 waitfortarget
38 target destoyIt
39 poplist 'spellCycle' 'front'
40 elseif inlist 'spellCycle' 'Magic Arrow'
41 cast 'Magic Arrow'
42 waitfortarget
43 target destoyIt
44 poplist 'spellCycle' 'front'
45 elseif inlist 'spellCycle' 'Harm'
46 cast 'Harm'
47 waitfortarget
48 target destoyIt
49 poplist 'spellCycle' 'front'
50 elseif inlist 'spellCycle' 'Fireball'
51 cast 'Fireball'
52 waitfortarget
53 target destoyIt
54 poplist 'spellCycle' 'front'
55 elseif inlist 'spellCycle' 'Lightning'
56 cast 'Lightning'
57 waitfortarget
58 target destoyIt
59 poplist 'spellCycle' 'front'
60 else
61 overhead 'Sequence done'
62 unsetvar 'destoyIt'
63 poplist 'spellCycle' 'front'
64 wait 100
65 endif
66
67wait 2000
68
69overhead 'Passive Script Engaged' 33
70
71
72if not timerexists "healpot"
73 createtimer "healpot"
74 settimer "healpot" 8000
75endif
76
77if not timerexists "shroomy"
78 createtimer "shroomy"
79 settimer "shroomy" 61000
80endif
81
82
83while not dead
84
85 # If hidden, skip
86 if hidden
87 continue
88 endif
89
90
91 if insysmsg 'you cannot move!'
92 overhead 'Paralyzed!' 34
93 overhead [pouch
94 endif
95
96 #Eat a magic mushroom if we have
97 #25 less mana than full
98 if mana < 60 and timer "shroomy" >= 61000
99 wait 500
100 //add this wait to avoid
101 //eating a shroom on a refund
102 if mana < 60
103 dclicktype '29012'
104 overhead 'Mushroom Power!'
105 settimer "shroomy" 0
106 endif
107 endif
108
109 if not findtype "Yellow Potion" backpack
110 overhead 'Out of heal potions!' 34
111 wait 200
112 endif
113
114 //Heal drinker if below 40
115 if hp < 55
116 if findtype "Yellow Potion" backpack
117 if timer "healpot" >= 8000
118 overhead 'Drinking heal!'
119 potion "heal"
120 wait 200
121 settimer "healpot" 0
122 endif
123 endif
124 endif
125 wait 100
126endwhile