• You've discovered RedGuides, an EverQuest multi-boxing and scripting community 🧙‍♀️⚙️. We want you to play several EQ characters at once, come join us and say hello! 👋

  • A TLP without truebox has thawed (Very Vanilla ready)
    Frostreaver

Question - Macro Help

Joined
Aug 10, 2015
RedCents
757¢
I wanted something that could make all my chars meet back in POK when I do not have a wizard for AOE TL. I also have wanted to get better at understanding macros so I decided to write my own. My first attempt (which gets the job done) is just a basic loop with what you'll see below that just spammed a bunch of stuff no matter the class/zone, and it worked, but I wanted to learn more and have it only do certain pieces based on class. For example, KB,KA,BB, are paths for a beserker to run from Kaladim B. There is no need for my warrior / bard in GFay to bother with this. . The advpaths are for different zones that I recorded based on where the classes origin to and I haven't gotten that far yet to update them in the new format.

My current problem is the mac works fine, ends automatically if in pok or when chars reach there, and melee origin, and casters mem gate, and cast it. If for some reason I interrupt gate, the caster will then try to origin but I'm not sure why. Maybe there is something in my argument for GoHomeMelee that allows it to trigger on the second go through, but the first time I run the mac they do not do try to origin.

So my questions so far are:

1. Why does the cleric cast origin if I manually interrupt gate?
2. Would it be better to call a class check in the main loop then /call different subs based on where they origin to? or should I leave as is, then as I get to the paths, add /calls to the main loop to go to subs based on the current zone someone is in and their class (for example, bards and wars both go to Kelethin, but need different paths)

I understand it's simple, but this is my first attempt at anything other than down/holy shits or altering someone elses macro slightly for my own use so go easy :) . The If char shortname piece comes from KA, so maybe I'm not fully understanding that. Maybe it would be better in the main loop to do a /call based on class, rather than having all melee go to the same sub (when I get to adding specific paths based on class).

I know MQ2Nav may be a better answer, but I haven't been able to find how to /nav to a zone line. I can nav to the pokbooks when in the zone with them. It is something along the lines of "/nav door id poktele500 click" and finally, MQ2Nav does not get along with Kelethin. It will just run to the edge of one of the level up top closest to the pok book on the ground and stop. Advpath has no probably running straight off based on my recorded paths.

Thank you for the help.

Rich (BB code):
|GoHome.Mac
|By Levox
|A macro to gate your casters, origin your melee, and have everyone get back to POK on their own
#Turbo 

Sub Main 

/twist off
:loop
/doevents
/Call POK
/Call GoHomeMelee
/Call GoHomeCasters
/if (${Zone.ID}==67 && !${AdvPath.Playing}) /play kb
/if (${Zone.ID}==60 && !${AdvPath.Playing}) /play ka
/if (${Zone.ID}==68 && !${AdvPath.Playing}) /play bb
/if (${Zone.ID}==54 && ${Me.Class.ID}==8 && !${AdvPath.Playing}) /play bard
/if (${Zone.ID}==54 && ${Me.Class.ID}==1 && !${AdvPath.Playing}) /play war
/delay 5s
/goto :loop 

/return 

|---------------------------------
| Checking to see if I'm in POK
|---------------------------------
Sub POK
	/if (${Zone.ID}==202) {
		/endmac
	}
/return

|---------------------------------
| GoHome Melee
|---------------------------------
Sub GoHomeMelee
	/if (${Me.AltAbilityReady[Origin]} && ${Select[${Me.Class.ShortName},BRD,BER,MNK,ROG,WAR]}) (
		/alt activate 331
	}
/return

|---------------------------------
| GoHome Casters
|---------------------------------
Sub GoHomeCasters
	/if (${Select[${Me.Class.ShortName},CLR,ENC]}) {
		/memorize "gate|7"
		/delay 10s
		/casting gate
	}
/return
 
I am not personally seeing any reason it should be casting Origin for the cleric or the Enchanter based on this macro's code.
 
i came up with these alterations.
untested.

Rich (BB code):
|GoHome.Mac
|By Levox
|A macro to gate your casters, origin your melee, and have everyone get back to POK on their own
#Turbo 

Sub Main 
	/declare
	/twist off
	:loop
		/doevents
		/if (!${Select[${Zone.ID},202,64,60,68,54}) {
			/if (${Me.Class.PureCaster}) {
				/Call GoHomeCasters
			} else /Call GoHomeCasters
		}
		/if (${Zone.ID}==202) /endmac
		/if (${Zone.ID}==67 && !${AdvPath.Playing}) /play kb
		/if (${Zone.ID}==60 && !${AdvPath.Playing}) /play ka
		/if (${Zone.ID}==68 && !${AdvPath.Playing}) /play bb
		/if (${Zone.ID}==54 && ${Me.Class.ID}==8 && !${AdvPath.Playing}) /play bard
		/if (${Zone.ID}==54 && ${Me.Class.ID}==1 && !${AdvPath.Playing}) /play war
		/delay 5s
	/goto :loop 

/return 

|---------------------------------
| GoHome Melee
|---------------------------------
Sub GoHomeMelee
	/if (${Me.AltAbilityReady[Origin]}) /alt activate 331
	
/return

|---------------------------------
| GoHome Casters
|---------------------------------
Sub GoHomeCasters
	:CastGate
		/if (!${Select[${Cast.Status},C,M]}) /casting "Gate|7"
		/delay 5
	/if (${Cast.Stored.NotEqual[Gate]}) /goto :CastGate
	}
/return
 
I've been using the following snippet for some 10 years


Rich (BB code):
Sub Wait4Play
	/declare PlayTimer timer local
	/varset PlayTimer 3000
	/echo PlayTimer ${PlayTimer}
	:PlayLoop
	/if (${AdvPath.Playing} && ${PlayTimer} > 0) {
		/delay 1
		/goto :PlayLoop
	}
	/echo PlayTimer ${PlayTimer}
	/play off
/return

I set it to run for 5mins or whenever AdvPath stops.

I have it in my gen.inc file of various little utility functions I've written over the years and the way to use it as follows:

/play mypath
/call Wait4Play

Generally you do not want to do anything else when running so it works the best for me instead of sticking AdvPath logic all over the place.

Your method is fine too just that it would be hard to follow once you start making more complicated macros
(I have macros spanning multiple zones and multiple /play paths)
 
Thank you all for your replies I really appreciate it. Too bad I posted that right before I left for work as I have a ton of new ideas to incorporate tonight and will report back.

Edit - I must admit, I spent a few hours on this last night, recording paths, testing, creating the macro and different versions, reading mq2wiki, reviewing other macros for ideas, and that was way more fun than actually playing the game.

- - - Updated - - -

I am not personally seeing any reason it should be casting Origin for the cleric or the Enchanter based on this macro's code.

Sigh, I found it. Used a ( instead of { (red highlight)

Rich (BB code):
Sub GoHomeMelee
	/if (${Me.AltAbilityReady[Origin]} && ${Select[${Me.Class.ShortName},BRD,BER,MNK,ROG,WAR]}) (
		/alt activate 331
	}
 
That should have thrown an error when it reached that line of code. I suppose I should have copied it to a new file and run a bracket check on it, but I hadn't considered it being a bracket issue because that typically comes with an error.

It should have said something along the lines of "Unable to find the command to execute" line ###
if (conditions) /command

Had that thrown the error and been provided we likely would have known exactly what the issue was.

With that said, if it didn't throw an error then we need to let eqmule know about it so that he can possibly look into making it throw the error. I recently encountered an issue where using

/if (condition) {
/dothis
}else {
/dothisotherthing
}

where because the else didn't have a space after the } it was causing a crash to desktop.

MQ2 is pretty picky usually. So perhaps this is another quirk. I've been known to typo my share of bracketing issues.
 
is
Rich (BB code):
	/if (${Me.AltAbilityReady[Origin]} && ${Select[${Me.Class.ShortName},BRD,BER,MNK,ROG,WAR]}) (

causing a problem maybe?

*edit*
doh, didn't read the whole thread, someone already said it >.<
 
Took inspiration from your gohome.mac and made this for running from pok to my hunting area.

Rich (BB code):
|2paw.Mac
|By kaen01
|Runs your team to Paw from Pok
#Turbo 
#define NAV "/call NavTo"
#define WHILENAVIGATING "/call Navigating"
Sub Main 
	/echo \a-tGoing to \a-g${Zone[18]}
	:loop
		/if (${Zone.ID}==202) NAV 77 "door id 25 click"
		/if (${Zone.ID}==77) NAV 51 "loc -675 -46 -18"
		/if (${Zone.ID}==51) NAV 14 "loc 4387 1154 0"
		/if (${Zone.ID}==14) NAV 18 "loc -3068 854 -11"
		/if (${Zone.ID}==18) /endm
		WHILENAVIGATING
		/delay 1s
	/goto :loop 
/return 

Sub Navto(int NextZoneID, string NavCommand)
	/echo \a-t..Moving to \a-g${Zone[${NextZoneID}]}
	/squelch /nav ${NavCommand}
/return

Sub Navigating
	/while (${Navigation.Active}) {
		/delay 2
	}
/return
 
well sorta did get to it. its probably bit overkill but it works.

Rich (BB code):
|2.Mac
|By kaen01
|Define a route, call it, and you will run it. ex. /mac 2 paw

Sub Main
	/if (!${Defined[Param0]}) /call Info
	/declare Route 		string 	outer ${Param0}
	/call Routes
	/call Travel
/return

Sub Routes
	/declare i			int		outer
	|from pok 2 paw
	/declare paw[5,2]	string	outer
		/varset paw[1,1]	202
		/varset paw[1,2]	door id 25 click
		/varset paw[2,1]	77
		/varset paw[2,2]	loc -675 -46 -18
		/varset paw[3,1]	51
		/varset paw[3,2]	loc 4387 1154 0
		/varset paw[4,1]	14
		/varset paw[4,2]	loc -3068 854 -11
		/varset paw[5,1]	18
/return

Sub Travel
 	/echo \a-tGoing to \a-g${Zone[${${Route}[${${Route}.Size[1]},1]}]} 
	/for i 1 to ${${Route}.Size[1]}
	:TravelLoop
		/if (${Zone.ID} == ${${Route}[${${Route}.Size[1]},1]}) {
			/echo \a-t Arrived in \a-g${Zone[${${Route}[${${Route}.Size[1]},1]}]}
			/endm
		} else	/if (${Zone.ID} == ${${Route}[${i},1]}) {
			/call NavTo ${${Route}[${Math.Calc[${i}+1]},1]} "${${Route}[${i},2]}"
		}
		/call Navigating
		/delay 2
		/if (${Zone.ID} == ${${Route}[${i},1]}) /goto :TravelLoop
	/next i
/return

Sub Info
	/echo \a-rNo Destination given
	/endm
/return

Sub NavTo(int NextZoneID, string NavCommand)
	/echo \a-t..Moving to \a-g${Zone[${NextZoneID}]} via ${NavCommand}
	/squelch /nav ${NavCommand}
/return

Sub Navigating
	/while (${Navigation.Active}) {
		/delay 2
	}
/return
 
Version 2, works for any char that origins to Greater Feydark, East Cab, and Kaladim a/b. Some weird things like SK's origin to Cab is at the top of a tower and MQ2Nav sucks there, so I had to record a path to jump off, then switch to MQ2Nav. Same with Kelethin, using Advpath (files attached) to jump off the edge. The rest of the zones require MQ2Nav.

The goal in the end will be to apply it to all starting zones. Any comments are welcome.

Rich (BB code):
|GoHome.Mac v2
|By Levox
|A macro to gate your casters, origin your melee, and have everyone get back to POK on their own
#Turbo 

Sub Main 

/Call POK
/twist off
/delay 1s
/Call GoHomeMelee
/Call GoHomeCasters
:loop
/doevents
/Call POK
/if (${Zone.ID}==67) /call kaladimb
/if (${Zone.ID}==60) /call kaladima
/if (${Zone.ID}==68) /call butcher
/if (${Zone.ID}==54) /call gfay
/if (${Zone.ID}==106) /call cabeast
/if (${Zone.ID}==78) /call fob
/delay 5s
/goto :loop 

/return 

|---------------------------------
| Checking to see if I'm in POK
|---------------------------------
Sub POK
	/if (${Zone.ID}==202) {
		/endmac
	}
/return

|---------------------------------
| kaladimb
|---------------------------------
Sub kaladimb
	/nav loc 400.10 339.71 -21.89
/return

|---------------------------------
| kaladima
|---------------------------------
Sub kaladima
	/nav loc -90.51 43.91 2.50
/return

|---------------------------------
| butcher
|---------------------------------
Sub butcher
	/nav door poktele500 click
/return

|---------------------------------
| gfay
|---------------------------------
Sub gfay
	/nav loc -55.28 -165.42 77.28
	/call Wait4Nav
	/play gfay
	/call Wait4Path
	/nav door poktele500 click
	/call Wait4Nav
	}
/return

|---------------------------------
| cabeast
|---------------------------------
Sub cabeast
	/if (${Me.Class.ID}==5) {
		/play cab
		/call Wait4Path
		/nav loc 1352.92 -523.72 0
		/call Wait4Nav
		} else /nav loc 1352.92 -523.72 0
/return

|---------------------------------
| fob
|---------------------------------
Sub fob
	/nav door poktele500 click
	/call Wait4Nav
/return

|---------------------------------
| GoHome Casters
|---------------------------------
Sub GoHomeCasters
	/if (${Select[${Me.Class.ShortName},CLR,ENC,MAG,NEC,SHM,DRU]}) {
		/memorize "gate|7"
		/delay 10s
		/casting gate
	}
/return

|---------------------------------
| GoHome Melee
|---------------------------------
Sub GoHomeMelee
	/if (${Me.AltAbilityReady[Origin]} && ${Select[${Me.Class.ShortName},BRD,BER,MNK,ROG,WAR,RNG,PAL,SHD]}) {
		/alt activate 331
	}
/return

|---------------------------------
| Wait4Path - Thanks Playj
|---------------------------------
Sub Wait4Path
	/declare PlayTimer timer local
	/varset PlayTimer 3000
	/echo PlayTimer ${PlayTimer}
	:PlayLoop
	/if (${AdvPath.Playing} && ${PlayTimer} > 0) {
		/delay 1
		/goto :PlayLoop
	}
	/echo PlayTimer ${PlayTimer}
	/play off
	/delay 1s
/return

|---------------------------------
| Wait4Nav - Thanks Playj
|---------------------------------
Sub Wait4Nav
	/declare NavTimer timer local
	/varset NavTimer 3000
	/echo NavTimer ${NavTimer}
	:NavLoop
	/if (${Navigation.Active} && ${NavTimer} > 0) {
		/delay 1
		/goto :NavLoop
	}
	/echo PlayTimer ${NavTimer}
	/nav stop
	/delay 1s
/return
 

Attachments

Question - Macro Help

Users who are viewing this thread

Back
Top
Cart