forked from m0rg/RKMacros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RKShadowKnight.mac
148 lines (104 loc) · 3.98 KB
/
RKShadowKnight.mac
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
#Event SnareImmune "#*#Your target is immune to changes in its run speed."
#include RKBase.inc
#include RKMeleeBase.inc
#include RKCasterBase.inc
Sub Main
/call Init_RKBase
/call Init_RKMeleeBase
/call AddToArray "CombatActionSubs" "SKCombatActions"
/call Init_RKCasterBase
| *** VARIABLE DECLARATIONS
/varset StickFlags moveback loose
/varset PullMode TRUE
/varset KeepAgroOnAdds FALSE
/varset UpperAggroThreshold 101
/varset MercBurnThreshold 101
/declare SnareMode bool outer FALSE
/declare ShouldSnare bool outer TRUE
/call AddToArray "DefensiveActionSubs" "SKDefensives"
/call AddToArray "NonCombatSubs" "SKNonCombat"
/call AddToArray "InvisModeSubs" "SelfInvis"
/call AddToArray "DetrimentalSpells" "Touch of Piqiorn Rk. II"
/call AddToArray "DetrimentalSpells" "Provocation for Power Rk. II"
/call AddToArray "DetrimentalSpells" "Insidious Audacity Rk. II"
/call AddToArray "DetrimentalSpells" "Korum's Bite Rk. II"
/call AddToArray "DetrimentalSpells" "Perfidious Blight Rk. II"
/call AddToArray "GiftSpells" "Dire Allegation Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Drape of the Sepulcher Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Shadow of the Shadeborne Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Sholothian Horror Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Strength of the Bosquestalker Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Call of Shadow Rk. II"
|/call AddToArray "NonCombatSelfBuffs" "Ghoul Skin Rk. II"
/call AddToArray "BurnCombatActionSubs" "ExecuteBurnShadowKnightCombatActions"
/call AddToArray "XPEarnedSubs" "ResetSnareMode"
/echo Done initializing ShadowKnight macro!
| *** MAIN LOOP
:loop
/call Tick
/goto :loop
/return
Sub ResetSnareMode
/if (${SnareMode}) /varset ShouldSnare TRUE
/return FALSE
Sub SKNonCombat
/if (${Me.Moving}) /return FALSE
/if (!${Me.Buff[Voice of Thule II].ID} && ${Me.AltAbilityReady[Voice of Thule]}) {
/target id ${Me.ID}
/delay 1s ${Target.ID} == ${Me.ID}
/call RKAACast "Voice of Thule"
}
/return FALSE
Sub ExecuteBurnShadowKnightCombatActions
/call RKAACast "Fundament: Third Spire of the Reavers"
/call RKAACast "Imbued Ferocity"
/call RKDisc "Undivided Acrimony RK. II"
/call RKDisc "Sholothian Carapace RK. II"
/call RKDisc "Crimson Blade RK. II"
/return FALSE
Sub SKCombatActions
/if (${Me.Casting.ID} && !${Me.Class.Name.Equal[Bard]}) /return FALSE
/doability 1
/doability 2
/if (${Me.PctHPs} < 80) {
/call RKCast "Dire Allegation Rk. II" ${CurrentTargetId}
}
/if (${Me.SpellReady[Terror of Desalin Rk. II]}) {
/cast "Terror of Desalin Rk. II"
/delay 5
}
/if (${Me.SpellReady[Terror of Rerekalen Rk. II]}) {
/cast "Terror of Rerekalen Rk. II"
/delay 5
}
/cast item "Innoruuk's Dark Blessing"
/call RKDisc "Renounce RK. II"
/if (${Me.XTarget} > 1) {
/call RKAACast "Abhorrence Rk. II" ${CurrentTargetId}
/call RKAACast "Explosion of Spite"
/call RKAACast "Explosion of Hatred"
}
/if (${SnareMode} && ${ShouldSnare} && !${Target.Buff[Encroaching Darkness].ID}) /call RKAACast "Encroaching Darkness"
/call RKDisc "Gouging Blade RK. II"
/if (!${Me.Moving}) {
/call RKAACast "Vicious Bite of Chaos"
/call RKAACast "Chattering Bones"
}
/return FALSE
Sub SelfInvis
/if (!${Me.Invis}) /call RKAACast "Cloak of Shadows"
/if (${DebugMode}) /echo SelfInvis - Cloak of shadows
/return FALSE
Sub SKDefensives
/if (${Me.PctHPs} < 10) {
/call RKAACast "Harmshield"
}
/if (${Me.Buff[Harmshield].ID}) /return FALSE
/if (${Me.PctHPs} < 20) /call RKDisc "Deflection Discipline"
/if (${Bool[${Me.ActiveDisc}]} && ${Me.ActiveDisc.Name.Equal[Deflection Discipline]}) /return FALSE
/if (${Me.PctHPs} < 60) /call RKDisc "Recondite Mantle RK. II"
/if (${Me.PctHPs} < 80) /call RKDisc "Sholothian Carapace RK. II"
/return FALSE
Sub Event_SnareImmune
/varset ShouldSnare FALSE
/return