Bot/zh: Difference between revisions

From Minecraft Parkour Wiki
Content added Content deleted
(Created page with "==== 范例: ====")
(Created page with "* starting from Y=200: %blip 4 * 荷叶 17 连卡角:%blip_top 17 0.015625")
Line 93: Line 93:
==== 范例: ====
==== 范例: ====


<div lang="en" dir="ltr" class="mw-content-ltr">
* starting from Y=200: %blip 4
* starting from Y=200: %blip 4
* 17 chained blips on lilypad: %blip_top 17 0.015625
* 荷叶 17 连卡角:%blip_top 17 0.015625
</div>





Revision as of 02:36, 3 January 2023

Other languages:

MCPK 機械人是一個致力於取代 MathBot 來計算運動的 Discord 機械人。實際上,一直重新定義函數越來越令人厭煩,而且語法使用起來也不太方便。MathBot 作為通用計算工具仍然非常有用。

相對於 Mathbot 的優點

  • 更充實且更具描述性的輸出
  • 內置了函數:不需要手動重定義它們。
  • 機械人使用浮點數運算而不是分數,因此模擬更精確。
  • 對於模擬運動:
    • X 和 Z 運動都被考慮在內,並計入了動量閾值。
    • 操作是從左到右讀取的,讀寫起來更方便。
    • 所有操作都有方向這一可選參數。



距離

%distance <X> [Z]

返回 X 乘 Z 跳躍的真距(以方塊為距離單位,Z 方向為可選變量)

公式就是簡單的


範例:

  • 4b 跳躍:%distance 4
  • 3x3 跳躍:%distance 3 3



滯空時間

%duration <跳躍高度> [天花板高度]

對於給定的高度,返回一個跳躍的滯空時間(高度以方塊為單位,天花板高度為可選變量)


範例:

  • -1.5b 跳躍:%duration -1.5
  • 3bc +1 跳躍:%duration 1 3




高度

%height <起跳 Tick 數> [天花板高度]

返回玩家 n ticks 後的起跳高度(天花板高度可選填)


範例:

  • 12t 跳躍:%height 12
  • 2bc 9t 跳躍:%height 9 2



卡角

%blip <重複次數> [初始高度] [卡角高度] [最後跳躍 Tick 數]

返回連續卡角後玩家的高度(按慣例,Y=0 作為地面)

  • <重複次數> 為連續卡角的次數
  • [初始高度] 是玩家第一次起跳前的初始高度(默認:0.0)
  • [卡角高度] 是卡角所用平面的高度(例如:地毯為 0.0625,活板門為 0.1875……)
  • 除非指定了 [最後跳躍 Tick 數],否則按照默認值(6 tick)來返回跳躍的最高高度。


範例:

  • starting from Y=200: %blip 4
  • 荷葉 17 連卡角:%blip_top 17 0.015625



Simulate

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

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


操作:

操作擁有兩個變量:

  • 刻:操作的持續時間,以刻為單位
  • 方向(可選):操作的方向(不是 facing),以度為單位
操作 介紹
stop, stop_air 無輸入
sneak, sneak_air 潛行
sneak45, sneak45_air 帶有 45°斜跑的潛行
sneaksprint,

sneaksprint_air

帶有疾跑的潛行(用於 1.14+,or for sprint delay in air)
sneaksprint45,

sneaksprint45_air

Sneak with sprint (used for 1.14+, or for sprint delay in air)
walk, walk_air 行走
walk45, walk45_air 帶有 45°斜跑的行走
sprint, sprint_air 疾跑
sprint45, sprint45_air 帶有 45°斜跑的疾跑
stopjump 無移動跳躍
walkjump 無疾跑跳躍
walkjump45 無疾跑跳躍,在跳躍期間使用 45°斜跑
Lwalkjump

Rwalkjump

無疾跑跳躍,在跳躍後的第一 tick 向左(Left)或右(Right)斜跑斜跑。
sprintjump 疾跑跳躍
sprintjump45 疾跑跳躍,在跳躍期間使用 45°斜跑
Lsprintjump

Rsprintjump

疾跑跳躍,在跳躍後的第一 tick 向左(Left)或右(Right)斜跑。

範例:用於 rex bwmm

Lsprintjump45

Rsprintjump45

疾跑跳躍,在跳躍期間向左(Left)或右(Right)斜跑斜跑。

範例:用於 1bm 5-1

在操作前添加「max_」以獲得該操作的最大加速(將該操作重複 20 次)


特殊符號:

  • MomentumMM,以及 | 將當前的操作設置為助跑(在最後一 tick 重置位置的負值)
  • Blocks,和 b 將輸出的落地距離轉換成方塊(如果不為零,在 X 和 Z 軸上 ± 0.6)
  • Meters,和 m 將輸出的落地距離轉換成米(與默認的值相同)
  • Positionpos,以及 p 將輸出轉換為相對位置(當你不在計算跳躍距離時使用)



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).



範例:

  • 延立:% sprint | sprintjump(12)
  • rex bwmm:% walkjump(12,180) walk(1,180) Lsprintjump(12) | sprintjump(12)
  • 1bm 5-1:% walkjump45(12,170) walk45(1,170) Lsprintjump45(1,-10) sprint45_air(11) |