-
Notifications
You must be signed in to change notification settings - Fork 18
/
e3.mac
93 lines (85 loc) · 3.24 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
|---------------------------------------------------|
|- e3.mac v7.0 -|
|- Originally written by Killians of PEQ. -|
|- Enhanced and maintained by Creamo of PEQ. -|
|- Thanks to Vysra for IDE,additional plugins,code -|
|---------------------------------------------------|
|#warning
#turbo 100
#include e3 Includes\e3_Setup.inc
SUB Main(modeSelect)
/declare macroVersion string outer 7.0
/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
:MainLoop
/if (${Debug}) /echo |- MainLoop ==>
/varset ActionTaken FALSE
/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
| 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
/for i 1 to ${mainLoop_Array.Size}
/if (${Bool[${mainLoop_Array[${i}]}]}) /call ${mainLoop_Array[${i}]}
/if (!${ActionTaken}) /next i
/if (${Me.CombatState.NotEqual[COMBAT]}) {
/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) || (${Me.PctEndurance} < ${autoMedPctMana})) {
/varset medBreak TRUE
}
}
}
/if (${medBreak}) /call check_MedBreak
}
/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
}
/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