PK Getaway Script for Mages (2) by Jaseowns
Description: Watch it in action here:
https://clips.twitch.tv/ElegantFineDogeBCouch-b-TZsJdd-2Vf9u2E
1# PK Getaway Script by Jaseowns
2# UO Outlands
3# Watch it in action here:
4# https://clips.twitch.tv/ElegantFineDogeBCouch-b-TZsJdd-2Vf9u2E
5// Thank you Gyvulor
6// farming with 1 (autobot mage)
7// activate this "stayalive" hotkey
8// find a gate nearby and take it
9// check buffs (magic reflect, reactivae armor)
10// chiv heal if available
11// bandaids (for dexxers)
12// must have one hand free to drink pots
13
14@setvar! globalTimeoutMini 650
15@setvar! globalTimeout 400
16@setvar! showSystemMessageScriptEngaged 1
17
18if showSystemMessageScriptEngaged = 1
19 sysmsg "PK Getaway Script engaged" 88
20endif
21
22# Using Bandaids
23if skill "Healing" > 0
24 if findtype "clean bandage%s%" backpack as aids
25 if not bandaging and hp < maxhp
26 dclick aids
27 wft 500
28 hotkey 'Target Self'
29 elseif not bandaging and poisoned
30 dclick aids
31 wft 500
32 hotkey 'Target Self'
33 elseif not bandaging and findbuff "bleed"
34 dclick aids
35 wft 500
36 hotkey 'Target Self'
37 elseif not bandaging and findbuff "disease"
38 dclick aids
39 wft 500
40 hotkey 'Target Self'
41 endif
42 else
43 overhead "No bandages" 34
44 endif
45endif
46
47// Trapped
48if paralyzed
49 if findtype "pouch" backpack 38
50 yell "[pouch"
51 wait globalTimeoutMini
52 else
53 overhead "Out of Pouches!" 34
54 endif
55endif
56
57// poison
58if poisoned
59 if findtype "Orange Potion" backpack as jPot
60 dclick jPot
61 wait globalTimeoutMini
62 else
63 overhead "Out of cure pots" 34
64 endif
65endif
66
67
68// Drink red pot
69if diffstam >= 5
70 overhead "drink a red pot"
71 if findtype "Red Potion" backpack as jPot
72 dclick jPot
73 wait globalTimeoutMini
74 else
75 overhead "Out of refresh pots" 34
76 endif
77endif
78
79// Drink str pot
80if str < 100
81 if not findbuff "Strength"
82 if findtype "White Potion" backpack as jPot
83 dclick jPot
84 wait globalTimeoutMini
85 else
86 overhead "Out of str pots" 34
87 endif
88 endif
89endif
90
91if weight > maxweight
92 #############
93 # Player gates, chiv gate
94 #############
95 while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
96 dclick jGate
97 endwhile
98
99 if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
100 gumpresponse 2 3899019871
101 replay
102 endif
103
104 #############
105 # Town/Dungeon Moongates - yellow, red, death, blue
106 #############
107 while not gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
108 dclick jGate
109 endwhile
110
111 if gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
112 gumpresponse 2 3773199800
113 wait 200
114 replay
115 endif
116
117 if findtype "gold coin" backpack as item
118 lift item 2000
119 droprelloc 0 0
120 wait 200
121 if insysmsg "cannot drop anything"
122 drop backpack -1 -1 -1
123 endif
124 wait globalTimeout
125 replay
126 else
127 overhead "We are overweight and cannot drop anything" 34
128 endif
129endif
130
131
132if skill "Magery" >= 60
133
134 if diffhits >= 30
135 // figure out when we want to drink a pot, vs just heal
136 if findtype "Yellow Potion" backpack as jPot
137 dclick jPot
138 wait globalTimeout
139 else
140 overhead "Out of heals pots" 34
141 endif
142 endif
143
144 if diffhits >= 30 and mana >= 12
145 while not targetexists
146 #############
147 # Player gates, chiv gate
148 #############
149 while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
150 dclick jGate
151 endwhile
152
153 if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
154 gumpresponse 2 3899019871
155 replay
156 endif
157
158 #############
159 # Town/Dungeon Moongates - yellow, red, death, blue
160 #############
161 while not gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
162 dclick jGate
163 endwhile
164
165 if gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
166 gumpresponse 2 3773199800
167 wait 200
168 replay
169 endif
170
171 if diffhits >= 60
172 cast 'Heal'
173 else
174 cast 'Greater Heal'
175 endif
176 wait 50
177 if hp = maxhp
178 hotkey '> Interrupt'
179 break
180 endif
181 endwhile
182 if targetexists
183 hotkey 'Target Self'
184 endif
185 elseif diffhits >= 15 and mana >= 12
186 while not targetexists
187 #############
188 # Player gates, chiv gate
189 #############
190 while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
191 dclick jGate
192 endwhile
193
194 if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
195 gumpresponse 2 3899019871
196 replay
197 endif
198
199 #############
200 # Town/Dungeon Moongates - yellow, red, death, blue
201 #############
202 while not gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
203 dclick jGate
204 endwhile
205
206 if gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
207 gumpresponse 2 3773199800
208 wait 200
209 replay
210 endif
211
212 cast 'Heal'
213 wait 50
214 if hp = maxhp
215 hotkey '> Interrupt'
216 break
217 endif
218 endwhile
219 if targetexists
220 hotkey 'Target Self'
221 endif
222 endif
223
224 if poisoned
225 while not targetexists
226 cast 'Cure'
227 wait 50
228 #############
229 # Player gates, chiv gate
230 #############
231 while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
232 dclick jGate
233 endwhile
234
235 if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
236 gumpresponse 2 3899019871
237 replay
238 endif
239
240 #############
241 # Town/Dungeon Moongates - yellow, red, death, blue
242 #############
243 while not gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
244 dclick jGate
245 endwhile
246
247 if gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
248 gumpresponse 2 3773199800
249 wait 200
250 replay
251 endif
252
253 if not poisoned
254 hotkey '> Interrupt'
255 break
256 endif
257 endwhile
258 if targetexists
259 hotkey 'Target Self'
260 endif
261 endif
262
263else
264
265 // We are hurt
266 if hp < maxhp
267
268 // check for paralyzed during heal
269
270 // figure out when we want to drink a pot, vs just heal
271 if findtype "Yellow Potion" backpack as jPot
272 dclick jPot
273 wait globalTimeOutMini
274 else
275 overhead "Out of heals pots" 34
276 endif
277
278
279 endif
280
281endif
282
283#############
284# Player gates, chiv gate
285#############
286while not gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
287 dclick jGate
288endwhile
289
290if gumpexists 3899019871 and findtype "blue moongate" ground 0 1 2 as jGate
291 gumpresponse 2 3899019871
292 replay
293endif
294
295#############
296# Town/Dungeon Moongates - yellow, red, death, blue
297#############
298while not gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
299 dclick jGate
300endwhile
301
302if gumpexists 3773199800 and findtype "blue moongate" ground -1 1 2 as jGate
303 gumpresponse 2 3773199800
304 wait 200
305 replay
306endif
307
308if findtype "blue moongate" ground -1 1 12 as jGate
309 overhead "Move closer!" 34
310 wait 50
311 replay
312endif
313
314wait 50
315loop