KMA_v1 by ProMess
Related: Snippet keep alive script - with discord
Description: The script right now is a continuous loop. To keep the script going when I need to cast spells but keep the script rolling, I use scripts that cast the spell to restart the script without waiting for target. Since the script is just targeting the script, UO doesn't see it as something to prevent the game from moving along. I like living risky, so I set my numbers to trip the different heals a little later. Save some regs, maybe costs more pots? I'll probably tune them tighter to keep me alive.
Discord Targeting is jacked... I gotta figure out why
1@setvar! minimumWaitForPing 200
2@setvar! cdMushroom 61000
3//todo: build toggle off of warmode status to regenerate mushrooms after mobs are dead
4@setvar! canYouMakeAMushroom 1
5@setvar! cdLightning 20000
6@setvar! cdMagicArrow 20000
7@setvar! cdHarm 20000
8@setvar! cdFireball 60000
9
10@setvar! hpCheckToTriggerGreaterHealSpell 45
11@setvar! hpCheckToTriggerMiniEmergencyHealSpell 70
12@setvar! hpCheckToTriggerHealPotion 60
13
14//statuses
15@setvar! canMushroom 1
16@setvar! canDiscord 1
17@setvar! isDiscorded 0
18
19
20if not timerexists magicMushroomTimer
21 createtimer magicMushroomTimer
22endif
23
24if not timerexists meditationTimer
25 createtimer meditationTimer
26endif
27
28if not timerexists statusM
29 createtimer statusM
30 settimer statusM 21000
31endif
32
33if not timerexists cdMushroom
34 createtimer cdMushroom
35endif
36
37if not timerexists musicTimer
38 createtimer musicTimer
39endif
40
41if not timerexists antispam
42 createtimer antispam
43endif
44
45if not timerexists ssTimer
46 createtimer ssTimer
47endif
48
49if timer statusM > 20000
50 sysmsg 'Keeping you up'
51 settimer statusM 0
52endif
53
54
55if diffhits >= hpCheckToTriggerGreaterHealSpell
56 if targetexists
57 hotkey 'Cancel Current Target'
58 endif
59 while not targetexists 'beneficial'
60 if diffhits >= hpCheckToTriggerMiniEmergencyHealSpell
61 cast 'Heal'
62 else
63 cast 'Greater Heal'
64 endif
65 wait 50
66 endwhile
67 if targetexists 'beneficial'
68 hotkey "Target Self"
69 endif
70 replay
71endif
72
73
74if diffhits >= hpCheckToTriggerHealPotion and findtype "Yellow Potion" backpack as pot
75 getlabel pot desc
76 if "next usable" in desc
77 // do nothing
78 else
79 dclick pot
80 wait 650
81 endif
82endif
83
84if diffmana > 50
85 if timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushroom
86 if timer antispam > 10000
87 overhead "Eating shrooms" 66
88 endif
89 dclick mushroom
90 wait 200
91 if insysmsg "You consume a magic mushroom and restore some mana."
92 settimer magicMushroomTimer 0
93 elseif insysmsg "before you may consume another magic mushroom" or insysmsg "been in combat with another"
94 settimer magicMushroomTimer 30000
95 endif
96 if followers > 0 and timer antispam > 10000
97 say "all guard me"
98 endif
99 endif
100
101 #if not findbuff "actively meditating"
102# skill 'Meditation'
103# settimer meditationTimer 0
104# insysmsg 'meditation'
105#
106# endif
107endif
108
109if targetexists harmful
110 wait 500
111 if timer antispam > 10000
112 sysmsg 'target acquired'
113 endif
114 @setvar myKillTarget lasttarget
115endif
116
117if skill "Discordance" >= 50 and canDiscord = 1
118 if isDiscorded = 0
119 getlabel myKillTarget discordDesc
120 if "discord" in discordDesc
121 @setvar! isDiscorded 1
122 elseif timer musicTimer >= 11000
123 useskill 'Discordance'
124 wft 500
125 if insysmsg "What instrument"
126 if findtype "bamboo flute" backpack as inny
127 target inny
128 elseif findtype "tambourine" backpack as inny
129 target inny
130 elseif findtype "drum" backpack as inny
131 target inny
132 elseif findtype "lute" backpack as inny
133 target inny
134 elseif findtype "harp" backpack as inny
135 target inny
136 elseif findtype "lap harp" backpack as inny
137 target inny
138 else
139 overhead "I do not have an inny" 34
140 @setvar! canDiscord 0
141 endif
142 wft 500
143 endif
144 if targetexists
145 target myKillTarget
146 overhead "Discorded" 88 myKillTarget
147 endif
148 settimer musicTimer 5000
149 endif
150 endif
151
152 if not findbuff "song of discordance" and timer musicTimer >= 11000
153 useskill 'Discordance'
154 wft 500
155 if insysmsg "What instrument"
156 if findtype "bamboo flute" backpack as inny
157 target inny
158 elseif findtype "tambourine" backpack as inny
159 target inny
160 elseif findtype "drum" backpack as inny
161 target inny
162 elseif findtype "lute" backpack as inny
163 target inny
164 elseif findtype "harp" backpack as inny
165 target inny
166 elseif findtype "lap harp" backpack as inny
167 target inny
168 else
169 overhead "I do not have an inny" 34
170 @setvar! canDiscord 0
171 endif
172 wft 500
173 endif
174 target backpack
175 settimer musicTimer 0
176 endif
177endif
178
179if poisoned
180 if automaticallyDrinkCurePot = 1 and diffhits >= hpCheckToTriggerCurePotion and findtype "Orange Potion" backpack as pot
181 dclick pot
182 wait 200
183 endif
184
185 while not targetexists beneficial
186 if not poisoned
187 hotkey '> Interrupt'
188 break
189 else
190 cast 'Cure'
191 wait 50
192 endif
193 endwhile
194 if targetexists beneficial
195 hotkey "Target Self"
196 wait 500
197 endif
198endif
199
200if dead
201 overhead "Rip" 34
202 for 10
203 if gumpexists 2957810225
204 gumpresponse 1 2957810225
205 break
206 endif
207 wait 500
208 endfor
209 replay
210endif
211
212if skill "Tracking" > 0
213 if not findbuff "tracking"
214 clearsysmsg
215 while not gumpexists 4267467659
216 useskill 'tracking'
217 wait minimumWaitForPing
218 endwhile
219 if gumpexists 4267467659
220 while not insysmsg "You will now hunt all hostile players."
221 gumpresponse 8 4267467659
222 waitforgump 4267467659 5000
223 endwhile
224 gumpresponse 6 4267467659
225 wait minimumWaitForPing
226 endif
227 gumpclose 4267467659
228 endif
229endif
230
231if timer antispam > 11000
232 settimer antispam 0
233endif
234
235if not targetexists
236 @setvar! isDiscorded 0
237 skill 'spirit speak'
238 if timer antispam > 10000
239 sysmsg 'Target is dead' 88
240 endif
241endif
242
243loop