First macro to camp a mob

Morx

Member
Joined
Apr 20, 2009
Messages
576
Reaction score
3
Points
16
Want to sit character near spawn points. Sitting will cause aggro. As soon as spawns happen, character will be attacked, causing pet to attack and combat state. Due to combat state, it will then cast a spell.

Would this work for that?

Code:
Sub Main

	:mainLoop
		/if (${Me.CombatState.NotEqual[ACTIVE]} && ${Me.State.NotEqual[SIT]}) /sit
		/if (${Me.CombatState.Equal[ACTIVE]} && ${Target.ID} && {Target.Type.Equal[NPC]} /call Attack
		/if (${Me.PctHPs}<20) /call Feign
	/goto :mainLoop
	/end

Sub Attack
	/echo ${Target.CleanName} doesn't stand a chance!

	:attack
		/if (${Target.ID} && ${Target.PctHPs}>5) /cast 1
		/delay 4s
	/goto :attack

Sub Feign
	/echo Umm.. you suck!
	
	:feigndeath
		/cast 8
		/delay 2s
		/if (!${Me.Feigning}) /goto :feigndeath
		else /if (${Me.Feigning}) /goto :feigned


	:feigned
		/echo Whew! That was close!
		/if (${Me.PctHPs}<70) /delay 5m
		else /if (${Me.PctHPs}>70 && ${Me.CombatState.NotEqual[ACTIVE]}) /stand
	/goto :feigned
 
/return

Thanks for the critique.
 
Last edited:
Yours should probably work.

It appears that you want to kill a single static spawn. In that case, it might be easiest just to define the spawn point and kill any mob that pops there.

There are a bunch of options to do that. Maybe the easiest would be to walk to the spawn point or target the mob and use that location as your "kill box" and anything that moves onto that point or spawns there will be killed. using sit as a mechanic can be meh.

So how that would work by standing on spawn:
Code:
Sub Main
/declare XLOC int outer ${Me.X}
/declare YLOC int outer ${Me.Y}

:mainloop
/if (${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID} && (!${Target.ID}||${Target.Type.NotEqual[npc]})) {
         /tar id ${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID}
        /delay 1s ${Target.ID}
       /call Attack
       }
/if (${Me.PctHPs}<20) /call Feign
/goto :mainloop
/return
By targeting spawn, then running macro:
Code:
Sub Main
/declare XLOC int outer ${Target.X}
/declare YLOC int outer ${Target.Y}

:mainloop
/if (${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID} && (!${Target.ID}||${Target.Type.NotEqual[npc]})) {
         /tar id ${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID}
        /delay 1s ${Target.ID}
       /call Attack
       }
/if (${Me.PctHPs}<20) /call Feign
/goto :mainloop
/return
Id also change that /delay 5m on feigning to be more like 15s personally.
 
Last edited:
It is a static spawn, but there are 3 static spawns in the very immediate area. I'm only concerned with the 1, but I do have to kill all 3. So if I use your first posted macro, and set the radius to maybe 15 or 20, that would work also.

I also just realized I posted this in the completely wrong forum area. :( Ug.
 
I also just realized I posted this in the completely wrong forum area. :( Ug.

I moved it to the questions/requests area for ya :)

Oh awesome! Thanks VI!

So I love it how a macro can start very simple. Then after just a bit of reading, and maybe looking at other macros, and how they do something, your macro ends up exploding into something way not simple!

Looking into right now adding more casted spells into the attack sequence, checking for buffs, and casting them if needed, and also adding a few /beep commands if a certain named spawned. This should be fun! :)
 
If you look at my macro builder thread, you can make a "complex" macro like this very, very easily that is fully operational. Unfortunately you arent a lifetime member, so you cant use the pulling portion of the macro that makes use of the "build a camp" module.

as gee whiz info, the MobCamp.inc on macro builder thread is used to create camps based on spawn X,Y locations like that example. You can still build camps, but you cant pull them via MQ2Navigation.

setup is pretty easy and it sounds like you wouldnt need much more than the example macro that is provided other than adding in:

Code:
/if (${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID} && (!${Target.ID}||${Target.Type.NotEqual[npc]})) {
         /tar id ${Spawn[loc ${XLOC} ${YLOC} npc radius 10].ID}
        /delay 1s ${Target.ID}
       /call Attack
       }
and making sure to declare:
Code:
/declare XLOC int outer ${Me.X}
/declare YLOC int outer ${Me.Y}

 or

/declare XLOC int outer ${Target.X}
/declare YLOC int outer ${Target.Y}
or you can peek at the MobCamp.inc and Pulling.inc to see how that operates to get mobs to your pull spot. youd want to look at using mq2advpath or just a /stick method if you are literally camping 3 mobs all side by side.

hope that helps. if you decide to try the macro builder stuff and have any questions, comments, etc.. go ahead and post on that thread or PM me and i can take a look.
 
I should have looked at that thread first.

This is amazing! Thank you!