AnonymousHero
Active member
- Joined
- Apr 22, 2011
- RedCents
- 516¢
I've decided it's a good idea to build some tools that encourage people to write their macros with safety in mind. To do this I will be making my own tools I've been working on available to the NA community as an .inc file.
I've also added an SOS distress call that beeps out SOS (simple /call SOS). I use this in the CheckGMs subroutine if a GM is in the zone with you.
CheckZone: Updated. You can specify how many players you want in your area (like if you have 3 toons you play together you'd punch in 3. Also specifies how close people have to be for your macro to go into a holding pattern. I'd use 200-300 for most things like cskillup.mac or alctol.mac.
CheckGMs: Updated. Will also beep out SOS if it detects a GM presence in the zone. Should only do it once if your settings put your macro into a holding pattern but I havent been able to test because I dont run into many GMs
PluginCheck: Updated and tested. Works perfectly. /call PluginCheck MQ2Main as an example would not run the macro if the plugin MQ2Main was not loaded.
To use this in your macro.
Save the file to your /macro folder
Add the following text to the top your macro
#include AHTools.inc
I've also added an SOS distress call that beeps out SOS (simple /call SOS). I use this in the CheckGMs subroutine if a GM is in the zone with you.
CheckZone: Updated. You can specify how many players you want in your area (like if you have 3 toons you play together you'd punch in 3. Also specifies how close people have to be for your macro to go into a holding pattern. I'd use 200-300 for most things like cskillup.mac or alctol.mac.
CheckGMs: Updated. Will also beep out SOS if it detects a GM presence in the zone. Should only do it once if your settings put your macro into a holding pattern but I havent been able to test because I dont run into many GMs

PluginCheck: Updated and tested. Works perfectly. /call PluginCheck MQ2Main as an example would not run the macro if the plugin MQ2Main was not loaded.
To use this in your macro.
Save the file to your /macro folder
Add the following text to the top your macro
#include AHTools.inc
Rich (BB code):
| ---------------------------------------------------------------------------
| AHTools.inc by AnonymousHero
| This is not actually a macro but a file that can be #included into other
| existing macros to do different checks.
| ---------------------------------------------------------------------------
| holding variable will be used primarily for things that should only be
| triggered once.
Sub SOS
| Used to beep out SOS in Morse code to get the attention of the person near
| the computer while the macro is running. Used in CheckGMs when a GM
| is detected in the zone.
/beep
/delay 1
/beep
/delay 1
/beep
/delay 5
/beep
/delay 5
/beep
/delay 5
/beep
/delay 5
/beep
/delay 1
/beep
/delay 1
/beep
/return
Sub CheckZone(int MyPlayers, int MyRadius)
| If you have 3 toons in your group then you will set MyPlayers in your macro
| to 3. If it detects a 4th toon in your specified radius then it will put
| the macro on pause by continuing to check if players are in the radius and
| resume the macro when the player has left the area. If you want it to be
| zone wide just punch in MyRadius as like 10000 or 100000. A number of
| about 200-300 could be used in large zones if you are not worried.
/declare holding bool local
:CZLockDown
/if (${SpawnCount[PC radius ${MyRadius}]}>${MyPlayers}) {
/if (!${holding}) {
/echo [AHTools] Macro on hold due to player activity
/varset holding 1
}
/delay 1s
/goto :CZLockDown
} else { /varset holding 0 }
/return
Sub CheckGMs(int ECM, int ECM2)
| This Macro uses MQ2GMCheck. Example /call CheckGMs 3 1 would pause the
| macro if a GM is online and if a GM comes into the zone it will unload MQ2.
| If there are any GM's on it will effectively pause the macro (by going back
| to the MainLoop. Make sure the /call CheckGMs is the first thing in your loop.
/call PluginCheck MQ2GMCheck
/declare holding bool local
:GMLockDown
/if (${SpawnCount[GM]}>=1) {
/if (${ECM}=1) {
/if (!${holding}) /multiline ; /call SOS ; /echo [AHTools] Macro on hold due to GM Presence ; /varset holding 1
/goto :GMLockDown
} else {
/varset holding 0
}
/if (${ECM}=2) /multiline ; /echo [AHTools] Ending Macro due to GM Presence ; /endmacro
/if (${ECM}=3) /multiline ; /echo [AHTools] Unloading MQ2 due to GM Presence; /unload
/if (${ECM}=4) /multiline ; /echo [AHTools] Quitting out of EQ due to GM Presence ; /quit
}
/if (${GMCheck}) {
/if (${ECM2}=1) {
/if (!${holding}) /multiline; /echo [AHTools] Macro on hold due to GM Activity
/goto :GMLockDown
}
/if (${ECM2}=2) /multiline ; /echo [AHTools[ Ending Macro due to GM Activity ; /endmacro
}
/return
Sub PluginCheck(string PluginName)
| /call PluginCheck MQ2Cast for example. Should be called before the main
| loop for peformance sake. Once you're running the macro you probably wont
| be unloading plugins.
/if (!${Plugin[${PluginName}].Name.Equal[${PluginName}]}) {
/echo This macro requires the ${PluginName} plugin!
/echo You can enable this by typing /plugin ${PluginName}
/echo To remove later on type /plugin ${PluginName} unload
/endmacro
}
/return
Attachments
Last edited by a moderator:


