/target info

Macro requests from before the user variable changes that broke all macros

Moderator: MacroQuest Developers

8 legs
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Oct 03, 2002 1:00 pm

/target info

Post by 8 legs » Thu Oct 03, 2002 1:06 pm

Could use a sample or a little help with the /target command.

Basically I want it to..

1. Target the closest skeleton to me

2. is on the same level as me i.e. z axis.. not above or below me

3. doesnt have a pc in close proximity

4. and is no further than say 1000 distance from me

I can get it to do 1 of these but not all at the same time. If you could please post an example for me I would be very grateful.

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Thu Oct 03, 2002 1:20 pm

um... can you just stack the commands?

/target npc zradius 25 nopcnear 200 skeleton

the within 1000 ft of your isnt in ... yet.
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

User avatar
DeathSpiral
a ghoul
a ghoul
Posts: 95
Joined: Thu Aug 22, 2002 6:31 pm

Post by DeathSpiral » Thu Oct 03, 2002 1:21 pm

I think you want something similar to this:

Code: Select all

/target npc zradius 20 nopcnear 100 skeleton
/if n $target(distance)<1000 {
   | Code to execute here
   ...
}
I might suggest taking a look at the excellent readme.html that comes with MQ.
readme.html wrote:/target [pc|npc|corpse|pet] [class <class>] [race <race>] [range <min> <max>] [noalert #] [zradius <zheight>] [nopcnear <radius>] [notid|id <spawnid>] [spawnname|myself|mycorpse|alert #]
Targets nearest mob meeting all requirements
  • pc, npc, corpse, pet - limits matching to specific type of spawn (default all)
  • class <class> - limits matching to a particular class
  • race <race> - limits matching to a particular race
  • range <min> <max> - limits matching to level range
  • zradius <zheight> - limits matching to a Z height
  • noalert # - limits matching to spawns that do not have an alert that would be active at their location
  • nopcnear <radius> - limits matching to spawns that do not have a PC within radius of it
  • id <spawnid> - limits matching to a specific spawn via id
  • notid <spawnid> - limits matching to anything BUT a specific spawn via id
  • spawnname, myself, mycorpse, alert # - limits matching to those that contain "name" or are "yourself", "your corpse" or a particular alert
Last edited by DeathSpiral on Thu Oct 03, 2002 1:39 pm, edited 1 time in total.
I am orc pawn, hear me yell for centurians...

8 legs
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Oct 03, 2002 1:00 pm

Post by 8 legs » Thu Oct 03, 2002 2:48 pm

Think I tried a string very similar to yours already Deathspiral, but it was having problems with targetting mobs that were above/below me.. Mainly using this for farming a single level of a dungeon that has multiple levels.

Gonna go try out your code asap and let ya know how it worked.. Thanks in advance for the input guys =)

8 legs
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Oct 03, 2002 1:00 pm

Post by 8 legs » Fri Oct 04, 2002 12:08 pm

Still doesnt work =( Its still trying to target mobs that are above or below me. The place im at my Z loc is 104.. its targetting mobs that are on very diff Z axis.

Magnus
a ghoul
a ghoul
Posts: 85
Joined: Sun Aug 11, 2002 3:50 pm

Post by Magnus » Fri Oct 04, 2002 5:14 pm

Try and set a loop with an if then. Set a variable on your Z-axis coord and if target is >= whatever distance on the Z you want to limit then your script would retarget.

The problem with all this is that you will continually target that mob til something moves in range...basically looping but maybe that's what you want :P

Basically, use what was started above and add a variable check in relation to your Z. Yes it's redudant, but it might solve your problem.


Mag

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Fri Oct 04, 2002 5:19 pm

are you using the zradius command? bring it down to ten and see if it works... if not its possibly bugged

AFTER you try those and submit your results :)

/filter zrange <zrange>

Filters /target, /where, /face, /itemtarget, and alerts to a specific +/-Z height
Not saved, default is off, values 10000 or higher turn it off
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

8 legs
decaying skeleton
decaying skeleton
Posts: 7
Joined: Thu Oct 03, 2002 1:00 pm

Post by 8 legs » Sat Oct 05, 2002 6:51 pm

I got it working, but its kinda buggy.. about every 50 targets it will go crazy and try and target a mob too far below or above me.. So I just added in this.

/if $target(z)>150 /goto :above
/if $target(z)<-50 /goto :below

It basically then just tells me that the mob isnt in the Z height I want and delays a few seconds then finds a new target..

User avatar
rizwank
Huggle Police
Huggle Police
Posts: 524
Joined: Tue Jul 23, 2002 12:07 am
Contact:

Post by rizwank » Sun Oct 06, 2002 3:33 am

can you repro the bug and post it in development?
#macroquest op
Macroquest Official Documentarion
Macroquest Board Moderator
All around cool guy

[img]http://medicomuerte.users.btopenworld.com/images/fairy_bounce08.gif[/img]

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

Post by Plazmic » Wed Oct 09, 2002 2:38 am

It's probably the same bug that's in /target radius in the IRC release.
Haven't looked at it yet, but know it doesn't work from a test in steamfont while PLing a friend.
- Plazmic