• 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 - String Comparing?

Hello,

How would I compare stings in this example?

/if ${Me.Gem[1].Skill} is NotEqual to Abjuration {

/do this

}

${Me.Gem[2]Skill} returns the skill type of gem 1 but I have tried dozens of different things but unable to find a way with my current experiance.
 
Solution
Hello,

How would I compare stings in this example?

/if ${Me.Gem[1].Skill} is NotEqual to Abjuration {

/do this

}

${Me.Gem[2]Skill} returns the skill type of gem 1 but I have tried dozens of different things but unable to find a way with my current experiance.

so in this case

${Me.Gem[2].Skill.NotEqual[Abjuration]}
or
${Me.Gem[2].Skill.Equal[Abjuration]} depending if you want that Not or not
Hello,

How would I compare stings in this example?

/if ${Me.Gem[1].Skill} is NotEqual to Abjuration {

/do this

}

${Me.Gem[2]Skill} returns the skill type of gem 1 but I have tried dozens of different things but unable to find a way with my current experiance.

so in this case

${Me.Gem[2].Skill.NotEqual[Abjuration]}
or
${Me.Gem[2].Skill.Equal[Abjuration]} depending if you want that Not or not
 
Solution
Ok, that worked for one thing, unless the Gem is empty :( If it's empty it returns null and continues past the statement I want it to go to

I also tried

Code:
/if (${Me.Gem[1].Skill.Equal[NULL]}) {

/do stuff

}

But it falls through
you could wrap the whole thing in a bool check as well - I'm not sure exactly what you're trying to do, but there is probably an easier / better way

here is the bool

${Bool[${Me.Gem[2].Skill.NotEqual[Abjuration]}]} a NULL would return a FALSE here
 
Yeah the problem is because the gem isn't set, anything beyond Gem[2] is NULL, not a string, so you can't use NotEqual or do anything else but check if it is NULL.

Note that you'd want to check ${Me.Gem[2]} for NULL, not .skill etc
 
I'm confused. ${Bool[!${Me.Gem[1]}]} seems to be a check on if you have a Gem 1, which means if you're a caster, you will have a Gem 1, whether it has a spell in it or not, it always comes back as true.

What I am trying to do is have two checks, which can probably be rolled into one (i just have no experienced in coding, this is kind of my first jump in). The check is looking to see if there is an Abjuration spell in Gem 1, if there is a spell there but it is not an Abjuration spell, it will send a text explaining there isn't a Abjuration spell in Gem 1. The second check is if there is a spell at all in Gem 1, if there it no spell memmed to gem 1, it sends text explaining and ends the macro.

Code:
:Abjuration
/varset AbjurationSkill ${Me.Skill[Abjuration]}
/if (${Bool[${Me.Gem[1].Skill.NotEqual[Abjuration]}]} ) {
    /cecho \ayGem Slot 1 \awdoes not have an \atAbjuration \awspell learned....\arskipping skill.
    /delay 1s
    /goto :Alteration
}

| The above goes TRUE when there is a spell in gem 1 but it is not Abjuration. 
| It returns false if there is no spell there or when there is an Abjuration spell there. 
| What I am trying to add is a check in case the gem slot is empty that will return TRUE only if it is empty.

/if (${AbjurationSkill}==${AbjurationSkillCap}) {
    /cecho \atAbjuration \awmaxed...moving on to \atAlteration
    /delay 1s
    /goto :Alteration
} else /if (${Me.SpellReady[1]}) {
    /cecho \ag${Math.Calc[${Me.SkillCap[Abjuration]}-${Me.Skill[Abjuration]}]} \atAbjuration \awskill ups to go.
    /call HPCheck
    /call ManaCheck
    /cecho \awCasting \at${Me.Gem[1]}.
    /target myself
    /cast 1
    /delay 1
    /goto :Abjuration
} else {
    /autoinventory
    /goto :Abjuration
}
 
Last edited:
Question - String Comparing?

Users who are viewing this thread

Back
Top
Cart