• 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

need greater than less than help with macro

Jinx

Member
I am looking to have my macro start casting at 96% for example but stop casting if great than 10% for example see below.

Rich (BB code):
   /if (${Target.PctHPs}<=95&&${Target.Type.Equal[NPC]}&&${Target.Distance}<=200)
/code

I tried

code
   /if (${Target.PctHPs}<=95&&${Target.PctHPs}>=7&&${Target.Type.Equal[NPC]}&&${Target.Distance}<=200)

but that doesn't seem to work. Any suggestions?
 
/if ((${Target.PctHPs}<=95) && (${Target.PctHPs}>=7) && ${Target.Type.Equal[NPC]} && (${Target.Distance}<=200))

You just left out some extra ( ) I think is all... That SHOULD work... If not the ${Target.Type.Equal[NPC]} might need to be enclosed in ( ) as well.
 
Last edited:
Just an FYI Veyron. are only needed around the whole check unless you're putting multiple checks on one. ie
Rich (BB code):
/if ((${Target.Type.Equal[NPC]} && ${Target.PctHPs}<=95) || (${Target.Type.Equal[PC]} && ${Target.PctHPs}>=7)) /call code
btw, your code was correct except for the brackets i put in.
Rich (BB code):
/if (${Target.PctHPs}<=95 && ${Target.Type.Equal[NPC]} && ${Target.Distance}<=200) {
code
}
 
/if (${Target.PctHPs}<=95 && ${Target.PctHPs}>=7 && ${Target.Type.Equal[NPC]} && ${Target.Distance}<=200) {
code
}


my question is, are you looking for the target to be an npc? If not, then ${Target.Type.Equal[NPC]} should be ${Target.Type.NotEqual[NPC]} or !${Target.Type.Equal[NPC]}
 
Still didn't work for me as I would still cast when mob was less than 10%. I am assisting my bard who is kiting in circles so here is what I did. I set a longer delay after assist so I would cast too early. Then I added below:

Rich (BB code):
   /assist Bard
   /delay 19s
   /if ((${Target.PctHPs}>=10) && (${Target.Type.Equal[NPC]}) && (${Target.Distance}<=200)) {

this seemed to work ok for now based on what I am doing. I just figured since I am PL'ing my group they might as well kick in with some dots. The problem I was having was it would begin to cast the mob would die and it would acquire a new target by assisting the bard and get agro from casting too early. The bard wouldn't have ago and then I would come back to a dead group (. That is why I was looking for the greater than less than code but it doesn't seem to work. This way I don't cast after it reaches 10% and with the delay it doesn't cast till bard has good agro.
 
Last edited:
Rich (BB code):
/squelch /target clear
 /assist Bard
    /delay 1s ${Target.ID}
    /if ((${Target.PctHPs}>=10) && (${Target.Type.Equal[NPC]}) && (${Target.Distance}<=200) && (${Target.PctHPs}<=90)) {
 
need greater than less than help with macro

Users who are viewing this thread

Back
Top
Cart