Move points

Need help with a macro you are writing? Ask here!

Moderator: MacroQuest Developers

Yeoman
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 14, 2012 11:17 pm

Move points

Post by Yeoman » Mon Oct 15, 2012 4:20 pm

I trying to write a macro that uses /moveto loc. I have looked through archives and also mq2 wiki but I can't find out you would write a section to move to point a then point b.
I tried using a /delay but it seems to just go through the macro quickly. I looking either for suggestions, or point me in a better direction on how to write. Right now I just dealing with moving to point A, then point B, then point C, and so forth. Eventually I will want to add in other things, but right now its more learning how to write macros, and figuring out some of the things I have no been able to learn on my own.

I thinking maybe a

/if ${moveto.moving} = true

Might working or some variation of pausing , or maybe some way of writing it /if at location then move to location b.
any ideas would be helpful.

thanks

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Move points

Post by dewey2461 » Mon Oct 15, 2012 4:46 pm

If you aren't a VIP member donate $20 to the devs and get VIP access. There are many macros and plugins which do what you are looking to do.

I use a plugin called MQ2AdvPath which makes it pretty easy to record and play back a path.

/plugin MQ2AdvPath

/record
;-- move around
/record save mypath

Then in your macro you use the following

/play mypath
/delay 30s ${AdvPath.Playing}

This is from memory so may be some mistakes.

dewey2461
Contributing Member
Contributing Member
Posts: 1759
Joined: Sun Apr 17, 2005 1:53 am

Re: Move points

Post by dewey2461 » Mon Oct 15, 2012 4:49 pm

Other thoughts:

I think the MQ2MoveUtils has a move to location command. Would be closer to what you asked for. Same logic though. Call /move loc y,x then /delay with the move status. Again don't know the exact systax but should point you in the right direction.

Yeoman
decaying skeleton
decaying skeleton
Posts: 5
Joined: Sun Oct 14, 2012 11:17 pm

Re: Move points

Post by Yeoman » Mon Oct 15, 2012 4:51 pm

the /moveto loc works, I am looking for a delay, or a /if at such and such loc then proceed to location 2, and so on.

Ralindal
a hill giant
a hill giant
Posts: 153
Joined: Thu Jul 26, 2007 4:51 pm

Re: Move points

Post by Ralindal » Fri Oct 26, 2012 6:34 am

Well, you can use /delay with a condition, so you could:

/delay 100 ${Me.DistanceTo[loc Y X] < 10}

(syntax might be off, I rarely use the MQ macro language)

Blitter
a hill giant
a hill giant
Posts: 151
Joined: Sat Dec 29, 2007 11:07 pm
Location: Sky

Re: Move points

Post by Blitter » Sat Oct 27, 2012 4:53 am

Code: Select all

 /moveto loc ${Path[${PathNum},${i},1]} ${Path[${PathNum},${i},2]}
     :MoveLoop1 
     /delay 1
     /doevents
     /if (!${MoveTo.Stopped}) /goto :MoveLoop1
Maybe a better way could be

Code: Select all

/moveto loc Y X
/delay 60s ${MoveTo.Stopped}
/if (!${MoveTo.Stopped}) {
    .....some sort of interference , problem with the path - do something else , back up or strafe or what ever and /goto moveto :)
}

for a bigger example..

Code: Select all

/stopsong
  /varset i 1
   :moveloop
     /bc [+Y+]Path : [+y+]${CampNum}[+Y+]  Point : [+y+]${i}  [+x+]
      /squelch /moveto loc ${Path[${CampNum},${i},1]} ${Path[${CampNum},${i},2]}
     :MoveLoop1 
       /if (${NearestSpawn[1, NPC los radius 180 zradius 30 noalert 1].ID}) {
         /keypress DOWN
         /if (${Me.CombatState.Equal[COMBAT]}) /goto :ReturnPath
         /tar id ${NearestSpawn[1, NPC los radius 180 zradius 30 noalert 1].ID}
         /delay 2s ${Target.ID}==${NearestSpawn[1, NPC los radius 180 zradius 30 noalert 1].ID}
         /if (${Target.Distance}>140) {
           /delay 5s ${Me.AltAbilityReady[Boastful Bellow]}
           /bc Bellow pull
           /alt activate 199
           /delay 6
         } 
         /cast "Slumber of Kolain Rk. II"
         /delay 1s
         /delay 4s ${Me.CombatState.Equal[COMBAT]}
         /delay 5
         /echo ${Me.XTarget}
         /stopsong
         /if (${Me.XTarget}==2) {
           /delay 4
           /if (${Me.XTarget}==2) {
           /bc Boastful Bellow SS
           /alt activate 199
           }
         }
         /echo Returning back
         /goto :ReturnPath
       }
     /delay 1
     /if (!${MoveTo.Stopped}) /goto :MoveLoop1
  /varcalc i ${i}+1
 || /echo ${Bool[${Path[${CampNum},${i},1]}]}   ${Path[${CampNum},${i},1]}
  /if (${Bool[${Path[${CampNum},${i},1]}]}) /goto :moveloop
  /delay 1s
  /bc End of Path Encounted - No Aggro
  /call CampFireBack
Thats my bard pull code - it's specific for an instance, but you can get the gist of it.