🧨 Actions
Raw actions can be created using
To "test" an action created via
Command Arguments for every action:
(flags) - Optional flags--category <categoryName> - If this is a raw, actions.yml action, you are able to set its category here--delay <delay> - If this is a raw, actions.yml action, you are able to set its execution delay here. If you enter, for example, 1s, it will be executed in 1 seconds and not immediately.
Default Variable Actions
These actions act as "vessels" for variables. What does that mean?
Well... for example, the NumberAction is such a variable action. In-game, it turns into as many actions as there are number variables, so it's a lot more actions than you think there are. Other than for conditions, not every variable is able to set a value. For example, the DayOfWeek can only be used as a condition, but not as an action.
Makes sense right? You can't just time-travel in real life with a Minecraft plugin. The variable "Money" however can be used as a condition AND an action, since you can see a Player's money, but also change it. In-game money of course 🥲
Please consult the Variables Section for those.
❓ Boolean
What happens: The value of this Boolean variable is set to either true or false
Command Arguments:
<variable type> Type of the Boolean variable<variable arguments> Additional variable arguments which may or may not exist for this specific variable<operator> - Valid operators areset andsetNot <expression> - What the variable should be. Common values aretrue orfalse , but you can also set it to a different boolean variables here.
Example commands:
/qa actions add actionname Flying set true - Flying would be a Boolean variable type. This action would make the player fly./qa actions add pp3 Money add ((TagInteger(TagName:points)>=4)*(10+30))+(!(TagInteger(TagName:points)>=4)*5) - This is just to show that very complex actions are also possible with NotQuests expression system. This action does the following: If your "points" (from the Integer tag) are bigger or equal 4, this action will give you 40$. Otherwise, it will give you 5$.
📙 List
What happens: The value of this List variable is changed
Command Arguments:
<variable type> Type of the List variable<variable arguments> Additional variable arguments which may or may not exist for this specific variable<operator> - Possible operators areadd ,clear ,remove andset <expression> - What the variable should be. This depends on the variable type
Example command:
📖 ItemStackList
What happens: The value of this ItemStackList variable is changed
Command Arguments:
<variable type> Type of the ItemStackList variable<variable arguments> Additional variable arguments which may or may not exist for this specific variable<operator> - Possible operators areadd ,clear ,remove andset <expression> - What the variable should be. This depends on the variable type, but they do have to be Items
Example command:
💯 Number
What happens: The value of this Number variable is changed
Command Arguments:
<variable type> Type of the Number variable<variable arguments> Additional variable arguments which may or may not exist for this specific variable<operator> - Valid operators areadd ,deduct ,divide ,multiply andset <expression> - What the result of the variable should be. This expression is cool, because it can contain any kind of math expression. And it can even contain other number variables.
Example command:
🆎 String
What happens: The value of this String variable is changed
Command Arguments:
<variable type> Type of the String variable<variable arguments> Additional variable arguments which may or may not exist for this specific variable<operator> - Valid operators areset andappend <expression> - What the result of the variable should be. This depends on the variable type, but it has to be a String (= text)
Example command:
Default Actions
These are the default, "standalone" actions and don't depend on variables.
🤓 Action
What happens: One or multiple other actions are executed. Yes, this simply executes other actions defined in the
Command Arguments:
<Other Action Name> - Name of the other action(s) which needs to be executed.- Optional:
<amount> - Amount of times the other action should be executed. (flags) - Optional flags--ignoreConditions - If you set this flag, all conditions added to the other action which should be executed will be ignored. It will be executed no matter if they are fulfilled or not.--minRandom <amount> - If this is set, it will only execute a random amount of quests with this minimum--maxRandom <amount> - If this is set, it will only execute a random amount of quests with this maximum--onlyCountForRandomIfConditionsFulfilled - Does not count an action to the min or max random counter if its conditions are not fulfilled, if this flag is set--executedActionDelay - Sets the delay for which all included actions will be executed. This overrides possible existing delays.
Example commands:
/qa actions add actionname Action a1 2 --ignoreConditions - This executes the action a1 two times, regardless of the conditions of action a1./qa actions add actionname Action a1,a2,money10 1 - This executes the actions a1, a2 and money10.
Example commands for random actions: For these commands, I have pre-created the actions sm1, sm2, sm3 ... sm10 which are all different SendMessage actions.
/qa actions add sendAllMessages Action sm1,sm2,sm3,sm4,sm5,sm6,sm7,sm8,sm9,sm10 1 - Executes all 10 actions in the specified order/qa actions add sendAllMessagesInRandomOrder Action sm1,sm2,sm3,sm4,sm5,sm6,sm7,sm8,sm9,sm10 1 --minRandom 10 --maxRandom 10 - Executes all 10 actions in a random order/qa actions add sendRandomMessage Action sm1,sm2,sm3,sm4,sm5,sm6,sm7,sm8,sm9,sm10 1 --minRandom 1 --maxRandom 1 - Sends exactly one random action ouf of the provided actions/qa actions add sendGuaranteedRandomMessage Action sm1,sm2,sm3,sm4,sm5,sm6,sm7,sm8,sm9,sm10 1 --minRandom 1 --maxRandom 1 --onlyCountForRandomIfConditionsFulfilled - This is useful if your actions have conditions attached to them. It does exactly the same as the previous action. However, in case the action it chooses does not fulfill its condition, it will try out another action instead. The previous action however would simply send nothing/qa actions add sendOneOrTwoRandomMessage Action sm1,sm2,sm3,sm4,sm5,sm6,sm7,sm8,sm9,sm10 1 --minRandom 1 --maxRandom 2 - Executes either one or two random actions out of the provided actions