• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
  • Unfortunately, yes, there is a suspension wave happening around the new tlp launch. :'( Please keep regular discussion to Suspension MegaThread and please consider submitting a Suspension report to RG.

target (1 Viewer)

zxcvbb

New member
Joined
Nov 13, 2006
RedCents
21¢
does any one have a mac that when ur target die it targets another one? ontill all mobs around u die
 
INI:
Sub Main
:WHEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
/if (!${Target.ID}) /target ID ${NearestSpawn[npc, 1].ID}
/goto :WHEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
/return

I swear to God that macro is worth ATLEAST 10 redcents.
 
Rich (BB code):
Sub Main
:loop
/call start
/doevent
/call next
/doevent
/call circle
/doevent
/call twist
/goto :loop
/return


sub start
/plugin mq2moveutils
/return

sub circle
:circle
/circle on 75
/circle unpause
/return

sub twist
:twist
/twist 1 2 3 4 5 6
/return


/sub next
:next
/if (!${Target.ID}) /target ID ${NearestSpawn[npc, 1].ID}
/goto :next
/return

Okay, here's some advice:

First, you're over-separating. You don't need to put all of that in different subs...it works fine in one section, since it's not very complicated.

Second, you don't need to use "/doevents" (And it's doeventS, not doevent). You don't HAVE any events, so there's nothing to do or check.

Third, you have ":circle" or whatever else in every sub, even when you don't use it. The ":whatever" text is only needed when, inside that sub, you're going to be needing a loop (using a /goto).

Fourth, I'd recommend that instead of doing circle unpause, before you start your circle, you do /stick off.

Fifth, you don't need to do a loop in your targeting section. All that will do is keep trying to get you a target -- there's no way for the macro to *EVER* escape that loop.

Sixth, you don't want to constantly reload the moveutils plugin -- that will eat up memory doing useless stuff. I added a check to see if the plugin was loaded.

Here's what a good rewrite of that code there would look like:
Rich (BB code):
Sub Main
/if ( !${Plugin[MQ2MoveUtils].Name.Length} ) {
		/squelch /plugin MQ2MoveUtils
		/if ( !${Plugin[MQ2MoveUtils].Name.Length} ) {
			/echo You must have MQ2MoveUtils plugin to use this macro!!
			/endmacro
		}
}
/stick off
/circle on 75
/twist 1 2 3 4 5 6

:loop
/if (!${Target.ID}) /target ID ${NearestSpawn[npc, 1].ID}
/delay 1s
/goto :loop
/return

What this will do is a) only load MoveUtils if it isn't loaded, b) Do a /stick off, then turn on circle, c) turn twist on, then d) do an infinity loop to automatically get you a target when you lose yours.

What I would do, though, to upgrade the targeting code, is this:

Replace:
Rich (BB code):
:loop
/if (!${Target.ID}) /target ID ${NearestSpawn[npc, 1].ID}
/goto :loop
/return

with
Rich (BB code):
/call TargetLoop
/return

Sub TargetLoop
:Looptime
/if (!${Target.ID}) /target ID ${NearestSpawn[npc, 1].ID}
/if (${Target.Distance}>250) {
     /target clear
     /target ID ${NearestSpawn[npc, 1].ID}
     /goto :Looptime
     }
/return

That targeting sub will only keep mobs targeted if they are within 250 -- if that isn't close enough for your songs, adjust the distance until you are only targeting mobs that you can hit.

Now, with all of this said, if you want a better macro to take examples from, go look for AFKBard.mac, or target.mac, macros that are already posted on the boards here and work fairly well -- they provide good examples to work from.
 
target

Users who are viewing this thread

Back
Top