Back to "provo" tags

Auto Bard Provo Dexxer Bot (NEW 7/5/2023) by Jaseowns

Description: We took the Auto Dexxer and tried to improve the targeting for provocation. Use with caution - you may become rich.

1# Automatic Bard Provo Dexxer Bot by Jaseowns
2# NEW TARGET SYSTEM
3# UO Outlands
4#######
5# Working on this during the live streams: Monday / Wednesday / Friday
6# https://youtube.com/jaseowns/live
7#######
8#####
9##  Verison 1.0.0
10##  Last Edit: 7/5/2023 
11##    - took exisitng dexxer bot and made new target system
12##    - Disclaimer: we only played an archer with provo and discord
13###
14    
15# Basic Heal and Chivalry abilties to heal by Jaseowns
16# UO Outlands
17@setvar! showTargetOverheadMessages 1
18@setvar! cdPreventOverheadSpam 2000
19
20################################
21###### Random abilities
22################
23@setvar! automaticallySkinCorpses 1
24@setvar! automaticallyPoisonWeaponThatIsEquipped 1
25
26################################
27###### Bard abilities
28################
29@setvar! useAutomaticProvoke 1
30
31
32################################
33###### Potion Controllers
34################
35@setvar! automaticallyDrinkStrPot 1
36@setvar! automaticallyDrinkAgiPot 1
37@setvar! automaticallyDrinkMagicPot 1
38@setvar! automaticallyDrinkHealPot 1
39@setvar! automaticallyDrinkCurePot 1
40@setvar! automaticallyDrinkRefreshPot 1
41
42@setvar! hpCheckToTriggerHealPotion 45
43@setvar! hpCheckToTriggerCurePotion 45
44@setvar! stamDiffCheckToTriggerRedPotion 10
45
46@setvar! drinkPotionsEvenIfInWarModeAndYouLoseHealth 1
47
48################################
49###### Chiv abilities
50################
51@setvar! useCleanseByFireAutomatically 1
52@setvar! useCloseWoundsAutomatically 1
53@setvar! useHolyLightAutomatically 1
54@setvar! useDivineFuryAutomatically 1
55@setvar! hpTriggerForHolyLight 35
56@setvar! lowHealthTriggerForNobleSacrifice 40
57
58@setvar! myRangeCheckForTarget 1
59
60if skill "Archery" > 50
61    @setvar! myRangeCheckForTarget 8   
62endif
63
64@setvar! cdCleanseByFire 31000
65@setvar! cdCloseWounds 31000
66@setvar! cdHolyLight 31000
67@setvar! cdDivineFury 31000
68@setvar! cdNobleSacrifice 31000
69
70################################
71###### Chiv abilities overheads
72################
73@setvar! showChivUsageAsOverhead 1
74@setvar! showChivUsageAsSystemMessage 1
75@setvar! showChivUsageAsOverheadColor 88
76@setvar! showChivUsageAsSystemMessageColor 88
77
78################################
79###### Bard abilities overheads
80################
81@setvar! showDiscordDebuffAsOverhead 1
82@setvar! showDiscordDebuffAsOverheadColor 55
83@setvar! showPeaceDebuffAsOverhead 1
84@setvar! showPeaceDebuffAsOverheadColor 77
85
86################################
87###### Codex Stance Switch
88################
89@setvar! switchShieldCodexAutomatically 1
90@setvar! switchToWardingStanceDuringBleed 1
91@setvar! switchToWardingStanceDuringDisease 1
92@setvar! switchToWardingStanceDuringPoison 1
93@setvar! switchToShieldBash 0
94@setvar! switchToBulwark 1
95@setvar! cdSwitchStance 10000
96
97###########
98# If shit is not working right, adjust this number to ping
99#####
100@setvar! minimumWaitForPing 200
101@setvar! minimumWaitForPingUnequipping 650
102@setvar! cdPreventChivAbilitySpam 750
103@setvar! cdSkinningCheck 3000
104
105###########
106# Taming Stuff
107#####
108if skill "Animal Taming" > 50
109    @setvar! hpTriggerForHolyLight 80
110
111    if not varexist myJaseHelperText
112        overhead "Make sure to set totalPets to your pet count: default is 2" 88
113        @setvar! myJaseHelperText 1
114    endif
115    @setvar! totalPets 2
116
117    # Pets
118    if not varexist myDexxerTankPet
119        @setvar! myDexxerTankPet 0
120    endif
121    if not find myDexxerTankPet ground -1 -1 20
122        overhead "Select your main tank" 88
123        @setvar! myDexxerTankPet
124        wait 200
125    endif
126    
127    if totalPets = 2 or totalPets = 3 or totalPets = 4 or totalPets = 5
128        if not varexist myOtherPet1
129            @setvar! myOtherPet1 0
130        endif
131        if not find myOtherPet1 ground -1 -1 20
132            overhead "Select your non tank pet 1" 88
133            @setvar! myOtherPet1
134            wait 200
135        endif
136    else
137        @setvar! myOtherPet1 0
138    endif
139    
140    if totalPets = 3 or totalPets = 4 or totalPets = 5
141        if not varexist myOtherPet2
142            @setvar! myOtherPet2 0
143        endif
144        if not find myOtherPet2 ground -1 -1 20
145            overhead "Select your non tank pet 2" 88
146            @setvar! myOtherPet2
147            wait 200
148        endif
149    else
150        @setvar! myOtherPet2 0
151    endif
152    
153    if totalPets = 4 or totalPets = 5
154        if not varexist myOtherPet3
155            @setvar! myOtherPet3 0
156        endif
157        if not find myOtherPet3 ground -1 -1 20
158            overhead "Select your non tank pet 3" 88
159            @setvar! myOtherPet3
160            wait 200
161        endif
162    else
163        @setvar! myOtherPet3 0
164    endif
165
166    if totalPets = 5
167        if not varexist myOtherPet4
168            @setvar! myOtherPet4 0
169        endif
170       if not find myOtherPet4 ground -1 -1 20
171            overhead "Select your non tank pet 4" 88
172            @setvar! myOtherPet4
173            wait 200
174        endif
175    else
176        @setvar! myOtherPet4 0
177    endif
178endif
179
180##############################################
181###########  DO NOT EDIT BELOW THIS
182#######
183
184@setvar! cdWorldSaveOver 15000
185# function
186// do find type
187
188@setvar! JASE_ClosestGreyMob 0
189@setvar! JASE_NextGreyMob 0
190
191################
192### Targetting 
193####
194while not dead 
195    
196    // automatically find a target?
197    if warmode
198        // do nothing
199    else
200    
201        hotkey "Target Closest Grey Monster"
202        wait 200
203        if insysmsg "No one matching"
204            overhead "No one there bro" 88
205        else
206            @setvar! JASE_ClosestGreyMob lasttarget 
207            hotkey "Next Grey Monster Target"
208            wait 200
209            @setvar! JASE_NextGreyMob lasttarget 
210        endif
211        
212        @setvar! JASE_TargetRangeCheck 12
213        @setvar! JASE_NextTargetInRange 0
214        
215        if JASE_ClosestGreyMob != 0
216            
217            if find JASE_ClosestGreyMob ground -1 -1 JASE_TargetRangeCheck
218                overhead "Closest Target in Range" 88 JASE_ClosestGreyMob
219            else
220                overhead "Out of range" 88 JASE_ClosestGreyMob
221            endif
222  
223            if JASE_ClosestGreyMob != JASE_NextGreyMob
224                for 5
225                    if find JASE_NextGreyMob ground -1 -1 JASE_TargetRangeCheck
226                        @setvar! JASE_NextTargetInRange 1
227                        break
228                    else
229                        hotkey "Next Grey Monster Target"
230                        wait 200
231                        @setvar! JASE_NextGreyMob lasttarget 
232                    endif
233                 endfor
234                 
235                 if JASE_NextTargetInRange = 1
236                     overhead "Next Closest Target in Range" 77 JASE_NextGreyMob
237                 else
238                     overhead  "No next target in range" 34
239                 endif
240             else
241                  overhead  "No next target in range" 34
242             endif
243        endif
244        
245        
246        // find a target 
247            # target closest
248            # next target 
249            # findtype
250            
251        // is it nearby and can we fight it
252            # range check of the target
253        
254            // if no target
255            // do we loop again or do some other logic
256        
257        // if we are fighting it
258            # is it in range and combating? (attack command)
259            
260            
261        // check other mobs nearby
262            # target closest
263            # next target 
264            # findtype
265            
266            // if we have another mob.. do we provoke?
267            // discord, peace, etc
268    endif
269    
270    if skill "Animal Taming" > 50
271        while dead myDexxerTankPet
272            if not bandaging and findtype "clean bandage%s%" backpack as item
273                dclick item
274                wft 500
275                target myDexxerTankPet
276            endif
277            
278            if hp <= hpCheckToTriggerHealPotion or hp <= hpTriggerForHolyLight
279                break
280            endif
281            wait 100
282        endwhile
283        
284        # want a timer to start healing pets
285        # if the timer passes certain time
286        # trigger a heal bandage
287        # we want to check system message to see
288        # if its working
289        
290        @setvar! cdPetHeal 8000
291        if not timerexists petHealTimer
292            settimer petHealTimer cdPetHeal
293        endif
294        
295        @setvar! cdPetGuard 8000
296        if not timerexists petGuardTimer
297            settimer petGuardTimer cdPetGuard
298        endif
299        
300        if timer petGuardTimer >= cdPetGuard
301                menu myDexxerTankPet 3
302                if not dead myOtherPet1
303                    wait 200
304                    menu myOtherPet1 3
305                endif
306            settimer petGuardTimer 0
307        endif
308      
309        if timer petHealTimer >= cdPetHeal
310            
311            if findtype "veterinary supplies" backpack as item
312                if not bandaging
313                    dclick item
314                    wait 650
315                endif
316            else
317                if not bandaging and findtype "clean bandage%s%" backpack as item
318                    dclick item
319                    wft 500
320                    target myDexxerTankPet
321                    overhead "Heal Target" 77 myDexxerTankPet
322                    wait 650
323                endif
324                if myOtherPet1 != 0 and not bandaging and findtype "clean bandage%s%" backpack as item
325                    dclick item
326                    wft 500
327                    target myOtherPet1
328                    overhead "Heal Target" 66 myOtherPet1
329                    wait 650
330                endif
331                if myOtherPet2 != 0 and not bandaging and findtype "clean bandage%s%" backpack as item
332                    dclick item
333                    wft 500
334                    target myOtherPet2
335                    overhead "Heal Target" 55 myOtherPet2
336                    wait 650
337                endif
338                if myOtherPet3 != 0 and not bandaging and findtype "clean bandage%s%" backpack as item
339                    dclick item
340                    wft 500
341                    target myOtherPet3
342                    overhead "Heal Target" 44 myOtherPet3
343                    wait 650
344                endif
345                if myOtherPet4 != 0 and not bandaging and findtype "clean bandage%s%" backpack as item
346                    dclick item
347                    wft 500
348                    target myOtherPet4
349                    overhead "Heal Target" 33 myOtherPet4
350                    wait 650
351                endif
352            endif
353        
354            
355            if not bandaging
356                settimer petHealTimer 0
357            endif
358        endif
359        
360        
361    endif
362
363    if not timerexists skinningCheckTimer
364        settimer skinningCheckTimer cdSkinningCheck
365    endif
366
367    if automaticallySkinCorpses = 1 and findtype "corpse" ground -1 -1 2 as jorpse
368        if findtype "Elven Spellblade" backpack and timer skinningCheckTimer >= cdSkinningCheck 
369            while not targetexists 
370                useskill 'forensicevaluation'
371            endwhile
372            if targetexists 
373                hotkey "Target Self"
374                wait minimumWaitForPing
375                settimer skinningCheckTimer 0
376                @ignore jorpse
377            endif
378        endif
379    endif
380
381    // Trapped
382    if paralyzed 
383        if findtype "pouch" backpack 38 
384            yell "[pouch"
385            wait minimumWaitForPing
386        else
387            overhead "Out of Pouches!" 34
388        endif
389    endif
390
391    if findbuff "weaken" and weight > maxweight 
392        if findtype "gold coin" backpack as item
393            lift item 2000
394            droprelloc 0 0
395            wait minimumWaitForPing
396            if insysmsg "cannot drop anything"
397                drop backpack -1 -1 -1
398            endif
399            wait minimumWaitForPingUnequipping
400        else
401            overhead "We are overweight and cannot drop anything" 34
402        endif
403    endif
404
405    if not varexist jaseCrimHealCheck
406        gumpclose 3587807212
407        while not gumpexists 3587807212
408            say '[commands'
409            wait 200
410        endwhile
411        gumpresponse 11 3587807212
412        waitforgump 3587807212 5000
413        gumpresponse 3 3587807212
414        waitforgump 3587807212 5000
415        if ingump "[PreventCriminalHealing" 3587807212
416            if ingump "Prevented"
417                gumpclose 3587807212
418            else
419                gumpresponse 29 3587807212
420                waitforgump 3587807212 5000
421                gumpclose 3587807212
422            endif
423        endif
424        @setvar! jaseCrimHealCheck 1
425    endif
426
427    if not timerexists worldSaveTimer
428        settimer worldSaveTimer cdWorldSaveOver
429    endif
430
431    if insysmsg 'world will save'
432        overhead "World save coming soon.."
433        settimer worldSaveTimer 0
434    elseif insysmsg 'world is saving'
435        for 100
436            overhead 'Waiting for world save...'
437            wait 100
438            if insysmsg 'save complete'
439                settimer worldSaveTimer cdWorldSaveOver
440                overhead 'Save complete - continue on!' 88
441                break
442            endif
443        endfor
444    endif
445
446    if timer worldSaveTimer >= cdWorldSaveOver
447        if automaticallyPoisonWeaponThatIsEquipped = 1 and skill "Poisoning" > 0
448            if findlayer self righthand as found
449                @setvar! weapon_equipped found
450            elseif findlayer self lefthand as found
451                @setvar! weapon_equipped found
452            else
453                overhead "Unknown or no weapon equipped" 34
454                stop
455            endif  
456            getlabel weapon_equipped desc
457            if "poison charges" in desc
458                // do nothing
459            else
460                if findtype "Green Potion" backpack
461                    menu weapon_equipped 0
462                else
463                    overhead "No poison pots" 34
464                endif
465            endif  
466        endif
467    endif
468
469    if not findtype "White Potion" backpack
470        @setvar! automaticallyDrinkStrPot 0
471    endif
472
473    if not findtype "Blue Potion" backpack
474        @setvar! automaticallyDrinkAgiPot 0
475    endif
476
477    if not findtype "Black Potion" backpack
478        @setvar! automaticallyDrinkMagicPot 0
479    endif
480
481    @setvar! cdAids 15000
482    if dex >= 100
483        @setvar! cdAids 10000    
484    endif
485
486    if not timerexists preventOverheadSpamTimer
487        createtimer preventOverheadSpamTimer
488        settimer preventOverheadSpamTimer cdPreventOverheadSpam
489    endif
490
491    if not timerexists preventChivAbilitySpamTimer
492        createtimer preventChivAbilitySpamTimer
493        settimer preventChivAbilitySpamTimer cdPreventChivAbilitySpam
494    endif
495
496    if not timerexists aidsTimer
497        createtimer aidsTimer
498        settimer aidsTimer cdAids
499    endif
500
501    // JASE_ClosestGreyMob 
502    // JASE_NextGreyMob 
503    
504    @setvar! myKillTarget JASE_ClosestGreyMob
505    @setvar! targetInRange 0 
506
507    if not varexist myPreviousKillTarget
508        @setvar myPreviousKillTarget 0     
509    endif
510
511    if warmode 
512        // do nothing
513    else
514        
515        if not varexist autoAttack
516            @setvar! autoAttack 1
517        endif
518        
519        if myKillTarget != 0 and myPreviousKillTarget != myKillTarget
520            getlabel myKillTarget mobDesc
521            @setvar! myPreviousKillTarget myKillTarget
522        
523            if "(summoned" in mobDesc or "(bonded" in mobDesc or "(tame" in mobDesc
524                overhead "▼ Player pet - IGNORE ▼" 77 lasttarget
525                @setvar! autoAttack 0
526            else  
527                @setvar! autoAttack 1
528            endif    
529        endif
530        
531
532        
533        if myKillTarget = 0
534            // do nothing
535        elseif not find lasttarget ground -1 -1 myRangeCheckForTarget
536            if showTargetOverheadMessages = 1 and timer preventOverheadSpamTimer >= cdPreventOverheadSpam
537                overhead "● ▼ OUT OF RANGE ▼ ●" 88 lasttarget
538                settimer preventOverheadSpamTimer 0
539            endif
540            if find lasttarget ground -1 -1 8 and autoAttack = 1
541                attack lasttarget 
542            endif
543        elseif autoAttack = 1
544            @setvar! targetInRange 1
545            if showTargetOverheadMessages = 1 and timer preventOverheadSpamTimer >= cdPreventOverheadSpam
546                overhead "● ▼▼ HERE ▼▼ ●" 88 lasttarget    
547                settimer preventOverheadSpamTimer 0
548            endif
549            attack lasttarget 
550        endif
551    endif
552
553    # Eat food if we got it
554    if not findbuff "food" and findtype "tray" backpack as jood
555        dclick jood
556        wait minimumWaitForPing
557    endif
558
559    @setvar! needStrBuff 0
560    @setvar! needDexBuff 0
561    @setvar! needMagicBuff 0
562    @setvar! needHealPot 0
563    @setvar! needCurePot 0
564    @setvar! needRefreshPot 0
565
566    @setvar! drinkThosePots 0
567
568    if targetInRange = 1 
569       @setvar! drinkThosePots 1   
570    elseif warmode and drinkPotionsEvenIfInWarModeAndYouLoseHealth = 1 and hp < maxhp
571        @setvar! drinkThosePots 1   
572    endif
573
574    if automaticallyDrinkStrPot = 1 and drinkThosePots = 1 and not findbuff "Strength"
575        @setvar! needStrBuff 1
576    endif
577
578    if automaticallyDrinkAgiPot = 1 and drinkThosePots = 1 and not findbuff "Agility"
579        @setvar! needDexBuff 1 
580    endif
581
582    if automaticallyDrinkMagicPot = 1 and drinkThosePots = 1 and not findbuff "Magic Resist Potion"
583        @setvar! needMagicBuff 1 
584    endif
585
586    if automaticallyDrinkHealPot = 1 and hp <= hpCheckToTriggerHealPotion
587        @setvar! needHealPot 1 
588    endif
589
590    if automaticallyDrinkCurePot = 1 and poisoned and hp <= hpCheckToTriggerCurePotion
591        @setvar! needCurePot 1 
592    endif
593
594    if automaticallyDrinkRefreshPot = 1 and diffstam >= stamDiffCheckToTriggerRedPotion
595        @setvar! needRefreshPot 1 
596    endif
597
598    if needStrBuff = 1 and not findtype "White Potion" backpack
599        @setvar! needStrBuff 0
600    endif
601
602    if needDexBuff = 1 and not findtype "Blue Potion" backpack
603        @setvar! needDexBuff 0
604    endif
605
606    if needMagicBuff = 1 and not findtype "Black Potion" backpack
607        @setvar! needMagicBuff 0
608    endif
609
610    if needHealPot = 1 and not findtype "Yellow Potion" backpack
611        @setvar! needHealPot 0
612    elseif needHealPot = 1 and findtype "Yellow Potion" backpack as item
613        getlabel item healPotDesc
614        if "next usable" in healPotDesc
615            @setvar! needHealPot 0
616        else
617            @setvar! needHealPot 1
618        endif
619    endif
620
621    if needCurePot = 1 and not findtype "Orange Potion" backpack
622        @setvar! needCurePot 0
623    endif
624
625    if needRefreshPot = 1 and not findtype "Red Potion" backpack
626        @setvar! needRefreshPot 0
627    endif
628
629    @setvar! jaseCanDrinkPotion 0
630
631    if needStrBuff = 1 or needDexBuff = 1 or needMagicBuff = 1 or needHealPot = 1 or needCurePot = 1 or needRefreshPot = 1
632
633        @setvar! jaseRightHand 0
634        @setvar! jaseLeftHand 0
635        @setvar! needTwoHandSwap 0
636        @setvar! needShieldSwap 0
637
638        if skill "Alchemy" >= 80
639            @setvar! jaseCanDrinkPotion 1
640        else
641            if not findlayer self lefthand and not findlayer self righthand
642                @setvar! jaseCanDrinkPotion 1
643            else
644                if findlayer self lefthand as myLefthand
645                    @setvar! jaseLeftHand myLefthand
646                endif
647                if findlayer self righthand as myRightHand
648                    @setvar! jaseRightHand myRightHand
649                endif 
650                if not lhandempty 
651                    if not rhandempty 
652                        @setvar! jaseCanDrinkPotion 0
653                    else
654                        // handle two handed weapons
655                        getlabel jaseLeftHand desc
656                        if skill "Swordsmanship" > 0
657                           if "axe" in desc or "bardiche" in desc or "halberd" in desc
658                                @setvar! jaseCanDrinkPotion 0
659                                @setvar! needTwoHandSwap 1
660                            else   
661                                @setvar! jaseCanDrinkPotion 1
662                            endif
663                        elseif skill "Mace Fighting" > 0
664                            if "staff" in desc or "crook" in desc or "war hammer" in desc
665                                @setvar! jaseCanDrinkPotion 0
666                                @setvar! needTwoHandSwap 1
667                            else   
668                                @setvar! jaseCanDrinkPotion 1
669                            endif
670                        elseif skill "Fencing" > 0
671                            if "spear" in desc or "pitchfork" in desc
672                                @setvar! jaseCanDrinkPotion 0
673                                @setvar! needTwoHandSwap 1
674                            else   
675                                @setvar! jaseCanDrinkPotion 1
676                            endif
677                        elseif skill "Archery" > 0
678                            if "bow" in desc or "heavy crossbow" in desc
679                                @setvar! jaseCanDrinkPotion 0
680                                @setvar! needTwoHandSwap 1
681                            else   
682                                @setvar! jaseCanDrinkPotion 1
683                            endif
684                        elseif skill "Wrestling" > 0
685                            @setvar! jaseCanDrinkPotion 1
686                        endif  
687                    endif
688                endif
689                if not rhandempty 
690                    if lhandempty 
691                        @setvar! jaseCanDrinkPotion 1
692                    else
693                        @setvar! needShieldSwap 1
694                    endif
695                endif
696            endif
697        endif
698
699        if jaseCanDrinkPotion = 1
700            // do nothing
701        else
702            if needTwoHandSwap = 1
703                if skill "Swordsmanship" > 0 and findtype "cutlass|broadsword|scimitar|viking sword|longsword|katana" backpack as item
704                    dclick item
705                    wait minimumWaitForPing
706                elseif skill "Mace Fighting" > 0 and findtype "maul|war axe|war mace|mace|hammer pick|club" backpack as item
707                    dclick item
708                    wait minimumWaitForPing
709                elseif skill "Fencing" > 0 and findtype "kryss|war fork" backpack as item
710                    dclick item
711                    wait minimumWaitForPing
712                elseif skill "Archery" > 0 and findtype "crossbow" backpack as item
713                    dclick item
714                    wait minimumWaitForPing
715                else
716                    hotkey 'Arm/Disarm Left Hand'    
717                    wait minimumWaitForPing
718                endif
719                @setvar! jaseCanDrinkPotion 1
720            elseif needShieldSwap = 1
721                overhead "we should be disarming left hand"
722                while not lhandempty
723                    hotkey 'Arm/Disarm Left Hand'
724                    wait minimumWaitForPingUnequipping
725                    while queued
726                        wait 100
727                    endwhile
728                endwhile
729                setvar! jaseCanDrinkPotion 1
730            endif
731        endif
732
733        if jaseCanDrinkPotion = 1
734            if needHealPot = 1
735                if findtype "Yellow Potion" backpack as jotion
736                    overhead "chug heal"
737                    dclick jotion
738                    wait minimumWaitForPing
739                    cooldown "Yellow Potion" 10000
740                else
741                    overhead "No Heal potion found!" 34
742                endif
743            endif
744            
745            if needCurePot = 1
746                if findtype "Orange Potion" backpack as jotion
747                    overhead "chug cure"
748                    dclick jotion
749                    wait minimumWaitForPing
750                else
751                    overhead "No Cure potion found!" 34
752                endif
753            endif
754            
755                        
756            if needDexBuff = 1
757                if findtype "Blue Potion" backpack as jotion
758                    overhead "chug"
759                    dclick jotion
760                    wait minimumWaitForPing
761                else
762                    overhead "No AGI potion found!" 34
763                endif
764            endif
765            
766            if automaticallyDrinkRefreshPot = 1 and diffstam >= stamDiffCheckToTriggerRedPotion
767                @setvar! needRefreshPot 1 
768            endif
769        
770            if needRefreshPot = 1
771                if findtype "Red Potion" backpack as jotion
772                    overhead "chug refresh"
773                    dclick jotion
774                    wait minimumWaitForPing
775                else
776                    overhead "No Refresh potion found!" 34
777                endif
778            endif
779        
780            if needStrBuff = 1
781                if findtype "White Potion" backpack as jotion
782                    overhead "chug"
783                    dclick jotion
784                    wait minimumWaitForPing
785                else
786                    overhead "No STR potion found!" 34
787                endif
788            endif
789            
790            if needMagicBuff = 1
791                if findtype "Black Potion" backpack as jotion
792                    overhead "chug"
793                    dclick jotion
794                    wait minimumWaitForPing
795                else
796                    overhead "No MR potion found!" 34
797                endif
798            endif
799
800            if needTwoHandSwap = 1
801                dclick jaseLeftHand
802                wait minimumWaitForPing
803            elseif needShieldSwap = 1
804                hotkey 'Arm/Disarm Left Hand'
805                wait minimumWaitForPingUnequipping
806            endif
807        endif
808    endif
809
810    #############
811    ### CODEX
812    #############
813    if timer worldSaveTimer >= cdWorldSaveOver and skill "Parrying" >= 80 and findtype "shield codex" backpack as item
814
815        if not timerexists jaseSwitchStanceTimer
816            settimer jaseSwitchStanceTimer cdSwitchStance
817        endif
818        
819        if not varexist canUseShieldFinisher
820            @setvar! canUseShieldFinisher 1
821        endif
822        
823        while not gumpexists 1066647553
824            overhead "Loading hotbar"
825            yell "[CodexHotBar"
826            wait minimumWaitForPing
827        endwhile
828
829        if switchShieldCodexAutomatically = 1 and timer jaseSwitchStanceTimer >= cdSwitchStance
830            getlabel item codexDesc
831            
832            // make sure we are in warding stance
833            @setvar! switchToWarding 0
834
835            if switchToWardingStanceDuringBleed = 1 and findbuff "bleed" 
836                @setvar! switchToWarding 1
837            elseif switchToWardingStanceDuringDisease = 1 and findbuff "disease" 
838                @setvar! switchToWarding 1
839            elseif switchToWardingStanceDuringPoison = 1 and poisoned
840                @setvar! switchToWarding 1
841            endif
842
843            if switchToWarding = 1
844                if "Warding" in codexDesc
845                    // we good
846                else
847                    yell [ShieldsStance2
848                    settimer jaseSwitchStanceTimer 0
849                    wait 200
850                endif    
851                
852                if "Barrier" in codexDesc
853                    // we good
854                elseif canUseShieldFinisher = 1
855                    yell [ShieldsFinisher2
856                    wait 200
857                    if insysmsg "You must first reach rank 5"
858                        @setvar! canUseShieldFinisher 0
859                    endif
860                endif    
861            elseif switchToBulwark = 1
862                if "Bulwark" in codexDesc
863                    // we good
864                else
865                    yell [ShieldsStance5
866                    settimer jaseSwitchStanceTimer 0
867                    wait 200
868                endif
869                
870                if "Last Stand" in codexDesc
871                    // we good
872                elseif canUseShieldFinisher = 1
873                    yell [ShieldsFinisher1
874                    wait 200
875                    if insysmsg "You must first reach rank 5"
876                        @setvar! canUseShieldFinisher 0
877                    endif
878                endif
879            elseif switchToShieldBash = 1
880                if "Shield Bash" in codexDesc
881                    // we good
882                else
883                    yell [ShieldsStance1
884                    settimer jaseSwitchStanceTimer 0
885                    wait 200
886                endif
887                
888                if "Last Stand" in codexDesc
889                    // we good
890                elseif canUseShieldFinisher = 1
891                    yell [ShieldsFinisher1
892                    wait 200
893                    if insysmsg "You must first reach rank 5"
894                        @setvar! canUseShieldFinisher 0
895                    endif
896                endif
897            endif
898        endif
899    endif
900
901    if skill "Tracking" > 0
902        if not findbuff "tracking"
903            clearsysmsg
904            while not gumpexists 4267467659
905                useskill 'tracking'
906                wait minimumWaitForPing
907            endwhile
908            if gumpexists 4267467659
909                while not insysmsg "You will now hunt all hostile players."
910                    gumpresponse 8 4267467659
911                    waitforgump 4267467659 5000
912                endwhile
913                gumpresponse 6 4267467659
914                wait minimumWaitForPing
915            endif
916            gumpclose 4267467659
917        endif
918    endif
919
920    if skill "Chivalry" >= 50
921
922        @setvar! chivSymbols 0
923        @setvar! cdCleanseByFire 31000
924        @setvar! cdCloseWounds 31000
925        @setvar! cdHolyLight 31000
926        @setvar! cdDivineFury 31000
927        @setvar! cdNobleSacrifice 31000
928
929        if not timerexists nobleSacrificeTimer
930            createtimer nobleSacrificeTimer
931            settimer nobleSacrificeTimer cdCleanseByFire
932        endif
933
934        if not timerexists cleanseByFireTimer
935            createtimer cleanseByFireTimer
936            settimer cleanseByFireTimer cdCleanseByFire
937        endif
938
939        if not timerexists closeWoundsTimer
940            createtimer closeWoundsTimer
941            settimer closeWoundsTimer cdCloseWounds
942        endif
943        
944        if not timerexists holyLightTimer
945            createtimer holyLightTimer
946            settimer holyLightTimer cdHolyLight
947        endif
948        
949        if not timerexists divineFuryTimer
950            createtimer divineFuryTimer
951            settimer divineFuryTimer cdDivineFury
952        endif
953        
954        while not gumpexists 1387930325
955            say "[ChivalryHotbar"
956            wait 200
957        endwhile
958        
959        if gumpexists 1387930325
960            if ingump "12/" 1387930325
961                @setvar! chivSymbols 12
962            elseif ingump "13/" 1387930325
963                @setvar! chivSymbols 13
964            elseif ingump "14/" 1387930325
965                @setvar! chivSymbols 14
966            elseif ingump "15/" 1387930325
967                @setvar! chivSymbols 15
968            elseif ingump "16/" 1387930325
969                @setvar! chivSymbols 16
970            elseif ingump "17/" 1387930325
971                @setvar! chivSymbols 17
972            elseif ingump "18/" 1387930325
973                @setvar! chivSymbols 18
974            elseif ingump "19/" 1387930325
975                @setvar! chivSymbols 19
976            elseif ingump "20/" 1387930325
977                @setvar! chivSymbols 20
978            elseif ingump "21/" 1387930325
979                @setvar! chivSymbols 21
980            elseif ingump "11/" 1387930325
981                @setvar! chivSymbols 11
982            elseif ingump "10/" 1387930325
983                @setvar! chivSymbols 10
984            elseif ingump "9/" 1387930325
985                @setvar! chivSymbols 9
986            elseif ingump "8/" 1387930325
987                @setvar! chivSymbols 8
988            elseif ingump "7/" 1387930325
989                @setvar! chivSymbols 7
990            elseif ingump "6/" 1387930325
991                @setvar! chivSymbols 6
992            elseif ingump "5/" 1387930325
993                @setvar! chivSymbols 5
994            elseif ingump "4/" 1387930325
995                @setvar! chivSymbols 4
996            elseif ingump "3/" 1387930325
997                @setvar! chivSymbols 3
998            elseif ingump "2/" 1387930325
999                @setvar! chivSymbols 2
1000            elseif ingump "1/" 1387930325
1001                @setvar! chivSymbols 1
1002            elseif ingump "0/" 1387930325
1003                @setvar! chivSymbols 0
1004            endif
1005        endif
1006        
1007        if hp <= lowHealthTriggerForNobleSacrifice and skill "Chivalry" >= 80
1008            if timer preventChivAbilitySpamTimer >= cdPreventChivAbilitySpam and timer nobleSacrificeTimer >= cdNobleSacrifice and 4 < chivSymbols
1009                if skill "Healing" > 0
1010                    hotkey 'Bandage Self'
1011                    settimer aidsTimer 0
1012                    wait minimumWaitForPing
1013                endif
1014                if showChivUsageAsOverhead = 1
1015                    overhead "Noble Sacrifice" showChivUsageAsOverheadColor
1016                endif
1017                if showChivUsageAsSystemMessage = 1
1018                    sysmsg "Noble Sacrifice" showChivUsageAsSystemMessageColor
1019                endif
1020                yell "[NobleSacrifice"
1021                wft 500
1022                hotkey "Target Self"
1023                wait 200
1024                if insysmsg "Holy symbols remaining:"
1025                    settimer nobleSacrificeTimer 0
1026                    settimer preventChivAbilitySpamTimer 0
1027                    cooldown NobleSacrifice cdNobleSacrifice
1028                endif
1029                if gumpexists 1387930325
1030                    if ingump "12/" 1387930325
1031                        @setvar! chivSymbols 12
1032                    elseif ingump "13/" 1387930325
1033                        @setvar! chivSymbols 13
1034                    elseif ingump "14/" 1387930325
1035                        @setvar! chivSymbols 14
1036                    elseif ingump "15/" 1387930325
1037                        @setvar! chivSymbols 15
1038                    elseif ingump "16/" 1387930325
1039                        @setvar! chivSymbols 16
1040                    elseif ingump "17/" 1387930325
1041                        @setvar! chivSymbols 17
1042                    elseif ingump "18/" 1387930325
1043                        @setvar! chivSymbols 18
1044                    elseif ingump "19/" 1387930325
1045                        @setvar! chivSymbols 19
1046                    elseif ingump "20/" 1387930325
1047                        @setvar! chivSymbols 20
1048                    elseif ingump "21/" 1387930325
1049                        @setvar! chivSymbols 21
1050                    elseif ingump "11/" 1387930325
1051                        @setvar! chivSymbols 11
1052                    elseif ingump "10/" 1387930325
1053                        @setvar! chivSymbols 10
1054                    elseif ingump "9/" 1387930325
1055                        @setvar! chivSymbols 9
1056                    elseif ingump "8/" 1387930325
1057                        @setvar! chivSymbols 8
1058                    elseif ingump "7/" 1387930325
1059                        @setvar! chivSymbols 7
1060                    elseif ingump "6/" 1387930325
1061                        @setvar! chivSymbols 6
1062                    elseif ingump "5/" 1387930325
1063                        @setvar! chivSymbols 5
1064                    elseif ingump "4/" 1387930325
1065                        @setvar! chivSymbols 4
1066                    elseif ingump "3/" 1387930325
1067                        @setvar! chivSymbols 3
1068                    elseif ingump "2/" 1387930325
1069                        @setvar! chivSymbols 2
1070                    elseif ingump "1/" 1387930325
1071                        @setvar! chivSymbols 1
1072                    elseif ingump "0/" 1387930325
1073                        @setvar! chivSymbols 0
1074                    endif
1075                endif
1076            endif
1077        endif
1078        
1079        if poisoned and skill "Chivalry" >= 60
1080            if timer preventChivAbilitySpamTimer >= cdPreventChivAbilitySpam and useCleanseByFireAutomatically = 1 and timer cleanseByFireTimer >= cdCleanseByFire and 2 < chivSymbols
1081                if showChivUsageAsOverhead = 1
1082                    overhead "Cleanse by fire" showChivUsageAsOverheadColor
1083                endif
1084                if showChivUsageAsSystemMessage = 1
1085                    sysmsg "Cleanse by fire" showChivUsageAsSystemMessageColor
1086                endif
1087                yell "[CleanseByFire"
1088                wait 200
1089                if insysmsg "Holy symbols remaining:"
1090                    settimer cleanseByFireTimer 0
1091                    settimer preventChivAbilitySpamTimer 0
1092                    cooldown CleanseByFire cdCleanseByFire
1093                endif
1094            endif
1095        elseif findbuff "bleed" or findbuff "disease" and skill "Chivalry" >= 70
1096            if timer preventChivAbilitySpamTimer >= cdPreventChivAbilitySpam and useCloseWoundsAutomatically = 1 and timer closeWoundsTimer >= cdCleanseByFire and 3 < chivSymbols
1097                if showChivUsageAsOverhead = 1
1098                    overhead "Close Wounds" showChivUsageAsOverheadColor
1099                endif
1100                if showChivUsageAsSystemMessage = 1
1101                    sysmsg "Close Wounds" showChivUsageAsSystemMessageColor
1102                endif
1103                yell "[CloseWounds"
1104                wait 200
1105                if insysmsg "Holy symbols remaining:"
1106                    settimer closeWoundsTimer 0
1107                    settimer preventChivAbilitySpamTimer 0
1108                    cooldown CloseWounds cdCloseWounds
1109                endif
1110            endif
1111        endif
1112        
1113        if gumpexists 1387930325
1114            if ingump "12/" 1387930325
1115                @setvar! chivSymbols 12
1116            elseif ingump "13/" 1387930325
1117                @setvar! chivSymbols 13
1118            elseif ingump "14/" 1387930325
1119                @setvar! chivSymbols 14
1120            elseif ingump "15/" 1387930325
1121                @setvar! chivSymbols 15
1122            elseif ingump "16/" 1387930325
1123                @setvar! chivSymbols 16
1124            elseif ingump "17/" 1387930325
1125                @setvar! chivSymbols 17
1126            elseif ingump "18/" 1387930325
1127                @setvar! chivSymbols 18
1128            elseif ingump "19/" 1387930325
1129                @setvar! chivSymbols 19
1130            elseif ingump "20/" 1387930325
1131                @setvar! chivSymbols 20
1132            elseif ingump "21/" 1387930325
1133                @setvar! chivSymbols 21
1134            elseif ingump "11/" 1387930325
1135                @setvar! chivSymbols 11
1136            elseif ingump "10/" 1387930325
1137                @setvar! chivSymbols 10
1138            elseif ingump "9/" 1387930325
1139                @setvar! chivSymbols 9
1140            elseif ingump "8/" 1387930325
1141                @setvar! chivSymbols 8
1142            elseif ingump "7/" 1387930325
1143                @setvar! chivSymbols 7
1144            elseif ingump "6/" 1387930325
1145                @setvar! chivSymbols 6
1146            elseif ingump "5/" 1387930325
1147                @setvar! chivSymbols 5
1148            elseif ingump "4/" 1387930325
1149                @setvar! chivSymbols 4
1150            elseif ingump "3/" 1387930325
1151                @setvar! chivSymbols 3
1152            elseif ingump "2/" 1387930325
1153                @setvar! chivSymbols 2
1154            elseif ingump "1/" 1387930325
1155                @setvar! chivSymbols 1
1156            elseif ingump "0/" 1387930325
1157                @setvar! chivSymbols 0
1158            endif
1159        endif
1160        
1161        if timer preventChivAbilitySpamTimer >= cdPreventChivAbilitySpam and useHolyLightAutomatically = 1 and hp <= hpTriggerForHolyLight and skill "Chivalry" >= 95
1162            
1163            @setvar! doubleCheckHolyLight 1
1164        
1165            if skill "Healing" > 0 and cdAids = 10000 and timer aidsTimer >= 9000
1166                // skip holy light
1167                overhead "Skipping Holy Light" 34
1168                @setvar! doubleCheckHolyLight 0
1169                // unless we gonna die
1170                if hp <= 20 or poisoned
1171                    overhead "Just kidding, do not wanna die" 34
1172                    @setvar! doubleCheckHolyLight 1
1173                endif
1174            endif
1175            
1176            if doubleCheckHolyLight = 1
1177                if timer holyLightTimer >= cdHolyLight and 5 < chivSymbols
1178                    if showChivUsageAsOverhead = 1
1179                        overhead "Holy Light" showChivUsageAsOverheadColor
1180                    endif
1181                    if showChivUsageAsSystemMessage = 1
1182                        sysmsg "Holy Light" showChivUsageAsSystemMessageColor
1183                    endif
1184                    yell "[HolyLight"
1185                    wait 200
1186                    if insysmsg "Holy symbols remaining:"
1187                        settimer holyLightTimer 0
1188                        settimer preventChivAbilitySpamTimer 0
1189                        cooldown HolyLight cdHolyLight
1190                    endif
1191                endif
1192            endif
1193        endif
1194        
1195        if timer preventChivAbilitySpamTimer >= cdPreventChivAbilitySpam and targetInRange = 1 and useDivineFuryAutomatically = 1 and skill "Chivalry" >= 85
1196            if timer divineFuryTimer >= cdDivineFury and 4 < chivSymbols
1197                if showChivUsageAsOverhead = 1
1198                    overhead "Divine Fury" showChivUsageAsOverheadColor
1199                endif
1200                if showChivUsageAsSystemMessage = 1
1201                    sysmsg "Divine Fury" showChivUsageAsSystemMessageColor
1202                endif
1203                yell "[DivineFury"
1204                wait 200
1205                if insysmsg "Holy symbols remaining:"
1206                    settimer divineFuryTimer 0
1207                    settimer preventChivAbilitySpamTimer 0
1208                    cooldown DivineFury cdDivineFury
1209                endif
1210            endif
1211        endif
1212    endif
1213
1214    if skill "Healing" > 0
1215            
1216        @setvar! cdAids 15000
1217        if dex >= 100
1218            @setvar! cdAids 10000    
1219        endif
1220
1221        if not timerexists aidsTimer
1222            createtimer aidsTimer
1223            settimer aidsTimer cdAids
1224        endif
1225
1226        if findtype "clean bandage%s%" backpack
1227            if not bandaging and hp < maxhp
1228                hotkey 'Bandage Self'
1229                settimer aidsTimer 0
1230            elseif not bandaging and poisoned
1231                hotkey 'Bandage Self'
1232                settimer aidsTimer 0
1233            elseif not bandaging and findbuff "bleed"
1234                hotkey 'Bandage Self'
1235                settimer aidsTimer 0
1236            elseif not bandaging and findbuff "disease"
1237                hotkey 'Bandage Self'
1238                settimer aidsTimer 0
1239            endif
1240        else
1241            overhead "No bandages" 34
1242        endif
1243    endif
1244
1245    if not timerexists sCheck
1246        createtimer sCheck
1247        settimer sCheck 11000
1248    endif
1249
1250       
1251
1252    if find myKillTarget ground -1 -1 10 and skill "Discordance" > 0
1253        
1254        getlabel myKillTarget descBard
1255
1256        if "discord" in descBard
1257            if showDiscordDebuffAsOverhead = 1
1258                overhead "Already discorded" showDiscordDebuffAsOverheadColor myKillTarget
1259            endif
1260        elseif timer sCheck >= 5000
1261            useskill 'Discordance'
1262            wft 500
1263            if insysmsg "What instrument"
1264                if findtype "bamboo flute" backpack as inny
1265                    target inny
1266                elseif findtype "tambourine" backpack as inny
1267                    target inny
1268                elseif findtype "drum" backpack as inny
1269                    target inny
1270                elseif findtype "lute" backpack as inny
1271                    target inny
1272                elseif findtype "lap harp" backpack as inny
1273                    target inny
1274                else
1275                    overhead "I do not have an inny" 34
1276                    wait 2000
1277                endif
1278                wft 500
1279            endif
1280                
1281            if targetexists 
1282                target myKillTarget
1283                wait 200
1284                if insysmsg "you play success"
1285                    settimer sCheck 0
1286                elseif insysmsg "t incite that!"
1287                    // bad target
1288                elseif insysmsg "You fail to"
1289                    settimer sCheck 0
1290                endif
1291            endif
1292
1293        else
1294            overhead "Waiting for skill cooldown..." 88
1295        endif
1296    endif
1297
1298
1299    if find myKillTarget ground -1 -1 10 and skill "Peacemaking" > 0
1300        
1301        getlabel myKillTarget descBard
1302        
1303
1304        if "pacified" in descBard
1305            if showPeaceDebuffAsOverhead = 1
1306                overhead "Already peaced" showPeaceDebuffAsOverheadColor myKillTarget
1307            endif
1308        elseif timer sCheck >= 5000
1309            useskill 'Peacemaking'
1310            wft 500
1311            if insysmsg "What instrument"
1312                if findtype "bamboo flute" backpack as inny
1313                    target inny
1314                elseif findtype "tambourine" backpack as inny
1315                    target inny
1316                elseif findtype "drum" backpack as inny
1317                    target inny
1318                elseif findtype "lute" backpack as inny
1319                    target inny
1320                elseif findtype "lap harp" backpack as inny
1321                    target inny
1322                else
1323                    overhead "I do not have an inny" 34
1324                    wait 2000
1325                endif
1326                wft 500
1327            endif
1328                
1329            if targetexists 
1330                target myKillTarget
1331                wait 200
1332                if insysmsg "you play success"
1333                    settimer sCheck 0
1334                elseif insysmsg "t incite that!"
1335                    // bad target
1336                elseif insysmsg "You fail to"
1337                    settimer sCheck 0
1338                endif
1339            endif
1340
1341        else
1342            overhead "Waiting for skill cooldown..." 88
1343        endif
1344    endif
1345
1346
1347     
1348    if skill "Discordance" > 0
1349        if not findbuff "song of discordance" and timer sCheck >= 11000
1350            useskill 'Discordance'
1351            wft 500
1352            target backpack
1353            settimer sCheck 0
1354        endif
1355    endif
1356
1357    if skill "Provocation" > 0
1358        
1359        if JASE_NextGreyMob != 0
1360            if timer sCheck >= 5000
1361                useskill 'Provocation'
1362                wft 500
1363                if insysmsg "What instrument"
1364                    if findtype "bamboo flute" backpack as inny
1365                        target inny
1366                    elseif findtype "tambourine" backpack as inny
1367                        target inny
1368                    elseif findtype "drum" backpack as inny
1369                        target inny
1370                    elseif findtype "lute" backpack as inny
1371                        target inny
1372                    elseif findtype "lap harp" backpack as inny
1373                        target inny
1374                    else
1375                        overhead "I do not have an inny" 34
1376                        wait 2000
1377                        replay
1378                    endif
1379                    wft 500
1380                endif
1381                
1382                if targetexists 
1383                    target JASE_ClosestGreyMob
1384                    wft 500
1385                    target JASE_NextGreyMob
1386                    wait 200
1387                    if insysmsg "you play success"
1388                        settimer sCheck 0
1389                        break
1390                    elseif insysmsg "t incite that!"
1391                        break
1392                    endif
1393                endif
1394
1395            else
1396                overhead "Waiting for skill cooldown..." 88
1397            endif
1398        
1399        endif
1400    
1401        if not findbuff "song of provocation" and timer sCheck >= 11000
1402            useskill 'Provocation'
1403            wft 500
1404            target backpack
1405            settimer sCheck 0
1406        endif
1407    endif
1408
1409    if skill "Peacemaking" > 0
1410        if not findbuff "song of peacemaking" and timer sCheck >= 11000
1411            useskill 'Peacemaking'
1412            wft 500
1413            target backpack
1414            settimer sCheck 0
1415        endif
1416    endif
1417
1418    wait 200
1419endwhile
1420
1421while dead 
1422    overhead "Rip" 34
1423    if gumpexists 2957810225
1424        gumpresponse 1 2957810225
1425        break
1426    endif        
1427    wait 500
1428endwhile
1429
1430replay
1431
1432