Basic assist macro

I rewrote some of it and found this to work much better than the previous version.

This WILL wait until the mob is below 90% and will wait for it be at the camp spot before it runs off to attack.


Code:
Sub Main
/squelch /assist off
/if (!${Defined[Param0]}) {
  /echo Proper usage: /macro assist TankName
  /end
}

   /declare RT_MyXLOC           int outer  ${Me.X} 
   /declare RT_MyyLOC           int outer  ${Me.Y}
   /declare AssistGuy string outer ${Param0}

:Loop
 /if (${Zone.ShortName.Equal[GuildLobby]}) {
	/sit
	/endmac
}

 /if (${Spawn[${AssistGuy}].Type.Equal[PC]} && ${Spawn[${AssistGuy} radius 100].ID} && ${${AssistGuy}.Distance}<50) {
			/assist ${AssistGuy}
			/if (!${Target.ID}) /goto :loop
			/delay 30s ${Target.PctHPs}<90
			/delay 30s ${Target.Distance}<50
			/attack on
			/stick behind 15
}
/if (${Target.Type.Equal[Corpse]}) /goto :Loop
/delay 30s !${Target.ID} ${Target.Type.Equal[Corpse]}

 /if (!${Target.ID})  	/moveto loc ${RT_MyyLOC} ${RT_MyXLOC}
	
 /delay 3s

/goto :Loop

/return
 
I forgot I had an assist macro I ripped from a couple different magro's, so here it is.

Useage: /mac assist Tankname Assist% (example: /mac assist Ubertank 90

This macro will assist your specified Tank at the Specified %, kill the mob, then return to it's camp location. So it will set itself an anchor when you start it.

There is also some custom code, to place your bot into sleep mode, if you die. Once rezzed, it will go back to assisting and attacking normally, but pays no attention to it's hp, or mana (if applicable) So this macro is far from smart.

Code:
|Simple Assist Macro v2.0
|Ripped from Various Macro's
|By HardOne
|

#event ImDead          "#*#You have been slain by#*#"
#event ImDead          "Returning to home point, please wait..."
#event ImDead          "#*#Returning to Bind Location#*#"

Sub Main
	|SYSTEM VARS - DO NOT MODIFY.
	/declare maintank 		 string outer	${Param0}
	/declare attackat 			int outer 	${Param1}
	/declare attackid 			int outer
	/declare RT_MyXLOC          int outer	${Me.X} 
	/declare RT_MyyLOC          int outer	${Me.Y}
	/declare MyHeading         	int outer 	${Me.Heading.DegreesCCW}
	/declare Camp_Zone 			int outer	${Zone.ID}
		
	/if (!${Param0.Length} && !${Param1.Length}) {
		/echo You must start the macro including the main assist's name and the percent to attack after.
		/echo i.e.:
		/echo /mac assist Ubertank 90
		/end
	}
	
	/echo AFK AssistTank Running. Assisting ${Param0} at ${Param1}%
	/echo Camp Set to: ${Me.X} ${Me.Y}, Facing: ${Me.Heading.DegreesCCW} in ${Zone}
	/echo Ensuring MQ2Melee is loaded
	/plugin mq2melee
	/delay 2s
	/squelch /target clear
	/squelch /assist off


	:mainloop
		/if (!${SpawnCount[${maintank}]}) {
			/echo Maintank Dead/Missing. Delaying 30 seconds and restarting.
			/delay 30s
			/goto :mainloop
		}
		/assist ${maintank}
		/delay 5
		/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs}<${attackat}) /call Attacking
		/doevents
	/goto :mainloop
	/end

Sub Attacking
	/echo Attacking ${Target.CleanName}!
	/varset attackid ${Target.ID}

	:attackloop
		/if (!${Target.ID}) /goto :endcombat
		/if (${Target.ID}!=${attackid}) /goto :newtarget
		/if (!${Me.Combat}) /attack on
		/doevents
	/goto :attackloop


	:newtarget
	/echo Somehow got new target. Re-assisting maintank.
	/squelch /target clear
	:endcombat
	/varset attackid 0
	/delay 2s
	/if (${Camp_Zone} == ${Zone.ID}) /call MoveToLoc ${RT_MyyLOC} ${RT_MyXLOC}
	/face fast heading ${MyHeading}
/return

Sub MoveToLoc(MoveToY, MoveToX) 
   /declare running int local 
   /declare distanceNow float local 
   /declare distanceBefore float local 
   /declare distanceModifier int local 
   /declare distanceTimer timer 15 
   /varset running 0 
   /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
   /varset distanceModifier 1 
   /echo Moving to Location: ${MoveToY}, ${MoveToX}. 
   /echo Distance: ${distanceBefore} 
   :moveToLocation  
      /face fast nolook loc ${MoveToY},${MoveToX} 
      /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<10) { 
         /keypress forward 
         /return 
      } 
      /if (${distanceTimer}==0) { 
         /if (${Me.Sneaking}) { 
            /varset distanceModifier 2 
         } else { 
            /varset distanceModifier 1 
         } 
         /varset distanceNow ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /if (${Math.Calc[${distanceBefore}-${distanceNow}]}<${Math.Calc[10/${distanceModifier}]}) { 
         /call HitObstacle 
         } 
         /varset distanceBefore ${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]} 
         /varset distanceTimer 15 
      } 
      /if (${running}==0) { 
         /keypress forward 
            /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}>10) { 
               /varset running 1 
               /keypress forward hold 
            } 
      } else { 
         /if (${Math.Distance[${Me.Y},${Me.X}:${MoveToY},${MoveToX}]}<11) { 
            /varset running 0 
            /keypress forward 
         } 
      } 
      /goto :moveToLocation 
/return

Sub HitObstacle 
   /echo Obstacle hit, moving around it... 
   /keypress forward 
   /keypress back hold 
   /delay 3 
   /keypress back 
   /if (${Math.Rand[2]}) { 
      /keypress strafe_right hold 
   } else { 
      /keypress strafe_left hold 
   } 
   /delay 5 
   /keypress strafe_right 
   /keypress strafe_left 
   /keypress forward hold 
/return

Sub Event_ImDead
	/doevents
	/if (${Stick.Status.Equal[ON]}) /squelch /stick off
	/keypress forward
	/keypress back
	/keypress Left
	/keypress Right
	/delay 2s
	/echo I've been Killed! Going into Sleep Mode...
	/beep
	/beep
	    :DeathSleep
			/doevents
			/delay 5s
			/if (${Me.State.Equal[HOVER]} || ${Zone.ID} != ${Camp_Zone}) /goto :DeathSleep
/return
 

Attachments

  • assist1.mac
    4.4 KB · Views: 303
Last edited by a moderator:
Hardone's works pretty well, loving it.

Tried the one you put up Village and it's either taking an extremely long time to re-assist, for example if I target one of my toons, they assist, then I target the mob and pull it, they stay on the toon.
 
I have been using Hardone's assist macro and its working nicely. If anyone has some time would it be possible to get rid of the returning to the start point portion of the macro, and to make them assist more to change targets with my main tank? Any help would be greatly appreciate. Basically assist/kill and keep assisting throughout the fight is what I am looking for, nothing special. Thank you for the help in advance.
 
Anyone able to edit this, so that it follows the MA and assists? I.E, Want my rogue to follow my ranger, while i roam around, and assist.

Not returning to a set point, but just /stick MA. Its too late at nite for me to try editiing it ;)


**EDIT**

Ignore my foolishness, found i can edit RH to do exactly this ;)
 
Last edited:
cant get this to move to the target just stands there hmm

Try loading the macro then camping out and back. That worked for me, but I don't know why I had to do that to make it work.
 
I have been using Hardone's assist macro and its working nicely. If anyone has some time would it be possible to get rid of the returning to the start point portion of the macro, and to make them assist more to change targets with my main tank? Any help would be greatly appreciate. Basically assist/kill and keep assisting throughout the fight is what I am looking for, nothing special. Thank you for the help in advance.


change the macro maybe work for u :

/if (${Camp_Zone} == ${Zone.ID} && !${Me.CombatState.Equal[COMBAT]}) /call MoveToLoc ${RT_MyYLOC} ${RT_MyXLOC}
 
Hardone's works pretty well, loving it.

Tried the one you put up Village and it's either taking an extremely long time to re-assist, for example if I target one of my toons, they assist, then I target the mob and pull it, they stay on the toon.

this maybe work for u:
/assist ${maintank}
/delay 5
/if (!${Target.ID} || !${Target.Type.Equal[NPC]}) /goto :mainloop
/if (${Target.ID} && ${Target.Type.Equal[NPC]} && ${Target.PctHPs}<${attackat}) /call Attacking
 
Last edited:
it's a cool assist.mac from hardone.( thank hardone)
and i edit a 99% perfect assist.mac from HardOne
pls check and adv here what need to improve.

========funtion=========
1.ass MT(ubertank) and start attack when mob 90% HP by type /mac assist Ubertank 90

2.won't move back to start loc if aggroed.so he can keep ass and attack without move back .

3.change target asap if target is not npc.


============my question=============
who can give me a autopull.mac pls
i want :
1. range or spell pull passible
2. dont loot anything.( i want pure exp only)
3. come back to camp loc directly when aggroed.( i dont want to run to mob's loc and hit him and run back ....because mob summon><~~)

thanks!
 

Attachments

  • assist.mac
    4.4 KB · Views: 158
Love this auto assist. Wish I understood a little more so I could get more out of my zerker with different discs and clickies, etc. Im learning though just a steep curve for a newb like myself.

Thanks for the work you all do on this stuff and sharing it as well.
 
Love this auto assist. Wish I understood a little more so I could get more out of my zerker with different discs and clickies, etc. Im learning though just a steep curve for a newb like myself.

Load up mq2melee and then do the command /melee save Then open your MQ folder to look for the server_charname.ini and it would be something like this for auto renewal of clickies and usage of various skills:

Code:
[MQ2Melee]
cryhavoc=10
disarm=0
enrage=0
holyflag0=1
holyflag1=1
downflag0=1
downflag1=1
downflag2=1
downflag3=1
downflag4=1
facing=1
frenzy=1
harmtouch=0
infuriate=1
kick=0
melee=1
petmend=20
petrange=75
plugin=1
pothealfast=0
provoke1=14184
provokeend=20
provokemax=1
provokeonce=1
ragevolley=0
resume=20
slam=0
stickrange=75
stun1=14184
version=5.209


holyshit0=/if (${Me.CombatAbilityReady[Overpowering Frenzy]} && ${Target.PctHPs}>10) /disc overpowering frenzy

holyshit1=/if (${Me.CombatAbilityReady[Eradicator's Volley]} && ${Target.PctHPs}<95) /disc Eradicator's Volley



downshit0=/if (${Spell[Form of Endurance IV].Stacks} && !${Me.Invis} && !${Me.Buff[Form of Endurance IV].ID} && !${Me.Moving}) /casting "Camail of the Blackened Heart"

downshit1=/if (${Spell[Savage Guard].Stacks} && !${Me.Invis} && !${Me.Buff[Savage Guard].ID} && !${Me.Moving}) /casting "Diazophire Earring"

downshit2=/if (${Spell[Taelosian Guard].Stacks} && !${Me.Invis} && !${Me.Buff[Taelosian Guard].ID} && !${Me.Moving}) /casting "Band of Subterfuge"

downshit3=/if (${Spell[Bloodlust Aura].Stacks[0]} && !${Me.Aura[Bloodlust Aura].ID} && !${Me.Moving}) /disc Bloodlust Aura 

downshit4=/if (${Spell[Illusion: Ancient Iksar].Stacks} && !${Me.Invis} && !${Me.Buff[Illusion: Ancient Iksar].ID} && !${Me.Moving}) /casting "Bone Mask of the Ancient Iksar"

** can automate disc/activated aa's more so than listed here but I prefer to do those manually myself so not listed in my example.
 
Last edited:
Not using code brackets makes teh baby jesus cry
 
help with following tank around

was wondering if someone can help me out. i'm trying to get my 2nd toon to follow me around and assist me while my 1st toon is running autokill.mac
 
Bump!

Would love for someone to post the code for this to basically auto follow a designated toon, and assist that toon. Thanks in advance!
 
Sub HitObstacle
/echo Obstacle hit, moving around it...
/keypress forward
/keypress back hold
/delay 3
/keypress back
/if (${Math.Rand[2]}) {
/keypress strafe_right hold
} else {
/keypress strafe_left hold
}
/delay 5
/keypress strafe_right
/keypress strafe_left
/keypress forward hold
/return

[/code]
I love the use of random in the HitObstacle sub:)
 
Last edited:
I use a merc tank sorry if this a n00b question but how can I get this macro to assist my merc? with a name like a_hired_goblin etc
 
I use a merc tank sorry if this a n00b question but how can I get this macro to assist my merc? with a name like a_hired_goblin etc

Do /echo ${Target.ID} and it will give you the full name, put that into the mac