• IS THIS SITE UGLY? Click "RG3" at the very bottom-left of this page to change it. To dismiss this notice, click the X --->

Question - Trying to make a basic macro that runs around and kills shit...

toots

New member
RedCents
2,704¢
#22
You have /play and /nav commands in there. As far as I understand advpath and mq2nav do not play well together. Stick with one of the plugins, or make sure you have code built in to load and unload them as you need them.
 
#24
You have /play and /nav commands in there. As far as I understand advpath and mq2nav do not play well together. Stick with one of the plugins, or make sure you have code built in to load and unload them as you need them.
The other zones that use /play aren't being used anymore because I am stuck solely on the riftseekers part. So wall of slaugher, MPG subs are irrelevant until i figure out how to actually make it farm the zone I want it to (Riftseekers)
 
#25
Also check your X & Y are correct with coords!
This screwed me up a lot

/loc is X, Y

Most mq2 stuff takes Y, X coords

Your mac may also be messing up because of this kinda stuff

Rich (BB code):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AFAIK MQ2 only knows to ignore stuff if you properly comment it out
Rich (BB code):
| for 1 line
And for multiple lines:
Rich (BB code):
|** 
stuff here in a line
more lines
**|
 
#26
Also check your X & Y are correct with coords!
This screwed me up a lot

/loc is X, Y

Most mq2 stuff takes Y, X coords

Your mac may also be messing up because of this kinda stuff

Rich (BB code):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
AFAIK MQ2 only knows to ignore stuff if you properly comment it out
Rich (BB code):
| for 1 line
And for multiple lines:
Rich (BB code):
|** 
stuff here in a line
more lines
**|
Yea I realized it didn't read that ~~~ stuff when I started to encase my Sub routines in it. It started spitting errors out left and right and I was just like oh jeeze. I reformated it to the |---- which a few people seem to use.

Also apparently this macro was way over my head for what I wanted to do, I have been getting a lot of help from TheDroidUrLookingFor. When this is all done I will make a new thread with the working version of it (if we get one) for anyone to use. Then I *should* be able to take the code from this macro and make even more that farm Artisan's Prize mats.
 
#27
I got it working for the most part last night. :) It just needs a little bit of refinement now. Kinda brute forced the code until I got her doing what I wanted. Here is the macro as is... It runs both ground floor and upstairs at the moment.

-- EDIT --
Does Ground, Basement, and upstairs now!

-- EDIT --
Added the alt activates from LamahHerder
Added a delay to the combat routine... since it is in that routine for awhile sometimes.

Rich (BB code):
|------------------------------------------------------------| 
|          Rift.mac 
| 
|      Last Modified by: TheDroidUrLookingFor 
|
|------------------------------------------------------------| 
#turbo
|------------------------------------------------------------| 
|          Includes 
|------------------------------------------------------------| 
#include spell_routines.inc
#include MQ2Cast_Spell_Routines.inc
#define CASTMODE "MQ2Cast"
|------------------------------------------------------------|
|          Defines
|------------------------------------------------------------|
	#define CHATMETHOD       "/echo"
	#define CHATMETHOD1      "/bc"
	#define CHATMETHOD2      "/t"
|------------------------------------------------------------| 
|          Events 
|------------------------------------------------------------| 

|------------------------------------------------------------| 
|          Defines 
|------------------------------------------------------------| 
#define CHATMETHOD        "/bc"
#define CHATMETHOD1       "/echo"

Sub Main
CHATMETHOD Sub Main Loaded Successfully.
/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
/if (!${Bool[${Plugin[MQ2AdvPath]}]}) /plugin mq2advpath load
/call DeclareVars

:MainLoop
/if (${Zone.Name.Equal[Wall of Slaughter]}) {
| WoS to MPG
/if (${UseMQ2AdvPath}) /call AdvPathMove "PortintoMPG" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Muramite Proving Grounds]}) {
| MPG to RSS
/if (${UseMQ2AdvPath}) /call AdvPathMove "MPGtoRiftseekers" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Riftseekers' Sanctum]}) {
/echo I am in ${Zone}!

| Ground Location #1
/if (${UseMQ2Nav}) /call Move 708 40 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Ground Location #2
/if (${UseMQ2Nav}) /call Move 479 -178 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Ground Location #3
/if (${UseMQ2Nav}) /call Move -2 -443 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #4
/if (${UseMQ2Nav}) /call Move -702 -405 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #5
/if (${UseMQ2Nav}) /call Move -482 -180 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #6
/if (${UseMQ2Nav}) /call Move -696 298 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Ground Location #7
/if (${UseMQ2Nav}) /call Move -472 783 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #8
/if (${UseMQ2Nav}) /call Move -4 992 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #9
/if (${UseMQ2Nav}) /call Move 474 775 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #1
/if (${UseMQ2Nav}) /call Move 1266 455 -535
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Basement Location #2
/if (${UseMQ2Nav}) /call Move 1421 1117 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Basement Location #3
/if (${UseMQ2Nav}) /call Move 1090 1426 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #4
/if (${UseMQ2Nav}) /call Move 564 1559 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #5
/if (${UseMQ2Nav}) /call Move 97 1655 -595
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #6
/if (${UseMQ2Nav}) /call Move -203 1211 -616
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Basement Location #7
/if (${UseMQ2Nav}) /call Move 564 1150 -593
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #8
/if (${UseMQ2Nav}) /call Move 1041 1045 -535
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #9
/if (${UseMQ2Nav}) /call Move 495 573 -473
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

/if (${UseMQ2Nav}) /call Move -764 614 2
/if (${UseMQ2AdvPath}) /call AdvPathMove "EntToUpstairsSpot1" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear

| Upstairs Location #1
/if (${UseMQ2Nav}) /call Move -845 -197 -18
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Upstairs Location #2
/if (${UseMQ2Nav}) /call Move -1233 188 4
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Upstairs Location #3
/if (${UseMQ2Nav}) /call Move 1165 616 44
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #4
/if (${UseMQ2Nav}) /call Move -1080 1116 44
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #5
/if (${UseMQ2Nav}) /call Move -546 1212 64
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #6
/if (${UseMQ2Nav}) /call Move -100 1328 64
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Upstairs Location #7
/if (${UseMQ2Nav}) /call Move 261 1728 163
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #8
/if (${UseMQ2Nav}) /call Move 205 263 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #9
/if (${UseMQ2Nav}) /call Move 620 214 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #10
/if (${UseMQ2Nav}) /call Move -227 233 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot10ToSpot11" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

/goto :MainLoop
/return

Sub DeclareVars
CHATMETHOD Declaring Variables.
|-----------Change-------------------------------------------|
/declare UseMQ2Nav bool outer TRUE
/declare UseMQ2AdvPath bool outer FALSE
/declare AnchorRadius int outer 25
/declare AggroRadius int outer 100
/declare ZAggroRadius int outer 10
/declare AttackAtDistance int outer 20
/declare MoveStopAt int outer 5
|-----------EQBC----------------------------------------=----|
/Declare UseEQBC			bool outer FALSE
/Declare EQBCServerAddr		string outer "192.168.1.251"
/Declare EQBCPort			string outer "2112"
/Declare EQBCPassword		string outer ""
|-----------Dont Change--------------------------------------|
/declare AnchorY string outer ${Me.Y}
/declare AnchorX string outer ${Me.X}
/declare AnchorZ string outer ${Me.Z}
|------------------------------------------------------------|
/if (${UseEQBC}) /bccmd connect ${EQBCServerAddr} ${EQBCPort} ${EQBCPassword}
CHATMETHOD Variables Declared Successfully.
/return

Sub SetAnchor
/varset AnchorX ${Me.X}
/varset AnchorY ${Me.Y}
/varset AnchorZ ${Me.Z}
/return

Sub Move(int X, int Y, int Z, int StopDist)
:LetsRoll
/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav ${X} ${Y} ${Z}
/delay 1s
/if (${Math.Distance[${X},${Y},${Z}:${Me.X},${Me.Y},${Me.Z}]}<=${StopDist}) /goto :LetsRoll
/if (${Navigation.Active}) /goto :LetsRoll
/return

Sub AdvPathMove(string FileName, int StopDist)
:LetsRoll
/if (${AdvPath.Active} && !${AdvPath.Playing}) /play ${FileName} smart
/delay 1s
/if (${AdvPath.Playing}) /goto :LetsRoll
/return

Sub KillAllNear
:FindTarget

/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0) {
/if (${AdvPath.Playing}) /nav pause
/echo Mobs Found!
/target id ${NearestSpawn[npc targetable los radius ${AggroRadius} zradius ${ZAggroRadius} noalert 3].ID}
/delay 5s ${Target.ID}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<${AggroRadius} && ${Target.LineOfSight}) /goto :LockedOn
/goto :FindTarget
} else {
/return
}

:LockedOn
/if (${Me.Pet.Distance}>=${AggroRadius}) /alt act ${Me.AltAbility[Summon Companion].ID}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /attack on
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Pet.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /pet attack
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}>=20 && ${Target.LineOfSight} && ${Me.SpellReady[Remorseless Servant]}) /call CASTMODE "Remorseless Servant" gem1 6s
/if (${Me.AltAbilityReady[Force of Elements]} && !${Target.Type.Equal["corpse"]}) /alt act 8800
/if (${Me.PctHPs}<=50 && ${Me.AltAbilityReady[${Elemental Ward}]}) /alt act 2060
/delay 1s
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0 && !${Target.ID}) /goto :FindTarget
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} == 0 && !${Target.ID}) /goto :ExitSub
/if (!${Target.Type.Equal[NPC]} || !${Target.ID}) /goto :FindTarget
/goto :LockedOn

:ExitSub
/nav pause
/return
 
Last edited:
#28
I took a stab at what you posted as well LurkMcGurk

Untested as I have no clue where this is....

Your logic for fighting when a target was found while pathing seemed off and thats what I mostly messed with...
Let me know if this works better

Rich (BB code):
|**
----------------------------------------------------
Riftseekers' Sanctum "Pyrilen Flame" Farming Macro
----------------------------------------------------
**|


Sub Main


	:setup
		/declare AggroRadius int outer 200
		/declare ZAggroRadius int outer 10
		/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
		/if (!${Bool[${Plugin[MQ2MoveUtils]}]}) /plugin MQ2MoveUtils load
		/if (!${Navigation.MeshLoaded}) {
			/echo No Mesh!!!
			/end
			} 


	:MainLoop
		/if (${Zone.ShortName.Equal[wallofslaughter]}) /call WallofSlaughter
		/if (${Zone.ShortName.Equal[provinggrounds]}) /call MPG
		/if (${Zone.ShortName.Equal[Riftseekers]}) /call Riftseeker
		/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
		/delay 5
	/goto :MainLoop 
/return


Sub WallofSlaughter
	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/play PortintoMPG
	/delay 60s !${AdvPath.Playing}
	/click left door
	/delay 60s ${Zone.ShortName.Equal[provinggrounds]}==TRUE
/return


Sub MPG
	/echo I am in Muramite Proving Grounds now. Time to navigate this shit hole. Took like fucking 45min to do all these locations.
	/call Transport
	/play MPGtoRiftseekers
	/delay 60s !${AdvPath.Playing}
	/doortarget CT_Crystal
	/call openDoor
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/return


Sub Riftseekers
	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/call RollOut "633" "-773" "2"
	/call CheckMobs
/return




Sub Attack
	/echo Entering Attack Rotation
	/doevents


	:FindTarget
		/if (${SpawnCount[npc radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0) {
			/squelch /target clear
			/delay 5 !${Target.ID}
			/target ${NearestSpawn[npc radius ${AggroRadius} zradius ${ZAggroRadius}]}
			/delay 5 ${Target.ID}
			/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<${AggroRadius} && ${Target.LineOfSight}) /goto :LockedOn
		/goto :FindTarget
		} else {
			/hidecorpse all
			/return
			}
	
	:LockedOn
		/if (${Me.AltAbilityReady[Force of Elements]} && !${Target.Type.Equal["corpse"]}) /alt act 8800
		/if (${Me.PctHPs}<=50 && ${Me.AltAbilityReady[${Elemental Ward}]}) /alt act 2060
		/if (${Me.Combat} && ${Me.SpellReady[${Remorseless Servant}]} && ${Target.Distance} <= 35) /cast 3
		/if (!${Target.Type.Equal[NPC]} || !${Target.ID}) /goto :FindTarget
	/goto :LockedOn


/return


Sub CheckMobs
	:MobCheck
		/if (${SpawnCount[npc los loc ${Me.X} ${Me.Y} radius ${AggroRadius} zradius ${ZAggroRadius} targetable noalert 1]}>0) /call Attack
	/goto :MobCheck
/return


Sub RollOut(int X, int Y, int Z)
	/echo Starting Movement
	:LetsRoll
		/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav ${X} ${Y} ${Z}
		/call CheckAggro
		/if (${Macro.Return}) /call CheckMobs
	/if (${Math.Distance[${X},${Y}:${Me.X},${Me.Y}]}>5) /goto :LetsRoll
/return


Sub CheckAggro
	:setup
	/declare i int local
	
	/for i 1 to ${Me.XTarget}
		/if (${Me.XTarget[${i}].ID}!=0) /return TRUE
	/next i
/return FALSE


Sub openDoor
	/if (${Switch.Open}==FALSE) {
		:openSwitchLoop
			/face door
			/if (${Window[LargeDialogWindow]}) /invoke ${Window[largedialogwindow].Child[LDW_OkButton].LeftMouseUp}
			/click left door
			/delay 2s
			/if (${Switch.Open}==FALSE) /goto :openSwitchLoop
	}
	/delay 1s
/return


Sub Pet
	/echo I am now buffing my pet up
	/delay 1s 
	/pet hold off
	/delay 1s 
	/pet ghold off
	/delay 1s 
	/cast 9
	/delay 7s 
	/cast 10
	/delay 7s 
	/alt act 323
	/delay 7s 
	/alt act 852
	/delay 5s
/return


Sub Transport
	/echo Getting ready to run across an unfriendly zone
	/delay 1s
	/alt act 1210
	/delay 3s
	/pet hold off
	/delay 1s
	/pet ghold off
	/delay 1s
/return


Sub Cauldron
	/if (${FindItem[Cauldron of Countless Goods].Timer}) /return
	/echo Using Cauldron of Countless Goods. Hopefully I get something good!!
	/nomodkey /itemnotify "${FindItem[Cauldron of Countless Goods]}" rightmouseup
	/delay 25s
	/autoi
/return
 
#29
I took a stab at what you posted as well LurkMcGurk

Untested as I have no clue where this is....

Your logic for fighting when a target was found while pathing seemed off and thats what I mostly messed with...
Let me know if this works better

Rich (BB code):
|**
----------------------------------------------------
Riftseekers' Sanctum "Pyrilen Flame" Farming Macro
----------------------------------------------------
**|


Sub Main


	:setup
		/declare AggroRadius int outer 200
		/declare ZAggroRadius int outer 10
		/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
		/if (!${Bool[${Plugin[MQ2MoveUtils]}]}) /plugin MQ2MoveUtils load
		/if (!${Navigation.MeshLoaded}) {
			/echo No Mesh!!!
			/end
			} 


	:MainLoop
		/if (${Zone.ShortName.Equal[wallofslaughter]}) /call WallofSlaughter
		/if (${Zone.ShortName.Equal[provinggrounds]}) /call MPG
		/if (${Zone.ShortName.Equal[Riftseekers]}) /call Riftseeker
		/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
		/delay 5
	/goto :MainLoop 
/return


Sub WallofSlaughter
	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/play PortintoMPG
	/delay 60s !${AdvPath.Playing}
	/click left door
	/delay 60s ${Zone.ShortName.Equal[provinggrounds]}==TRUE
/return


Sub MPG
	/echo I am in Muramite Proving Grounds now. Time to navigate this shit hole. Took like fucking 45min to do all these locations.
	/call Transport
	/play MPGtoRiftseekers
	/delay 60s !${AdvPath.Playing}
	/doortarget CT_Crystal
	/call openDoor
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/return


Sub Riftseekers
	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/call RollOut "633" "-773" "2"
	/call CheckMobs
/return




Sub Attack
	/echo Entering Attack Rotation
	/doevents


	:FindTarget
		/if (${SpawnCount[npc radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0) {
			/squelch /target clear
			/delay 5 !${Target.ID}
			/target ${NearestSpawn[npc radius ${AggroRadius} zradius ${ZAggroRadius}]}
			/delay 5 ${Target.ID}
			/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<${AggroRadius} && ${Target.LineOfSight}) /goto :LockedOn
		/goto :FindTarget
		} else {
			/hidecorpse all
			/return
			}
	
	:LockedOn
		/if (${Me.AltAbilityReady[Force of Elements]} && !${Target.Type.Equal["corpse"]}) /alt act 8800
		/if (${Me.PctHPs}<=50 && ${Me.AltAbilityReady[${Elemental Ward}]}) /alt act 2060
		/if (${Me.Combat} && ${Me.SpellReady[${Remorseless Servant}]} && ${Target.Distance} <= 35) /cast 3
		/if (!${Target.Type.Equal[NPC]} || !${Target.ID}) /goto :FindTarget
	/goto :LockedOn


/return


Sub CheckMobs
	:MobCheck
		/if (${SpawnCount[npc los loc ${Me.X} ${Me.Y} radius ${AggroRadius} zradius ${ZAggroRadius} targetable noalert 1]}>0) /call Attack
	/goto :MobCheck
/return


Sub RollOut(int X, int Y, int Z)
	/echo Starting Movement
	:LetsRoll
		/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav ${X} ${Y} ${Z}
		/call CheckAggro
		/if (${Macro.Return}) /call CheckMobs
	/if (${Math.Distance[${X},${Y}:${Me.X},${Me.Y}]}>5) /goto :LetsRoll
/return


Sub CheckAggro
	:setup
	/declare i int local
	
	/for i 1 to ${Me.XTarget}
		/if (${Me.XTarget[${i}].ID}!=0) /return TRUE
	/next i
/return FALSE


Sub openDoor
	/if (${Switch.Open}==FALSE) {
		:openSwitchLoop
			/face door
			/if (${Window[LargeDialogWindow]}) /invoke ${Window[largedialogwindow].Child[LDW_OkButton].LeftMouseUp}
			/click left door
			/delay 2s
			/if (${Switch.Open}==FALSE) /goto :openSwitchLoop
	}
	/delay 1s
/return


Sub Pet
	/echo I am now buffing my pet up
	/delay 1s 
	/pet hold off
	/delay 1s 
	/pet ghold off
	/delay 1s 
	/cast 9
	/delay 7s 
	/cast 10
	/delay 7s 
	/alt act 323
	/delay 7s 
	/alt act 852
	/delay 5s
/return


Sub Transport
	/echo Getting ready to run across an unfriendly zone
	/delay 1s
	/alt act 1210
	/delay 3s
	/pet hold off
	/delay 1s
	/pet ghold off
	/delay 1s
/return


Sub Cauldron
	/if (${FindItem[Cauldron of Countless Goods].Timer}) /return
	/echo Using Cauldron of Countless Goods. Hopefully I get something good!!
	/nomodkey /itemnotify "${FindItem[Cauldron of Countless Goods]}" rightmouseup
	/delay 25s
	/autoi
/return
Yea the code I gave him was written at work when I was slightly busy. Didn't have a chance to fix it at the time but it stays in the area and on target now.
 
#30
Trying to use this, getting a lot of invalid locations when trying to use nav. Any ideas?

I know there were changes to the x,y locations but even after switching them around I get errors.

- - - Updated - - -

Trying to use this, getting a lot of invalid locations when trying to use nav. Any ideas?

I know there were changes to the x,y locations but even after switching them around I get errors.
 
#31
Trying to use this, getting a lot of invalid locations when trying to use nav. Any ideas?

I know there were changes to the x,y locations but even after switching them around I get errors.

- - - Updated - - -

Trying to use this, getting a lot of invalid locations when trying to use nav. Any ideas?

I know there were changes to the x,y locations but even after switching them around I get errors.
It never properly worked for me, the one DroidYourLookingFor gave me wasn't tested and didn't work effeciently (it refused to stop to med and other things)

This is the closest thing to a working version there was:

Rich (BB code):
|----------------------------------------------------------|
|
|Riftseekers' Sanctum "Pyrilen Flame & Essence of Discord" Farming Macro
|
|----------------------------------------------------------|
#turbo

|----------------------------
|		Include
|----------------------------

	#include spell_routines.inc
	#include MQ2Cast_Spell_Routines.inc


	#define CASTMODE "MQ2Cast"


	#Event Summon "You have been summoned!"

|----------------------------
|		Declares
|----------------------------
Sub Declares

	/declare UseMQ2Nav bool outer TRUE
	/declare UseMQ2AdvPath bool outer FALSE
	/declare AnchorRadius int outer 25
	/declare AggroRadius int outer 100
	/declare ZAggroRadius int outer 10
	/declare AttackAtDistance int outer 20
	/declare MoveStopAt int outer 5
	/declare AnchorY string outer ${Me.Y}
	/declare AnchorX string outer ${Me.X}
	/declare AnchorZ string outer ${Me.Z}
/return


|----------------------------
|		Main Sub
|----------------------------

Sub Main

/call Checks
/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
/if (!${Bool[${Plugin[MQ2AdvPath]}]}) /plugin mq2advpath load
/call Declares
/call Cauldron
/Call pet

:MainLoop
/if (${Zone.Name.Equal[Wall of Slaughter]}) {
| WoS to MPG
/if (${UseMQ2AdvPath}) /call AdvPathMove "PortintoMPG" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Muramite Proving Grounds]}) {
| MPG to RSS
/if (${UseMQ2AdvPath}) /call AdvPathMove "MPGtoRiftseekers" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Riftseekers' Sanctum]}) {
/echo I am in ${Zone}!
/if (${UseMQ2Nav}) /call Move -764 614 2
/if (${UseMQ2AdvPath}) /call AdvPathMove "EntToUpstairsSpot1" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear

| Ground Location #1
/if (${UseMQ2Nav}) /call Move 708 40 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Ground Location #2
/if (${UseMQ2Nav}) /call Move 479 -178 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Ground Location #3
/if (${UseMQ2Nav}) /call Move -2 -443 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #4
/if (${UseMQ2Nav}) /call Move -702 -405 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #5
/if (${UseMQ2Nav}) /call Move -482 -180 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #6
/if (${UseMQ2Nav}) /call Move -696 298 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Ground Location #7
/if (${UseMQ2Nav}) /call Move -472 783 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #8
/if (${UseMQ2Nav}) /call Move -4 992 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Ground Location #9
/if (${UseMQ2Nav}) /call Move 474 775 -235
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "GroundSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #1
/if (${UseMQ2Nav}) /call Move 1266 455 -535
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Basement Location #2
/if (${UseMQ2Nav}) /call Move 1421 1117 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Basement Location #3
/if (${UseMQ2Nav}) /call Move 1090 1426 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #4
/if (${UseMQ2Nav}) /call Move 564 1559 -553
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #5
/if (${UseMQ2Nav}) /call Move 97 1655 -595
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #6
/if (${UseMQ2Nav}) /call Move -203 1211 -616
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Basement Location #7
/if (${UseMQ2Nav}) /call Move 564 1150 -593
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #8
/if (${UseMQ2Nav}) /call Move 1041 1045 -535
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Basement Location #9
/if (${UseMQ2Nav}) /call Move 495 573 -473
/if (${UseMQ2AdvPath}) /call AdvPathMove "BasementSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

/if (${UseMQ2Nav}) /call Move -764 614 2
/if (${UseMQ2AdvPath}) /call AdvPathMove "EntToUpstairsSpot1" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear

| Upstairs Location #1
/if (${UseMQ2Nav}) /call Move -845 -197 -18
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot1ToSpot2" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Upstairs Location #2
/if (${UseMQ2Nav}) /call Move -1233 188 4
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot2ToSpot3" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear

| Upstairs Location #3
/if (${UseMQ2Nav}) /call Move 1165 616 44
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot3ToSpot4" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #4
/if (${UseMQ2Nav}) /call Move -1080 1116 44
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot4ToSpot5" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #5
/if (${UseMQ2Nav}) /call Move -546 1212 64
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot5ToSpot6" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #6
/if (${UseMQ2Nav}) /call Move -100 1328 64
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot6ToSpot7" "${MoveStopAt}"
/call SetAnchor
/call KillAllNear
}

| Upstairs Location #7
/if (${UseMQ2Nav}) /call Move 261 1728 163
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot7ToSpot8" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #8
/if (${UseMQ2Nav}) /call Move 205 263 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot8ToSpot9" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #9
/if (${UseMQ2Nav}) /call Move 620 214 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot9ToSpot10" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Upstairs Location #10
/if (${UseMQ2Nav}) /call Move -227 233 303
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot10ToSpot11" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

| Return to Zone In
/if (${UseMQ2Nav}) /call Move 0 97 -236
/if (${UseMQ2AdvPath}) /call AdvPathMove "UpstairsSpot11ToEnt" "${MoveStopAt}"
/call SetAnchor
/delay 5
/call KillAllNear
}

/goto :MainLoop
/return


|----------------------------
|		"Utility" Subs
|----------------------------

Sub Pet

	/echo I am now buffing my pet up
	/delay 1s 
	/pet hold off
	/delay 1s 
	/pet ghold off
	/delay 1s 
	/cast 9
	/delay 7s 
	/cast 10
	/delay 7s 
	/alt act 323
	/delay 7s 
	/alt act 852
	/delay 5s

/return

Sub Cauldron


	/if (${FindItem[Cauldron of Countless Goods].Timer}) /return
	/echo Using Cauldron of Countless Goods. Hopefully I get something good!!
	/nomodkey /itemnotify "${FindItem[Cauldron of Countless Goods]}" rightmouseup
	/delay 25s
	/autoi
/return

|----------------------------
|		Movement Subs
|----------------------------

Sub SetAnchor
/varset AnchorX ${Me.X}
/varset AnchorY ${Me.Y}
/varset AnchorZ ${Me.Z}
/return

Sub Move(int X, int Y, int Z, int StopDist)
:LetsRoll
/call Checks
/delay 1
/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav ${X} ${Y} ${Z}
/delay 1
/if (${Math.Distance[${X},${Y},${Z}:${Me.X},${Me.Y},${Me.Z}]}<=${StopDist}) /goto :LetsRoll
/if (${Navigation.Active}) /goto :LetsRoll
/return

Sub AdvPathMove(string FileName, int StopDist)
:LetsRoll
/if (${AdvPath.Active} && !${AdvPath.Playing}) /play ${FileName} smart
/delay 1s
/if (${AdvPath.Playing}) /goto :LetsRoll
/return

|----------------------------
|		Attack Rotation Subs
|----------------------------

Sub KillAllNear
:FindTarget

/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0) {
/if (${AdvPath.Playing}) /nav pause
/echo Mobs Found!
/target id ${NearestSpawn[npc targetable los radius ${AggroRadius} zradius ${ZAggroRadius} noalert 3].ID}
/delay 5s ${Target.ID}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<${AggroRadius} && ${Target.LineOfSight}) /goto :LockedOn
/goto :FindTarget
} else {
/return
}

:LockedOn
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /attack on
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && ${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /face
/if (${Me.Combat} && ${Me.PctHPs}<70 && ${Me.AltAbilityReady[Elemental Ward]}) /alt act 2060
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Pet.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /pet attack
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && ${Me.Pet.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /alt act 1371
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}>=20 && ${Target.LineOfSight} && ${Me.SpellReady[Remorseless Servant Rk. II]}) /call CASTMODE "Remorseless Servant Rk. II" gem3 6s
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}>=20 && ${Target.LineOfSight}) /call CASTMODE "Remorseless Servant Rk. II" gem3 6s
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 4 && !${Target.ID}) /alt act 1371
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0 && !${Target.ID}) /goto :FindTarget
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} == 0 && !${Target.ID}) /goto :ExitSub
/if (!${Target.Type.Equal[NPC]} || !${Target.ID}) /goto :FindTarget
/goto :LockedOn

:ExitSub
/nav pause
/return


|------------------------------------------------------------|
|         Checks Routines
|------------------------------------------------------------|

Sub Checks
/doevents
/call CheckHP
/call CheckMP
/call CheckBuffs
/return

Sub CheckHP
/declare i int local
/for i 1 to ${HealSize}
:SelfHeal
/if (${Me.PctHPs}<=${HealPct}) && ${HealType}.Equal["Self"]) {
	/if (${AdvPath.Playing}) /nav stop
	/target id ${Me.ID}
	/delay 15s ${Target.ID}
	/call CASTMODE "${Heal[${i}]}" ${HealGem[${i}]} 15s
	/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :SelfHeal
	/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :SelfHeal
}
:PetHeal
/if (${Me.Pet.ID} && ${Me.Pet.PctHPs}<=${HealPct}) && ${HealType}.Equal["Pet"]) {
	/if (${AdvPath.Playing}) /nav stop
	/target id ${Me.Pet.ID}
	/delay 15s ${Target.ID}
	/call CASTMODE "${Heal[${i}]}" ${HealGem[${i}]} 15s
	/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :PetHeal
	/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :PetHeal
}
/next i
/if (!${AdvPath.Playing} && ${LastX}) /nav ${LastX} ${LastY} ${LastZ}
/return

Sub CheckMP
:Med_Loop
/if (${Med} && ${Me.Standing} && !${Me.Mount.ID} && ${Me.PctHPs} <= ${MedAt} && !${Me.Combat}) {
	/if (${AdvPath.Playing}) /nav stop
	/sit
	/goto :Med_Loop
}
/if (!${AdvPath.Playing} && ${LastX}) /nav ${LastX} ${LastY} ${LastZ}
/return

Sub CheckBuffs
/declare i int local
/for i 1 to ${BuffSize}

:SelfBuff 
/if (!${Me.Buff[${Spell[${Spell[${Buff[${i}]}].ID}].RankName}].ID} && ${BuffType[${i}].Equal[Self]}) {
	/call CASTMODE "${Spell[${Spell[${Buff[${i}]}].ID}].RankName}" ${BuffGem[${i}]} 15s 
	/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :SelfBuff
	/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :SelfBuff
}
	
/if (!${Me.PetBuff[${Spell[${Spell[${Buff[${i}]}].ID}].RankName}].ID} && ${BuffType[${i}].Equal[Pet]}) {	
	/if (${Me.Pet.ID}) { 
	:PetBuff 
	  /if (${Me.Pet.ID}!=null && !${Me.PetBuff[${Buff[${i}]}]}) {
		/target ${Me.Pet}
		/echo Pet needed "${Spell[${Spell[${Buff[${i}]}].ID}].RankName}"
		/call CASTMODE "${Buff[${i}]}" ${BuffGem[${i}]} 15s
			/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :PetBuff
			/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :PetBuff
	  } 
	} else {
	/echo You dont have a pet! Making one!
	:MakePet_Loop
		/if (${Me.Pet.ID}==null) {
			/echo Summoning your pet with spell: ${PetSummon}
			/call CASTMODE "${PetSummon}" gem6 15s
			/delay 20
				/if (${Macro.Return.Equal["CAST_INTERRUPTED"]}) /goto :MakePet_Loop
				/if (!${Macro.Return.Equal["CAST_SUCCESS"]}) /goto :MakePet_Loop
		} 
	} 
}
/next i
/return

Sub Event_Summon
/nav stop
/call KillAllNear
/return
 
#32
You know what. You could actually achieve a lot by simply being able to use the /nav npc pyrilen in place of all the ground locations.

The only problem is, I don't know how to stop it from navigating to corpses, and I don't know how to put the proper delays in.

- - - Updated - - -

Oh, and by the way. You can totally get it working by just changing:

/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav ${X} ${Y} ${Z}

to

/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav loc xyz ${X} ${Y} ${Z}

Some of the locations don't work on my mesh, so I just need to edit them, but I think something based on /nav spawn would work much better.

- - - Updated - - -

/nav spawn $(Spawn[npc radius 500 pyrilen]} would probably work really well :)
 

saar

New member
RedCents
2,553¢
#33
Rich (BB code):
Sub CheckMP
:Med_Loop
/if (${Med} && ${Me.Standing} && !${Me.Mount.ID} && ${Me.PctHPs} <= ${MedAt} && !${Me.Combat}) {
	/if (${AdvPath.Playing}) /nav stop
	/sit
	/goto :Med_Loop
}
looks wrong try
Rich (BB code):
Sub CheckMP
:Med_Loop
/if (${Me.Standing} && !${Me.Mount.ID} && ${Me.PctMana}<=${MedAt} && !${Me.Combat}) {
	/if (${AdvPath.Playing}) /nav stop
	/sit
	/goto :Med_Loop
}
also need to add a declare also so under declare sub add
Rich (BB code):
/declare MedAt int outer 20
or what ever pct you want to start medding at.
could also try
Rich (BB code):
Sub CheckMP
:Med_Loop
/if (${Me.Standing} || ${Me.State}==RESTING && !${Me.Mount.ID} && ${Me.PctMana}<=${MedAt} && !${Me.Combat}) {
	/if (${AdvPath.Playing}) /nav stop
	/sit
	/goto :Med_Loop
}
 

ChatWithThisName

Active member
Staff member
RedCents
395¢
#34
So I'm standing in RSS. Admittedly I didn't really try to read the code because there was so much previous content. I've always found that I troubleshoot better by running the code and reacting to errors when it pertains to other peoples code. In a way this could be considered a lazy way to do it, but it also tends to point the finger directly at any culprits.

For starters. /nav X Y Z should be /nav loc Y X Z or /nav locxyz X Y Z (locxyz doesn't have a space between it as mentioned by EQBackagain, but he was on the right track and may have accidentally spaced it). This did in fact get my berserker in motion (yeah I'm on a zerker lol)

I also opted to stick #warning at the top of the code to check for undeclared variables because I noticed that you /call Checks before you /call Declares. I figured there was a high probability that you were attempting to use variables that had not yet been declared / initialized to a value. Oh man was I correct!

  1. Buff see line: 473
  2. BuffSize see line: 495
  3. BuffType see line: 473
  4. HealPct see line: 431
  5. HealSize see line: 429
  6. HealType see line: 431
  7. LastX see line: 459
  8. LastY see line: 459
  9. LastZ see line: 459
  10. Med: see line: 454
  11. MedAt: see line: 454

These are found in Sub Check, which is your medding and such. None of that stuff works because the variables aren't defined.

I got that list both from using #warning to pause per undeclared variable. Then followed with using /echo ${Macro.Undeclared} which will output a list of undeclared variables your macro has used.

For the sake of understanding why when UseMQ2Nav is true that I'm getting undeclared variables for LastX, LastY, LastZ you must understand how a macro parses information.

That is, it parses an entire line at a time. To avoid trying to parse variables that aren't defined they should be used in block if statements instead of single line if statements.

Block statement.
Rich (BB code):
/declare This bool local FALSE
/if (${This}) {
    /echo ${ThisVariableIsntDefined}
}
Single Line
Rich (BB code):
/declare This bool local FALSE
/if (${This}) /echo ${ThisVariableIsntDefined}
In the above two statements. If ran the macro will only report the undeclared variable ThisVariableIsntDefined on the single line if statement. It does this because the macro parses the whole line. For the block statement, it parses ${This} to be false, and skips to the other side of the closing brace for the block statement. Thus, it never tries to parse the line with the undeclared variable.
 

ChatWithThisName

Active member
Staff member
RedCents
395¢
#35
Since you have BuffSize and BuffType. It implies that you would like to look into creating some buff logic. I'd like to be the first to tell you that a buff routine is a pretty advanced thing to go about coding. I have a stand alone buff routine if you would be interested in taking a look at it. It's certainly not a polished work of art. But it works as I've coded it and intended it for my own personal use.

It's hard coded to handle 20 buffs. Afraid the INI only handles gems 1-9 because I haven't bothered to do much else with it. It doesn't handle items.

Rich (BB code):
|**AutoBuff Macro**|


	#Event beginCast "#*#You begin casting#*#"
	#Event Fizzle "#*#Your spell fizzles!#*#"
	#Event Interrupted "#*#Your spell is interrupted#*#"
	#Event noTarget "#*#You must first select a target#*#"
	#Event noMana "#*#Insufficient Mana to cast#*#"
	#Warning


| --------------------------------------------------------------------------------------------
| SUB: Main
| --------------------------------------------------------------------------------------------
Sub Main


	/declare Filename string outer Buff_${Me.CleanName}_${Me.Class}.ini
	/declare TotalBuffs int outer 0


	/call CheckINI
	/call Declares
	/while (TRUE) {
		/call BuffRoutine
	}


/return


| --------------------------------------------------------------------------------------------
| SUB: Declares
| --------------------------------------------------------------------------------------------
Sub Declares
	/declare Black 		string outer \ab
	/declare Blue   	string outer \au
	/declare Brown      string outer \a-o
	/declare Cyan   	string outer \at
	/declare Gray		string outer \a-w
	/declare Green		string outer \ag
	/declare Pink   	string outer \am
	/declare Orange   	string outer \ao
	/declare Purple   	string outer \ap
	/declare Red   		string outer \ar
	/declare Teal   	string outer \at
	/declare White   	string outer \aw
	/declare Yellow  	string outer \ay
	/declare DarkGreen 	string outer \a-g
	/declare DarkMaroon	string outer \a-m
	/declare DarkPurple	string outer \a-p
	/declare DarkRed	string outer \a-r
	/declare DarkCyan	string outer \a-t
	/declare DarkBlue	string outer \a-u
	/declare DarkYellow	string outer \a-y
	/declare OldGroupSize int outer ${Group}
	/declare beginCast bool outer FALSE
	/declare Fizzle bool outer FALSE
	/declare Interrupted bool outer FALSE
	/declare noTarget bool outer FALSE
	/declare noMana bool outer FALSE
	/declare DefaultGem string outer ${Ini[${Filename},Settings,DefaultGem]}
	/declare Debugging bool outer ${Ini[${Filename},Settings,DebugMode]}
	/noparse /declare RecastNeeded string outer (${noTarget} || ${Interrupted} || ${Fizzle})
	/declare MedToMana int outer ${Ini[${Filename},Settings,MedToMana]}
	/declare BuffCheckFrequency timer outer 0s
	/declare GlobalConditions string outer ${Ini[${Filename},Settings,GlobalConditions]}
	/alias /buffecho /echo ${White}[${Green}Buff.mac${White}]${Orange}
	/declare i int local
	/for i 1 to ${TotalBuffs}
		/declare Buff${i} string outer ${Ini[${Filename},Buffs,Buff${i}]}
		/declare Buff${i}Slot string outer ${Ini[${Filename},Buffs,Buff${i}Slot]}
		/declare Buff${i}Conditions string outer ${Ini[${Filename},Buffs,Buff${i}Conditions,TRUE]}
		/declare Buff${i}Targets string outer
		/declare Buff${i}Type string outer ${Ini[${Filename},Buffs,Buff${i}Type,Spell]}
		/declare BuffCmd${i} string outer
	|** Only look here if Buff${i} isn't NULL **|
		/if (!${Buff${i}.Equal[NULL]}) {
			/if (${Debugging}) /buffecho Setting buff command
		|** Is this an AltAbility? **|
			/if (${Me.AltAbility[${Buff${i}}].ID}) {
				/varset BuffCmd{i} casting "${Buff${i}} alt"
				/if (${Debugging}) /buffecho Buff Command is: ${BuffCmd${i}}
			|** Is this a spell I have? **|
			} else /if (${Me.Book[${Buff${i}}]}) {
				/if (${Debugging}) /buffecho ${Buff${i}} was in my book.
			|** Do I already have this Memorized? **|
				/if (${Debugging}) /buffecho Do I have it memorized? ${Me.Gem[${Buff${i}}]}
				/if (${Me.Gem[${Buff${i}}]}) {
					/varset BuffCmd${i} casting "${Buff${i}}"|gem${Me.Gem[${Buff${i}}]}
					/if (${Debugging}) /buffecho Buff Command is: ${BuffCmd${i}}
				|** If I don't have it memorized which gem do I use? **|
				} else /if (!${Bool[${Buff${i}Slot}]}) {
					/if (${Debugging}) /buffecho Did I assign it a slot? ${Buff${i}Slot}
					/varset BuffCmd${i} casting "${Buff${i}}"|${DefaultGem}
					/if (${Debugging}) /buffecho Buff Command is: ${BuffCmd${i}}
				} else {
					/if (${Debugging}) /buffecho Did I assign it a slot? ${Buff${i}Slot}
					/varset BuffCmd${i} casting "${Buff${i}}"|${Buff${i}Slot}
					/if (${Debugging}) /buffecho Buff Command is: ${BuffCmd${i}}
				}
			|** Is this a CombatAbility? **|
			} else /if (${Me.CombatAbility[${Buff${i}}]}) {
				/varset BuffCmd${i} disc "${Me.CombatAbility[${Buff${i}}]}"
				/if (${Debugging}) /buffecho Buff Command is: ${BuffCmd${i}}
			|** If I haven't figured out what it is by now, then I don't think we have it. ~~~~~~~~~~~~~~~Expand to include an itemcheck **|
			} else {
				/varcalc TotalBuffs ${TotalBuffs}-1
				/buffecho ${Red} There was a problem with Buff${i}: ${Buff${i}}. It doesn't seem to be a AltAbility, Spell, or CombatAbility. Please check the INI entry.
				/continue
			}
			/varset Buff${i}Targets ${Ini[${Filename},Buffs,Buff${i}Targets]}
		}
	/next i
|** If I don't have any buffs setup that I actually have the say so and end the macro **|
	/if (!${TotalBuffs}) {
		/buffecho ${Red}No Buffs Loaded, edit ${Filename} located in the macros folder.
		/end
	}
|** How many buffs do I have setup correctly? **|
	/buffecho ${Red} ${TotalBuffs} Buffs Loaded
|** Show me what buffs I have loaded **|
	/for i 1 to ${TotalBuffs}
		/buffecho ${Green} ${Buff${i}} <--
	/next i


/return


| --------------------------------------------------------------------------------------------
| SUB: CheckINI
| --------------------------------------------------------------------------------------------
Sub CheckINI
	/if (${Ini[${Filename},MacroBuiltInCheck,INIGenerated].Length}) {
		/declare INIGenerated bool local ${Ini[${Filename},MacroBuiltInCheck,INIGenerated]}
	} else {
		/declare INIGenerated bool local FALSE
	}
	/if (!${INIGenerated}) {
		/call GenerateINI
	}
	/declare i int local
	/for i 1 to 20
		/if (${String[${Ini[${Filename},Buffs,Buff${i}]}].NotEqual[NULL]}) {
			/varset TotalBuffs ${Math.Calc[${TotalBuffs}+1]}
		} else /break
	/next i


/return


| --------------------------------------------------------------------------------------------
| SUB: GenerateINI
| --------------------------------------------------------------------------------------------
Sub GenerateINI
	/ini "${Filename}" "Settings" "BuffGroup?" "TRUE"
	/ini "${Filename}" "Settings" "DefaultGem" "gem1"
	/ini "${Filename}" "Settings" "BuffCheckFrequency" "10s"
	/ini "${Filename}" "Settings" "GlobalConditions" "(TRUE)"
	/ini "${Filename}" "Settings" "MedToMana" "100"
	/ini "${Filename}" "Settings" "DebugMode" "FALSE"
	/declare i int local
	/for i 1 to 20
		/ini "${Filename}" "Buffs" "${i}-------------------${i}" "--------"
		/if (!${Ini[${Filename},Buffs,Buff${i}].Length}) {
			/ini "${Filename}" "Buffs" "Buff${i}" "NULL"
		}
		/if (!${Ini[${Filename},Buffs,Buff${i}Slot].Length}) {
			/ini "${Filename}" "Buffs" "Buff${i}Slot" "NULL"
		}
		/if (!${Ini[${Filename},Buffs,Buff${i}Conditions].Length}) {
			/ini "${Filename}" "Buffs" "Buff${i}Conditions" "(TRUE)"
		}
		/if (!${Ini[${Filename},Buffs,Buff${i}Targets].Length}) {
			/ini "${Filename}" "Buffs" "Buff${i}Targets" "NULL"
		}
		/ini "${Filename}" "Buffs" "${i}---${i}" "--------"
	/next i
	/ini "${Filename}" "MacroBuiltInCheck" "INIGenerated" "TRUE"
	/echo \aw[\agBuff.mac\aw]\aoINI Generated. Please Edit the INI ${Filename} in your Macro's folder.
	/echo \aw[\agBuff.mac\aw]\aoBuff1=Spirit of Wolf
	/echo \aw[\agBuff.mac\aw]\aoBuff1Targets=Single
	/noparse /echo \aw[\agBuff.mac\aw]\aoBuff1Conditions=(!${Me.Zoning} && !${Me.Invis} && ${Me.PctMana} > 20 && !${Me.Moving} && !${Me.Sitting} && !${Me.Combat})
	/echo \aw[\agBuff.mac\aw]\aoBuff2=Talisman of the Doomscale
	/echo \aw[\agBuff.mac\aw]\aoBuff2Targets=Group
	/noparse /echo \aw[\agBuff.mac\aw]\aoBuff2Conditions=(!${Me.Zoning} && !${Me.Invis} && ${Me.PctMana} > 20 && !${Me.Moving} && !${Me.Sitting} && !${Me.Combat})
	/end
/return


| --------------------------------------------------------------------------------------------
| SUB: BuffRoutine
| --------------------------------------------------------------------------------------------
Sub BuffRoutine
	/declare i int local
	/declare j int local
	/declare k int local
	/if (!${BuffCheckFrequency}) {
		/if (${Ini[${Filename},Settings,BuffGroup?]}) {
			/if (${Group}) {
				/for j 0 to ${Group}
					/target id ${Group.Member[${j}].ID}
					/delay 2s ${Target.ID}==${Group.Member[${j}].ID}&&${Target.BuffsPopulated}
					/for i 1 to ${TotalBuffs}
						/if (${Buff${i}Targets.Find[${Target.Class.ShortName}]} || ${Buff${i}Targets.Find[Group]} || ${Buff${i}Targets.Find[All]} || ${Buff${i}Targets.Find[Self]}) {
							/if ((${Spell[${Buff${i}}].TargetType.Equal[Self]} || ${Buff${i}Targets.Find[Self]} || ${Spell[${Buff${i}}].TargetType.Equal[Group v2]}) && ${j}!=0) /continue
							/if (${Debugging}) /buffecho Checking ${Buff${i}} conditions ${Buff${i}Conditions}
							/if (!${Defined[NeedsBuff]}) /declare NeedsBuff bool outer TRUE
							/varset NeedsBuff TRUE
							/if (${Buff${i}Conditions} && ${GlobalConditions}) {
								/if (${Debugging}) /buffecho Conditions Passed
								/if (${Target.Buff[${Buff${i}}].ID}) {
									/if (${Target.Buff[${Buff${i}}].Duration.TotalSeconds} < ${Math.Calc[${Spell[${Buff${i}}].CastTime.TotalSeconds}+2]}) {
										/varset NeedsBuff TRUE
									} else {
										/varset NeedsBuff FALSE
										/if (${Debugging}) /buffecho ${Target} doesn't need ${Buff${i}}
										/continue
									}
								}
								/if (${Debugging}) /buffecho ${Target.Name} Needs ${Buff${i}}: ${NeedsBuff}
								/if (${NeedsBuff}) {
									/if (${BuffCmd${i}.Find[gem]} && !${Me.Gem[${Buff${i}}]}) {
									:waitForMem
										/mem "${Buff${i}}" ${BuffCmd${i}.Right[1]}
										/delay 5
										/if (!${Me.Gem[${Buff${i}}]}) /goto :waitForMem
										/delay 10s !${Me.GemTimer[${Buff${i}}]}
									}
									/buffecho ${Purple}${Target.Name} ${White}--> ${Green}${Buff${i}}
									/if (${Buff${i}Conditions}) {
									:castAgain
										/docommand /${BuffCmd${i}}
									:beginCastCheck
										/delay 5
										/doevents
										/if (${noTarget}) {
											/target id ${Group.Member[${j}].ID}
											/goto :castAgain
										}
										/if (${Debugging}) /buffecho noMana: ${noMana} Recast Needed: ${RecastNeeded} Have I began cast:${beginCast}
										/if (${noMana}) /call Meditate
										/if (${RecastNeeded}) /goto :castAgain
										/if (!${beginCast}) /goto :castAgain
										/varset beginCast FALSE
										/varset Fizzle FALSE
										/varset Interrupted FALSE
										/varset noTarget FALSE
										/delay 1m !${Me.Casting.ID}
									|** Global Spell cooldown delay **|
										/delay 2s
									}
								}
							}
						}
					/next i


				/next j


			}
		}
		/squelch /target clear
		/varset BuffCheckFrequency ${Ini[${Filename},Settings,BuffCheckFrequency]}
	}


/return


| --------------------------------------------------------------------------------------------
| SUB: Meditate
| --------------------------------------------------------------------------------------------
Sub Meditate
:waitForMana
	/if (${Me.PctMana} < ${MedToMana}) {
		/delay 5
		/goto :waitForMana
	}
/return


| --------------------------------------------------------------------------------------------
| SUB: Event_beginCast
| --------------------------------------------------------------------------------------------
Sub Event_beginCast
	/if (${Debugging}) /buffecho Begin Casting Sub
	/varset beginCast TRUE
/return


| --------------------------------------------------------------------------------------------
| SUB: Event_Fizzle
| --------------------------------------------------------------------------------------------
Sub Event_Fizzle
	/varset Fizzle TRUE
/return


| --------------------------------------------------------------------------------------------
| SUB: Event_Interrupted
| --------------------------------------------------------------------------------------------
Sub Event_Interrupted
	/varset Interrupted TRUE
/return


| --------------------------------------------------------------------------------------------
| SUB: Event_noTarget
| --------------------------------------------------------------------------------------------
Sub Event_noTarget
	/varset noTarget TRUE
/return


| --------------------------------------------------------------------------------------------
| SUB: Event_noMana
| --------------------------------------------------------------------------------------------
Sub Event_noMana
	/varset noMana TRUE
/return
 
#36
I also opted to stick #warning at the top of the code to check for undeclared variables because I noticed that you /call Checks before you /call Declares. I figured there was a high probability that you were attempting to use variables that had not yet been declared / initialized to a value. Oh man was I correct!
Don't even know which macro you and saar are looking at and trying to pull apart/edit (the one I just posted or the one at the the top of the thread) but I know you're both wasting your time since Kissassist does a better job than the macro I wrote. Tis be why the project was abandoned in the first place. I asked myself why complicate things when you can just set the radius on Kissassist to a couple thousand and it does exactly what I wanted just much much slower.


Also since you bought it up I gotta say; #warning is the devil - worst Mq2 'feature' added since I started using the program. The argument you made to me about The Bazaar macro is the same one I made about #warning. That feature fucks over more 'regular' players by pausing the macro at ANY error than it does help people. #warning makes ANY error no matter how small catastrophic since it breaks the entire macro. I've raise the concern multiple times and I had a large amount of people agree with me the first time, an amount large enough to where the issue should have been fixed. If you need #warning to pause the macro as a coder you're not coding right. Additionally if you're a coder and you think pausing other peoples macros with #warning and PISSING THEM OFF is going to actually get them to post the issue and solve it with you - you're senile.


TL;DR - I hate #warning since it's terrible and got butthurt that it was used in my macro.





P.S - Not upset with you Chat; the reason #warning upsets me is because 90% of my job with my website is figuring out things that give people trouble/issues and making them easier and more enjoyable. That's in essence what writing guides is for me. #Warning isn't an issue that can be easily fixed by the every day user (since KA requires some trickery to open unencrypted) and it IS an issue that will piss off the every day user.

Due to the idiocy of #warning I have had to write a guide telling people how to remove it. That's even more proof in and of itself how stupid something like that is to include into a program that people with no computer knowledge use. If you wanna use #warning for diagnostic purposes I get it and I totally understand - leaving it in the final release of a macro like Kissassist ....stupid...
 
Last edited:
#37
Well, I modified things to use /nav spawn instead, which takes all the guesswork out of finding locations. I think it's a bloody good change, but there's definitely some things that it's doing wrong (picking up the combat routine whilst moving for one thing) and sometimes it has a mob targeted but not on xtarget and hangs until you clear the target.

Bear with me, I'm just a hack :(

A clever person would be able to make the command line of /mac rift mobname I am sure

Rich (BB code):
|------------------------------------------------------------| 
|          Rift.mac 
| 
|      Last Modified by: EQBackAgain
|
|------------------------------------------------------------| 
#turbo
|------------------------------------------------------------| 
|          Includes 
|------------------------------------------------------------| 
#include spell_routines.inc
#include MQ2Cast_Spell_Routines.inc
#define CASTMODE "MQ2Cast"
|------------------------------------------------------------|
|          Defines
|------------------------------------------------------------|
	#define CHATMETHOD       "/echo"
	#define CHATMETHOD1      "/bc"
	#define CHATMETHOD2      "/t"
|------------------------------------------------------------| 
|          Events 
|------------------------------------------------------------| 

|------------------------------------------------------------| 
|          Defines 
|------------------------------------------------------------| 
#define CHATMETHOD        "/bc"
#define CHATMETHOD1       "/echo"

Sub Main
CHATMETHOD Sub Main Loaded Successfully.
/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
/if (!${Bool[${Plugin[MQ2AdvPath]}]}) /plugin mq2advpath load
/call DeclareVars

:MainLoop
/if (${Zone.Name.Equal[Wall of Slaughter]}) {
| WoS to MPG
/if (${UseMQ2AdvPath}) /call AdvPathMove "PortintoMPG" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Muramite Proving Grounds]}) {
| MPG to RSS
/if (${UseMQ2AdvPath}) /call AdvPathMove "MPGtoRiftseekers" "${MoveStopAt}"
}

/if (${Zone.Name.Equal[Riftseekers' Sanctum]}) {
/echo I am in ${Zone}!

| Ground Location #1
/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav spawn npc ${Spawn[npc radius 800 pyrilen]}
/if (${Navigation.Active}) /delay 5
/call KillAllNear
}

/goto :MainLoop
/return

Sub DeclareVars
CHATMETHOD Declaring Variables.
|-----------Change-------------------------------------------|
/declare UseMQ2Nav bool outer TRUE
/declare UseMQ2AdvPath bool outer FALSE
/declare AnchorRadius int outer 25
/declare AggroRadius int outer 100
/declare ZAggroRadius int outer 10
/declare AttackAtDistance int outer 20
/declare MoveStopAt int outer 5
|-----------EQBC----------------------------------------=----|
/Declare UseEQBC			bool outer FALSE
/Declare EQBCServerAddr		string outer "192.168.1.21"
/Declare EQBCPort			string outer "2112"
/Declare EQBCPassword		string outer ""
|-----------Dont Change--------------------------------------|
/declare AnchorY string outer ${Me.Y}
/declare AnchorX string outer ${Me.X}
/declare AnchorZ string outer ${Me.Z}
|------------------------------------------------------------|
/if (${UseEQBC}) /bccmd connect ${EQBCServerAddr} ${EQBCPort} ${EQBCPassword}
CHATMETHOD Variables Declared Successfully.
/return

Sub SetAnchor
/varset AnchorX ${Me.X}
/varset AnchorY ${Me.Y}
/varset AnchorZ ${Me.Z}
/return

Sub Move(int X, int Y, int Z, int StopDist)
:LetsRoll
/if (${Navigation.MeshLoaded} && !${Navigation.Active}) /nav locxyz ${X} ${Y} ${Z}
/delay 1s
/if (${Math.Distance[${X},${Y},${Z}:${Me.X},${Me.Y},${Me.Z}]}<=${StopDist}) /goto :LetsRoll
/if (${Navigation.Active}) /goto :LetsRoll
/return

Sub AdvPathMove(string FileName, int StopDist)
:LetsRoll
/if (${AdvPath.Active} && !${AdvPath.Playing}) /play ${FileName} smart
/delay 1s
/if (${AdvPath.Playing}) /goto :LetsRoll
/return

Sub KillAllNear
:FindTarget

/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0) {
/if (${AdvPath.Playing}) /nav pause
/echo Mobs Found!
/target id ${NearestSpawn[npc targetable los radius ${AggroRadius} zradius ${ZAggroRadius} noalert 3].ID}
/delay 5s ${Target.ID}
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<${AggroRadius} && ${Target.LineOfSight}) /goto :LockedOn
/goto :FindTarget
} else {
/return
}

:LockedOn
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /attack on
/if (${Target.Type.Equal[NPC]} && ${Target.Distance}<=${AggroRadius} && !${Me.Pet.Combat} && ${Target.Type.Equal[NPC]} && ${Target.Distance} <= 20) /pet attack
/if (${Me.AltAbilityReady[Force of Elements]} && !${Target.Type.Equal["corpse"]}) /alt act 8800
/if (${Me.PctHPs}<=50 && ${Me.AltAbilityReady[${Elemental Ward}]}) /alt act 2060
/delay 1s
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} > 0 && !${Target.ID}) /goto :FindTarget
/if (${SpawnCount[npc los radius ${AggroRadius} zradius ${ZAggroRadius}]} == 0 && !${Target.ID}) /goto :ExitSub
/if (!${Target.Type.Equal[NPC]} || !${Target.ID}) /goto :FindTarget
/goto :LockedOn

:ExitSub
/nav stop
/retur
- - - Updated - - -

Oh, and by the way. I'm sure there are a whole heap of entries in my last post that don't even need to be there now. I was purely modifying existing code to try to get what I want.
 
#38
Well, I modified things to use /nav spawn instead, which takes all the guesswork out of finding locations. I think it's a bloody good change, but there's definitely some things that it's doing wrong (picking up the combat routine whilst moving for one thing) and sometimes it has a mob targeted but not on xtarget and hangs until you clear the target.
Unless you had an affinity for this macro I'd recommend starting your character on the second floor with a radius of 1250 and Zradius of 90 using Kissassist and just letting him kill with Pullerpettank.


When I farmed Riftseeker's for Artisan's Prize I either just used Kissassist or I used this version of the Riftseeker's Macro:

With the macro below you'll just about get to Riftseeker's from Wall of slaughter without intervention and assuming you're a PET class - as long as you turn pet hold OFF (or make sure it's off, this macro turns it off) then this should work. It runs throughout all of riftseekers, to each floor and holds long enough for a level 105 mage pet to kill everything. Unless they offset the entire zone at one point it should *always* work.

The macro you're fucking with and trying to get work I spent days building and i couldn't even get it to run 1 full cycle without fucking up so I eventually just fell back onto the first version I made which is the one below.


Rich (BB code):
-------------
Riftseekers' Sanctum Farming Macro
----------**|

Sub Main
	 /if (${Zone.ShortName.Equal[wallofslaughter]}) /call WallofSlaughter
	 /if (${Zone.ShortName.Equal[provinggrounds]}) /call MPG
	 /if (${Zone.ShortName.Equal[Riftseekers]}) /call Riftseekers


	/if (${Me.Combat}) /call attack

Sub WallofSlaughter

	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/delay 5s
	/moveto loc 14 -784
	/delay 4s
	/moveto loc 203 -558
	/delay 15s
	/moveto loc 763 -537
	/delay 20s
	/moveto loc 1336 -1071
	/delay 30s
	/moveto loc 1592 -1319
	/delay 15s
	/moveto loc 1905 -1630
	/delay 15s
	/moveto loc 1983 -1629
	/delay 5s
	/moveto loc 1984 -1695
	/delay 1s
	/doortarget MAZEDOOR
	/keypress u
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/click left door
	/delay 60s ${Zone.ShortName.Equal[provinggrounds]}==TRUE
/return

Sub MPG

	/echo I am in Muramite Proving Grounds now. Time to navigate this shit hole. Took like fucking 45min to do all these locations.
	/call Transport
	/moveto loc -5746 -38
	/delay 5s
	/moveto loc -5466 121
	/delay 10s
	/moveto loc -5397 -1
	/delay 5s
	/moveto loc -5256 84
	/delay 5s
	/moveto loc -5187 -43
	/delay 5s
	/moveto loc -5309 -105
	/delay 7s
	/moveto loc -5175 -342
	/echo The first tunnel area
	/delay 7s
	/moveto loc -4928 -223
	/delay 10s
	/moveto loc -4787 -524
	/delay 10s
	/moveto loc -4659 -526
	/delay 7s
	/moveto loc -4652 -382
	/delay 7s
	/moveto loc -4513 -386
	/delay 7s
	/moveto loc -4509 -529
	/delay 8s
	/moveto loc -4267 -528
	/echo Long stretch in middle of twisty area
	/delay 15s
	/moveto loc -4255 -396
	/delay 7s
	/moveto loc -3941 -386
	/delay 7s
	/moveto loc -3858 -284
	/delay 7s
	/moveto loc -3760 -20
	/delay 7s
	/moveto loc -3522 -20
	/echo after taskmaster cai
	/delay 7s
	/moveto loc -3517 -160
	/delay 7s
	/moveto loc -3382 -150
	/delay 10s
	/moveto loc -3382 8
	/delay 10s
	/moveto loc -3253 9
	/delay 10s
	/moveto loc -3048 162
	/delay 15s
	/moveto loc -2941 170
	/delay 10s
	/moveto loc -2884 84
	/delay 10s
	/moveto loc -2853 -86
	/delay 10s
	/moveto loc -2753 -205
	/echo start of quicker timers
	/delay 7s
	/moveto loc -2735 -294
	/delay 7s
	/moveto loc -2678 -319
	/delay 7s
	/moveto loc -2583 -303
	/delay 7s
	/moveto loc -2580 -174
	/delay 7s
	/moveto loc -2526 -183
	/delay 7s
	/moveto loc -2443 -182
	/delay 7s
	/moveto loc -2440 -324
	/delay 7s
	/moveto loc -2275 -329
	/delay 7s
	/moveto loc -2257 -370
	/delay 7s
	/moveto loc -2108 -378
	/delay 7s
	/moveto loc -2099 -530
	/delay 7s
	/moveto loc -1967 -539
	/delay 7s
	/moveto loc -1960 -584
	/delay 7s
	/moveto loc -1970 -677
	/delay 7s
	/moveto loc -2111 -677
	/delay 7s
	/moveto loc -2114 -837
	/delay 7s
	/moveto loc -2262 -836
	/delay 7s
	/moveto loc -2264 -711
	/delay 7s
	/moveto loc -2401 -712
	/delay 7s
	/moveto loc -2404 -842
	/delay 10s
	/moveto loc -2499 -849
	/delay 1s
	/doortarget CT_Crystal
	/click left door
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/keypress u
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/return

Sub Riftseekers

	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers



Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/delay 5s
	/moveto loc 274 -167
	/delay 10s
	/moveto loc 493 -366
	/delay 10s
	/moveto loc 361 -426
	/delay 10s
	/moveto loc 68 -328
	/delay 10s
	/moveto loc 35 -456
	/delay 10s
	/moveto loc 170 -565
	/delay 10s
	/moveto loc 400 -573
	/delay 10s
	/moveto loc 401 -765
	/delay 10s
	/moveto loc 628 -768
	/delay 20s
	/echo In a room - edit fight
	/moveto loc 401 -765
	/delay 20s
	/moveto loc 400 -941
	/delay 20s
	/moveto loc 209 -925
	/delay 20s
	/moveto loc 98 -826
	/delay 20s
	/moveto loc -114 -860
	/delay 20s
	/moveto loc -282 -792
	/delay 20s
	/moveto loc -195 -1016
	/delay 20s
	/echo I GET STUCK IN THIS AREA A BIT, MAKE MORE /MOVE TOS TO NAVIGATE THIS TURN
	/moveto loc -154 -1199
	/delay 20s
	/moveto loc -58 -1250
	/delay 20s
	/moveto loc 180 -1240
	/delay 20s
	/moveto loc 175 -1475
	/delay 20s
	/moveto loc 237 -1569
	/delay 20s
	/moveto loc 435 -1580
	/delay 20s
	/moveto loc 521 -1482
	/delay 20s
	/moveto loc 471 -1398
	/delay 20s
	/moveto loc 402 -1323
	/delay 20s
	/moveto loc 401 -1169
	/delay 20s
	/moveto loc 630 -1167
	/delay 20s
	/moveto loc 814 -1167
	/delay 20s
	/moveto loc 911 -1086
	/delay 20s
	/moveto loc 1150 -1055
	/delay 10s
	/alt act 60
	/delay 15s
	/moveto loc 1156 -733
	/delay 10s
	/moveto loc 1284 -581
	/delay 20s
	/moveto loc 1151 -490
	/delay 20s
	/moveto loc 1160 -272
	/delay 10s
	/moveto loc 1317 -92
	/echo Room with mobs in it
	/delay 20s
	/moveto loc 1440 -181
	/delay 20s
	/moveto loc 1555 -287
	/delay 10s
	/moveto loc 1617 -346
	/delay 10s
	/moveto loc 1747 -333
	/delay 15s
	/moveto loc 1728 8
	/delay 9s
	/moveto loc 1725 77
	/delay 9s
	/moveto loc 1783 197
	/echo Room with a lot of mobs in it, you havent even agro'd them all yet!
	/delay 20s
	/moveto loc 1775 313
	/delay 20s
	/moveto loc 1504 246
	/delay 20s
	/moveto loc 1349 240
	/delay 20s
	/moveto loc 1221 216
	/delay 10s
	/moveto loc 1137 130
	/delay 10s
	/moveto loc 997 258
	/delay 10s
	/moveto loc 862 257
	/delay 20s
	/moveto loc 692  107
	/delay 20s
	/moveto loc 577 203
	/delay 10s
	/moveto loc 388 206
	/delay 10s
	/moveto loc 280 202
	/delay 10s
	/moveto loc 214 405
	/delay 10s
	/moveto loc 220 619
	/delay 10s
	/moveto loc 225 1
	/delay 25s
	/moveto loc 226 -218
	/delay 10s
	/moveto loc 211 74
	/delay 10s
	/moveto loc 15 211
	/delay 10s
	/call LeaveUpper
/return

Sub LeaveUpper

	/echo I have cleared everything there is to clear in Upper Riftseekers, it is time to leave - I am heading out.
	/delay 1s
	/moveto loc 24 205
	/delay 10s
	/moveto loc 221 126
	/delay 10s
	/moveto loc 326 206
	/delay 10s
	/moveto loc 589 203
	/delay 10s
	/moveto loc 742 50
	/delay 5s
	/moveto loc 793 -1
	/delay 10s
	/moveto loc 787 -184
	/delay 10s
	/moveto loc 571 -179
	/echo Room with 6 mobs OMG FTFO
	/alt act 2060
	/delay 30s
	/moveto loc 787 -184
	/delay 10s
	/moveto loc 792 -315
	/delay 10s
	/moveto loc 685 -482
	/delay 5s
	/moveto loc 605 -545
	/delay 10s
	/moveto loc 416 -581
	/delay 10s
	/moveto loc 281 -572
	/delay 5s
	/moveto loc 136 -547
	/delay 10s
	/moveto loc 37 -443
	/delay 10s
	/moveto loc 84 -347
	/delay 10s
	/moveto loc 266 -423
	/delay 10s
	/moveto loc 491 -379
	/delay 10s
	/moveto loc 442 5
	/echo We have finished leaving Upper Riftseekers


/return


Sub GroundLevel

	/call Pet
	/delay 1s
	/echo Clearing the ground floor
	/moveto loc 493 -7
	/delay 10s
	/moveto loc 720 73
	/delay 10s
	/moveto loc 585 282
	/delay 10s
	/echo Room with 3 mobs
	/moveto loc 779 476
	/delay 10s
	/moveto loc 868 387
	/delay 10s
	/moveto loc 950 304
	/delay 10s
	/moveto loc 990 197
	/delay 10s
	/moveto loc 996 -3
	/delay 10s
	/moveto loc 997 -182
	/delay 10s
	/moveto loc 938 -329
	/delay 10s
	/moveto loc 776 -479
	/delay 15s
	/moveto loc 684 -573
	/delay 10s
	/moveto loc 580 -672
	/delay 5s
	/moveto loc 389 -698
	/delay 5s
	/moveto loc 298 -704
	/delay 7s
	/moveto loc 206 -701
	/delay 7s
	/moveto loc 92 -695
	/delay 7s
	/moveto loc -18 -639
	/delay 7s
	/moveto loc -112 -556
	/delay 5s
	/moveto loc -188 -490
	/delay 7s
	/moveto loc -274 -572
	/delay 7s
	/moveto loc -392 -692
	/delay 7s
	/moveto loc -499 -611
	/delay 4s
	/moveto loc -580 -525
	/delay 4s
	/moveto loc -575 -414
	/delay 7s
	/moveto loc -456 -265
	/delay 7s
	/moveto loc -441 -99
	/delay 5s
	/moveto loc -445 -4
	/delay 5s
	/moveto loc -444 93
	/delay 7s
	/moveto loc -444 246
	/delay 5s
	/moveto loc -496 358
	/delay 5s
	/moveto loc -573 451
	/delay 4s
	/moveto loc -569 525
	/delay 4s
	/moveto loc -523 622
	/delay 4s
	/moveto loc -443 660
	/delay 4s
	/moveto loc -344 647
	/delay 4s
	/moveto loc -208 506
	/delay 5s
	/moveto loc -91 390
	/delay 5s
	/moveto loc 1 297
	/delay 10s
	/moveto loc 179 150
	/delay 10s
	/moveto loc 390 72
	/delay 10s
	/moveto loc 468 5

/return

Sub LowerRiftseekers

	/call pet
	/delay 1s
	/moveto loc 467 1
	/delay 10s
	/moveto loc 446 119
	/delay 9s
	/moveto loc 426 257
	/delay 9s
	/moveto loc 482 363
	/delay 7s
	/moveto loc 318 413
	/delay 7s
	/moveto loc 186 405
	/delay 7s
	/moveto loc 183 456
	/delay 7s
	/moveto loc 235 570
	/delay 10s
	/moveto loc 134 807
	/delay 7s
	/moveto loc 129 930
	/delay 10s
	/moveto loc 252 1062
	/delay 9s
	/moveto loc 162 1164
	/delay 7s
	/moveto loc 142 1310
	/delay 7s
	/moveto loc 132 1406
	/delay 9s
	/moveto loc 147 1659
	/delay 9s
	/moveto loc 31 1750
	/delay 1s
		/tar a dragorn battlemaster
		/pet attack
		/hidecorpse all
	/delay 10s
	/moveto loc 130 1774
	/delay 10s
	/moveto loc 348 1664
	/delay 10s
	/moveto loc 615 1671
	/delay 7s
	/moveto loc 769 1675
	/delay 7s
	/moveto loc 853 1677
	/delay 7s
	/moveto loc 937 1635
	/delay 10s
	/moveto loc 961 1500
	/delay 7s
	/moveto loc 1036 1423
	/delay 7s
	/moveto loc 1163 1424
	/delay 10s
	/moveto loc 1286 1518
	/delay 7s
	/moveto loc 1411 1495
	/delay 7s
	/moveto loc 1476 1401
	/delay 10s
	/moveto loc 1476 1171
	/delay 20s
	/moveto loc 1391 1091
	/delay 15s
	/alt act 60
	/delay 20s
	/moveto loc 1219 1083
	/delay 9s
	/moveto loc 1104 1078
	/delay 9s
	/moveto loc 969 948
	/delay 10s
	/moveto loc 892 1093
	/delay 10s
	/moveto loc 770 1091
	/delay 7s
	/moveto loc 653 1090
	/delay 10s
	/moveto loc 563 1186
	/delay 10s
	/moveto loc 476 1282
	/delay 15s
	/moveto loc 563 1186
	/delay 10s
	/moveto loc 653 1090
	/delay 10s
	/moveto loc 770 1091
	/delay 10s
	/moveto loc 996 1002
	/delay 10s
	/moveto loc 1142 1052
	/delay 5s
	/moveto loc 1193 1086
	/delay 10s
	/moveto loc 1370 1088
	/delay 10s
	/moveto loc 1470 967
	/delay 7s
	/moveto loc 1470 849
	/delay 7s
	/moveto loc 1559 743
	/delay 15s
	/moveto loc 1569 557
	/delay 10s
	/moveto loc 1560 458
	/delay 9s
	/moveto loc 1555 332
	/delay 10s
	/moveto loc 1316 333
	/delay 9s
	/moveto loc 1315 178
	/delay 9s
	/moveto loc 1224 22
	/delay 9s
	/moveto loc 1235 -125
	/delay 15s
	/moveto loc 1348 -271
	/delay 9s
	/moveto loc 1435 -263
	/delay 9s
	/moveto loc 1557 -251
	/delay 10s
	/moveto loc 1629 -159
	/delay 9s
	/moveto loc 1636 -49
	/delay 10s
	/moveto loc 1639 101
	/delay 10s
	/moveto loc 1636 -49
	/delay 9s
	/moveto loc 1629 -159
	/delay 10s
	/moveto loc 1557 -251 
	/delay 10s
	/moveto loc 1435 -263
	/delay 13s
	/moveto loc 1229 -155
	/delay 5s
	/moveto loc 1227 -46
	/delay 12s
	/moveto loc 1224 45
	/delay 12s
	/moveto loc 1314 152
	/delay 12s
	/moveto loc 1315 329
	/delay 12s
	/moveto loc 1160 336
	/delay 12s
	/moveto loc 1157 463
	/delay 12s
	/moveto loc 1153 552
	/delay 12s
	/moveto loc 1163 340
	/delay 12s
	/moveto loc 964 330
	/delay 12s
	/moveto loc 952 136
	/delay 12s
	/moveto loc 892 13
	/delay 8s
	/moveto loc 802 -40
	/delay 5s
	/echo On approach to the final rooms on the bottom floor
	/moveto loc 679 -54
	/delay 15s
	/moveto loc 340 -48
	/delay 15s
	/moveto loc 85 -46
	/delay 15s
	/moveto loc 81 177
	/delay 15s
	/moveto loc 79 -264
	/delay 10s
	/moveto loc 79 -44
	/delay 10s
	/call LeaveLower


/return







Sub LeaveLower

	/moveto loc 78 -49
	/delay 10s
	/moveto loc 239 -49
	/delay 10s
	/moveto loc 440 -49
	/delay 10s
	/moveto loc 614 -51
	/delay 10s
	/moveto loc 719 -55
	/delay 10s
	/moveto loc 780 -52
	/delay 10s
	/moveto loc 853 -24
	/echo STAIRS LEAVE TIMERS SHORT
	/delay 5s
	/moveto loc 912 44
	/delay 5s
	/moveto loc 944 111
	/delay 5s
	/moveto loc 963 184
	/delay 5s
	/moveto loc 959 237
	/delay 10s
	/moveto loc 956 443
	/delay 10s
	/moveto loc 955 519
	/delay 10s
	/moveto loc 862 611
	/delay 10s
	/moveto loc 756 717
	/delay 10s
	/moveto loc 659 718
	/delay 10s
	/moveto loc 571 714
	/delay 10s
	/moveto loc 568 503
	/delay 30s
	/moveto loc 571 714
	/delay 10s
	/moveto loc 411 724
	/delay 10s
	/moveto loc 338 679
	/delay 10s
	/moveto loc 270 629
	/delay 5s
	/moveto loc 206 547
	/delay 10s
	/moveto loc 172 464
	/delay 10s
	/moveto loc 183 402
	/delay 10s
	/moveto loc 362 409
	/delay 10s
	/moveto loc 486 338
	/delay 10s
	/moveto loc 478 178
	/call UpperRiftseekers

/return



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




Sub Pet

	/echo I am now buffing my pet up
	/delay 1s
	/pet hold off
	/delay 1s
	/pet ghold off
	/delay 1s
	/cast 9
	/delay 7s
	/cast 10
	/delay 7s
	/alt act 323
	/delay 7s
	/alt act 852

/return

Sub Transport

	/echo Getting ready to run across an unfriendly zone
	/delay 1s
	/alt act 1210
	/delay 1s
	/pet hold off
	/delay 1s
	/pet ghold off
	/delay 1s

/return	


Sub Cauldron


	/if (${FindItem[Cauldron of Countless Goods].Timer}) /return
	/echo Using Cauldron of Countless Goods. Hopefully I get something good!!
	/nomodkey /itemnotify "${FindItem[Cauldron of Countless Goods]}" rightmouseup
	/delay 25s
	/autoi
/return
 

saar

New member
RedCents
2,553¢
#39
I was looking at the one you posted prior to my response, and like you said "this was a learning" experience from your point of view(trying to code a macro your self) I put my 2cents in, and it was not a waste of time if sometime down the line someone looked at this post they might learn a couple things. When it comes to coding there is many ways to do it, clean codes, messed up codes, elegant bloated. But in the end its what you want it to do, does it do what you want, and is it fast enough for what you want. You can view many different macros and all are different in execution but will manage the same thing.
 
Top