Macro MQ2Retro Being Phased Out

used to be a thread around here w some basic macros i think

been relying on bot plugin but I used to use rhdruid, aflcleric (nils) , mac bot, afnecro, afwiz

alot of stuff doesnt work well or at all so I just been balancing bot plugin w some holy flags and hoping for the best
 
I've made a public repo that has dev's for now, feel free to add if you want. Can put any single mac in root if you want, or make a dir. If multiple files, make a dir, so they get kept by themselves for related work and function (e.g., directory is there that has all devs bots in it).


If you do commit one, if it's something custom you did, please indicate that. thanks.


Repo link: GitHub - MMOBugs/MMOBugs-Macros: Macros maintained by MMOBugs.com developers and members.https://github.com/htwmmo/MMOBugs-Macros.git



htw
 
Last edited:
ill post my afdps macro later it works for wizards, mages, beast, zerkers, warriors(only in dps mode), monks. It could use some polish but ive been using it for awhile.
 
I spent a lot of time on this initially. The problem is that as time goes on, core changes separate the ease of maintaining more and more, and is not very manageable. Things start to get so spaghetti that legit fixes and improvements from eqmule & the mq2 devs to the core macro engine get missed or too far changed to add in and maintain. These changes/fixes from core are certainly to be desired, in some cases changes/fixes that would have been great to have years ago, and non-retro users should expect those to happen here.


What I can commit to is fixing the only real thing that broke back then - the undeclared variable issue. I can't commit to fixing every little functionality issue a macro has, but of course, if I were to see it while I'm working on the macro, I would do so.


I am going to have our own macro repo, which can be open to all the benefits of one, including tracking revisions, comments, reports, etc. Any macro anyone wants in there we'll put. The goal from my end will be to get it back to function without retro, but NOT to fix issues that existed already previously, or adding features, etc.



aspire: If you want to email to htwmmo@gmail.com a zip of all your dev macs/includes/etc. that were working, I can commit to getting them corrected for this.


As far as bot40/bot, I will want to start with the latest version that was working before the var changes, and start from there. That way any changes to how the macro works that may have broken anything can be dealt with later, but we get back to a good starting point for such changes.


At a minimum, I would begin with:
bot40
bot
dev's
tradeskills


Feel free to request any update to other broken macs (provide your last working version please).


htw

Getting the macro's up to date would be the more permanent fix for the situation and the time spent to get the properly up to date would be the ideal way to go. My copies of dev's bots were altered as mentioned in an attempt to make things work correctly. But I got them from Dev's GitHub. His GitHub can be found at GitHub - devestator/devbots: All Everquest / MQ2 class bots and other macros written by devestator

Personally like the idea of seeing a repository or at least a quick reference area to access all the macros available on MMOBugs instead of digging through the forums. Even if it's a master thread with links to all the macros that have been posted to mmobugs by creators. This would enable users to find macros a lot easier and reduce the amount of posts where someone's like "Where dis macro at that does this thing".


So be it a git link, or a link to the thread they can be referenced via a single link, and any changes made could be documented on the git regardless of who makes the changes.


This is what I was trying to say with my posts. And this is a great idea, regardless.

Thank you guys for doing this. and htw and all staff/coders, thank you for all the hard work you have done throughout the years. Sometimes I'm sure it feels that you all aren't appreciated. I just wanted to let you folks know that everything you do for us users, is sincerely appreciated.

Cheers.
 
For the next however many weeks/months I will be coding for class. This means I am temporarily motivated to code and am willing to update bot.mac if i can get a list of whatever is broken. However, I will completely change how it set up to have a bunch of includes for modularity sake and so that people can add new shit in easily. My coding habits have vastly changed since i first wrote bot and 10,000 lines of code in a single module is a no go for me. I don't actually have the game installed and so this is to all be done from sight alone so it is muy importante that I know exactly what is broken if I am to do this.
 
Did some stuff for bot40.mac, still working on it.


htw
 
Last edited:
If there are issues or bugs, please add tickets to the github so i can take a look/fix if able. Also people can open tickets on the site to request changes and then see if/when it was added in.
 
is it ok to try bot40 now and can it be done without that retro plugin (like i said didnt even know about it)

if so looking forward to trying it out again :)
 
Yeah, go for it. Any errors is what I would be looking for, paste them here and what class or other info you can give.


Here is latest, as well as a spell_routines.inc that I fixed a few issues in. <-- Attachments removed, used the git repo to ensure you have latest.


Still working on it, but making progress, promise.


htw
 
Last edited:
I've been using the bot40.mac for my puller for some time. Lately I've been doing progression. Once I get that taken care, which shouldn't be long, I'll run this and see if I get any errors.
 
are the macro's in Github work in progress or can we start downloading and testing them? How will we know when they are ready to use via Github as readme doesn't say in history
Thanks,
Tshadow
 
You can use them, but I would expect issues, it will take time and testing. We just started it, but will try to keep it up to date on the various git options (feel free to use the post, issue tracker, etc.).


Same goes for documentation, the wiki on there will be used for that purpose.


In the meantime, if you try out 1 and get some errors, can post on the issue tracker and that will make sure we can assign/accept work on it and it'll get tracked to resolution.


It's pretty easy, just make a free github user account if you don't have one.


htw
 
I've made a public repo that has dev's for now, feel free to add if you want. Can put any single mac in root if you want, or make a dir. If multiple files, make a dir, so they get kept by themselves for related work and function (e.g., directory is there that has all devs bots in it).


If you do commit one, if it's something custom you did, please indicate that. thanks.


Repo link: GitHub - MMOBugs/MMOBugs-Macros: Macros maintained by MMOBugs.com developers and members.https://github.com/htwmmo/MMOBugs-Macros.git



htw


For Dev's bots one of the major issues was undeclared variables and parameter issues. Parameters are now always declared even if not used, so checks were passing even though they were blank. I encountered similar issues with bot40 when I was working on that.

In leu of putting a #warning in the macro. You should be able to run the macro for some time (In a combat situation) and then use the :OnExit feature to add an /invoke ${Macro.Undeclared} to get a list of all the variables that weren't declared and where they were used to knock out a large chunk.

Code:
	:OnExit
	/squelch /alias /showignored delete
	/if (${Debugging}) /invoke ${Macro.Undeclared}
	/setchattitle MQ2
	/end

is in my Farm.mac for that purpose.

For the params, I had to look at each sub. Here's an example from my current copy of bot40.mac where I see an issue with a param check.


Code:
| --------------------------------------------------------------------------------------------
| SUB: IniLoad
| --------------------------------------------------------------------------------------------
Sub IniLoad(ininame,var,vartype,sec,default)
	/call Debug 3 "In Sub IniLoad"
	[COLOR="Red"]/if (!${Defined[${var}]})[/COLOR] {
		/if (${default.Equal[Null]}) {
			/declare ${var} ${vartype} outer ${MMOIni[${ininame},${sec},${var}]}
		} else {
			/declare ${var} ${vartype} outer ${MMOIni[${ininame},${sec},${var},${default}]}
		}
	} else {
		/if (${default.Equal[Null]}) {
			/varset ${var} ${MMOIni[${ininame},${sec},${var}]}
		} else {
			/varset ${var} ${MMOIni[${ininame},${sec},${var},${default}]}
		}
	}
	/if (${vartype.Equal[string]}) {
		/if (${${var}.Equal[NULL]}) /mmoini "${ininame}" "${sec}" "${var}"
	}
	/if (${vartype.Equal[string]}) {
		/if (!${${var}.Equal[NULL]}) /mmoini "${ininame}" "${sec}" "${var}" "${${var}}"
	}
	/if (${vartype.Equal[int]}||${vartype.Equal[float]}) /mmoini "${ininame}" "${sec}" "${var}" "${${var}}"
	/if (${vartype.Equal[bool]}) {
		/if (!${${var}}) /mmoini "${ininame}" "${sec}" "${var}" "FALSE"
	}
	/if (${vartype.Equal[bool]}) {
		/if (${${var}}) /mmoini "${ininame}" "${sec}" "${var}" "TRUE"
	}
	/varset ${var} ${Ini[${ininame},${sec},${var}]}
	/call Debug 3 "Leaving Sub IniLoad"
/return

/if (!${Defined[${var}]}) check won't work because as a parameter in the signature of the sub it's ALWAYS declared now. So even if ${var} isn't passed a value, it's still declared. It's not NULL either, It's just blank. So You would have to check the ${var.Length} to see if it contains anything or use a bool wrapper perhaps.

So going through every sub and checking for parameters and then checking to see how they're handled. Then it could also require checking every call to a sub that contains params to ensure they are using all the params in the event they are trying to skip the use of a param because passing a blank param doesn't work and will cause issues.

this alone is sure to take a lot of time. So I expect that it's going to take quite a bit of time to work out all of the kinks in bot/bot40/devs bots.
 
For Dev's bots one of the major issues was undeclared variables and parameter issues. Parameters are now always declared even if not used, so checks were passing even though they were blank. I encountered similar issues with bot40 when I was working on that.

In leu of putting a #warning in the macro. You should be able to run the macro for some time (In a combat situation) and then use the :OnExit feature to add an /invoke ${Macro.Undeclared} to get a list of all the variables that weren't declared and where they were used to knock out a large chunk.

Code:
	:OnExit
	/squelch /alias /showignored delete
	/if (${Debugging}) /invoke ${Macro.Undeclared}
	/setchattitle MQ2
	/end

is in my Farm.mac for that purpose.

For the params, I had to look at each sub. Here's an example from my current copy of bot40.mac where I see an issue with a param check.


Code:
| --------------------------------------------------------------------------------------------
| SUB: IniLoad
| --------------------------------------------------------------------------------------------
Sub IniLoad(ininame,var,vartype,sec,default)
	/call Debug 3 "In Sub IniLoad"
	[COLOR="Red"]/if (!${Defined[${var}]})[/COLOR] {
		/if (${default.Equal[Null]}) {
			/declare ${var} ${vartype} outer ${MMOIni[${ininame},${sec},${var}]}
		} else {
			/declare ${var} ${vartype} outer ${MMOIni[${ininame},${sec},${var},${default}]}
		}
	} else {
		/if (${default.Equal[Null]}) {
			/varset ${var} ${MMOIni[${ininame},${sec},${var}]}
		} else {
			/varset ${var} ${MMOIni[${ininame},${sec},${var},${default}]}
		}
	}
	/if (${vartype.Equal[string]}) {
		/if (${${var}.Equal[NULL]}) /mmoini "${ininame}" "${sec}" "${var}"
	}
	/if (${vartype.Equal[string]}) {
		/if (!${${var}.Equal[NULL]}) /mmoini "${ininame}" "${sec}" "${var}" "${${var}}"
	}
	/if (${vartype.Equal[int]}||${vartype.Equal[float]}) /mmoini "${ininame}" "${sec}" "${var}" "${${var}}"
	/if (${vartype.Equal[bool]}) {
		/if (!${${var}}) /mmoini "${ininame}" "${sec}" "${var}" "FALSE"
	}
	/if (${vartype.Equal[bool]}) {
		/if (${${var}}) /mmoini "${ininame}" "${sec}" "${var}" "TRUE"
	}
	/varset ${var} ${Ini[${ininame},${sec},${var}]}
	/call Debug 3 "Leaving Sub IniLoad"
/return

/if (!${Defined[${var}]}) check won't work because as a parameter in the signature of the sub it's ALWAYS declared now. So even if ${var} isn't passed a value, it's still declared. It's not NULL either, It's just blank. So You would have to check the ${var.Length} to see if it contains anything or use a bool wrapper perhaps.

So going through every sub and checking for parameters and then checking to see how they're handled. Then it could also require checking every call to a sub that contains params to ensure they are using all the params in the event they are trying to skip the use of a param because passing a blank param doesn't work and will cause issues.

this alone is sure to take a lot of time. So I expect that it's going to take quite a bit of time to work out all of the kinks in bot/bot40/devs bots.
Yes, I am aware, but thank you.
 
From what i looked at months ago you're better off writing an entirely new macro from scratch then digging into the mess that fixing bot40.mac is.
 
tried the bot40 you posted in here got this issue with the spell routines

HTML:
[2018/11/29 09:40:02]  Spiritual Remedy Rk. III -->  ShamanXXX
ClericXXX - [2018/11/29 09:40:02] WARNING: Undefined Variable spell_routines_loaded used on line 278@spell_routines.inc /if (${spell_routines_loaded}) /returnMacro Paused.
 
tried the bot40 you posted in here got this issue with the spell routines

HTML:
[2018/11/29 09:40:02]  Spiritual Remedy Rk. III -->  ShamanXXX
ClericXXX - [2018/11/29 09:40:02] WARNING: Undefined Variable spell_routines_loaded used on line 278@spell_routines.inc /if (${spell_routines_loaded}) /returnMacro Paused.
You need to get the spell_routines.inc I put up also, it doesn't even have that variable referenced, so you must not have the one I uploaded.


htw
 
hrm i seem to have two, one in my macro folder one in my include folder inside my mac folder i wonder wich one its reading LOL
 
Last edited:
hrm i seem to have two, one in my macro folder one in my include folder inside my mac folder i wonder wich one its reading LOL




Download the one of git and do a file comparison, the one that matches is the one you want.
 
Ok tested the new Bot40 and new spell routines

Bard zerkers worked good cleric and shaman have some undefined errors

Cleric

HTML:
Cleric - [2018/11/29 13:07:11] WARNING: Undefined Variable HealSingleSpellName4 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Cleric - [2018/11/29 13:07:11] WARNING: Undefined Variable HealSingleSpellName4 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Cleric - [2018/11/29 13:07:11] WARNING: Undefined Variable HealSingleSpellName4 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Cleric - [2018/11/29 13:07:11] WARNING: Undefined Variable HealSingleSpellName4 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Cleric - [2018/11/29 13:07:43] # CMD: [/end]

Shaman

HTML:
Shaman - [2018/11/29 13:05:27] WARNING: Undefined Variable HealBalanceUse1 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Shaman - [2018/11/29 13:05:27] WARNING: Undefined Variable HealBalanceSpellName1 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Shaman  - [2018/11/29 13:05:27] WARNING: Undefined Variable HealBalanceSpellName1 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Shaman - [2018/11/29 13:05:27] WARNING: Undefined Variable HealBalanceSpellName1 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.
Shaman - [2018/11/29 13:05:27] WARNING: Undefined Variable HealBalanceSpellName1 used on line 5527@bot40.mac /if (${${Heals.Arg[${y},|]}Use${t}} && !${${Heals.Arg[${y},|]}Recast${t}} && (${Me.SpellReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${Me.AltAbilityReady[${${Heals.Arg[${y},|]}SpellName${t}}]}||${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].ItemSlot} && !${FindItem[${${Heals.Arg[${y},|]}SpellName${t}}].Timer})) {Macro Paused.