Goto page 1, 2  Next Software Documentation mq2moveutils
Reply
mq2moveutils
Developers original post: http://www.macroquest2.com/phpBB3/viewtopic.php?f=31&t=15909

The main features of MQ2MoveUtils are as follows:

* Stick: This is the main use for this plugin and allows you to "stick" a certain distance from your target. It can be set to always stick behind the target, or always in front if you're tanking.
* MoveTo: Move to a certain point or target. This has some built-in logic that will allow it to move around obstacles.
* MakeCamp: You can set a spot as a "camp", so that you can return to it if you get too far away, or after combat, etc.
* Circle: Run in a circle.

[edit]
Commands
[edit]
/stick

* /stick [on|off]

Turn stick on and off. The default for /stick is to stick at max melee range.

* /stick [hold]

Sticks to current target even if you lose/change target

* /stick [<dist>]

Stick at <dist> units to your target

* /stick [-<dist>]

Subtract the dist used from the current stick distance (ie. it will put you <dist> units closer to your target)

* /stick [<pct>%]

Stick at <pct> of max melee range from target. Eg. if max melee range is 20, then /stick 50% will stick you at 10 range

* /stick [behind]

Sticks you behind your target.
Note: Be careful with this option if you do not have the Health of Target's Target Leadership Ability. If you have HoTT active and you are the Target of your Target, then you will not try to get behind. However if you do not have this ability and you gain aggro, you will spin around very quickly as you try and get behind your target while it continues to face you.

* /stick [behindonce]

Get behind the target once then convert to a regular stick

* /stick [pin]

Sticks you to the side of the target, same considerations as /stick behind apply

* /stick [!front]

Sticks you anywhere but in front of the target, will only reposition you if you would be in front. Same considerations apply to this as the "behind" and "pin" options

* /stick [moveback]

Moveback will back your toon up to the current <dist> value, keeping you at a consistant distance from your target

* /stick [loose]

Uses a time delay so adjustments to your position do not occur as frequently, simulating a more human-like control

* /stick [uw]

This changes the facing of your toon, and is very useful under water, where you will try and follow the Z coordinate of the spawn you are facing

* /stick [id <spawn>]

Allows you to stick to a specific spawn ID

* /stick [mpause]

By enabling mpause, manually moving your toon will not break stick and will rather put it on hold. When you are done manually moving, the /stick command will once again kick in and you will continue following the same target as before

* /stick [pause|unpause]

Pause and unpause the stick command

* /stick [save|load]

Some settings are stored in the INI file. This allows you to save your current preferences to the INI file, or load the saved preferences this file

* /stick [mindelay <time in ms>]

When used with /stick this delay is used when mpause is enabled to decide the smallest value to use to resume the /stick command after a manual move

* /stick [maxdelay <time in ms>]

When used with /stick this delay is used when mpause is enabled to decide the largest value to use to resume the /stick command after a manual move

[edit]
/moveto

* /moveto [loc Y X|off]

Moves you to the specified location, or stops the current /moveto (by using "/moveto off")

* /moveto [<dist>]

Sets the maximum distance from your moveto point that you consider acceptable. This option is here because it's not always possible to move to the exact point that you specify, so the plugin will move you to within <dist> units of the moveto point before stopping. Eg. if you use "/moveto 5", you will always move to within 5 units from your moveto point

* /moveto [-<dist>]

Subtract <dist> from the current moveto distance

* /moveto [mpause]

By enabling mpause, manually moving your toon will not break moveto and will rather put it on hold. When you are done manually moving, the /moveto command will once again kick in and you will continue moving to your moveto point

* /moveto [pause|unpause]

Pause and unpause the moveto command

* /moveto ID [Spawn ID]

Moves to the specified Spawn ID or moves to your current target if no Spawn ID is provided

* /moveto [mindelay <time in ms>]

When used with /moveto this delay is used when mpause is enabled to decide the smallest value to use to resume the /moveto command after a manual move.

* /moveto [maxdelay <time in ms>]

When used with /moveto this delay is used when mpause is enabled to decide the largest value to use to resume the /moveto command after a manual move.

* /moveto [save|load]

Save or load the moveto settings

[edit]
/makecamp

* /makecamp [on|off]

Turns MakeCamp logic off or turns it on, using your current location as the anchor point

* /makecamp [<y> <x>]

Turns MakeCamp logic on using the supplied Y,X location as the camp anchor point

* /makecamp [mindelay <time in ms>]

If outside the MakeCamp radius this is the minimum delay used before returning to a point within the camp radius

* /makecamp [maxdelay <time in ms>]

If outside the MakeCamp radius this is the maxium delay used before returning to a point within the camp radius

* /makecamp [leash]

Toggle the leash logic on and off. Leash is the maximum distance away from your camp anchor your toon will be allowed to go using another MQ2MoveUtils command such as /stick

* /makecamp [leash <dist>]

Turns leash logic ON and sets the leash length

* /makecamp [radius <dist>]

Sets the camp radius. This is the maximum distance you can be from the anchor point and still be considered "in camp"

* /makecamp [mpause]

By enabling mpause, manually moving your toon will not break makecamp and will rather put it on hold. When you are done manually moving, the /makecamp command will once again kick

* /makecamp [pause|unpause]

Pause and unpause the MQ2MoveUtils makecamp functionality

* /makecamp [return]

Returns your toon to the camp immediatly

* /makecamp [save|load]

Save or load the makecamp settings

[edit]
/circle

* /circle [on|off]

Sets the anchor point to your current location, and uses the currently set radius

* /circle [on <radius>]

Sets the anchor point to your current location, and uses the specified <radius>

* /circle [<y> <x>]

Sets Y,X anchor point around which to circle

* /circle [mpause]

By enabling mpause manually moving your toon will not break the circle but will instead put it on hold, when you get done manually moving the toon the /circle command will once again kick in.

* /circle [pause|unpause]

Pause and unpause the /circle command

* /circle [drunken]

Does not move in a perfect circle but instead the circle is more human-like

* /circle [mindelay <time in ms>]

When used with /circle this delay is used when mpause is enabled to decide the smallest value to use to resume the /stick command after a manual move.

* /circle [maxdelay <time in ms>]

When used with /circle this delay is used when mpause is enabled to decide the largest value to use to resume the /stick command after a manual move.

* /circle [save|load]

Save or load the circle settings from the INI file

[edit]
Top-Level Objects
[edit]
Stick

* string ${Stick}
Same as ${Stick.Status} (see below).
* string ${Stick.Status}
Return ON if currently sticking, OFF if not, or PAUSED if it is paused
* bool ${Stick.Active}
Returns TRUE if currently sticking, FALSE if not
* bool ${Stick.Behind}
Returns TRUE if behind target
* float ${Stick.Distance}
The current stick distance
* bool ${Stick.Loose}
Returns TRUE if stick loose is set
* bool ${Stick.MoveBack}
Returns TRUE if stick is set to moveback
* bool ${Stick.MoveBehind}
Returns TRUE if stick is set to move behind the target
* bool ${Stick.MovePause}
Returns TRUE if stick movement is paused due to manual intervention
* bool ${Stick.Paused}
Returns TRUE if stick has been paused with "/stick pause"
* bool ${Stick.Pin}
Returns TRUE if /stick pin is being used
* bool ${Stick.Stopped}
Returns TRUE if you are stationary

[edit]
MoveTo

* string ${MoveTo}
Return ON if currently moving to a location, OFF if not, or PAUSED if it is paused
* bool ${MoveTo.Moving}
Returns TRUE if moving to location, FALSE if not
* bool ${MoveTo.Stopped}
Returns TRUE if stopped, FALSE if not

[edit]
MakeCamp

* string ${MakeCamp}
Same as ${MakeCamp.Status} (see below).
* string ${MakeCamp.Status}
Return ON if MakeCamp is enabled, OFF if it is not enabled or PAUSED if it is paused
* float ${MakeCamp.AnchorX}
The X Loc of the anchor point
* float ${MakeCamp.AnchorY}
The Y Loc of the anchor point
* float ${MakeCamp.CampRadius}
The current camp radius
* bool ${MakeCamp.Leash}
Returns TRUE if the leash is enabled, FALSE if not
* float ${MakeCamp.LeashLength}
The length of the leash
* int ${MakeCamp.MaxDelay}
The maximum delay before resuming /makecamp functionality after manual intervention
* int ${MakeCamp.MinDelay}
The minimum delay before resuming /makecamp functionality after manual intervention
* bool ${MakeCamp.Returning}
Returns TRUE if returning to camp, FALSE if not

[edit]
INI File

A default INI file is created (if it doesn't exist) when you issue one of the "save" commands (eg. /stick save, /moveto save, etc).

The [Defaults] section contains global defaults for all users. New sections can be added with character names as titles to override the default values. An example INI file is below, with explanations of the options underneath:

[Defaults]
AutoPause=on
BreakOnWarp=on
BreakDist=250.0
BreakOnGate=on
Verbosity=1
ManualPause=on
MinDelay=500
MaxDelay=5000
CampRadius=0.0
LeashLength=0.0
StuckLogic=on
stuckCheck=5
stuckDist=0.1

* AutoPause [on/off]

This enables or disables the automatic pause on cast feature. This does not apply to bards, since they can move while singing.

* BreakOnWarp [on/off]

With BreakOnWarp on, any movement will be terminated if the target moves too far away. See BreakDist to set the distance.

* BreakDist

This sets how far away the target has to be before it will be considered too far away to continue following.

* BreakOnGate [on/off]

This enables/disables monitoring chat for "TargetName Gates". Movement will be terminated if it determines that the target has gated.

* ManualPause [on/off]

Stores your preference for the mPause functionality built into the various commands.

* MinDelay and MaxDelay

Stores your preference for the resuming after manual move. These values are also used to return to camp at the end of a /stick or /moveto command when using /makecamp.

* CampRadius

This is the default value used for /makecamp radius.

* LeashLength

This is the default value used for /makecamp leash length

* StuckLogic [on/off]

Enable or disable the logic used to determine if you are stuck behind an object when using /stick or /moveto.

* stickCheck

The number of pulses that are averaged out to come up with the stuckDist comparison number.

* stuckDist

This is the average distance covered during the the last stickCheck pulses to use as a comparison. Eg. if you normally would average .5 distance units covered in a 5 pulse period, then if your average drops down to .1 moved in the last 5 pulses then you are probably stuck and the stuck logic should kick in.
Fri Feb 06, 2009 6:48 pm
Co-Founder (Retired)
limit to current zone
Is there a way to make the various commands work only if the character you are sending them to is in the same zone as you are?
_________________
Denizen
Sat Mar 22, 2014 8:17 am
Does multi line parse variables before executing the command? That's probably a long shot.... But something like

/bca Tom //multiline ; ${If[<criteria>,"/command",]}
Sat Mar 22, 2014 12:49 pm
Project Lead
That's probably a dumb idea, it almost certainly parses afterwards
Sat Mar 22, 2014 12:50 pm
Project Lead
What if you did something like...

/bca Tom /stick ${If[<condition>,<real command parameters>,<nonsense parameters>]}

Or wait for one of the other Guys whose probably got a real solution :)
Sat Mar 22, 2014 12:54 pm
Project Lead
I once saw a great /stick that only worked for those in the same zone. I don't remember exactly how it functioned and I don't have it bookmarked.

Best I could do in a couple minutes. I'm not sure how to make it generic without making it multi-step (alias or social hotkey). It's worked every time I tried it.

/noparse /bca //docommand ${If[${Spawn[=charactername].ID},/stick id ${Spawn[=charactername].ID},/echo not in zone]}
Sat Mar 22, 2014 4:04 pm
Senior Project Member
thanks for th ideas
I'll test these out. Thank you.

The ideal would be something in an ini file that would limit every stick command to be in the same zone as the lead character, in my case a tank. Your examples will require hot keys, I can't imagine doing them on the fly as I sometimes do with stick.

It is so annoying to watch your characters trying to follow a stick command in another zone and running willy nilly to their deaths. It is even worse when there is lag, so that some have zoned and others have not, and those that have zoned run off immediately to their deaths.
_________________
Denizen
Sun Mar 23, 2014 8:57 am
There are some hot keys in mq2emucharacters that only work when they are in the zone. Most of the ini strings in there get parsed first and then executed. So you can put different commands into an If object. There are several examples of that in there. I'm on my phone but I can pull one out later if you want.
Sun Mar 23, 2014 9:14 am
Project Lead
The ideal would be something in an ini file that would limit every stick command to be in the same zone as the lead character, in my case a tank. Your examples will require hot keys, I can't imagine doing them on the fly as I sometimes do with stick.



Do you type /stick manually?

/alias /useawesomestick /noparse /bca //docommand ${If[${Spawn[=charactername].ID},/stick id ${Spawn[=charactername].ID},/echo not in zone]}

Play around with the /useawesomestick name to be something quick and convenient.
Sun Mar 23, 2014 7:50 pm
Senior Project Member
It's not a short command, but it should do exactly what you want it to (and then some).

Creating a gigantic-one-line alias in your MacroQuest2.ini file that reads:

Macro
More +
/multiline @ /echo [${Time.Time24}] Command issued: /stickme@/noparse /bca //multiline ; /if (!${Defined[StickZone]}) /declare StickZone string global;/if (!${Defined[StickTar]}) /declare StickTar int global;/if (!${Defined[Listening]}) /declare Listening bool global TRUE@/bca //varset StickZone ${Zone.Name}@/bca //varset StickTar ${Me.ID}@/noparse /bca //if (${Listening} && ${Zone.Name.Equal[${StickZone}]} && ${Spawn[${StickTar}].ID} && ${Spawn[${StickTar}].Distance}<200 && ${LineOfSight[${Me.Y},${Me.X},${Me.Z}:${Spawn[${StickTar}].Y},${Spawn[${StickTar}].X},${Spawn[${StickTar}].Z}]}) /multiline ; /echo [${Time.Time24}] Sticking to ${Spawn[${StickTar}].CleanName};/face ID ${StickTar} fast;/stick ID ${StickTar} 10@/noparse /bca //timed 3 /if (${Stick.Status.Equal[OFF]} && ${Listening}) /bc [${Time.Time24}] Stick target isn't nearby. Staying put.


Will broadcast commands to your boxes to do the following...
[1] Declare three global variables if they do not exist. They are StickZone, StickTar, and Listening. Global variables do not need an actively running macro to be created, accessed, or modified. This should meet the needs of both people that run macros and people that just do basic hotkeys with EQBCServer and plugins.
[2] Set those variables to the zone name (string), ID (int), and TRUE/FALSE (bool) of the broadcasting character. I use ${Listening} in my macros to allow characters to ignore commands, such as this stick command. That is the only reason it appears here.
[3] Check if they are listening for commands, in the same zone, within range (200 units), and within line of sight of the broadcasting character. Then proceed to stick if these are all true.
[4] If anything in [3] is false, then they will broadcast that they cannot stick to this character in the MQ2 window.
Last edited by Noren on Wed Apr 02, 2014 1:48 pm; edited 2 times in total
Sun Mar 23, 2014 9:34 pm
thanks
This is pretty awesome...thanks
_________________
Denizen
Tue Mar 25, 2014 9:57 am
That's great, wish we had upvote buttons
Tue Mar 25, 2014 11:47 am
Project Lead
I gifted a month of gold

Lacking an upvote button that is as close to reddit as I can get
Tue Mar 25, 2014 11:50 am
Project Lead
I would try this
Macro
More +
/bca //if (${Zone.ID}==${NetBots[${Me.Name}].Zone}) /moveto loc ${Me.ID}

or
Macro
More +
/bca //if (${Zone.ID}==${NetBots[${Me.Name}].Zone}) /stick id ${Me.ID}
Last edited by ultrax on Fri Mar 28, 2014 8:01 pm; edited 1 time in total
Tue Mar 25, 2014 1:21 pm
Listen to This Guy
Ultrax, those are evaluated on the character issuing the command. The character issuing the command is always in the same zone as the character issuing the command.

The Zone.ID portion needs to be passed via /noparse while the Me.Name portion has to be parsed (or hardcoded). You can't mix n match noparsed with parsed in a single command (hence the global variables in Noren's example).
Tue Mar 25, 2014 2:51 pm
Senior Project Member
Goto page 1, 2  Next Software Documentation mq2moveutils
Reply