Utility Commands
If you edit the commands in-game don't add the - that is before all examples.
DELAY
Info: Delays a command line for seconds
Command: DELAY {amount}
{amount}: To how long you want commands to be delayed (In seconds)
Example:
DELAYTICK
Info: Delays a command line for game ticks (20 ticks = 1 second)
Command: DELAYTICK {amount}
{amount}: To how long you want commands to be delayed (In ticks)
Example:
IF
CURRENTLY ONLY WORKS IN PLAYER RELATED AND ENTITY RELATED COMMANDS
Info: Executes commands if condition is met
Command: IF {condition_without_spaces} {command1} <+> {command2} <+> ...
{condition_without_spaces}: The condition for the IF to decide whether it runs or not.
Symbols: =, !=, >=, <=, >, <
It supports () for priority , && for AND and || for OR
{command1},{command2}: The commands that will be executed
Example:
WHILE
Info: Repeats indefinitely as long as the condition is met. It is also running in async
Command: WHILE {condition_without_spaces} {delay_in_ticks} {command1} <+> {command2} <+> ...
{condition_without_spaces}: The condition for the while loop to decide whether it continues or stops
{delay_in_ticks}: The delay before the next repetition
Delay supports decimals value but they are casted to the next integer (20.1 -> 20)
{command},{command2}: The commands that will be executed in repeat
Example:
It runs async + Condition support double placeholders, example %player_x%>%player_z%
The command will be stopped if the player is offline
LOOP
LOOP START
Info: First part of the command
Command: LOOP START: {amount}
{amount}: Number of times a command gets repeated. Placeholders are supported
LOOP END
Info: Last part of the command
Command: LOOP END
Example: (This is what you will see on config)
This is what the ExecutableItems plugin sees when it runs
Explanation:
When the plugin runs the commands, it duplicates the commands inside the loop commands to reduce the number of command lines in your config to make your config cleaner and since RANDOM RUN gives each command equal rates, the estimated rate will be:
50% chance to get an apple
30% chance to get iron
20% chance to get diamond
It supports placeholders
FOR - ENDFOR
Command that allows you to target multiple elements inside a list
What exactly happened here is that the FOR command will run 3 times because inside the bracket symbols, there are 3 values which are Special70
, Ssomar
and Vayk
.
The for1
word will be used as an "identifier" for that FOR command so we can use the placeholder for it.
So when the effect command runs for the first time, %for1% will return " Special70" then "Ssomar" for the second and "Vayk" for the third timehinhin
Don't overthink about the >
symbol.
What exactly happened here is that the FOR loops got stacked so the first FOR command will run the commands in it which is another FOR command that will run 5 times.
If you're gonna focus on the SENDMESSAGE command, the reason it ran 15 times because the first FOR command executed what's inside it by 3 while the second FOR command executed the SENDMESSAGE command 5 times which totals 15 times.
It works with score variable list placeholders
Run commands randomly ?
RANDOM RUN / RANDOM END
Info: A command mainly used for RNG.
RANDOM RUN
Info: The first part of the command
Command: RANDOM RUN: {amount}
{amount}: The amount of commands that will be randomly selected inside of the command line. Placeholders are supported
RANDOM END
Info: The other part of the command
Command: RANDOM END
Example:
This means that you have a 1/3 chance of getting coal, iron or gold
To be able to run multiple commands in one command line use +++
This means that from the 3 give commands, 2 of the randomly chosen command lines will run.
This means that there's a 10% chance to give you a diamond block.
NOTHING is just a command to adjust y percentage and if you want a case where the RNG will do nothing.
It supports placeholders
NOTHING*
Info: Mainly used for RANDOM RUN commands as a "dummy" command for RNG adjustments
Command: NOTHING*{amount}
Example of usage:
This command line means that there is a 1/100 chance it will give you a diamond
More Examples:
I want to make it so 99% chance it will give me dirt and 1% chance to give me diamond BUT I don't want to write 99 lines of the give dirt command.
So here is how to do it.
The 99 represents that any commands inside the loop command will be duplicated 99 times. You will only see the give command and the loop command but the plugin sees 99 give commands.
Here is what the plugin sees
(You get the idea.)
So let's go back to our main objective. 99% chance to get dirt, 1% chance to get diamond. The RANDOM RUN command evenly gives the same rng rates to all the commands inside the RANDOM RUN command.
The (5%) percentage stuff is not part of the command. It's written here in the wiki for you to acknowledge the chances for that command to be selected from the list of commands
After seeing these RANDOM RUN examples, we will acknowledge that it would work like this.
The total of the supposed lines is 100 so it's going to be (100 command lines / 100% = 1%) rate per command.
It supports placeholders
RANDOM RUN | RANDOM END Generator
Click on Run
Wait until the GUIDE message appears
Use the generator
Or you could visit (https://special70.github.io/item%20config%20editors/executableitems_editor.html) where you can adjust the rates and have a button that evens out the rates across all of your commands. Just click the RANDOM RUN button in that website
Last updated