bot40 and MQ2Nav

[40oz]

Lifetimer
Joined
Sep 5, 2008
Messages
590
Reaction score
4
Points
18
Got a PM today asking about MQ2Nav.

For my part, I don't know of anything off the top of my head that switching from MQ2Navigation to MQ2Nav would break. I've used both in the past for pulling with bot40, and both have worked.

That said, I've had zero time to try it with the newest MQ2Nav release and the deprecation of MQ2Navigation. If you're a saavy user, just unload MQ2Navigation, load up MQ2Nav, and give it a whirl. As long as your meshes are created properly and doors files are up to date, it should be good to go.

If it fails, I'll need to know detailed info on why/how it failed, but I think all the /nav commands that the bot mac uses are interchangeable between the two nav plugins.
 
  • Like
Reactions: EQDAB
There are a few changes in the syntax of navigation to locations, it's on the mq2nav github, pretty easy to find
 
  • Like
Reactions: EQDAB
Posted an untested update to the stickied update thread. As far as I know it will work, but I haven't even logged in to test. Went entirely off documentation, no time to log in and test.

Here's the patch, if you're curious:

Code:
--- D:\Downloads\bot40.mac
+++ D:\MQ2\MMOBugs\Macros\bot40.mac
@@ -14,6 +14,18 @@
  **
  ** Change List:
  ** Of note, bugs reporters will be credited by the change that fixes their bug in paranthesis.
+ **
+ ** 2017-03-10 - 40oz
+ **   - Updated for compatibility with MQ2Nav as MQ2Navigation is now deprecated (needs testing)
+ **   - Added entry point (SetupCustomEvents) for custom code in the bot_custom_events.inc include
+ **   - Fixed Advanced Pet Discipline to ranks of Pet Discipline
+ **   - Added /pet swarm for anyone with Pet Discipline AA >= Rank 4
+ **
+ ** 2017-02-05 - 40oz
+ **   - Added Giant Modulation Shard to autoinventory list
+ **
+ ** 2017-02-03 - 40oz
+ **   - Fix logic bug related to entering combat in a rare instance involving netbots assist type (islandgirl671)
  **
  ** 2017-02-02 - 40oz
  **   - Fixed AEMezzing Max NPC Level detection
@@ -112,7 +124,7 @@
 
 Sub Main
 	/echo Starting ThisMac.mac!
-	/declare DebugLevel int outer 0
+	/declare DebugLevel int outer ${Ini[MyIni,Settings,DebugLevel,0]}
 	/declare BotVersion string outer v2016.1009
 	/declare MyVersion string local ${Ini[MyIni,Settings,BotVersion]}
 	/declare NewVersion bool outer ${BotVersion.NotEqual[${MyVersion}]}
@@ -129,6 +141,7 @@
 		}
 	} else {
 		/call Load
+		/call SetupCustomEvents
 	}
 	
 	/if (${Param0.NotEqual[NULL]}) /declare AssistPC string outer ${Param0}				
@@ -198,12 +211,12 @@
 			/call Always
 			/doevents
 			
-			/if (${Me.CombatState.Equal[Combat]} || ${Me.Combat} || ${AddListPriority} || ${NetBots[${AssistPC}].Attacking} && ${AssistType}==4 || ${NetBots[${AssistPC}].CombatState}==0 && ${AssistType}==4) {
+			/if (${Me.CombatState.Equal[Combat]} || ${Me.Combat} || ${AddListPriority} || (${AssistType}==4 && (${NetBots[${AssistPC}].Attacking} || ${NetBots[${AssistPC}].CombatState}==0))) {
 				/call Combat
 				/doevents
 			}
 			
-			/if (${Me.CombatState.NotEqual[Combat]} || !${Me.XTarget}) {
+			/if (${Me.CombatState.NotEqual[Combat]} || !${Me.XTarget} || !${AddCount}) {
 				/call Rest
 				/doevents
 			}
@@ -217,7 +230,7 @@
 
 |################> Sub Always <#######################
 Sub Always
-	/if (${Select[${Cursor.ID},9963,76504,79322,79321,79320,6346,64953,64954,64955,64979,64980,64981,64982,64983,64984,52817,64951,52709,3426,57264,52674,76503,121336,64978,77613,77678,77681,57265,52818,52710,77679,64952,77682,52701,76501]}) /autoinventory
+	/if (${Select[${Cursor.ID},9963,76504,79322,79321,79320,6346,64953,64954,64955,64979,64980,64981,64982,64983,64984,52817,64951,52709,3426,57264,52674,76503,121336,64978,77613,77678,77681,57265,52818,52710,77679,64952,77682,52701,76501,79497]}) /autoinventory
 
 	/if (${TarID} && (!${Target.ID}||${Target.ID}!=${TarID}) && ${Spawn[id ${TarID}].Type.NotEqual[corpse]} && (!${Me.Casting.ID}||${Twist.Twisting}) && ${Spawn[${TarID}].ID}) /squelch /tar id ${TarID}
 	/if (${OptionsCheckCurrent.Equal[Group]} && ${Raid.Members} && ${OptionsCheckRaid.NotEqual[123456]}) {
@@ -299,12 +312,11 @@
 			/call AddHandler
 		}
 		/if (${OptionsCheck.Find[|${CombatRoutines.Arg[${i},|]}|]} && ${CombatRoutines.Arg[${i},|].NotEqual[NULL]}) {
-			/if (${Range.Between[${Math.Min[${${CombatRoutines.Arg[${i},|]}StopAtMobPctHP}]},${Math.Max[${${CombatRoutines.Arg[${i},|]}UseAtMobPctHP}]}:${Target.PctHPs}]} && ${Select[${CombatRoutines.Arg[${i},|]},Dot,Nuke,AA,Stun,ClickyNuke,Jolt]})		/call ${CombatRoutines.Arg[${i},|]}
+			/if (${Range.Between[${Math.Min[${${CombatRoutines.Arg[${i},|]}StopAtMobPctHP}]},${Math.Max[${${CombatRoutines.Arg[${i},|]}UseAtMobPctHP}]}:${Target.PctHPs}]} && ${Select[${CombatRoutines.Arg[${i},|]},Dot,Nuke,AA,Stun,ClickyNuke,Jolt]}) /call ${CombatRoutines.Arg[${i},|]}
 			/if (${Range.Between[1,${Math.Max[${${CombatRoutines.Arg[${i},|]}UseAtMobPctHP}]}:${Target.PctHPs}]} && ${Select[${CombatRoutines.Arg[${i},|]},Snare]})	/call ${CombatRoutines.Arg[${i},|]}
-			/if (${Range.Between[1,${Math.Max[${${CombatRoutines.Arg[${i},|]}UseAtMyHP}]}:${Me.PctHPs}]} && ${Select[${CombatRoutines.Arg[${i},|]},Lifetap,FeignDeath,Fade]})		/call ${CombatRoutines.Arg[${i},|]}
+			/if (${Range.Between[1,${Math.Max[${${CombatRoutines.Arg[${i},|]}UseAtMyHP}]}:${Me.PctHPs}]} && ${Select[${CombatRoutines.Arg[${i},|]},Lifetap,FeignDeath,Fade]}) /call ${CombatRoutines.Arg[${i},|]}
 			/if (!${Select[${CombatRoutines.Arg[${i},|]},Dot,Nuke,Stun,Snare,AA,Lifetap,FeignDeath,Fade,Jolt]})	/call ${CombatRoutines.Arg[${i},|]}
 		}
-
 	/next i
 	
 	/if (${CustomCombatTotal}) {
@@ -2131,7 +2143,7 @@
 	/if (!${Target.ID}) /call ReturnCamp
 	/if (!${CCTimer} && ${Target.Moving}) {
 		/varset CCTimer ${CCTimer.OriginalValue}
-		/if (${PullingMethod.Find[nav]}) /navi ${Spawn[${spawnid}].X} ${Spawn[${spawnid}].Y} ${Spawn[${spawnid}].Z}
+		/if (${PullingMethod.Find[nav]}) /nav id ${spawnid}
 		/if (${PullingMethod.Find[standard]}) /moveto id ${spawnid} loose
 	}
 	/if (${Me.Hovering}) {
@@ -2200,7 +2212,7 @@
 
 	|MQ2Nav Pulling
 	/if (${PullingMethod.Find[nav]} && !${Navigation.Active}) {
-		/navi ${Spawn[${spawnid}].X} ${Spawn[${spawnid}].Y} ${Spawn[${spawnid}].Z}
+		/nav id ${spawnid}
 		/echo Nav to ${Spawn[${spawnid}]}
 		/if (${Twist.Twisting}) {
 			/varset twisting TRUE
@@ -2227,7 +2239,7 @@
 	/if ((${Me.CombatState.Equal[COMBAT]}||${Me.XTarget}) && ${Pulling}) /call ReturnCamp
 	/if (${MoveUtils.Stuck}) /call MoveCheck
     /if (${Me.Casting.ID}||${Int[${Target.Distance}]}>${PullCastRange}||!${Target.LineOfSight} && ${PullSkillRequiresLineOfSight1}||!${Target.LineOfSight} && ${PullSkillRequiresLineOfSight1} && ${PullSkillRequiresLineOfSight2} && ${PullingTotal}==2) /return
-	/if (${Navigation.Active}) /navi off
+	/if (${Navigation.Active}) /nav stop
 	/if (${MoveUtils.Command.Equal[MOVETO]}) /moveto off
 	/if (${Me.Moving}) /keypress back
 	/delay 1s !${Me.Moving}
@@ -2374,7 +2386,7 @@
 		/next i
 	}
 	/if (${twisting} && !${Twist.Twisting}) /squelch /twist
-	/if (${PullingMethod.Find[nav]}) /navi ${XLOC} ${YLOC} ${ZLOC}
+	/if (${PullingMethod.Find[nav]}) /nav locxyz ${XLOC} ${YLOC} ${ZLOC}
 	/if (${PullingMethod.Find[standard]} && ${Pulling}) /moveto set breakonaggro off
 	/if (${PullingMethod.Find[standard]}) {
 		/moveto loc ${YLOC} ${XLOC} loose
@@ -2388,7 +2400,7 @@
     /if (${UseLeap} && ${LeapName.NotEqual[NULL]} && ${Me.AltAbilityReady[${LeapName}]} && (${Math.Distance[${Me.X},${Me.Y}:${XLOC},${YLOC}]}>250 && ${Math.Distance[${Target.X},${Target.Y}:${XLOC},${YLOC}]}<=600||${Debuff.Snared} && ${Math.Distance[${Me.X},${Me.Y}:${XLOC},${YLOC}]}>=120)) {
     	/alt act ${Me.AltAbility[${LeapName}].ID}
     	/delay 2
-    	/if (${PullingMethod.Find[nav]}) /navi ${XLOC} ${YLOC} ${ZLOC}
+    	/if (${PullingMethod.Find[nav]}) /nav locxyz ${XLOC} ${YLOC} ${ZLOC}
     	/if (${PullingMethod.Find[standard]}) /moveto loc ${YLOC} ${XLOC} loose
     }
 	/if (${Math.Distance[${Me.X},${Me.Y}:${XLOC},${YLOC}]}>16) /goto :wait
@@ -2405,32 +2417,32 @@
 	/if (!${Defined[PullingLoaded]}) /call PullingLoad
 	/if (${Me.XTarget[1].ID} && ${UseMelee} && !${Me.Combat}) /docommand ${AttackCommand}
 	/if (${Me.CombatState.NotEqual[COMBAT]} && (${Target.LineOfSight}||!${PullSkillRequiresLineOfSight1}) && ${Target.Distance}<=${PullSkillDistance1} && (${Me.AltAbilityReady[${PullSkillName1}]}||${Me.SpellReady[${PullSkillName1}]}||${FindItem[${PullSkillName1}].ItemSlot} && !${FindItem[${PullSkillName1}].Timer}||${Me.CombatAbilityReady[${PullSkillName1}]}||${Me.AbilityReady[${PullSkillName1}]})) {
-		/if (${Navigation.Active}) /navi off
+		/if (${Navigation.Active}) /nav stop
 		/call Cast "${PullSkillName1}" ${PullSkillGem1}
 	} else {
 		/if (${Me.CombatState.NotEqual[COMBAT]} && (${Target.LineOfSight}||!${PullSkillRequiresLineOfSight2}) && ${Target.Distance}<=${PullSkillDistance2} && (${Me.AltAbilityReady[${PullSkillName2}]}||${Me.SpellReady[${PullSkillName2}]}||${FindItem[${PullSkillName2}].ItemSlot} && !${FindItem[${PullSkillName2}].Timer}||${Me.CombatAbilityReady[${PullSkillName2}]}||${Me.AbilityReady[${PullSkillName2}]})) {
-			/if (${Navigation.Active}) /navi off
+			/if (${Navigation.Active}) /nav stop
 			/call Cast "${PullSkillName2}" ${PullSkillGem2}
 		}
 	}
 	/if (!${Me.CombatState.Equal[COMBAT]} && !${MovePullTimer} && ${Plugin[mq2navigation].Name.Equal[mq2navigation]}) {
 		/if (!${Defined[MovePullTimer]}) /declare MovePullTimer timer outer 1m
-		/navi ${XLOC} ${YLOC} ${ZLOC}
+		/nav locxyz ${XLOC} ${YLOC} ${ZLOC}
 		/varset MovePullTimer 1m
 	}
 	/if (${Navigation.Active} && (${Me.CombatState.Equal[COMBAT]}||${Me.XTarget})) {
-		/navi off
+		/nav stop
 		/call CheckTarget2
 	}
 	/declare i int local
 
-	/if (${Me.XTarget[1].ID} && ${Navigation.Active}) /navi off
+	/if (${Me.XTarget[1].ID} && ${Navigation.Active}) /nav stop
 	/if (${Me.XTarget[1].ID}||${Me.Feigning}) /return
 	/for i 1 to ${SpawnCount[npc]}
 		/varset PullConditions ${Ini[MyIni,Pulling,PullConditions,1]}
 		/if ((${PullConditions}) && (${NearestSpawn[${i}, npc].LineOfSight}||${PullingTotal}==1 && !${PullSkillRequiresLineOfSight1}||${PullingTotal}==2 && !${PullSkillRequiresLineOfSight2}) && ${NearestSpawn[${i}, npc noalert 1].Type.Equal[npc]} && ${Select[${NearestSpawn[${i}, npc noalert 1].ConColor},${PullConColor}]} && !${IgnoreList.Find[${NearestSpawn[${i}, npc noalert 1].CleanName}]}&& !${IgnoreAll.Find[${Spawn[loc ${XLOC${fm}} ${YLOC${fm}} npc noalert 1 radius ${If[${fm},${MQ2NavPullRadius},100]} zradius ${MQ2NavPullZRadius}].CleanName}]} && !${Me.XTarget[1].ID}) {
-			/squelch /tar ${NearestSpawn[${i}, npc noalert 1]}
-			/navi name ${NearestSpawn[${i}, npc noalert 1]}
+			/squelch /tar id ${NearestSpawn[${i}, npc noalert 1].ID}
+			/nav id ${NearestSpawn[${i}, npc noalert 1].ID}
 
 			/if (${UseMelee}||${UseArchery}) /call Attacking2
 			/return
@@ -6079,7 +6091,7 @@
 	/if (!${Spawn[id ${MoveID}].ID}||!${Following}) /return
 	/if (${Spawn[id ${MoveID}].Distance}>${DistanceToFollow}) {
 		/if (${Me.Casting.ID} && !${Me.Class.ShortName.Equal[BRD]}) /delay 15s !${Me.Casting.ID}
-		/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /navi name "${NameToFollow}"
+		/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /nav  name "${NameToFollow}"
 		/if (${FollowMethod.Find[stick]} && !${Stick.Distance}) /stick id ${MoveID} ${FollowMethod.Arg[2,|]}
 		/if (${FollowMethod.Find[adv]} && ${AdvPath.State}!=1) /afollow spawn ${MoveID}
 		/if (${FollowMethod.Find[keypress]} && !${Me.Moving}) /call MoveToLoc ${Spawn[id ${MoveID}].Y} ${Spawn[id ${MoveID}].X}
@@ -6101,7 +6113,7 @@
 		
 		/echo Following ${NameToFollow} - ID: ${MoveID}
 		/if (${Me.Casting.ID} && !${Me.Class.ShortName.Equal[BRD]}) /delay 5s !${Me.Casting.ID}
-		/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /navi name "${NameToFollow}"
+		/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /nav spawn pc ${NameToFollow}
 		/if (${FollowMethod.Find[stick]} && !${Stick.Distance}) /stick id ${MoveID} ${FollowMethod.Arg[2,|]}
 		/if (${FollowMethod.Find[adv]} && ${AdvPath.State}!=1) /afollow spawn ${MoveID}
 		/if (${FollowMethod.Find[keypress]} && !${Me.Moving}) /call MoveToLoc ${Spawn[id ${MoveID}].Y} ${Spawn[id ${MoveID}].X}
@@ -6117,7 +6129,7 @@
 	/echo Following ${NameToFollow} - ID: ${MoveID}
 	/if (!${moveup}) /varset Following 1
 	/varset UseCamp FALSE
-	/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /navi name "${NameToFollow}"
+	/if (${FollowMethod.Find[nav]} && !${Navigation.Active}) /nav spawn pc ${NameToFollow}
 	/if (${moveup}) {
 		/moveto loc ${Spawn[id ${MoveID}].Y} ${Spawn[id ${MoveID}].X} ${Spawn[id ${MoveID}].Z} loose
 		/return
@@ -7835,10 +7847,10 @@
 	/if (${Me.Hovering}) /return
   	/if (${Me.Invis}||${Me.Feigning}) /return
   	/if (${Me.Pet.ID} && ${PetGHold} && !${Me.Pet.GHold} && ${Me.AltAbility[Pet Discipline]} && ${PetGHOLD}) /pet ghold on
-	|/if (${TarID} && ${Me.Pet.Following.ID}!=${TarID} && ${Spawn[id ${TarID}].PctHPs}<=${PetAttackAt} && (${Spawn[id ${TarID}].Distance}<100||${PetAttackAt}<100)) /pet attack
   	/if (${Me.Pet.ID} && !${PetAttacking} && ${Target.ID}==${TarID} && ${Target.PctHPs}<${PetAttackAt} && ${Target.Distance}<=100) {
     	/pet attack
-   		/if (${UsePetFocusAA} && ${Me.AltAbility[Advanced Pet Discipline]}) /pet focus on
+   		/if (${UsePetFocusAA} && ${Me.AltAbility[Pet Discipline].Rank}>=3) /pet focus on
+		/if (${Me.AltAbility[Pet Discipline].Rank}>=4) /pet swarm
    		/varset PetAttacking TRUE
     }
 /return
 
Last edited:
  • Like
Reactions: EQDAB
I was able to test these changes a couple days ago; I was pulling just fine with MQ2Nav.

I did find a weird timing issue with "standard" pulling that I was unable to resolve, but MQ2Nav was fine.
 
  • Like
Reactions: EQDAB