forked from m0rg/RKMacros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RKNecro.mac
101 lines (73 loc) · 2.94 KB
/
RKNecro.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
#Event SnareImmune "#*#Your target is immune to changes in its run speed."
#include RKBase.inc
#include RKCasterBase.inc
#include RKPetBase.inc
Sub Main
/call Init_RKBase
/call Init_RKPetBase
/call AddToArray "CombatActionSubs" "ExecutePriorityCombatActions"
/call AddToArray "CombatActionSubs" "ExecuteNecroCombatActions"
/call Init_RKCasterBase
| *** VARIABLE DECLARATIONS
/declare SnareMode bool outer TRUE
/declare ShouldSnare bool outer TRUE
/declare SlowMode bool outer TRUE
/call AddToArray "DetrimentalSpells" "Coruscate Bones Rk. II"
/call AddToArray "DetrimentalSpells" "Brimtav's Flashblaze Rk. II"
/call AddToArray "DetrimentalSpells" "Prox's Swift Sickness Rk. II"
/call AddToArray "DetrimentalSpells" "Hral's Swift Lifedraw Rk. II"
/call AddToArray "DetrimentalSpells" "Pyre of Hazarak Rk. II"
/call AddToArray "DetrimentalSpells" "Pyre of Nos Rk. II"
/call AddToArray "DetrimentalSpells" "Ignite Potential Rk. II"
/call AddToArray "DetrimentalSpells" "Doom Rk. II"
/call AddToArray "DetrimentalSpells" "Necrotizing Wounds Rk. II"
/call AddToArray "PetBuffs" "Sigil of the Preternatural Rk. II"
/call AddToArray "NonCombatSelfBuffs" "Shadowside Rk. II"
/call AddToArray "BurnCombatActionSubs" "ExecuteBurnNecroCombatActions"
/call AddToArray "DefensiveActionSubs" "ExecuteDefensiveActions"
/call AddToArray "NonCombatSubs" "NecroNonCombatSubs"
/call AddToArray "XPEarnedSubs" "ResetSnareMode"
/varset SpellMemSlot 12
/echo Done initializing necromancer macro!
| *** MAIN LOOP
:loop
/call Tick
/goto :loop
/return
Sub ExecuteNecroCombatActions
/call RKAACast "Reluctant Benevolence"
/call RKAACast "Wake the Dead"
/call RKAACast "Rise of Bones"
/call RKAACast "Swarm of Decay"
/return FALSE
Sub ExecuteBurnNecroCombatActions
/call RKAACast "First Spire"
/return FALSE
Sub ExecutePriorityCombatActions
/face fast nolook
/if (${Me.State.Equal[FEIGN]}) /stand
/if (${Me.PctMana} < 60) /call RKAACast "Death Bloom"
/if (!${Me.State.Equal[FEIGN]} && ${Me.PctAggro} >= 85) /call RKAACast "Improved Death Peace"
/if (${SlowMode}) {
/if (!${Target.Buff[Death's Malaise].ID} && ${Target.Buff[Smoldering Bones].ID}) {
/call RKAACast "Death's Malaise"
/return TRUE
}
}
/if (${ShouldSnare} && !${Target.Buff[Encroaching Darkness].ID}) /call RKAACast "Encroaching Darkness"
/return FALSE
Sub NecroNonCombatSubs
|any actions which should be done in combat mode, but not while fighting
/return FALSE
Sub ExecuteDefensiveActions
/if (${Me.PctHPs} < 15) /call RKAACast "Harm Shield"
/if (${Bool[${Macro.Return}]} && ${Macro.Return}) /return TRUE
/if (${Me.PctHPs} < 30) /call RKAACast "Death's Effigy"
/if (${Bool[${Macro.Return}]} && ${Macro.Return}) /return TRUE
/return FALSE
Sub ResetSnareMode
/if (${SnareMode}) /varset ShouldSnare TRUE
/return FALSE
Sub Event_SnareImmune
/varset ShouldSnare FALSE
/return