-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathe3.mac
141 lines (126 loc) · 5.34 KB
/
e3.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
|---------------------------------------------------|
|- e3.mac v8.0 -|
|- Originally written by Killians of PEQ. -|
|- Enhanced and maintained by Creamo of PEQ. -|
|- Enhanced for Laz server by Rekka and Ewiclip -|
|- Thanks to Vysra for IDE,additional plugins,code -|
|---------------------------------------------------|
|#warning
#turbo 240
#include e3 Includes\e3_Setup.inc
SUB Main(modeSelect)
/declare macroVersion string outer 8.2
/declare Debug bool outer false
/declare IniMode string outer Ini
/if (${Bool[${Plugin[MQ2IniExt]}]}) {
/varset IniMode IniExt
/iniext clear
}
/call e3_Setup "${modeSelect}"
/if (${Debug}) {
/echo Post Setup
/delay 5
}
/declare i int local
/declare mainLoop_IsHealer bool outer False
/if (${Select[${Me.Class.ShortName},CLR,DRU,SHM]}) {
/varset mainLoop_IsHealer True
}
:MainLoop
/if (${Debug}) /echo |- MainLoop ==>
/varset ActionTaken FALSE
/call check_Basics
/call check_Active
/call check_Idle
/call check_autoTribute
/if (${currentZone} != ${Zone.ID}) /call check_Zone
/if (${Following} && !${Assisting}) /call check_Follow
/if (${Defined[lifeSupport2D]} && ${Me.PctHPs} < 99) /call check_lifeSupport
|workaround for item cast array
/if (${reloadOnLoot}) /call reloadSpellArrays
/call Background_Events
|insta buffs are normaly done for junk buffs, be sure to call them often and even when active
/if (${Defined[InstantBuffs2D]} && !${Me.Invis}) /call buffBotsInstant "InstantBuffs2D"
| If I'm not active, call mainFunctions
/if (!${activeTimer}) {
|These are functions in the e3_setup/Advanced.ini class sections... ex CLR Function#1=check_DivineArb
:restartMainLoopSubLoop
|Lets check our cursor, as having something on our cursor and casting spells can .. cause issues.
|main thing we want to check for is Azure Mind Crystals, Sanguine Crystals, Molten orbs, Large modulation shards
/call check_ClearCursor
|if you are a healer, hard coding a check_heals. This is to deal with sub methods being able to call
|interrupts for heals and then then ActionTaken is set to true, which may never get to your check_heals
|all healers should have check_Heals as their #1, this is just making sure it is.
/if (${mainLoop_IsHealer}) {
/call check_Heals
/varset ActionTaken False
}
/for i 1 to ${mainLoop_Array.Size}
/if (${Bool[${mainLoop_Array[${i}]}]}) {
/call ${mainLoop_Array[${i}]}
/if (${castReturn.Equal[CAST_INTERRUPTED]}) {
/if (${mainLoop_IsHealer}) {
/call check_Heals
}
}
/varset castReturn
|check to see if anything has been set to try and cast without an interrupt
/doevents nowCast
/varset castReturn
|check to see if we have spell(s) ready in nowCast that may have interrupted the above call
/call castNowSpells
/varset castReturn
}
/if (!${ActionTaken}) /next i
/if (${Me.CombatState.NotEqual[COMBAT]} && !${Assisting}) {
/if ((!${Me.Casting.ID} || ${Me.Class.ShortName.Equal[BRD]}) && !${use_TargetAE}) /call completePendingExchange
/if (!${Me.Moving} && !${Following} && !${Me.Casting.ID}) {
/if ((${Me.PctMana} < ${autoMedPctMana} && ${Me.MaxMana} > 1 && ${autoMedChar}) || (${Me.PctEndurance} < ${autoMedPctMana} && ${autoMedChar}) || (${Me.PctHPs} < ${autoMedPctMana} && ${autoMedChar})) {
/varset medBreak TRUE
|**/if ((${Defined[AssistType]}) && (${Select[${Me.Class.ShortName},CLR,DRU,ENC,MAG,NEC,SHM,WIZ]})) {
/varset AssistType Off
} else {
/declare AssistType string Off
}**|
}
}
}
/if (${medBreak}) /call check_MedBreak
}
|insta buffs are normaly done for junk buffs, be sure to call them often
/if (${Defined[InstantBuffs2D]} && !${Me.Invis}) /call buffBotsInstant "InstantBuffs2D"
/if (${MoveUtils.GM}) {
/squelch /stick imsafe
/echo GM Safe kicked in, issued /stick imsafe. you may need to reissue /followme or /assiston
}
/if (${Debug}) {
/echo <== MainLoop -|
/delay 5
}
/delay 1
/goto :MainLoop
/RETURN
|----------------------------------------------------------------------------------------------------------------|
|- Background events and functions that are checked even while casting or otherwise considered active. -|
|- This function is checked constantly, included events and functions should have minimal character interaction.-|
|- These are functions in the e3_setup Included Setups section
SUB Background_Events
/declare i int local
/for i 1 to ${macroSetups.Size}
/if (${Bool[${macroSetups[${i}]}]}) /call ${macroSetups[${i}]}_Background_Events
/next i
/RETURN
|----------------------------------------------------------------------------------------------------------------|
|- this handles removing and readding of items from spell arrays, ie when you die
|- criteria to reload = wearing a chest and having >=1 platinum
SUB reloadSpellArrays
/if (${Bool[${FindItem[=${missingSpellItem}].ID}]}) {
/varset reloadOnLoot FALSE
/varset missingSpellItem 0
/call buff_SpellArrays
/call heal_SpellArrays
/call assist_SpellArrays
/call pet_spellArrays
/call cure_spellArrays
}
/RETURN