• Hail, we're RedGuides. We want you to play six (yes, 6!) EverQuest characters at once. We have scripts and a friendly community to help, please join our playstyle and say hello! 👋
  • We've added LLM sections to our Terms & Rules and Resource Rules, for everyone's sanity & in-game safety.
    Read more
    a. Do not replace your voice with an LLM. This goes for your posts and your scripts. Drafting and editing with a tool is fine, but don't take you out of what you share.
    b. Do not replace your EQ character's voice with an LLM. We don't want scripts that speak over /ooc, /shout or other public channels. This has been an unwritten rule that's kept casino scripts off the site for decades, but we're now compelled to make it clear: keep automated communication private.

    Why Does RG Review Scripts?
    Nearly every LLM-written Lua script we see is making your character do impossible things, and rarely in a way that's beneficial to you. We've seen heavy server hammering, /target over impossible distances when /nav spawn would passively accomplish the same thing, a spawn search that fires 20+ times per second, and other pointless actions that are likely annoying GMs.

    You are welcome to use LLMs as a tool to structure, draft, and edit your work, but please read critically before hitting /lua run

Best way to determine aggro

What is the best way to determine if you have aggro?

${Me.combat} true if /attack is on? Or does it check for mob aggro
${Me.GotAggro} Ive seen this in the MQ2melee plugin, but don’t know if that is a /declare

Im trying to get it to /attack on when I get attacked (AFK) . This will be in the middle of a macro while it is on idle. Then when mob dies to resume the macro
!${Me.Combat} /call healingsub

Just trying to keep it simple.
 
${Me.Combat} will always be true if you have turned attack on, but will be false if you're under attack.

${Melee.GotAggro} is part of the MQ2Melee plugin and should be a relatively good indicator of whether you have aggro. To use it, you can do something like this in your macro:

Rich (BB code):
/if (${Melee.GotAggro}) {
  /echo I have aggro from something, attacking
  /killthis
}
Alternatively, you could clear your target after killing/looting or whatever. And then run a check to see if you have something on your target (ie. if something hit you) and then attack if so. Something like this:

Rich (BB code):
/if (${Target.ID}) {
  /echo I have aggro again
  /attack on
}
 
Use events like so:

Rich (BB code):
#Event hit "#*#hits you for#*#"
#Event hit "#*#kicks you for#*#"
#Event hit "#*#bites you for#*#"
#Event hit "#*#bashes you for#*#"
#Event hit "#*#slashes you for#*#"
#Event hit "#*#pierces you for#*#"
#Event hit "#*#crushes you for#*#"

Sub Event_hit
:loop
/delay 1s
/if (!${Melee.Combat} && ${Target.ID}) /killthis
/if (!${Melee.Combat} && !${Target.ID}) /call healingsub
/goto :loop
/return

Then just add in a /doevents (or even a /doevents hits) into your main loop.
 
There is a call to check if you are on HoTT of the mob as I recall. Think it was used in the warrior macro a while back that was on the mq2 boards might have been vip I forget.
 
everdead said:
There is a call to check if you are on HoTT of the mob as I recall. Think it was used in the warrior macro a while back that was on the mq2 boards might have been vip I forget.

aye autobot also uses HOTT to determine who has aggro.
 
Best way to determine aggro

Users who are viewing this thread

Back
Top
Cart