• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Question - Trying to make a basic macro that runs around and kills shit... (1 Viewer)

Joined
Jul 1, 2015
RedCents
9,002¢
...but right now all it does is run around.

Ultimately I am trying to make farming tradeskill mats for artisan's prize easier. Kissassist is total overkill for doing it so I wanted to make it attack on my own. Right now what I am trying to do is make it so when the character enters combat it begins the Attack subroutine and when he exits combat it ends that subroutine. For some reason though the macro is refusing to do what I would like it to do.

Can anyone assist?


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

Sub Main

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

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack

/return

:loop

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Sub Riftseekers

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers

/return

Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
	/delay 500s
	/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 250s
	/play LeaveUpper
	/echo We have finished leaving Upper Riftseekers
	/delay 200s

/return


Sub GroundLevel

	/call Pet
	/delay 1s
	/echo Clearing the ground floor
	/play Ground
	/delay 300s

/return

Sub LowerRiftseekers

	/call pet
	/play LowerRiftseekers

/return


Sub LeaveLower

	/call pet
	/play LeaveLower

/return


Sub WallofSlaughter

	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/delay 5s
	/path PortintoMPG
	/delay 60s
	/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
	/path MPGtoRiftseekers
	/delay 60s
	/doortarget CT_Crystal
	/click left door
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/keypress u
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/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 3s

/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 Attack

	/echo Letting you know I called Attack Rotation (when I finally see this fucking echo im going to squeal with joy)
	/afollow pause
	/clear target
	/delay 1s
	/target npc

	/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
	/hidecorpse all
	/if (${Me.CombatState.NotEqual[COMBAT]}) /afollow unpause
	/if (${Me.CombatState.NotEqual[COMBAT]}) /return



Sub Cauldron

	/if (${FindItem[Cauldron of Countless Goods].RecastTimer} !< 0) /broken
	/echo Using Cauldron of Countless Goods. Hopefully I get something good!!
	/nomodkey /itemnotify "${FindItem[Cauldron of Countless Goods]}" rightmouseup
	/delay 25s
	/autoi
/return
 
Rich (BB code):
Sub Main

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

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack

/return

:loop

Not sure why you have loop in there twice, and not really seeing where it would loop. Most macros I have seen have a "Mainloop" and "/goto Mainloop" or something similiar. Else, what is the main loop "/return"ing to?

Your attack sub has a conditional return. If that condition is not met though, there is no command for it to leave the sub routine, and would appear to overflow into the next sub.

That is what pops out at first glance anyways, but I am no macro writer.. I just tinker =)
 
Rich (BB code):
Sub Main

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

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack

/return

:loop

Not sure why you have loop in there twice, and not really seeing where it would loop. Most macros I have seen have a "Mainloop" and "/goto Mainloop" or something similiar. Else, what is the main loop "/return"ing to?

Your attack sub has a conditional return. If that condition is not met though, there is no command for it to leave the sub routine, and would appear to overflow into the next sub.

That is what pops out at first glance anyways, but I am no macro writer.. I just tinker =)

I put loop in there to try and make it do what it wasn't doing. - I am tinkering too and a lot of the stuff in this macro is in there to see what/if it would do.

I'll handle all flaws with the attack routine once I make it to that routine. I haven't even had the /echo go off yet so I haven't seen if the code in there will work, will stay or will even do what I want
 
My reading of the code seems that you are only checking if you are in combat when you first enter riftseekers and when you are done with that subroutine.

Indeed this is my thought as well. Though I don't know how to tell it to prioritize this line of code and that's kind of what I am trying to figure out. That's why the loop is in there. I thought maybe if I looped that line of code it would give all lines of code in that loop utmost priority. It didn't though =(

I'd like the macro to essentially work like this... If you're in combat, run sub Attack - if you aren't in combat do whatever you were doing.

So, my sub routine of Attack and the line of code that initiates it will take utmost priority over everything else.

I am unsure how to achieve this goal though.
 
You need to change this bit of code
Rich (BB code):
Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
	/delay 500s
	/call LeaveUpper
/return

Into something where instead of just delaying while you path around the zone you check if your in combat so something like this

Rich (BB code):
Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
:pathloop
	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
        /if (check if path is done however you want) 	/call LeaveUpper
/goto :pathloop	
/return
 
You need to change this bit of code
Rich (BB code):
Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
	/delay 500s
	/call LeaveUpper
/return

Into something where instead of just delaying while you path around the zone you check if your in combat so something like this

Rich (BB code):
Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
:pathloop
	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
        /if (check if path is done however you want) 	/call LeaveUpper
/goto :pathloop	
/return

[video=youtube;EqWRaAF6_WY]https://www.youtube.com/watch?v=EqWRaAF6_WY[/video]

- - - Updated - - -

I got it to work for a little while, enough to where it entered that routine and I made another routine for it when combat ends. It kept giving me a double positive/false error so that seemed like the best way. It worked great but it super spammed my windows. They flashed and went blank each time it would get into combat like it does when you have your map open and a ton of shit is running/loaded.

Then suddenly shit just stopped working. Now I can't get it to enter into the attack rotation no matte what I do again *sigh* here's my code:

Rich (BB code):
-------------
Riftseekers' Sanctum "Pyrilen Flame" 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

:mainloop

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/if (${Me.CombatState.Equal[RESTING]}) /call EndFight

	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers
	
/goto :mainloop

/return

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Sub Riftseekers

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers

/return

Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
	/delay 500s
	/call LeaveUpper

/return

Sub GroundLevel

	/call Pet
	/delay 25s
	/echo Clearing the ground floor
	/play Ground
	/delay 300s

/return

Sub LowerRiftseekers

	/call pet
	/play LowerRiftseekers
	/delay 500s
	/echo Finished clearing Lower
	/play LeaveLower

/return


Sub LeaveLower

	/call pet
	/play LeaveLower

/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 350s
	/play LeaveUpper
	/echo We have finished leaving Upper Riftseekers
	/delay 300s

/return


Sub WallofSlaughter

	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/delay 20s
	/play PortintoMPG
	/delay 60s
	/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
	/doortarget CT_Crystal
	/click left door
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/keypress u
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/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 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 Attack

	/echo in attack rotation
	/if (${Me.CombatState.Equal[COMBAT]}) /afollow pause
	/if (${NearestSpawn[NPC los targetable].Distance}<160) /target ${NearestSpawn[NPC los targetable]}) /cast 3
	/hidecorpse all

	/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

/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

Sub EndFight

	/if (${Me.CombatState.Equal[Cooldown]}) /squelch /afollow unpause

/return
 
Last edited:
I'll take a look and mod tomorrow

But fundamentally I think you are close, just thinking about macros wrong

Create a loop in submain that is a bunch of checks and keep running that loop over and over

Think of a sub like a peon/worker/person that you give jobs (call them to do the job)

Write a sub to do basically 1 'job', if it is a string of job's you make multiple subs (aka jobs) to do things specifically and you call those till you want to go back to your main loop

Rich (BB code):
|**
The above and below line is how you can comment code
You can put a bunch of lines or crap in between |** CRAP HERE **|
**|

| You can also use just | per line like this
| line 1 comment
| line 2 comment

Sub Main

:loop
 /if (some crap is happening) /call subJOB-doCrap1
 /if (some other crap is happening) /call subJOB-doCrap2
 /if (some other other crap is happening) /call subJOB-doCrap2
 /if (all is cool then go back to loop!) /goto :loop

/end macro <--- this is basically the 'shits not cool lets stop fucking around and abandon ship!'


Generically I would structure what you are trying to do like this

Rich (BB code):
| Farming whatever zone thing.mac

sub Main
 :1-time-setup-before-loop
 /do some cool shit
 /do more cool shit

 :loop
 /if ( I am in upperZone ) /call farmUpperZone
 /if (I am in lowerZone ) /call farmLowerZone
 /if ( I am in upperZone || I am in lowerZone && everything is cool) /goto :loop
/end

sub killShit
  /if (i got aggro) /killstuff
/return

sub farmUpperZone
 /if (I have aggro) /call killShit
 /play path-upper-1
 /if (I have aggro) /call killShit
 /play path-upper-2
 /if (I have aggro) /call killShit
 /call goToLowerZone
/return

sub farmLowerZone
 /if (I have aggro) /call killShit
 /play path-Lower-1
 /if (I have aggro) /call killShit
 /play path-Lower-2
 /if (I have aggro) /call killShit
 /call goToUpperZone
/return

sub goToLowerZone
 /play path-to-lower-from-upper
 /do whatever else
/return

sub goToUpperZone
 /play path-to-upper-from-lower
 /do whatever else
/return
 
Last edited:
I'll take a look and mod tomorrow

But fundamentally I think you are close, just thinking about macros wrong

Create a loop in submain that is a bunch of checks and keep running that loop over and over

Think of a sub like a peon/worker/person that you give jobs (call them to do the job)

Write a sub to do basically 1 'job', if it is a string of job's you make multiple subs (aka jobs) to do things specifically and you call those till you want to go back to your main loop

Rich (BB code):
|**
The above and below line is how you can comment code
You can put a bunch of lines or crap in between |** CRAP HERE **|
**|

| You can also use just | per line like this
| line 1 comment
| line 2 comment

Sub Main

:loop
 /if (some crap is happening) /call subJOB-doCrap1
 /if (some other crap is happening) /call subJOB-doCrap2
 /if (some other other crap is happening) /call subJOB-doCrap2
 /if (all is cool then go back to loop!) /goto :loop

/end macro <--- this is basically the 'shits not cool lets stop fucking around and abandon ship!'

That's how it will look once it is finished, sure. I think people keep assuming I am trying to put out a professional product and not learn how to write macros. Someone learning how to write macros isn't going to have the neatest code there is, especially on their second macro and before it is even finished/while they are stuck tinkering.

Right now I have the macro organized exactly how you say - just instead of it being in "main" it's in the first Riftseekers. That *should* be the main loop that the macro runs and calls all other parts of the macro to fulfill that main loop. I will reformat the whole macro.... Once it works the way I would like it to =P

Right now this is the entire macro (if it would just fucking work)

Rich (BB code):
Sub Riftseekers

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers

/return

But it refuses to call the attack routine UNLESS I put the attack routine IN the :pathloop. Like seen here:

Rich (BB code):
:pathloop
	/if (${Me.XTarget}==1) /afollow pause /squelch
	/if (${Me.XTarget}==1) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/if (!${AdvPath.NextWaypoint}=1140) /call LeaveUpper
/goto :pathloop

/return

Also I noticed checking the extended worked better than If I get agro /call attack. It seemed much more reliable. When it works like this though it runs into a lot of weird issues. First off, it seems like you spam /pause /unpause too much on /afollow it just turns off /afollow. I don't know if this is the actual cause but rarely did my chars finish farming even 1 floor of riftseekers before the macro breaks now. Shit, it was more reliable with moveto loc points than the advnav for now.


After last night's tinkering here is what I have:

Rich (BB code):
-------------
Riftseekers' Sanctum "Pyrilen Flame" 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.CombatState.Equal[COMBAT]}) /call Attack
	/if (${Me.CombatState.Equal[RESTING]}) /call EndFight

	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers
	

/return

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Sub Riftseekers

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/call UpperRiftseekers
	/call Groundlevel
	/call LowerRiftseekers

/return

Sub UpperRiftSeekers

	/echo I am in RiftSeekers Sanctum, I am going to clear Upper Riftseekers first
	/call cauldron
	/call pet
	/autoi
	/echo Starting
	/play UpperRiftseekers
:pathloop
	/if (${Me.XTarget}==1) /afollow pause /squelch
	/if (${Me.XTarget}==1) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/if (!${AdvPath.NextWaypoint}=1140) /call LeaveUpper
/goto :pathloop

/return

Sub GroundLevel

	/call Pet
	/delay 25s
	/echo Clearing the ground floor
	/play Ground
:pathloop
	/if (${Me.XTarget}==1) /afollow pause /squelch
	/if (${Me.XTarget}==1) /call Attack
	/if (!${Me.CombatState.Equal[COMBAT]}) /call EndFight
	/if (!${AdvPath.NextWaypoint}=1140) /call LowerRiftseekers
/goto :pathloop
	/delay 300s

/return

Sub LowerRiftseekers

	/call pet
	/play LowerRiftseekers
	/delay 500s
	/echo Finished clearing Lower
	/play LeaveLower

/return


Sub LeaveLower

	/call pet
	/play LeaveLower

/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 350s
	/play LeaveUpper
	/echo We have finished leaving Upper Riftseekers
	/delay 300s

/return


Sub WallofSlaughter

	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/delay 20s
	/play PortintoMPG
	/delay 60s
	/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
	/doortarget CT_Crystal
	/click left door
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/keypress u
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/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 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 Attack

	/target npc
	/squelch /delay 1s
	/pet attack
	/cast 3

/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

Sub EndFight

	/if (${Me.CombatState.Equal[COOLDOWN]}) /squelch /afollow unpause
	/if (${Me.CombatState.Equal[ACTIVE]}) /squelch /afollow unpause

/return
 
Can I make a small suggestion to your Attack subroutine? This should keep it in the Attack subroutine like you want until there are no longer mobs near.

Your Code:
Rich (BB code):
Sub Attack

	/echo Letting you know I called Attack Rotation (when I finally see this fucking echo im going to squeal with joy)
	/afollow pause
	/clear target
	/delay 1s
	/target npc

	/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
	/hidecorpse all
	/if (${Me.CombatState.NotEqual[COMBAT]}) /afollow unpause
	/if (${Me.CombatState.NotEqual[COMBAT]}) /return

/return

Suggestion:
Rich (BB code):
/declare AggroRadius int outer 200
/declare ZAggroRadius int outer 10
Sub Attack
/echo Letting you know I called Attack Rotation (when I finally see this fucking echo im going to squeal with joy)
/afollow pause

: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
/afollow unpause
/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

Change your Sub Main to...
Rich (BB code):
Sub Main

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

	/call Attack
/delay 5
/goto :MainLoop 
/return
 
Can I make a small suggestion to your Attack subroutine?

With it just having "/call Attack" it doesn't seem to be calling attack when I get into combat, but that should be a change I can fix on my own.

Your overall changes to my attack subroutine helped a ton. I honestly had a feeling the issue I was facing had to do with declares or rather, declaring shit and making it more complicated would put me on the right track I should say.

http://www.macroquest2.com/wiki/index.php/Declare

http://www.macroquest2.com/wiki/index.php/MQ2DataVars

Only have minimal examples on what a declare can do and I see macros on this website with like .... 30 - 50 different declares sometimes. I really wish it had more examples of what a declare can do because they seem a lot more important than the wiki makes them out to be =P


Edit - I think mq2advnav just refuses to call forth another subroutine unless you put it in a :pathloop right after the path. Even with the attack subroutine in the main sub it refuses to call it. I am going to put it back into :pathloop and see if that works if it does.... Then is seriously the only way to call forth a subroutine while using Mq2nav to put it into a :pathloop with it? That seems a bit archaic of a design for a plugin so many people use.
 
That's how it will look once it is finished, sure. I think people keep assuming I am trying to put out a professional product and not learn how to write macros. Someone learning how to write macros isn't going to have the neatest code there is, especially on their second macro and before it is even finished/while they are stuck tinkering.

Right now I have the macro organized exactly how you say - just instead of it being in "main" it's in the first Riftseekers. That *should* be the main loop that the macro runs and calls all other parts of the macro to fulfill that main loop. I will reformat the whole macro.... Once it works the way I would like it to =P

Right now this is the entire macro (if it would just fucking work)

Yea sorry, I was thinking this was about learning but I explained myself wrong.

My point about sub's and calling them for jobs is actually critical when building things because it lets you figure out what is messed up in a slice and lets you incrementally make the thing work properly.
If you do not split things up like this it usually takes longer (at least for me) because you are dealing with all the other nuances

The other thing I commonly do is t.mac !

I keep this open usually and try to figure out one little nugget of something that is not working properly in my macro by copying the absolutle minimal required from my main macro into t.mac (usually just 1 sub or maybe a chain of subs) and testing t.mac over and over until that exact thing works out well
It is very hard to try to debug a full macro but very easy to debug just a small portion not only because less code but also you can control your EQ char to keep repeating that exact thing over and over without having to wait for the rest of your main macro to work =)

Like the other day i was playing with /for loops and declares so this is what is currently in my t.mac (may give you a hint on importance of /declares!)
And wondering if I could use a for loop to increment a declare by nesting a # like 1 to 5
This is for a bigger macro I was making to try to powerlevel 1-5 characters so I needed a way to cycle thru those characters to add them to a group for example

Rich (BB code):
| t.mac , testing stuff

sub main
	/declare pcEXPCount string outer "5"
	/declare pcEXP1 string outer "bob"
	/declare pcEXP2 string outer "sue"
	/declare pcEXP3 string outer "john"
	/declare pcEXP4 string outer "phil"
	/declare pcEXP5 string outer "amy"	
	/declare i int local
	/for i 1 to ${pcEXPCount}
		/echo ${i}
		/echo ${pcEXP${i}}
	/next i
/return

So a variable and using a declare to populate the variable is used so you can refer to that thing.... it makes it abstract basically
So I was planning to use /declares for character names in my macro, that way I only need to edit 1 spot for a new character.... like bob gets to level 105 now I made a new character called Joe, I just edit the /declare pcEXP1 that is set to bob and set it to Joe, and everything is perfect.

So I have 5 characters and I want to do something to each character.... instead of making a line for each of them I wanted to use a /for loop. I have used /for loops many times but I wasnt sure how to do that against pcEXP1 pcEXP2 pcEXP3 (since those are strings+numbers!) so i did testing and found I could declare i (for integer or #) and nest that in pcEXP{#} but first couple ways I tried my syntax was wrong so I used t.mac to figure it out
 
It seems to be one of those "if you know about them, they make sense... if you don't you shouldn't be messing with them" things I have run into before when asking about stuff. As in, it can be like pulling teeth getting some "usable to utter newbs" information, when I was struggling with starting out as well =)

I fully agree there ought to be a lot more examples on stuff in the wiki to help out folks. One reason I have been, from time to time, expanding on the wiki some. I will see if I can dredge up some stuff to put there, with some explanations on what is happening. If something doesn't appear soon, poke me a few times to wake up! Other folks are of course welcome to add to the wiki as well.
 
With it just having "/call Attack" it doesn't seem to be calling attack when I get into combat, but that should be a change I can fix on my own.

Your overall changes to my attack subroutine helped a ton. I honestly had a feeling the issue I was facing had to do with declares or rather, declaring shit and making it more complicated would put me on the right track I should say.

http://www.macroquest2.com/wiki/index.php/Declare

http://www.macroquest2.com/wiki/index.php/MQ2DataVars

Only have minimal examples on what a declare can do and I see macros on this website with like .... 30 - 50 different declares sometimes. I really wish it had more examples of what a declare can do because they seem a lot more important than the wiki makes them out to be =P


Edit - I think mq2advnav just refuses to call forth another subroutine unless you put it in a :pathloop right after the path. Even with the attack subroutine in the main sub it refuses to call it. I am going to put it back into :pathloop and see if that works if it does.... Then is seriously the only way to call forth a subroutine while using Mq2nav to put it into a :pathloop with it? That seems a bit archaic of a design for a plugin so many people use.

Let me know if you want help. I'll take a look at the full macro. I wrote a macro to just pull mobs awhile back as I didn't need to move at all. It would be pretty trivial to change it to path.

Onto declares.. I will do my best here. Below you'll find an some code as it was the best way I could think of to explain things. Basically though.. You can declare an outer anywhere and have it referenced freely by any other subroutine. A local on the other hand will only be accessible where it was declared. You'll notice things say NULL when it happens.

Rich (BB code):
|------------------------------------------------------------|
|          DeclareExample.mac
|
|      Last Modified by: TheDroidUrLookingFor
|
|		Version:	1.0.0
|
|------------------------------------------------------------|

|------------------------------------------------------------|
|          Main Rountine
|------------------------------------------------------------|
Sub Main
/declare StringGlobal string outer This will work from any subroutine.
/declare StringLocal string local This will work only from the subroutine where it was declared.

/declare IntGlobal string outer 9001
/declare IntLocal string local 5

/declare BoolGlobal string outer TRUE
/declare BoolLocal string local TRUE

/echo Global String: ${StringGlobal}
/echo Local String: ${StringLocal}

/echo Global Power Level: ${IntGlobal}
/echo zOMG its over 9000!
/echo Local Power Level:  ${IntLocal}
/echo Perhaps we should train more

/echo The Answer is 42: ${BoolGlobal}
/echo The Answer is 42: ${BoolLocal}

/call Declares

/echo Global String: ${SubStringGlobal}
/echo Local String: ${SubStringLocal}

/echo Global Power Level: ${SubIntGlobal}
/echo Local Power Level:  ${SubIntLocal}

/echo The Answer is 42: ${SubBoolGlobal}
/echo The Answer is 42: ${SubBoolLocal}
/return
|------------------------------------------------------------|
|          End Main Rountine
|------------------------------------------------------------|
|------------------------------------------------------------|
|          Declares Rountine
|------------------------------------------------------------|
Sub Declares
/declare SubStringGlobal string outer This will work from any subroutine.
/declare SubSubStringLocal string local This will work only from the subroutine where it was declared.

/declare SubIntGlobal string outer 9001
/declare SubIntLocal string local 5

/declare SubBoolGlobal string outer TRUE
/declare SubBoolLocal string local TRUE

/echo Global String: ${StringGlobal}
/echo Local String: ${StringLocal}

/echo Global Power Level: ${IntGlobal}
/echo zOMG its over 9000!
/echo Local Power Level:  ${IntLocal}
/echo Perhaps we should train more

/echo The Answer is 42: ${BoolGlobal}
/echo The Answer is 42: ${BoolLocal}

/echo Global String: ${SubStringGlobal}
/echo Local String: ${SubStringLocal}

/echo Global Power Level: ${SubIntGlobal}
/echo Local Power Level:  ${SubIntLocal}

/echo The Answer is 42: ${SubBoolGlobal}
/echo The Answer is 42: ${SubBoolLocal}
/return
|------------------------------------------------------------|
|          Declares Rountine
|------------------------------------------------------------|
 
Yea sorry, I was thinking this was about learning but I explained myself wrong.

My point about sub's and calling them for jobs is actually critical when building things because it lets you figure out what is messed up in a slice and lets you incrementally make the thing work properly.
If you do not split things up like this it usually takes longer (at least for me) because you are dealing with all the other nuances

The other thing I commonly do is t.mac !

I keep this open usually and try to figure out one little nugget of something that is not working properly in my macro by copying the absolutle minimal required from my main macro into t.mac (usually just 1 sub or maybe a chain of subs) and testing t.mac over and over until that exact thing works out well
It is very hard to try to debug a full macro but very easy to debug just a small portion not only because less code but also you can control your EQ char to keep repeating that exact thing over and over without having to wait for the rest of your main macro to work

I agree with you on the subs and I did break my macro up with a subroutine for each different activity (including leaving an area, instead of mapping an entire area then you running into an issue as you're returning to camp, each area + moving to a different area is its own subroutine for me). I do this in HTML too and organizing websites/their web pages. It is something you pick up pretty early on as a coder for that exact reason =P

When you're looking at this giant block of code, even if you wrote it - shit can be a total nightmare finding what you want and fixing it in a timely maner.

t.mac is a good idea too. Luckily I don';t have to dive very far into my macro to run into an error right now, I am still working on getting a seemless transition in and out of the attack rotation



It seems to be one of those "if you know about them, they make sense... if you don't you shouldn't be messing with them" things I have run into before when asking about stuff. As in, it can be like pulling teeth getting some "usable to utter newbs" information, when I was struggling with starting out as well =)

I fully agree there ought to be a lot more examples on stuff in the wiki to help out folks. One reason I have been, from time to time, expanding on the wiki some. I will see if I can dredge up some stuff to put there, with some explanations on what is happening. If something doesn't appear soon, poke me a few times to wake up! Other folks are of course welcome to add to the wiki as well.

Right now I think what would be of most help is if each TLO had a list of variables to go with it. Everything is explained on the wiki but only explained partially. It says Hey, this is what a TLO does but we're not going to give you a list of ALL the variables it can use. For example, here's the issue I am currently trapped with...

http://www.redguides.com/community/showthread.php/24698-MQ2AdvPath

has a list of TLO's for MQ2AdvPath. Ok, but what variables can I use with them? Ok so lets look more at TLOs:

http://www.redguides.com/wiki/Category:Top-Level_Objects

Ok.... But.... what variables can I use with them? .....

Rich (BB code):
:pathloop
	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack
	/if (${AdvPath.State}=0) /call LeaveUpper
/goto :pathloop
	/delay 650s


Right now when I want it to leave that loop I can't figure out how to get it to leave it because it tells me what the TLO is in multiple locations but NOWHERE does it say what variables to pair with that TLO. I've tried a bunch of different things...

Rich (BB code):
	/if (${AdvPath.State}=0) /call LeaveUpper
	/if (!${AdvPath.State}=2) /call LeaveUpper
	/if (${AdvPath.State.Equal[0]}) /call LeaveUpper
	/if (!${AdvPath.State.Equal[2]}) /call LeaveUpper
       /if (${AdvPath.NextWaypoint}=1140) /call LeaveUpper
       /if (${AdvPath.NextWaypoint.Equal[1140]}) /call LeaveUpper

I have spent the last hour or so trying all different formats of the code since I can't find any examples anywhere in any macro or on google.
 
I looked at the code in the original post and it confused the hell outta me. One thing I do when writing macros is too never call a subroutine from within a subroutine. It gets very confusing at least to me.

It usually helps me to write what I want to do then find the macro commands/TLO's that do what I wrote... example

main loop
/if i'm in zone name and I'm not in combat and there are no spawns around then /move somewhere else
/if i'm in different zone name and I'm not in combat and there are no spawns around then /move different somewhere else
/if there are spawns around and I'm not in killing them then /move to the nearest spawn
/if I'm under attack but not fighting then /start fighting
/if i'm fighting and I don't have a target then /stop fighting
/start the loop over again... forever

sub fight
blah, blah, blah
/return

sub stop fighting
blah, blah, blah
/return
 
I looked at the code in the original post and it confused the hell outta me. One thing I do when writing macros is too never call a subroutine from within a subroutine. It gets very confusing at least to me.

It usually helps me to write what I want to do then find the macro commands/TLO's that do what I wrote... example

main loop
/if i'm in zone name and I'm not in combat and there are no spawns around then /move somewhere else
/if i'm in different zone name and I'm not in combat and there are no spawns around then /move different somewhere else
/if there are spawns around and I'm not in killing them then /move to the nearest spawn
/if I'm under attack but not fighting then /start fighting
/if i'm fighting and I don't have a target then /stop fighting
/start the loop over again... forever

sub fight
blah, blah, blah
/return

sub stop fighting
blah, blah, blah
/return


Thank you for this. As a noob, who doesn't know how to write macro code, this makes it so much easier to understand when someone breaks stuff down into laymen terms!
 
Thank you for this. As a noob, who doesn't know how to write macro code, this makes it so much easier to understand when someone breaks stuff down into laymen terms!

The issue with never doing a subroutine call from within another sub though is you can only write basic macros. This macro could definitely be written this way. But it's also an extremely basic macro that was my second macro/is something I am just tinkering with for now. If I can't figure out this part I may scrap the whole darn thing.

Right now the issue im having (I switched to trying MQ2Nav) is I need to figure out the code involved in telling the program how to realize I have made it to a nav point and go to the next nav point.

Right now I just have all my navs lined up and I am trying to figure out how to tell it to check that I have reached the location. Sadly there is nothing involving location in the Me. TLO wiki. The MQ2 nav wiki isn't very long, it kinda just says what the commands are but gives no variables/data entries on them.

/navigate waypoint start
/navigate waypoint FirstIntersection
/Navigate waypoint LargeRoom
/navigate waypoint SecondRoom
/navigate waypoint ThirdRoom
/navigate waypoint FourthRoom
/navigate waypoint SixthRoom
/navigate waypoint EigthRoom
/navigate waypoint NinthRoom
/navigate waypoint TenthRoom
/navigate waypoint EleventhRoom

If I can figure out how to get it to do a check then proceed to the next waypoint I think it should work flawlessly. What a ride this was, first I start with /moveto then Advpath then Nav. I've literally tried everything at this point.
 
I changed the code around a bit using TheDroidUrLookingFors help, currently I can get it to do two things... I can get it to run the path but not transition to another path even when I put in for it to look around my coords... but... the issue is the bot runs to the wrong coords entirely. As seen in the picture below.

JaOqyXx.jpg

Or it just refuses to run a path and says MQ2 nav no end reference found.

This macro has been a total fucking nightmare for me so far. I feel like I am out of my league and it shouldn't be this hard to get it to do what I am asking it to do. I don't know why it refuses to call the sub routine attack 90% of the time despite the code being solid and people have given me tons of code that should work... but it just doesn't. I can't even get the bot to run to 1 room reliably with ANY navigation other than /moveto which makes testing almost everything about the bot nearly impossible. If I can't get the nav to work, I can't test the combat. And when I finally do get the bot to run around (like I could do with ADvpath) I had to loop the combat subroutine INTO pathloop in order for it to ever be called

And when it was it kinda worked but if you get summoned at all using ADvpath it offsets the whole thing and since you're forced to use :pathloop in order to get the attack subroutine to work it makes finding a way to offset the summon difficult because that line of code would be spammed to all fuck and I (I couldnt anyway) figure out how to get the bot back on the nav path after he got summoned using ADVpath while also still calling the attack subroutine when needed.

This is what I have right now and all it does is run to the wrong location in riftseekers (to the coords show in the screenshot above) and never call the attack subroutine:

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

Sub Main

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

	/if (${Me.CombatState.Equal[COMBAT]}) /call Attack

/delay 5
/goto :MainLoop 
/return

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Declares
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


	/declare AggroRadius int outer 200
	/declare ZAggroRadius int outer 10

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Riftseekers Main Farm Subs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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 WallofSlaughter


	/echo I am in Wall of Slaughter, running to Muramite Proving Grounds
	/call Transport
	/delay 20s
	/play PortintoMPG
	/delay 60s
	/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
	/doortarget CT_Crystal
	/click left door
	/delay 1s
	/moveto loc ${Switch.DefaultY} ${Switch.DefaultX}
	/keypress u
	/delay 60s ${Zone.ShortName.Equal[Riftseekers]}==TRUE
/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 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 Attack


/doevents
/echo Entering Attack Rotation

: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 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

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



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)

	/if (!${Bool[${Plugin[MQ2Nav]}]}) /plugin mq2nav load
	/echo Starting Movement

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

/return

Sub CheckAggro

/declare i int local 1
/for i 1 to ${Me.XTarget}
	/if (${Me.XTarget[${i}].ID}!=0) /return TRUE
/next i
/return FALSE
 
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)
 
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
**|
 
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.
 
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:
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
 
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.
 
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.
 
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
 
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 :)
 
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
}
 
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.
 
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
 
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:
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.
 
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
 
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.
 
Question - Trying to make a basic macro that runs around and kills shit...

Users who are viewing this thread

Back
Top