Bot: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
m (explanation for L/Rsprintjump and L/Rsprintjump45)
(complete documentation)
Line 1: Line 1:
== Actions: ==
== Duration ==
'''%duration''' <jumpHeight> ''[ceilingHeight]''


Returns the duration of a jump with the given height (heights in blocks, ceilingHeight is optional)
Actions take two arguments:


==== Examples: ====
* Ticks : int
* Direction (optional) : float


* -1.5b jump: %duration -1.5
* 3bc +1 jump: %duration 1 3


stop, stop_air


sneak, sneak_air


== Height ==
sneak45, sneak45_air
'''%height''' <jumpTicks> ''[ceilingHeight]''


Returns the jump height of the player after n ticks (ceilingHeight is optional)
walk, walk_air


==== Examples: ====
walk45, walk45_air


* 12t jump: %height 12
sprint, sprint_air
* 2bc 9t jump: %duration 9 2


sprint45, sprint45_air


walkjump


== Distance ==
walkjump45
'''%distance''' <X> ''[Z]''


Returns the real distance of a X by Z jump (distances in blocks, Z is optional)
sprintjump


The formula is simply <math>\sqrt{max(0,X-0.6)^2 + max(0,Z-0.6)^2}</math>
sprintjump45


==== Examples: ====
Lsprintjump, Rsprintjump (sprintjump with strafe held on the first tick, used for rex bwmm, for example)


* 4b jump: %distance 4
Lsprintjump45, Rsprintjump45 (sprintjump with strafe held, facing 45°, used for 1bm 5-1, for example)
* 3x3 jump: %distance 3 3




== Special Tokens ==
'''Momentum''', '''MM''', and '''|''' sets the previous actions as momentum (resets the position minus the last tick)


== Simulate ==
'''Blocks''' and '''b''' convert the output landing distance to blocks (± 0.6 to X and Z if nonzero)


'''%simulate''' <actions> (or simply '''%'''<actions>)
'''Meters''', and '''m''' convert the output landing distance to meters (same values as default)


Reads the given actions from left to right, and simulates the resulting movement.
'''Position''', '''pos''', and '''p''' convert the output to (used when you're not calculating jump distance)


Here are the advantages (over using Mathbot):


* The functions are built-in: no need to redefine them manually.
== Usage ==
* X and Z movement are both considered.
* The bot uses float math instead of fractions, so the simulation is more accurate.
* It's way easier to read and write a sequence of actions from left to right.
* All actions take direction as an optional argument.

=== Actions: ===
Actions take two arguments:
* Ticks : the duration of the action, in ticks
* Direction (optional) : the direction (not facing) of the action, in degrees
{| class="wikitable"
!Action
!Description
|-
|stop, stop_air
|No input
|-
|sneak, sneak_air
|Sneak
|-
|sneak45, sneak45_air
|Sneak with 45° strafe
|-
|walk, walk_air
|Walk
|-
|walk45, walk45_air
|Walk with 45° strafe
|-
|sprint, sprint_air
|Sprint
|-
|sprint45, sprint45_air
|Sprint with 45° strafe
|-
|walkjump
|Jump without sprinting
|-
|walkjump45
|Jump without sprinting, 45° strafe throughout the jump
|-
|sprintjump
|Sprintjump
|-
|sprintjump45
|Sprintjump forward, start 45° strafe after the first tick
|-
|Lsprintjump, Rsprintjump
|Strafe '''L'''eft or '''R'''ight on the first tick of a sprintjump.
Example: used for rex bwmm
|-
|Lsprintjump45, Rsprintjump45
|Strafe '''L'''eft or '''R'''ight throughout a sprintjump.
Example: used for 1bm 5-1
|}
For jump actions, add "max_" in front to get the maximum jump distance with that action.

=== Tokens: ===

* '''Momentum''', '''MM''', and '''|''' sets the previous actions as momentum (resets the position minus the last tick)

* '''Blocks''' and '''b''' convert the output landing distance to blocks (± 0.6 to X and Z if nonzero)

* '''Meters''', and '''m''' convert the output landing distance to meters (same values as default)

* '''Position''', '''pos''', and '''p''' convert the output to (used when you're not calculating jump distance)

=== Usage: ===
The parser reads the actions and tokens from left to right. Actions and tokens should be separated by spaces.
The parser reads the actions and tokens from left to right. Actions and tokens should be separated by spaces.


Line 50: Line 118:


The '''Blocks''', '''Meters''', and '''Position''' tokens are to be used at the end of the sequence (mutually exclusive).
The '''Blocks''', '''Meters''', and '''Position''' tokens are to be used at the end of the sequence (mutually exclusive).

=== Examples: ===

* hh timing: % sprint | sprintjump(12)
* rex bwmm: % walkjump(12,180) walk(1) Lsprintjump(12) | sprintjump(12)
* 1bm 5-1: % walkjump(12,170) walk(1,170) Lsprintjump45(1,-10) sprint45_air(11) | sprintjump45(14) b

Revision as of 13:32, 8 January 2021

Duration

%duration <jumpHeight> [ceilingHeight]

Returns the duration of a jump with the given height (heights in blocks, ceilingHeight is optional)

Examples:

  • -1.5b jump: %duration -1.5
  • 3bc +1 jump: %duration 1 3


Height

%height <jumpTicks> [ceilingHeight]

Returns the jump height of the player after n ticks (ceilingHeight is optional)

Examples:

  • 12t jump: %height 12
  • 2bc 9t jump: %duration 9 2


Distance

%distance <X> [Z]

Returns the real distance of a X by Z jump (distances in blocks, Z is optional)

The formula is simply

Examples:

  • 4b jump: %distance 4
  • 3x3 jump: %distance 3 3


Simulate

%simulate <actions> (or simply %<actions>)

Reads the given actions from left to right, and simulates the resulting movement.

Here are the advantages (over using Mathbot):

  • The functions are built-in: no need to redefine them manually.
  • X and Z movement are both considered.
  • The bot uses float math instead of fractions, so the simulation is more accurate.
  • It's way easier to read and write a sequence of actions from left to right.
  • All actions take direction as an optional argument.

Actions:

Actions take two arguments:

  • Ticks : the duration of the action, in ticks
  • Direction (optional) : the direction (not facing) of the action, in degrees
Action Description
stop, stop_air No input
sneak, sneak_air Sneak
sneak45, sneak45_air Sneak with 45° strafe
walk, walk_air Walk
walk45, walk45_air Walk with 45° strafe
sprint, sprint_air Sprint
sprint45, sprint45_air Sprint with 45° strafe
walkjump Jump without sprinting
walkjump45 Jump without sprinting, 45° strafe throughout the jump
sprintjump Sprintjump
sprintjump45 Sprintjump forward, start 45° strafe after the first tick
Lsprintjump, Rsprintjump Strafe Left or Right on the first tick of a sprintjump.

Example: used for rex bwmm

Lsprintjump45, Rsprintjump45 Strafe Left or Right throughout a sprintjump.

Example: used for 1bm 5-1

For jump actions, add "max_" in front to get the maximum jump distance with that action.

Tokens:

  • Momentum, MM, and | sets the previous actions as momentum (resets the position minus the last tick)
  • Blocks and b convert the output landing distance to blocks (± 0.6 to X and Z if nonzero)
  • Meters, and m convert the output landing distance to meters (same values as default)
  • Position, pos, and p convert the output to (used when you're not calculating jump distance)

Usage:

The parser reads the actions and tokens from left to right. Actions and tokens should be separated by spaces.

The Momentum token can be used anywhere between two actions.

The Blocks, Meters, and Position tokens are to be used at the end of the sequence (mutually exclusive).

Examples:

  • hh timing:  % sprint | sprintjump(12)
  • rex bwmm:  % walkjump(12,180) walk(1) Lsprintjump(12) | sprintjump(12)
  • 1bm 5-1:  % walkjump(12,170) walk(1,170) Lsprintjump45(1,-10) sprint45_air(11) | sprintjump45(14) b