• 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

Config - Variable for Aggro and in Combat

rokn2day

New member
I have been trying to write PreConditions and failing miserably. The two things the keep throwing me off are:

How to determine that a toon has aggro and if a toon or group is in combat i.e. mobs in camp or within a certain radius.

For aggro I've been using:
INI:
PreCondition=/if ({Me.AltAbilityReady[Spiritual Rebuke]} && ({Melee.AggroMode} && {Melee.GotAggro}) /return TRUE

And for combat I'm using:
INI:
PreCondition=/if ({Melee.Combat}) /return TRUE

Both seem to be throwing errors in modbot. I'm sure it's my lack of understanding and I'd appreciate some pointers.

Also is it possible to use something to indicate an "OR" condition in the PreCondition line?"AND" is && and i'm wondering if there is an OR.
 
Last edited:
I have been trying to write PreConditions and failing miserably. The two things the keep throwing me off are:

How to determine that a toon has aggro and if a toon or group is in combat i.e. mobs in camp or within a certain radius.

For aggro I've been using:
INI:
PreCondition=/if ({Me.AltAbilityReady[Spiritual Rebuke]} && ({Melee.AggroMode} && {Melee.GotAggro}) /return TRUE

And for combat I'm using:
INI:
PreCondition=/if ({Melee.Combat}) /return TRUE

Both seem to be throwing errors in modbot. I'm sure it's my lack of understanding and I'd appreciate some pointers.

Also is it possible to use something to indicate and "OR" condition in the PreCondition line?"AND" is && and i'm wondering if there is an OR.
Or is double pipes ||

>> HERE << is the MQ2 Operators page

I'm not very familiar with ModBot, but your TLOs appear to need the "$" like ${Me.AltAbilityReady[Spiritual Rebuke]}
something I do frequently is If i'm checking on the syntax or testing a condition i'll echo it in game to see if it returns what I expect

if you did /echo ${Me.Name} you should see your name return in your mq2 window - if you did /echo {Me.Name} it would just say "{Me.Name}" as the parser doesn't know to check it for information
 
Last edited:
Or is double pipes ||

>> HERE << is the MQ2 Operators page

I'm not very familiar with ModBot, but your TLOs appear to need the "$" like ${Me.AltAbilityReady[Spiritual Rebuke]}
something I do frequently is If i'm checking on the syntax or testing a condition i'll echo it in game to see if it returns what I expect

if you did /echo ${Me.Name} you should see your name return in your mq2 window - if you did /echo {Me.Name} it would just say "{Me.Name}" as the parser doesn't know to check it for information
Thanks @Sic ! For the Modbot Preconditions you drop the $, but I appreciate you taking the time to offer up some help! The link to the Operations page is awesome thank you.
 
I have been trying to write PreConditions and failing miserably. The two things the keep throwing me off are:

How to determine that a toon has aggro and if a toon or group is in combat i.e. mobs in camp or within a certain radius.

For aggro I've been using:
INI:
PreCondition=/if ({Me.AltAbilityReady[Spiritual Rebuke]} && ({Melee.AggroMode} && {Melee.GotAggro}) /return TRUE

And for combat I'm using:
INI:
PreCondition=/if ({Melee.Combat}) /return TRUE

Both seem to be throwing errors in modbot. I'm sure it's my lack of understanding and I'd appreciate some pointers.

Also is it possible to use something to indicate an "OR" condition in the PreCondition line?"AND" is && and i'm wondering if there is an OR.

I'm making some guesses on what you are going for, but hopefully this helps.

For the Aggro Condition, you only want this to trigger if Spiritual Rebuke is ready AND you've got MQ2Melee Aggro Mode on AND you've got aggro on the mob? I'd assume you'd want it to fire when you don't have aggro which would be !{Melee.GotAggro}. The ! is a NOT.

For the if you're in melee, not sure which section you are adding this to, but you might want to use {Me.Combat} instead. I think Melee.Combat returns true if you have auto attack on vs Me.Combat is if you have the crossed swords icon.

You could also use a {Me.CombatState[Combat]} check. You could also use a SpawnCount check.
I use the below on my SK for his AE aggro spell:
/if ({SpawnCount[npc radius 100]} > 2) /return TRUE

A useful resource: https://www.redguides.com/docs/projects/macroquest/reference/data-types/datatype-character/
 
Config - Variable for Aggro and in Combat

Users who are viewing this thread

Back
Top
Cart