Macro Bot.mac Updates and Bug Fixes by [40oz]

Quick Question

Is there a way to make bots follow person marked main assist instead of top of hate list?
 
Look at Pete's wiki on AssistTypes.

Use assist type 3 and it will follow Xtarget1, which you can set to group assist's target.

You can also set it to assist type 1 to old school assist.
 
Is there any way to prevent auto-self targeting when bot is casting canni? It's super annoying when trying to semi-hand-assist and he just constantly auto targets self to canni :)
 
One more thing, is there supposed to be a check on if there is enough mana to cast something? When doing buffs, if there is not enough mana, it will just completely spam the buff in the mq2 window
 
I've seen that buff issue, but not a good way to reproduce it, I've also seen a similar issue with quiescent harvest when it hasn't refreshed yet, so there's a bunch of issues with checking before casting that apparently aren't working.

The canni thing should be an easy fix? Not sure. I work today, but hopefully I can look soon. Neither of those are really game breaking off the bat, though. Added them to my to do list.
 
I've seen that buff issue, but not a good way to reproduce it, I've also seen a similar issue with quiescent harvest when it hasn't refreshed yet, so there's a bunch of issues with checking before casting that apparently aren't working.

It causes extremely fast target switching if you don't have enough mana as it will constantly target your buff target and the kill target rapidly till you have enough mana to cast
 
Oh man I just saw this thread... so a couple quick questions before I dig in.
Whats the convert look like for ini files? I read somewhere in this thread that some stuff changed but don't remember seeing what all it was.


second the compiled INI list I started a while ago
Compiled INI List Bot.mac

I'd like to update it and need to know if I need different ini files for for bot.mac vs 40bot

After that 40 you do need some donations man. Once I get my shit all setup again using your updates i'll ping ya.
 
I aimed to stay backwards compatible. INIs should work, just the name changed. You can take any INI you used to use and paste it in and it should work. I've added one or two entries, but they should all default sanely.

I changed the name because I was tired of having to manually handle files when swapping between characters of the same name on different servers when I was testing.
 
Had a few minutes to look at a small fix today, so I believe I've removed the self targeting on shaman mana gain spells; none of them need targetting anyways.

I didn't spend hardly any time testing this, so please report back if there are issues.
 
Hello,

Does the following section detect the AA Harvest and Spell Harvest? I saw on the first post of this thread something to that effect but I don't know if there is another setting? Id like to utilize both Harvest. Thank you
 
Hello,

Does the following section detect the AA Harvest and Spell Harvest? I saw on the first post of this thread something to that effect but I don't know if there is another setting? Id like to utilize both Harvest. Thank you

What following section?

The bot does detect those things, spell harvest only if it's memorized when you start the bot. It won't be used unless you have the "Mana" section in your options.
 
Hi 40oz,

Was trying to figure out why my enchanter wont AEMez. I am not a code writer but I was looking at the program and noticed something, I'm not sure if this would make a difference but just pointing it out in case it does.

*** I want to credit all on IRC chat namely HTW and PeteSampras for helping me to understand the basic syntax definition .***

This is just possible findings that I saw which might possibly be the cause of the AE-MEZ issue. There is no intent to undermine everyone who has contributed their hard work and countless hours of time to this macro program. I just thought my findings might help to speed up the process to rectify the AEMEZ issue which I (possibly others) am having an issue with.

I believe there might be a misspelling on the below code as indicated as it is highlighted in RED.
Comment: I don't know if it will make much difference, I'm just pointing it out.


Code:
/varset CurrentSub AEMez
   	/for m 1 to ${MezList.Count[|]}
		/for i 1 to ${AEMezTotal}
  			/if (${aemezcnt}>2 && (${Me.SpellReady[${[COLOR="Red"]AEMezSpellNae[/COLOR]${i}}]}||${Me.AltAbilityReady[${AEMezSpellName${i}}]}) && ${Me.CurrentMana}>${Spell[${AEMezSpellName${i}}].Mana} && !${MezTimer${MezList.Arg[${m},|]}} && ${MezList.Arg[${m},|]}>0 && ${Spawn[id ${MezList.Arg[${m},|]}].ID} && ${AEMezUse${i}}) {
			  	/call Debug 3 "Trying to AE Mez using ${AEMezSpellName${i}} on ${MezList.Arg[${m},|]}"
				/squelch /tar id ${MezList.Arg[${m},|]}
				/call MezAdd "${AEMezSpellName${i}}" "${AEMezSpellGem${i}}" ${Target.ID}
			}
		/next i

While on the same subject, I looked into the ${aemezcnt}. I am unsure why this int (interger) is always returning back a value of 1 regardless if I have 5 monsters on ${Me.XTarget}. Without any knowledge of writing codes or macros; and just echoing commands back in game, it looks as if ${mezcnt}=${aemezcnt} even though ${AddCount} is of higher number. By looking at the /if statement it looks as if it is setting both ${mezcnt} and ${aemezcnt} to a value of 1 because both /if conditions are calling for it and the only thing separating the 2 conditions is one /if condition calls for ${mezcnt} and the other /if condition calls ${aemezcnt}; which both conditions are identical with the exception of 1 calls for ${mezcnt} while the other /if condition calls for ${aemezcnt}. In either case that is the only difference that I can see (code listed below) and is purely my opinion.

Code:
/for m 1 to ${MezList.Count[|]}
		[COLOR="Purple"]/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=[COLOR="Magenta"]${MezMaxNPCLevel}[/COLOR] && !${MezTimer${MezList.Arg[${m},|]}}) [/COLOR]/varcalc mezcnt [COLOR="Magenta"]${mezcnt}[/COLOR]+1
		
               [COLOR="purple"] /if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=[COLOR="Cyan"]${AEMezMaxNPCLevel}[/COLOR] && !${MezTimer${MezList.Arg[${m},|]}}) [/COLOR]/varcalc aemezcnt [COLOR="Cyan"]${aemezcnt}[/COLOR]+1

Code:
[2017/02/02 18:17:58] [MQ2] 1 <---[COLOR="Magenta"]${mezcnt}
[/COLOR][2017/02/02 18:18:05] [MQ2] 1 <---[COLOR="Cyan"]${aemezcnt}
[/COLOR][2017/02/02 18:18:14] [MQ2] 0 <---[COLOR="Lime"]${AddCount}
[/COLOR]
"This is when idle, there is nothing on my Xtarget we are just sitting and not pulling or nothing is around us. Macro program running but idle."

Code:
[2017/02/02 18:20:28] [MQ2] 1 <---[COLOR="magenta"]${mezcnt}[/COLOR]
[2017/02/02 18:20:30] [MQ2] 1 <---[COLOR="Cyan"]${aemezcnt}[/COLOR]
[2017/02/02 18:20:42] [MQ2] 1 <---[COLOR="Lime"]${AddCount}
[/COLOR]
"Now we are fighting a monster. we only have 1 monster on XTarget and nothing else.

Code:
[2017/02/02 18:35:35] [MQ2] 1 <---[COLOR="magenta"]${mezcnt}[/COLOR]
[2017/02/02 18:35:41] [MQ2] 1 <---[COLOR="cyan"]${aemezcnt}
[/COLOR][2017/02/02 18:35:47] [MQ2] 0 <---[COLOR="lime"]${AddCount}
[/COLOR]
"Again, we are doing nothing, no fighting just sitting nothing around us and nothing on XTarget."

Code:
[2017/02/02 18:42:17] [MQ2] 1 <---[COLOR="magenta"]${mezcnt}[/COLOR]
[2017/02/02 18:42:19] [MQ2] 1 <---[COLOR="cyan"]${aemezcnt}
[/COLOR][2017/02/02 18:42:22] [MQ2] 3 <---[COLOR="lime"]${AddCount}

[/COLOR]"Now we have 3 monsters on the Xtarget, Tank is killing 1 monster while the other 2 was individualized mezed."

The only place in the program that I can see it setting ${mezcnt} and ${aemezcnt} to a value of 1 would be here on the below code where ${mezcnt}+1 and ${aemezcnt}+1 is setting them to a "int" (interger) of the value 1.

Then again, and once again, I'm not a code or macro writer so I am unsure and just making an assumption. I was just trying to find where and why is it always setting ${mezcnt} and ${aemezcnt} to a value of 1. This section might help to explain why ${mezcnt} and ${aemezcnt} is always returning back an "int" (interger) of 1.

Code:
/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=[COLOR="Magenta"]${MezMaxNPCLevel}[/COLOR] && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc mezcnt [COLOR="Magenta"]${mezcnt}+1
[/COLOR]		/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=[COLOR="Cyan"]${AEMezMaxNPCLevel}[/COLOR] && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc aemezcnt [COLOR="cyan"]${aemezcnt}+1[/COLOR]
		/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<35 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=${PBAEMezMaxNPCLevel} && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc PBAEMezcnt ${PBAEMezcnt}+1
  	/next m

Out of curiosity I changed ${aemezcnt}>2 to ${Me.XTarget}>2 and changed ${Me.SpellReady[${AEMezSpellNae${i}}]} to ${Me.SpellReady[${AEMezSpellName${i}}]} on the below asscoicated /if condition; and now my enchanter is recognizing the AE mez and conditons. I am not changing anything to the program, like I said It was just out of curiosity.

Code:
/if ([COLOR="orange"]${Me.XTarget}>2[/COLOR] && ([COLOR="Magenta"]${Me.SpellReady[${AEMezSpellName${i}}]}[/COLOR]||${Me.AltAbilityReady[${AEMezSpellName${i}}]}) && ${Me.CurrentMana}>${Spell[${AEMezSpellName${i}}].Mana} && !${MezTimer${MezList.Arg[${m},|]}} && ${MezList.Arg[${m},|]}>0 && ${Spawn[id ${MezList.Arg[${m},|]}].ID} && ${AEMezUse${i}}) {
			  	/call Debug 3 "Trying to AE Mez using ${AEMezSpellName${i}} on ${MezList.Arg[${m},|]}"
				/squelch /tar id ${MezList.Arg[${m},|]}
				/call MezAdd "${AEMezSpellName${i}}"
In my opinion, according to the /if statement; the condition calls for ${aemezcnt}>2. Since ${aemezcnt} always retuns back 1 it will never AE-MEZ. That is just my assumption, Like I said I'm not a code writer and know nothing about writing macros its just something I saw and wanted to point it out to you just in case it might help to solving the AE-MEZ situation. Now that I changed ${aemezcnt}>2 to ${Me.XTarget}>2 it recognizes the AE-MEZ and when to mez the monsters.

I want to point out that I love the responsiveness to this macro program. it works real fast and I'm enjoying it a lot. I apologize if I am intruding on the hard work and time put into this and please know I had no intent to do so. My opinions and finding was just purely out of curiosity and that was it.

In any case enchanter is surely not AEmezzing at all.

thank you again for looking.
 
Last edited:
That's definitely a misspelling.

AEMez has been broken a long time, I just hadn't had a chance to dig in to why. Thank you for doing some leg work on this. I'm not sure what aemezcnt is used for, I'll have to see what the intention is there. The XTarget approach is good for newer servers with all expansions, but if xtarget isn't available that would break aemez in those instances. I'll try to at least get your bandage in for it and test tonight before or after my raids.

The only place in the program that I can see it setting ${mezcnt} and ${aemezcnt} to a value of 1 would be here on the below code where ${mezcnt}+1 and ${aemezcnt}+1 is setting them to a "int" (interger) of the value 1.

What's happening there is there's 3 sections of code that I need to debug.

Code:
  	/for m 1 to ${MezList.Count[|]}
		/if (${MezList.Length}>1 && ${MezList.Arg[${m},|].NotEqual[|]} && (!${Spawn[id ${MezList.Arg[${m},|]}].ID}||!${AddList.Find[${MezList.Arg[${m},|]}]})) /varset MezList ${MezList.Replace[${MezList.Arg[${m},|]},]}
		/if (${MezList.Find[||]}) /varset MezList ${MezList.Replace[||,|]}
  	/next m

This is supposed to make a pipe (|) seperated list of stuff that needs mezzing. Then...

Code:
  	/for m 1 to ${AddList.Count[|]}
		/if (!${MezList.Find[${AddList.Arg[${m},|]}]} && (${IgnoreImmuneLists}||!${MezImmuneList.Find[${Spawn[id ${AddList.Arg[${m},|]}].CleanName}]}) && ${AddList.Arg[${m},|]}!=${TarID} && !${DontMezConColor.Find[${Spawn[id ${AddList.Arg[${m},|]}].ConColor}]} && !${Spawn[id ${AddList.Arg[${m},|]}].CleanName.Find[_pet]} && ${Spawn[id ${AddList.Arg[${m},|]}].ID} && ${Spawn[id ${AddList.Arg[${m},|]}].Level}<=${FinalMezMaxNPCLevel}) {
			/if (${Defined[MezTimer${AddList.Arg[${m},|]}]}) /varset MezTimer${AddList.Arg[${m},|]} 0
			/varset MezList ${MezList}${AddList.Arg[${m},|]}|
		}
  	/next m

This is supposed to look through a global (I think) variable AddList and add anything it finds not on the mez list to the mez list, and reset the MezTimer for each. Then...

Code:
  	/for m 1 to ${MezList.Count[|]}
		/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=${MezMaxNPCLevel} && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc mezcnt ${mezcnt}+1
		/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<100 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=${AEMezMaxNPCLevel} && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc aemezcnt ${aemezcnt}+1
		/if (${Spawn[id ${MezList.Arg[${m},|]}].Distance}<35 && ${Spawn[id ${MezList.Arg[${m},|]}].Level}<=${PBAEMezMaxNPCLevel} && !${MezTimer${MezList.Arg[${m},|]}}) /varcalc PBAEMezcnt ${PBAEMezcnt}+1
  	/next m

	/call Debug 2 "mezcnt: ${mezcnt} | aemezcnt: ${aemezcnt} | PBAEMezcnt: ${PBAEMezcnt}"

This is supposed to iterate over the MezList, count up all the stuff that needs mezzing, and increment the mezcnt, aemezcnt, and PBAEMezcnt variables.

So all that logic is to figure out what precisely needs mezzing and get a count. Something is wrong in there, since aemezcnt is staying at 1.
 
Last edited:
Hi 40oz,

once again, I apologize and didn't mean to comment, please know my post was just an opinion of mine and may also be wrong. Ive updated my post to reflect more color coding in case you were interested in further reviewing.

Once again thank you.

also on a side note, is there any way u can make my enchanter aut inventory items while in combat mode? I have her set to summon those crystals. she summons them through the AA routine but keeps it in cursor until after combat> curious to know if she can just auto inventory while in combat ? thank you again
 
Found the issue and uploaded a new version.

There were a bunch of bugs detecting max level a mez spell could mez. I fixed those up, fixed the type-o you spotted, and now it seems to be working for me. Haven't tested the PBAEMez fixes on my bard yet, but I would presume that works also.
 
Hi 40oz,

once again, I apologize and didn't mean to comment, please know my post was just an opinion of mine and may also be wrong. Ive updated my post to reflect more color coding in case you were interested in further reviewing.

Once again thank you.

also on a side note, is there any way u can make my enchanter aut inventory items while in combat mode? I have her set to summon those crystals. she summons them through the AA routine but keeps it in cursor until after combat> curious to know if she can just auto inventory while in combat ? thank you again

Don't apologize, you helped me find one of several bugs in the mez routine =) I'm glad it put me on the right track. I've uploaded a new version that should have AE Mezzing fixed.

As far as summoning the mind crystals, I don't have those defined in my ini, yet my enchanter does it. I know the bot detects certain spells and uses them regardless, I believe Azure Mind Crystal is one of them.

I wouldn't use the AA section to handle those anyways. The AA section only works in combat. I would add "SummonItem" as an option up top, then add a SummonItem section in your INI, like this:

Code:
[SummonItem]
SummonItemTotal=1

SummonItemUse1=TRUE
SummonItemName1=Sanguine Mind Crystal
SummonItemSpellGem1=alt
SummonItemConditions1=!${FindItemCount[Sanguine Mind Crystal]} && ${Me.PctMana}>70
 
Last edited:
thank you for your kindness.


the only reason why I summon them during combat is I use them before I use the harvest and spell harvest while in combat. it helps a little since those 2 items gives like 10k mana etc.. just once again curious
 
downloaded the new update.
I see that the below statement is still there. after updating now my enchanter is not AEMEZING again, changed it to ${Me.XTarget}>2 and works as previously posted. I know your looking into the ${aemezcnt} just pointing it out.

help

Help

/varset CurrentSub AEMez
/for m 1 to ${MezList.Count[|]}
/for i 1 to ${AEMezTotal}
/if (${aemezcnt}>2 &&



 
downloaded the new update.
I see that the below statement is still there. after updating now my enchanter is not AEMEZING again, changed it to ${Me.XTarget}>2 and works as previously posted. I know your looking into the ${aemezcnt} just pointing it out.

help

Help

/varset CurrentSub AEMez
/for m 1 to ${MezList.Count[|]}
/for i 1 to ${AEMezTotal}
/if (${aemezcnt}>2 &&




aemezcnt is definitely increasing past 1 now, and counting properly at least for me. It needs to hit a certain minimum (3, in this case) to actually ae mez though. I don't have much more time to look at it right now, hopefully tonight though.