Page 1 of 1
Move points
Posted: Mon Oct 15, 2012 4:20 pm
by Yeoman
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
Re: Move points
Posted: Mon Oct 15, 2012 4:46 pm
by dewey2461
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.
Re: Move points
Posted: Mon Oct 15, 2012 4:49 pm
by dewey2461
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.
Re: Move points
Posted: Mon Oct 15, 2012 4:51 pm
by Yeoman
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.
Re: Move points
Posted: Fri Oct 26, 2012 6:34 am
by Ralindal
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)
Re: Move points
Posted: Sat Oct 27, 2012 4:53 am
by Blitter
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.