• 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

Target IDs

FunWithUs

New member
I am looking for a way to identify a select few NPCs in a zone and avoid targeting them for a pulling macro (like an unkillable NPC). Would the best way to accomplish that be to use the npc's target ID number? I was imagining the code to look something like this:

/if (${Target.ID[34567]}) {
/target npc next
}

The problem with this idea is that I don't know how to find the target id and put it to use.

I'm open to suggestions on how this can be accomplished. I have some macroing skills, but they are limited till I learn more.
 
Since it sounds like you have multiple NPCs you wish to not target, the following command will add your NPCs to an alert list (Add the names of NPCs you wish to target):
Rich (BB code):
/alert add 1 "spawnname"

example: /alert add 1 "an ukun"
The example code will add an ukun to alert list 1. When you then execute the code below, it will only target an ukun or anything on the alert list 1. You can add multiple NPCs to an alert list and you can make multiple alert lists.
In your /target line just add something like the following:
Rich (BB code):
/squelch /target alert 1 npc next
More about the Target TLO here. That will show you all the spawn search options when using the /target command.

This process can also be reversed. You can add the NPCs you wish not to target to a second /alert list and during your /target code do the following:
Rich (BB code):
/squelch /target noalert 2 npc next
This will cause you to target any NPC that ISN'T on alert list 2.

FunWithUs said:
I am looking for a way to identify a select few NPCs in a zone and avoid targeting them for a pulling macro (like an unkillable NPC). Would the best way to accomplish that be to use the npc's target ID number? I was imagining the code to look something like this:

/if (${Target.ID[34567]}) {
/target npc next
}

The problem with this idea is that I don't know how to find the target id and put it to use.

I'm open to suggestions on how this can be accomplished. I have some macroing skills, but they are limited till I learn more.

Also, to find the ID of a target, just:
Rich (BB code):
/echo ${Target.ID}
 
So what I have below should work, once I know what the ID of the target is right? I'm still trying to figure out how to set conditions to determine when an NPC is unkillable.

Maybe using a hot key to add it manually would work? Something like:

Rich (BB code):
/alert add 1 ${Target.ID}

And then to skip spacific targets, I was thinking something like:

Rich (BB code):
/if (${Target.ID[alert 1]}) {
   /target npc next
}

Do you think this would work? I didn't want to target NPCs on the alert list.
 
This first part works if you change it to what you see below.
Rich (BB code):
/alert add 1 ${Target.CleanName}
Change this:
Rich (BB code):
/if (${Target.ID[alert 1]}) {
   /target npc next
}
To:
Rich (BB code):
/target noalert 1 npc next
You don't technically require an "If" statement to target an NPC. For what you need, the above will work quite well. The above code will target the nearest NPC that ISN'T on "alert list 1".

P.S: If you're using this to run a macro, I'd suggest just adding the /alert into your Sub Main before your :Loop starts. That way, you can just "/alert add 1 "spawnname" without needing to target the actual spawn first. Just replace "spawnname" with the NPCs actual name.
 
ok. I am trying to check for specific NPCs in range that are NOT on the alert list.

Basically I am going to make a hotkey that will add the ID# of NPC I wanted to add to the alert list. The hotkey is as follows:
Rich (BB code):
/alert add 1 ${Target.ID}

I am pretty sure that code such as what is listed below is probably incorrect, but it's a good example of what I want to accomplish with it.

Rich (BB code):
sub main 
/if (!${SpawnCount[noalert 1].ID}) { 
/goto :loop 
} 

/if (!${SpawnCount[noalert 1].ID}) { 
/goto :loop 
} 
/if (!${SpawnCount[noalert 1 Radius 475].ID})

Basically, I want to compare the target's ID to the target numbers on the alert list and act accordingly. Can it be done? If so, can someone show me the correct code? I can't seem to figure it out.
 
Target IDs

Users who are viewing this thread

Back
Top
Cart