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

Problem - Macro will cast on everything not just NPCs with Target.Type.Equal[NPC] (1 Viewer)

Joined
Mar 23, 2019
RedCents
55¢
I am not sure if the code was updated to something else but it used to not cast on PCs at all, now using the following code it just casts no mater what. the issue is if i accidently target myself i end up casting on myself. any advice?

INI:
/if (${Target.Type.Equal[NPC]} && !${Target.MyBuff[${Me.Gem[1].Name}].ID} || ${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<2) /cast 1
 
What is this from?

If you target yourself what does ${Target.Type.Equal[NPC]} evaluate to?
Not sure i understand your question. if i target myself it just keeps going. if i use this macro, it just casts spell 1 no mater what i target

INI:
#warning
#turbo 140

Sub Main
:Loop
/delay 5s ${Me.SpellReady[1]}
/if (${Target.Type.Equal[NPC]} && !${Target.MyBuff[${Me.Gem[1].Name}].ID} || ${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<1) /cast 1

/goto :Loop
 
its probably because you have the npc check in the first "and" and then there's nothing on the second "or" so it would fire if only the last condition is reached.

Id try adding the NPC check as an AND with the check after the "or"

so basically your saying if this is true
{Target.Type.Equal[NPC]} && !${Target.MyBuff[${Me.Gem[1].Name}].ID}

or

${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<1
 
its probably because you have the npc check in the first "and" and then there's nothing on the second "or" so it would fire if only the last condition is reached.

Id try adding the NPC check as an AND with the check after the "or"

so basically your saying if this is true
{Target.Type.Equal[NPC]} && !${Target.MyBuff[${Me.Gem[1].Name}].ID}

or

${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<1
You are correct! thank you. changing it to this worked so the "Or" also checks to see if the target is a NPC

/if (${Target.Type.Equal[NPC]} && !${Target.MyBuff[${Me.Gem[1].Name}].ID} || ${Target.Type.Equal[NPC]} && ${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<1) /cast 1

Edit: come to think of it. This all might be redundant and more complicated then need be. if ${Target.MyBuff[${Me.Gem[1].Name}].Duration.Seconds}<1 isnt meet, its going to cast 1. so why have !${Target.MyBuff[${Me.Gem[1].Name}].ID} in the first place. I have like 30 of these and feel like i made them more complicated then i needed too lol
 
Last edited:
Use extra parenthesis to get the right order of operations.
( A && B || C ) does the "A && B" first and then evaluates that sub-result against "|| C"

If, instead, you want A to be present with B or C, you need to do ( A && ( B || C ) )
 
Problem - Macro will cast on everything not just NPCs with Target.Type.Equal[NPC]

Users who are viewing this thread

Back
Top