Back to "provo" tags

Auto-PROVO by dennozz

1#Auto-PROVO 1.20
2
3#********** INFORMATION **********# 
4
5#Made by @dennozz on discord. 
6#Inspired/learned by other scrips in https://outlands.uorazorscripts.com/
7
8#This script will auto provoke two nearest creatures.
9
10#Optional: Set overhead messages on Razor > Display/Counters > Overhead messages
11           #Add overhead messages when success provocation, fail provocation or skill needs to wait for use.
12           
13#********** SET YOUR SETTINGS **********# 
14
15# 0 - The script will be faster but will not check if the selected target is visible
16# 1 - The script will be slower but will make sure targets are visible.
17
18@setvar! checkVisibility 0
19
20#********** DO NOT EDIT FROM HERE UNLESS YOU KNOW HOW TO SCRIPT **********# 
21
22@setvar! oneTarget 0
23@setvar! twoTarget 0
24
25@setvar! foundFirstTarget 0
26@setvar! foundSecondTarget 0
27
28removelist discordedCreatures
29createlist discordedCreatures
30
31#********** SET INSTRUMENT **********# 
32
33if not varexist myInstruz
34    @setvar! myInstruz 0
35endif
36
37while findtype 3740|3742|3762|3763|10245|20006|20008|20010|20012|20014|20016 backpack as inst 
38    getlabel inst myLabel
39    
40    if "supremely" in myLabel or "exceedingly" in myLabel
41        @setvar! myInstruz inst
42        break
43    endif
44    
45    @ignore inst
46endwhile
47
48@clearignore
49
50if not find myInstruz backpack
51    clearsysmsg
52    overhead "Select instrument:" 55
53    @setvar! myInstruz
54    wait 200
55    while not targetexists and not insysmsg "Select"
56        @setvar! myInstruz    
57    endwhile
58    wait 200
59    if find myInstruz backpack as inst
60        getlabel inst iLabel
61        
62        if "flute" in iLabel or "drums" in iLabel or "harp" in iLabel or "lute" in iLabel or "tambourine" in iLabel or "gemshorn" in iLabel or "hurdy" in iLabel or "psaltery" in iLabel or "sackbut" in iLabel or "shawm" in iLabel or "Vielle" in iLabel
63            dclick inst
64            wait 200
65        else 
66            @setvar! myInstruz 0
67            overhead "Not an instrument!" 33
68            stop
69        endif
70    else
71        @setvar! myInstruz 0
72        overhead "Not in backpack" 33
73        stop    
74    endif
75endif
76
77if not timerexists discoTimer
78    settimer discoTimer 0
79endif
80
81clearsysmsg
82
83if targetexists
84    hotkey 'cancel current target'
85endif
86
87#********* AUTO-SELECT 1ST TARGET *********
88
89settimer testTimer 0
90sysmsg "Provo Start.." 65
91hotkey 'target closest grey monster'
92
93if not find lasttarget ground -1 -1 10
94    overhead 'No target found' 33
95else
96    while index != 20
97        @setvar! tempTarget lasttarget 
98        if index != 0 
99            hotkey "next non-friendly monster target"
100            @setvar! tempTarget lasttarget 
101            #overhead "*{{index}}*" 34 tempTarget
102            
103            if index = 1
104                @setvar! firstTarget lasttarget
105            elseif firstTarget = tempTarget
106                break
107            endif
108        endif
109        
110        if find tempTarget ground -1 -1 12
111            getlabel tempTarget targetLabel
112                        
113            if "provoked" in targetLabel 
114                overhead "provoked {{index}}" 11 tempTarget
115            elseif "break" in targetLabel
116                overhead "break {{index}}" 11 tempTarget
117            elseif "-" in targetLabel
118                sysmsg "Label error, replaying search.." 34
119                replay
120            else
121                
122                if 1 = checkVisibility
123                    clearsysmsg
124                    skill 'begging'
125                    waitfortarget 650
126                    target tempTarget
127                    wait 200
128                endif
129                
130                if insysmsg "Target cannot be seen" and 1 = checkVisibility
131                    #sysmsg "*Not visible* [{{index}}]" 34
132                    overhead  "*Not visible* [{{index}}]" 34 tempTarget
133                elseif insysmsg "That is too far away" and 1 = checkVisibility
134                    overhead "*Too far* [{{index}}]" 34 tempTarget
135                elseif insysmsg "You must wait" and 1 = checkVisibility
136                    overhead "*Skill cooldown*" 11
137                    #sysmsg "*Skill cooldown*" 11
138                    break
139                else 
140                    @setvar! foundFirstTarget 1 
141                    @setvar! oneTarget tempTarget
142                    getlabel oneTarget myLabel
143                    sysmsg "Target: {{myLabel}}" 55
144                    break
145                endif
146                
147            endif
148        endif
149    endwhile
150endif
151
152#********* AUTO-SELECT 2ND TARGET *********
153
154if oneTarget != 0
155    while index != 20
156        @setvar! tempTarget lasttarget 
157        if index != 0 
158            hotkey "next non-friendly monster target"
159            @setvar! tempTarget lasttarget 
160            #overhead "*{{index}}*" 34 tempTarget
161            
162            if index = 1
163                @setvar! firstTarget lasttarget
164            elseif firstTarget = tempTarget
165                break
166            endif
167        endif
168        getlabel tempTarget targetLabel
169        if "break" in targetLabel
170            #next
171        elseif tempTarget != oneTarget and find tempTarget ground -1 -1 10
172        
173            if 1 = checkVisibility
174                clearsysmsg
175                skill 'begging'
176                waitfortarget 650
177                target tempTarget
178                wait 200
179            endif
180            
181            if insysmsg "Target cannot be seen" and 1 = checkVisibility
182                #sysmsg "*Not visible* [{{index}}]" 34
183                overhead  "*Not visible* [{{index}}]" 34 tempTarget
184            elseif insysmsg "That is too far away" and 1 = checkVisibility
185                overhead "*Too far* [{{index}}]" 34 tempTarget
186            elseif insysmsg "You must wait" and 1 = checkVisibility
187                overhead "*Skill cooldown*" 11
188                #sysmsg "*Skill cooldown*" 11
189                break
190            else 
191                @setvar! foundSecondTarget 1 
192                @setvar! twoTarget tempTarget
193                getlabel twoTarget myLabel
194                sysmsg "Target: {{myLabel}}" 11
195                break
196            endif
197                
198        endif
199    endwhile
200endif
201
202#********* PROVO IF TARGETS FOUND *********
203
204if 1 = foundFirstTarget and 1 = foundSecondTarget
205    skill 'provocation'
206    waitfortarget 650 
207  
208    if insysmsg "What instrument"    
209        target myInstruz
210        replay
211    else 
212        target oneTarget
213        waitfortarget 650
214        target twoTarget
215    endif
216    
217    wait 100
218    
219    if insysmsg 'You fail to incite'
220        overhead "Provo FAILED" 34 oneTarget
221    elseif insysmsg "The creatures"
222        overhead "* too far away< *" 34 oneTarget
223        overhead "* >too far away *" 34 twoTarget
224    elseif insysmsg "You play successfully, provoking" 
225        getlabel oneTarget myLabel
226        overhead "> provoked" 88 oneTarget
227        getlabel twoTarget myLabel2
228        overhead "provoked <" 88 twoTarget
229    endif
230    
231    getlabel myInstruz instLabel
232    
233    if "(10/" in instLabel
234        overhead "Instrument : 10 uses left" 33
235        sysmsg "Instrument : 10 uses left" 33
236    elseif "(8/" in instLabel
237        overhead "Instrument : 8 uses left" 33
238        sysmsg "Instrument : 8 uses left" 33
239    elseif "(6/" in instLabel
240        overhead "Instrument : 6 uses left" 33
241        sysmsg "Instrument : 6 uses left" 33
242    elseif "(4/" in instLabel
243        overhead "Instrument : 4 uses left" 33
244        sysmsg "Instrument : 4 uses left" 33
245    elseif "(2/" in instLabel
246        overhead "Instrument : 2 uses left" 33
247        sysmsg "Instrument : 2 uses left" 33
248    elseif "(1/" in instLabel
249        overhead "Instrument : 1 use left" 33
250        sysmsg "Instrument : 1 use left" 33
251    endif
252    
253elseif 1 = foundFirstTarget
254    sysmsg "2nd target not found" 34
255elseif 1 = foundSecondTarget
256    sysmsg "1st target not found" 34
257else 
258    sysmsg "No one visible found" 34
259endif
260
261#********* SONG BUFF *********
262
263if not findbuff "Song Of Provocation"
264    clearsysmsg
265    wait 650
266    skill 'provocation'
267    wait 200
268    
269    if insysmsg "You must wait"
270        overhead "Provo Buff Cooldown" 11
271    else
272        waitfortarget 650
273        target backpack
274    endif
275endif
276
277sysmsg "Provo Finish! time elapsed: {{testTimer}}" 44