• 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 - Feel free to improve this sub

Soandso2

Well-known member
So, in my BAM macro I have a sub for casting illusions (Human or Skeleton) and the code below works (as far as I can see and have been able to test), but it feels awkward and cumbersome, also I am not sure that it covers all scenarios/posibilities.

The idea is to:
  • Always have an illusion. Be without illusion as little as possible. Items: Amulet of Necropotence (Skeleton, instant cast) and Circlet of Disguise (Human, 7 second cast)
  • Prefer Human illusion, but use Skeleton illusion as a last resort (use instant cast skeleton if you are busy fighting a mob or running around not paying attention).
  • Avoid chat window spam
  • Do not cast illusion if you are already casting illusion (the event fires three times, I think, or atleast twice).
The sub triggers either on an event ("You feel as if you are about to look like yourself again.") or simply if you find yourself without buff because:
  • You died
  • Your illusion faded whilst the macro was not running
  • Your illusion was debuffed

Thoughts? Improvements? Spot any bugs or ways this can fail? One illusion blocks another, what if I sometimes want to use a third illusion (manual click)?

Sub Cast_Illusion
Code:
Sub Cast_Illusion
  /if (!${Me.Casting.ID}) {
    /if (${Me.Buff[Illusion: Skeleton].ID} > 0 || ${Me.Buff[Resurrection Sickness].ID} > 0) {
      /useitem "Amulet of Necropotence"
    } else /if (${Me.Combat} || ${Me.Moving}) {
      /removebuff Illusion
      /useitem "Amulet of Necropotence"
    } else {
      /if (${Me.Sitting}) {
        /useitem "Circlet of Disguise"
        /delay 8s
        /sit
      } else {
        /useitem "Circlet of Disguise"
        /delay 8s
      }
    }
  }
/return
 
In my opinion, take it with a whole table of salt...ditch the sub, and process the illusion part with a LEM instead. Plenty of examples to go by already for a quick modification. Now it would be universal across multiple toons if you would like, versus the one MNK.
 
So, in my BAM macro I have a sub for casting illusions (Human or Skeleton) and the code below works (as far as I can see and have been able to test), but it feels awkward and cumbersome, also I am not sure that it covers all scenarios/posibilities.

The idea is to:
  • Always have an illusion. Be without illusion as little as possible. Items: Amulet of Necropotence (Skeleton, instant cast) and Circlet of Disguise (Human, 7 second cast)
  • Prefer Human illusion, but use Skeleton illusion as a last resort (use instant cast skeleton if you are busy fighting a mob or running around not paying attention).
  • Avoid chat window spam
  • Do not cast illusion if you are already casting illusion (the event fires three times, I think, or atleast twice).
The sub triggers either on an event ("You feel as if you are about to look like yourself again.") or simply if you find yourself without buff because:
  • You died
  • Your illusion faded whilst the macro was not running
  • Your illusion was debuffed

Thoughts? Improvements? Spot any bugs or ways this can fail? One illusion blocks another, what if I sometimes want to use a third illusion (manual click)?

Sub Cast_Illusion
Code:
Sub Cast_Illusion
  /if (!${Me.Casting.ID}) {
    /if (${Me.Buff[Illusion: Skeleton].ID} > 0 || ${Me.Buff[Resurrection Sickness].ID} > 0) {
      /useitem "Amulet of Necropotence"
    } else /if (${Me.Combat} || ${Me.Moving}) {
      /removebuff Illusion
      /useitem "Amulet of Necropotence"
    } else {
      /if (${Me.Sitting}) {
        /useitem "Circlet of Disguise"
        /delay 8s
        /sit
      } else {
        /useitem "Circlet of Disguise"
        /delay 8s
      }
    }
  }
/return
Lua would be an improvement.
It casts aon if you already have aon buff? Looks like it's just gonna spam it if the buffs up.
And if it's not up, which illusion you cast just depends if you're fighting/moving? Seems an odd condition to decide on a illusion
 
Lua would be an improvement.
It casts aon if you already have aon buff? Looks like it's just gonna spam it if the buffs up.
And if it's not up, which illusion you cast just depends if you're fighting/moving? Seems an odd condition to decide on a illusion
HAHA, I didn't even see that in the code, just went straight to the LEM solution, but yes, @aquietone is correct:

Code:
/if (${Me.Buff[Illusion: Skeleton].ID} > 0 || ${Me.Buff[Resurrection Sickness].ID} > 0) {
      /useitem "Amulet of Necropotence"

That alone will spam if your Skeleton illusion ID > 0, which will be if you cast it once.
 
Lua would be an improvement.
It casts aon if you already have aon buff? Looks like it's just gonna spam it if the buffs up.
And if it's not up, which illusion you cast just depends if you're fighting/moving? Seems an odd condition to decide on a illusion
Amulet of Necropotence is instant click, which means that it can be cast without interrupting combat, and it can be cast when you move. At least that is the intention behind the code.
 
Question - Feel free to improve this sub

Users who are viewing this thread

Back
Top
Cart