• 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

Question - Conditions for casting

Soandso2

Well-known member
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 @raw, 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 @raw, 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