mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
[skip ci] Update document (#2468)
* Update execif document * Update installation guide * Add simple script page * Add text script page to sidebar
This commit is contained in:
parent
42abf928fb
commit
3570ef605e
35 changed files with 82 additions and 28 deletions
|
|
@ -470,7 +470,7 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
|||
|
||||
- **Usage:**
|
||||
|
||||
Basic usage: `/execif <condition (C# expression)> ---> <command>`
|
||||
Basic usage: `/execif <condition (C# expression)> <command>`
|
||||
|
||||
- **Examples:**
|
||||
|
||||
|
|
@ -478,30 +478,38 @@ In scripts and remote control, no slash is needed to perform the command, eg. `q
|
|||
|
||||
```
|
||||
/set test=Something
|
||||
/execif test == "Something" ---> send Success!
|
||||
/execif 'test == "Something"' "send Success!"
|
||||
```
|
||||
|
||||
<div class="custom-container tip"><p class="custom-container-title">Tip</p>
|
||||
|
||||
**You can use single quote (`'`) to wrap your expression if the expression contains double quote (`"`)**
|
||||
|
||||
**Adding back-slash (`\`) before the double quote will also work (`/execif "test == \"Something\"" "send Success!"`)**
|
||||
|
||||
</div>
|
||||
|
||||
```
|
||||
/set test2=1
|
||||
/execif test2 == "1" ---> send Success 2!
|
||||
/execif 'test2 == "1"' "send Success 2!"
|
||||
```
|
||||
|
||||
Basic C# expression:
|
||||
|
||||
```
|
||||
/execif 1 + 2 + 3 == 6 ---> send Success!
|
||||
/execif "1 + 2 + 3 == 6" "send Success!"
|
||||
```
|
||||
|
||||
Using MCC class:
|
||||
|
||||
```
|
||||
/execif MCC.GetHealth() == 20.0 ---> send Success!
|
||||
/execif "MCC.GetHealth() == 20.0" "send Success!"
|
||||
```
|
||||
|
||||
Using in combination with [`execmulti`](#execmulti):
|
||||
|
||||
```
|
||||
/execif 1 == 1 ---> execmulti send 1 -> send 2 -> send 3
|
||||
/execif "1 == 1" "execmulti send 1 -> send 2 -> send 3"
|
||||
```
|
||||
|
||||
### `execmulti`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue