Simple Autotarget

Have a macro idea but not sure where to start? Ask here.

Moderator: MacroQuest Developers

User avatar
FliPsY
decaying skeleton
decaying skeleton
Posts: 9
Joined: Fri Jul 16, 2004 1:06 pm

Simple Autotarget

Post by FliPsY » Thu Jul 22, 2004 9:18 pm

First macro attempt and i was wondering if i could get a little help on how to start this. I want to make a macro that ONLY autotargets mobs within a certain range and ONLY mobs with a certain name. and once the mob that is targetted is dead, it re-searches for the mob name within the radius. Example:
/macro autotarget <mob name> <radius>
/macro autotarget An_Undead_Vassal 80
this would target all "An Undead Vassal"s with a radius of 80 and once the mob is dead it searches in the radius for the mob again.

Any Suggestions?
My Twist with [b][color=red]MQ2Twist[/b][/color]

[b][color=red]1.[/b][/color] [color=blue]Vilia's Chorus of Celerity[/color]
[b][color=red]2.[/b][/color] [color=blue]Cassindra's Chorus of Clarity[/color]
[b][color=red]3.[/b][/color] [color=blue]Amplification[/color]
[b][color=red]4.[/b][/color] [color=blue]Katta's Song of Sword Dancing[/color]

Drumstix42
a grimling bloodguard
a grimling bloodguard
Posts: 808
Joined: Mon May 03, 2004 4:25 pm

Post by Drumstix42 » Fri Jul 23, 2004 12:38 am

Ummm RTFM.
/target [pc|npc [corpse]|corpse|pet|chest] [class class] [race race] [range min max] [noalert alert#] [nearalert alert#] [notnearalert alert#]
[zradius zheight] [radius distance] [nopcnear radius] [notid|id spawnid] ["spawnname"] [myself|mycorpse] [alert alert#]

pc|npc [corpse]
Selects nearest pc or npc. Using corpse will select the nearest pc or npc corpse

corpse
Selects the nearest corpse

pet
Selects the nearest pet

class class
Selects the nearest class match to target

chest
Selects the nearest chest type spawn (such as in LDoN)

race race
Selects nearest race to target

range min max
Sets the minimum and maximum level range to target

noalert alert#
***NEED TO FILL THIS DESCRIPTION IN***

nearalert alert#
***NEED TO FILL THIS DESCRIPTION IN***

notnearalert alert#
***NEED TO FILL THIS DESCRIPTION IN***

zradius zheight
Targets the spawn if it is within the height value

radius distance
Targets the spawn if it is within the 2D distance

nopcnear radius
Select the nearest spawn with no PC within radius of the spawn

notid|id spawnid
***NEED TO FILL THIS DESCRIPTION IN***

spawnname
Targets the nearest specified spawnname

myself|mycorpse
Targets the yourself or your corpse

alert alert#
Targets any spawn in the specified alert #

/target npc skele radius 80

nightfall154
orc pawn
orc pawn
Posts: 19
Joined: Fri Jul 16, 2004 1:49 pm

Re:

Post by nightfall154 » Sun Aug 01, 2004 7:57 pm

Would that continue targetting mobs after the current one is dead though? Think that is the point.

dok
a ghoul
a ghoul
Posts: 127
Joined: Mon Mar 15, 2004 3:38 pm

Post by dok » Sun Aug 01, 2004 9:32 pm

:Loop
/if (!${Target.ID}) /target npc xxxxx radius ##
/goto :Loop

you fill in the rest to make it work with paramters, etc.

nightfall154
orc pawn
orc pawn
Posts: 19
Joined: Fri Jul 16, 2004 1:49 pm

Re:

Post by nightfall154 » Fri Aug 13, 2004 4:23 pm

In case you haven't found one yet, I'll be nice.

Code: Select all

#turbo 

Sub Main 

  
:loopstart 
/if (${Target.Distance}>220) /keypress esc 
/if (${Target.ID}==FALSE) /tar NPC radius 220 
/delay 10 
/goto :loopstart 
/return 
Works perfectly for me.

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Fri Aug 13, 2004 7:32 pm

Or you could just do

/custombind add MyTarget
/custombind set MyTarget /target npc <mobname> radius <range>
/bind MyTarget t


obviously put your own values in the relevant place.

type these into the chat window one after another and you can just hit t to target the mob set up in the bind.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

Mimatas
a hill giant
a hill giant
Posts: 262
Joined: Wed Mar 10, 2004 4:22 pm

Post by Mimatas » Fri Aug 13, 2004 7:54 pm

holy crap fippy. I've been trying to figure out that custombinds stuff forever. I didn't realize you had to /bind after you defined the custom bind. I feel like a mucking foron. Thanks :)

nightfall154
orc pawn
orc pawn
Posts: 19
Joined: Fri Jul 16, 2004 1:49 pm

Re:

Post by nightfall154 » Fri Aug 13, 2004 8:42 pm

Except yours doesn't refresh with a new target when your current target is lost/dies, which is what the macro I use is for.

User avatar
Fippy
a snow griffon
a snow griffon
Posts: 499
Joined: Tue Jul 16, 2002 10:42 am

Post by Fippy » Sat Aug 14, 2004 5:47 am

Of course your are correct nf it wont loop was just pointing out another way of doing it. Using a custom bind you do have to tap a key to get a new target but on the plus side you can run a different macro.
Fippy

This is my girl. But Rizwank had her first :-)
[img]http://www.btinternet.com/~artanor/images/fairy_bounce09.gif[/img]

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Post by Cr4zyb4rd » Sat Aug 14, 2004 6:39 am

Custombinds are phatly rich mim, like you can do

Code: Select all

/custombind add MegaNuke
/custombind set MegaNuke /multiline ; /gsay OH YEAH I'M NUKING!!! ; /macro nukelikecrazy
/custombind set MegaNuke-up /multiline ; /gsay YOU LIKE THAT SHIT?!? ; /endmacro
/bind MegaNuke n
And you'll nuke like crazy crazy while n is held, and stop automatically when you release it.

I couldn't live without 'em. Binding stuff to key-up is just too useful.