Back to "learning" tags

One hotkey mage cycle (1) by Jaseowns

Description: Check out https://outlands.uorazorscripts.com/script/25b38218-28e5-43d1-b9e1-01de484da5ce for latest

1# One hotkey mage cycle by Jaseowns
2# UO Outlands - WIP
3##################
4############
5#########
6#####
7# Check out https://outlands.uorazorscripts.com/script/25b38218-28e5-43d1-b9e1-01de484da5ce for latest
8##################
9############
10#########
11#######################
12############
13#########
14#######################
15############
16#########
17#######################
18############
19#########
20#######################
21############
22#########
23#####
24
25// Beta client for cooldowns
26// cooldowns for mushrooms, mana vampire and healpots
27// for now using timers
28
29# Update this variable to 1 for ALL KILL
30# Update this variable to 0 for target nearest
31@setvar! setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster 0
32
33
34@setvar! cdLightning 40000
35@setvar! cdMagicArrow 20000
36@setvar! cdHarm 40000
37@setvar! cdFireball 60000
38@setvar! cdEvilOmen 30000
39@setvar! cdVampiricEmbrace 30000
40@setvar! cdMushroom 60000
41
42if not timerexists magicMushroomTimer
43    createtimer magicMushroomTimer
44    settimer magicMushroomTimer cdMushroom
45endif
46
47if not timerexists magicArrowTimer
48    createtimer magicArrowTimer
49    settimer magicArrowTimer cdMagicArrow
50endif
51
52if not timerexists lightningTimer
53    createtimer lightningTimer
54    settimer lightningTimer cdLightning
55endif
56
57if not timerexists harmTimer
58    createtimer harmTimer
59    settimer harmTimer cdHarm
60endif
61
62if not timerexists fireballTimer
63    createtimer fireballTimer
64    settimer fireballTimer cdFireball
65endif
66
67if not timerexists evilOmenTimer
68    createtimer evilOmenTimer
69    settimer evilOmenTimer cdEvilOmen
70endif
71
72if not timerexists vampiricEmbraceTimer
73    createtimer vampiricEmbraceTimer
74    settimer vampiricEmbraceTimer cdVampiricEmbrace
75endif
76
77if setThisAsOneIfYouWantToTargetYourOwnKillOrItWillTargetClosestMonster = 1
78    say "all kill"
79    wait 200
80    while targetexists 
81        // wait
82        wait 50
83    endwhile
84else
85    hotkey 'Target Closest Non-Friendly Monster'
86    wait 200
87    if insysmsg "No one matching that was found"
88        overhead "found no one" 34
89        stop
90    endif    
91endif
92
93@setvar myKillTarget lasttarget 
94
95if not varexist myPreviousKillTarget
96    @setvar myPreviousKillTarget 0     
97endif
98
99getlabel myKillTarget desc
100overhead desc
101
102if not varexist myEarthPet or dead myEarthPet
103    overhead "Your pet is dead, demonic summon time" 34
104else
105    menu myEarthPet 1
106    wft 500
107    target myKillTarget
108endif
109
110if find myKillTarget -1 -1 12 as killy
111   // do nothing
112else
113    overhead "Out of range" 34
114    stop
115endif
116
117if myKillTarget = myPreviousKillTarget
118    // do nthoing
119else
120    
121    while not targetexists and not dead myKillTarget
122        cast 'Curse'
123        wait 50
124        if diffhits >= 30 
125            hotkey '> Interrupt'
126            break
127        endif
128    endwhile
129    target myKillTarget
130    wait 500
131
132
133    while not targetexists and not dead myKillTarget
134        cast 'mana drain'
135        wait 50
136        if diffhits >= 30 
137            hotkey '> Interrupt'
138            break
139        endif
140    endwhile
141    target myKillTarget
142    wait 500
143
144    @setvar myPreviousKillTarget myKillTarget
145
146endif
147
148if timer evilOmenTimer >= cdEvilOmen
149    say "[EvilOmen"
150    settimer evilOmenTimer 0
151    wait 500
152endif
153
154clearsysmsg 
155
156say "all guard"
157
158while not dead myKillTarget
159    
160    if timer vampiricEmbraceTimer >= cdVampiricEmbrace and findtype 8198 ground -1 -1 4 as jorpse
161        say "[VampiricEmbrace"
162        wft 500
163        target jorpse
164        settimer vampiricEmbraceTimer 0
165    endif
166   
167    if find myKillTarget -1 -1 12 as killy
168       // do nothing
169    else
170        overhead "Out of range" 34
171        break
172    endif
173    
174    if diffhits < 30 and mana > 12 and timer lightningTimer >= cdLightning
175        while not targetexists or diffhits >= 30 
176            cast 'Lightning'
177            wait 50
178            if dead myKillTarget
179                hotkey '> Interrupt'
180                break
181            endif
182        endwhile
183        target myKillTarget
184        settimer lightningTimer 0
185        wait 500
186    endif
187
188    if diffhits < 30 and mana > 10 and timer magicArrowTimer >= cdMagicArrow
189        while not targetexists or diffhits >= 30 
190            cast 'magic arrow'
191            wait 50
192            if dead myKillTarget
193                hotkey '> Interrupt'
194                break
195            endif
196        endwhile
197        target myKillTarget
198        settimer magicArrowTimer 0
199        wait 500
200    endif
201
202    if diffhits < 30 and mana > 12 and timer harmTimer >= cdHarm
203        while not targetexists
204            cast 'harm'
205            wait 50
206            if dead myKillTarget or diffhits >= 30 
207                hotkey '> Interrupt'
208                break
209            endif
210        endwhile
211        target myKillTarget
212        settimer harmTimer 0
213        wait 500
214    endif
215
216    if diffhits < 30 and mana > 12 and timer fireballTimer >= cdFireball
217        while not targetexists
218            cast 'fireball'
219            wait 50
220            if dead myKillTarget or diffhits >= 30 
221                hotkey '> Interrupt'
222                break
223            endif
224        endwhile
225        target myKillTarget
226        settimer fireballTimer 0
227        wait 500
228    endif
229
230    if diffhits >= 30 and mana > 12
231        while not targetexists
232            if diffhits >= 60
233                cast 'Heal'
234            else
235                cast 'Greater Heal'                
236            endif
237            wait 50
238            if hp = maxhp
239                hotkey '> Interrupt'
240                break
241            endif
242        endwhile
243        target self
244    elseif mana < 55 and findbuff "actively meditating" 
245        // wait for mana
246    elseif mana > 40
247        while not targetexists and mana > 40
248            cast 'Flamestrike'
249            wait 50
250            if dead myKillTarget or diffhits >= 30
251                hotkey '> Interrupt'
252                break
253            endif
254        endwhile
255        target myKillTarget
256    elseif not findbuff "actively meditating" and timer magicMushroomTimer >= cdMushroom and findtype "mushroom" backpack as mushy
257        dclick mushy
258        settimer magicMushroomTimer 0
259    elseif not findbuff "actively meditating" 
260        useskill 'meditation'
261        wait 500
262    endif
263    wait 50
264endwhile
265wait 500
266if targetexists 
267    hotkey 'Cancel Current Target'
268endif
269say "all guard me"
270if counttype "mushroom" backpack < 5
271    while counttype "mushroom" backpack < 15
272        cast "Create Food"
273        wait 200
274    endwhile
275endif
276while mana < 50
277    if not findbuff "actively meditating" 
278        useskill 'meditation'
279    endif
280    wait 500
281endwhile
282if timer vampiricEmbraceTimer >= cdVampiricEmbrace and findtype 8198 ground -1 -1 4 as jorpse
283    say "[VampiricEmbrace"
284    wft 500
285    target jorpse
286    settimer vampiricEmbraceTimer 0
287endif
288   
289
290
291// curse
292// mana drain
293// magic arrrow
294// harm
295// fireball
296// lightening