Resist Spells to 80 by vizzka
1// Script to train Resist Spells
2// Uses Poison Field for skill < 70 and Energy Bolt for skill >= 70
3// Reagent requirements:
4// - Greater Heal: Garlic, Ginseng, Mandrake Root, Spiders Silk
5// - Poison Field: Black Pearl, Nightshade, Spiders Silk
6// - Energy Bolt: Black Pearl, Nightshade
7
8while skill 'Resisting Spells' < 80
9 sysmsg 'Starting new cycle. Resist Spells: ' + skill 'Resisting Spells' 88
10
11 // Health check to ensure it never drops below 50
12 if hits < 50
13 sysmsg 'Health critically low! Healing immediately.' 33
14 if mana >= 11
15 cast 'Greater Heal' // Cast Greater Heal
16 waitfortarget 2000 // Wait for target
17 target self // Target self
18 pause 500 // Short pause after casting
19 sysmsg 'Health restored.' 88
20 else
21 sysmsg 'Not enough mana for healing. Meditating.' 33
22 useskill 'Meditation' // Use Meditation skill
23 pause 10000 // Wait for mana regeneration
24 endif
25 else
26 // Check skill level to determine which spell to use
27 if skill 'Resisting Spells' < 70
28 // Poison Field for skill < 70
29 if mana >= 17
30 sysmsg 'Casting Poison Field.' 88
31 cast 'Poison Field' // Cast Poison Field
32 waitfortarget 2000 // Wait for target
33 target self // Target self
34 pause 500 // Short pause after casting
35 sysmsg 'Poison Field set. Waiting for damage.' 88
36
37 // Timer-based loop for Poison Field duration
38 set %wait_time 90 // Set 90-second timer
39 while %wait_time > 0
40 // Health check during Poison Field
41 if hits < 50
42 sysmsg 'Health critically low! Healing during Poison Field.' 33
43 if mana >= 11
44 cast 'Greater Heal'
45 waitfortarget 2000
46 target self
47 pause 500
48 sysmsg 'Health restored.' 88
49 else
50 sysmsg 'Not enough mana for healing. Meditating.' 33
51 useskill 'Meditation'
52 pause 10000
53 endif
54 endif
55 pause 1000 // Wait 1 second before next check
56 math %wait_time %wait_time - 1 // Decrement timer
57 endwhile
58 else
59 // Not enough mana for Poison Field, start meditation
60 sysmsg 'Not enough mana for Poison Field. Meditating.' 33
61 useskill 'Meditation'
62 pause 10000
63 endif
64 else
65 // Energy Bolt for skill >= 70
66 if mana >= 25
67 sysmsg 'Casting Energy Bolt on self.' 88
68 cast 'Energy Bolt' // Cast Energy Bolt
69 waitfortarget 2000 // Wait for target
70 target self // Target self
71 pause 500 // Short pause after casting
72 sysmsg 'Energy Bolt successfully dealt damage.' 88
73
74 // Health check after Energy Bolt
75 if hits < 50
76 sysmsg 'Health critically low! Healing after Energy Bolt.' 33
77 if mana >= 11
78 cast 'Greater Heal'
79 waitfortarget 2000
80 target self
81 pause 500
82 sysmsg 'Health restored.' 88
83 else
84 sysmsg 'Not enough mana for healing. Meditating.' 33
85 useskill 'Meditation'
86 pause 10000
87 endif
88 endif
89 else
90 // Not enough mana for Energy Bolt, start meditation
91 sysmsg 'Not enough mana for Energy Bolt. Meditating.' 33
92 useskill 'Meditation'
93 pause 10000
94 endif
95 endif
96 endif
97endwhile
98
99sysmsg 'Resist Spells reached 80. Script completed.' 34
100stop
101