NONPCnear

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

Mutter
a ghoul
a ghoul
Posts: 105
Joined: Sat Nov 16, 2002 1:09 pm

NONPCnear

Post by Mutter » Wed Oct 29, 2003 4:29 pm

Ok guys, PLEASe someone I have been trying this for like a year. I need function etc that gets me a target with nothing near it. IE: if i target an orc pawn, i want a SOLO orc pawn, not one with 300 friends.

-Mutter

User avatar
Slice
a hill giant
a hill giant
Posts: 189
Joined: Wed Oct 30, 2002 2:52 pm

Post by Slice » Wed Oct 29, 2003 4:42 pm

I was venture a guess that adding a orc pawn to your alert list 1 and then using:

/target npc pawn notnearalert 1

might work. Untested. Not sure what the default radius is for alert lists.
Slice

Sharp of Fairlight
VIP=Very Impressive Pimpin'
Posts: 108
Joined: Wed Oct 29, 2003 3:54 pm
Location: Sweden

Post by Sharp of Fairlight » Wed Oct 29, 2003 5:11 pm

I'm looking for something similar. Guessing you want to singlepull, i want to make sure a rainspell only hits my target.

Idea for devs: Make a command called $targetsearchspawn() who does the same thing as $searchspawn() but from the current targets point of view.

hmmm that's interesting!

Post by hmmm that's interesting! » Wed Oct 29, 2003 5:55 pm

I like taht idea

Plazmic
The One
The One
Posts: 800
Joined: Fri Jun 14, 2002 12:31 am
Contact:

Post by Plazmic » Wed Oct 29, 2003 8:01 pm

Try this:

Code: Select all

/alert add 55 npc radius 100
/target "your mob filters here" notnearalert 55
if it doesn't work, come back.

About $targetsearchspawn():
The above logic should work as $searchspawn(blah,blah,blah,notnearalert:55)

To loop through mobs within 60 units of a spawn:

Code: Select all

Sub CountSpawnsCloseToSpawn(SpawnID)
   /if $defined(SpawnID)==false /return 0
   /declare CloseSpawn local
   /declare SpawnCount local
   /alert clear 56
   /alert add 56 id @SpawnID radius 60

   /varset CloseSpawn $searchspawn(npc,nearalert:56)
   /varset SpawnCount 0
   :Loop
      /if n @CloseSpawn==0 /goto :Return
      /varadd SpawnCount 1
      /echo @SpawnCount) $spawn(@CloseSpawn,name)
      /varset CloseSpawn $searchspawn(npc,nearalert:56,next,id:@CloseSpawn)
   /goto :Loop
   :Return
/return @SpawnCount
(All untested, alert list numbers picked at random)
- Plazmic

Mutter
a ghoul
a ghoul
Posts: 105
Joined: Sat Nov 16, 2002 1:09 pm

nice

Post by Mutter » Wed Oct 29, 2003 11:43 pm

very nice my thanks!