• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • EverQuest (live servers) were patched today and MacroQuest developers are putting in time for their own update. Please show them your appreciation. Per brainiac, ETA is 11pm EST

Question - String Comparing? (1 Viewer)

Hellaciouss

Member
Joined
Jun 21, 2022
RedCents
241¢
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

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
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

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

/do stuff

}

But it falls through
 
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

INI:
/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.

INI:
: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