Strangelands Dexxer Bot by Jaseowns

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