• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Conditions for casting

Soandso2

Well-known member
Joined
Mar 13, 2023
RedCents
937¢
So, when writing a macro or Lua and you want your toon to cast a spell or use a discipline or skill, what are the conditions really?

In my loop I have a check to see if my aura is up. If it is not, I have to cast it. Easy enough. But I also hate spam, so I dont want to have the macro attempt to cast the aura for seven thousand times before actually succeeding, because I was stunned or feared or .. well, whatever.

Personally, I would love to see something like /if ${Me.Able} /whatever but I figure that is not a thing. Currently, I am checking for Stunned, Feared, Mezzed and Charmed, and that I am not casting something else, or that I am not in combat (as this might make the attempt to cast fail or interrupt my DPS for a few seconds)

Are there other conditions for keep in mind?
 
So, when writing a macro or lua and you want your toon to cast a spell or use a discipline or skill, what are the conditions really?

In my loop I have a check to see if my aura is up. If it is not, I have to cast it. Easy enough. But I also hate spam, so I dont want to have the macro attempt to cast the aura for seven thousand times before actually succeeding, because I was stunned or feared or .. well, whatever.

Personally, I would love to see something like /if ${Me.Able} /whatever but I figure that is not a thing. Currently, I am checking for Stunned, Feared, Mezzed and Charmed, and that I am not casting something else, or that I am not in combat (as this might make the attempt to cast fail or interrupt my DPS for a few seconds)

Are there other conditions for keep in mind?
If you're writing in Lua rather than a macro, I'd highly recommend having a look through the LeRogue code by @rawmotion, he's done a pretty good job covering some of the things you're looking at.

After looking at how he approaches things, you will likely do things differently because your use case will be different, but he has coded some excellent ideas that you can take inspiration from.
I don't use lerogue myself, I'm all in on KissAssist, but I've expanded some of my conditions after looking through LeRogue.
 
If you're writing in lua rather than a macro, I'd highly recommend having a look through the LeRogue code by @rawmotion, he's done a pretty good job covering some of the things you're looking at.

After looking at how he approaches things, you will likely do things differently because your use case will be different, but he has coded some excellent ideas that you can take inspiration from.
I don't use lerogue myself, I'm all in on KissAssist, but I've expanded some of my conditions after looking through LeRogue.
Actually, I am in the progress of migrating my macro to Lua, and LeRogue is what I look at in order to learn how to Lua. I just did not think about looking through it at this time. :P Thanks for reminding me.

Edit: I am bluntly and shamelessly snagging goodToGo() (and giving due credit in my own Lua - not that I think that anyone would ever use it as it is custom made for my own character and not monks in general, but anyway)
 
Last edited:
There are a number of considerations for casting a spell if you're trying to make a blanket check.

Do I have the spell memorized.
Is the spell on cooldown?
Have I recently casted a spell and am currently in global cooldown?
Do I have enough mana?
Do I have enough endurance?
Do I have enough health?
Am I sitting?
Am I moving?
Am I stunned?
Am I silenced?
Am I dead?
Do I require line of sight?
Can I see the target?
Is the spell an AE, PBAE, TargetRingAE, Rain?
Do I have a target?
Is the target in range of the spell?
Is the spell beneficial? If so, is it a player I'm intending to cast on?
Is the spell detrimental? If so, is it an npc I'm intending to cast on?
Does the spell require reagents? If so, do I have the required reagent?
and a whole slew of other things.
 
(and giving due credit in my own Lua - not that I think that anyone would ever use it as it is custom made for my own character and not monks in general, but anyway)

Lol, that's what I thought when I wrote LeRogue.
We all take inspiration from others.
As Bono would say, "Every artist is a cannibal; every poet is a thief."
 
Question - Conditions for casting

Users who are viewing this thread

Back
Top
Cart