• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Check if any mobs are nearby before casting?

Joined
Mar 19, 2021
RedCents
10,291¢
Hey fellas,

I'm looking for a way to make sure there are no dangerous mobs nearby before breaking invis and casting a buff.

Something along the lines of "/if nearestNPCSpawnDistance < 60 /donothing"

Any tips?

Thanks.
 
${SpawnCount[npc radius 60]} is the type of variable you would want to work with. however, there's no /donothing command that is going to suppress all other MQ2 automation macros or plugins that you might have running. Those automation tools usually handle breaking invis or not breaking invis on their own. CWTN plugins, for example, only break invis if you have a camp set. Otherwise, they check that you're not invis before casting a buff.

If you were wanting to cast a specific buff outside of the various automation tools, you could use something like MQ2React with a condition of something like ${Me.Invis} && !${Me.Buff[BuffName].ID} && !${SpawnCount[npc radius 60]} and an action of /cast # where # is the spell gem # of the buff you want or a /alt act # in the case of an AA buff.
 
/echo ${If[${SpawnCount[npc radius 60]},\arENEMIES NEARBY STOP,\agGood to go]}

This would at least let you know if there are enemies nearby or not? Not really have full context for how you plan to use it to know how to recommend you conduct your check and any subsequent code.
 
Thanks guys!

Sorry for the lack of context. Indeed wanting to put this into React as a global so my rogue doesn’t reapply poison or other buffs while invis, escaped, moving, or with mobs nearby.
You answered my question. ${SpawnCount[npc radius 60]} is the variable I needed! (=

By the way, is there a resource that lists all the different variables and arguments like this? I feel like this should have been something I could have looked up.

Cwtn, what does \ar and \ag do? Haven’t seen that syntax?
 
Code:
    /declare Black      string outer \ab
    /declare Blue       string outer \au
    /declare Brown      string outer \a-o
    /declare Cyan       string outer \at
    /declare Gray       string outer \a-w
    /declare Green      string outer \ag
    /declare Pink       string outer \am
    /declare Orange     string outer \ao
    /declare Purple     string outer \ap
    /declare Red        string outer \ar
    /declare Teal       string outer \at
    /declare White      string outer \aw
    /declare Yellow     string outer \ay
    /declare DarkGreen  string outer \a-g
    /declare DarkMaroon string outer \a-m
    /declare DarkPurple string outer \a-p
    /declare DarkRed    string outer \a-r
    /declare DarkCyan   string outer \a-t
    /declare DarkBlue   string outer \a-u
    /declare DarkYellow string outer \a-y
 
You can also use color codes, see the "gold" line below:
INI:
Sub Main
    /echo Colors start with backslash a and then one of the below:
    /echo x = Set color to what it was before the last color change
    /echo b = black \ab= black\ax (#000000)
    /echo g = green \ag= green\ax (#00FF00)
    /echo -g = dark green \a-g= dark green\ax (#009900)
    /echo m = magenta \am= magenta\ax (#FF00FF)
    /echo -m = dark magenta \a-m= dark magenta\ax (#990099)
    /echo o = orange \ao= orange\ax (#FF9900)
    /echo -o = dark orange \a-o= dark orange\ax (#996600)
    /echo p = purple \ap= purple\ax (#9900FF)
    /echo -p = dark purple \a-p= dark purple\ax (#660099)
    /echo r = red \ar= red\ax (#FF0000)
    /echo -r = dark red \a-r= dark red\ax (#990000)
    /echo t = teal \at= teal\ax (#00FFFF)
    /echo -t = dark teal \a-t= dark teal\ax (#009999)
    /echo u = blue \au= blue\ax (#0000FF)
    /echo -u = dark blue \a-u= dark blue\ax (#000099)
    /echo w = white \aw= white\ax (#FFFFFF)
    /echo -w =dark white \a-w= dark white\ax (#FFFFFF)
    /echo y = yellow \ay= yellow\ax (#FFFF00)
    /echo -y = dark yellow \a-y= dark yellow\ax (#999900)
    /echo #FFD700 = gold \a#FFD700= gold\ax (#FFD700)
/return
 
I wrote a react to pause the macro before and start a twist using React. This was testing to set up if there are more than 1 mob in range start chaining stuns. It worked fairly well I just didn't use it much cause I didn't like AoE'ing.

[CODE lang="ini" title="reacts"]reacts:
AETwistStarter:
action: /multiline ; /mqp on ; /stand ; /twist 2 4 5
condition: "!${Twist} && ${SpawnCount[npc radius 30 zradius 15]}>1 "
AETwistStopper:
action: /multiline ; /twist off ; /mqp off ;
condition: "${Twist} && ${SpawnCount[npc radius 30 zradius 15]}<2 "[/CODE]


If you enable both on the character, and more than 1 mob is in range it will pause the macro and start twisting 2 4 5. If there are less than 2, it will stop the twist, and start the macro back up.

You could change this to > 0 and /mqp on. Then Off if < 1 ?

EDIT: realized not having the Twist being used would complicate things. You could tie to ${Macro.Paused} instead. See below for possible react to do what you want?

[CODE lang="ini" title="reacts"]reacts:
StrangerDanger:
action: /mqp on
condition: "!${Macro.Paused} && ${SpawnCount[npc radius 60 zradius 15]}>0 "
StrangerDangerClear:
action: /mqp off
condition: "${Macro.Paused} && ${SpawnCount[npc radius 60 zradius 15]}<1 "[/CODE]
 
Last edited:
Question - Check if any mobs are nearby before casting?

Users who are viewing this thread

Back
Top
Cart