Random activators selector
ONLY for one type of activator.
Example, you have 3 PLAYER_ALL_CLICK activator and you want to activate only one.
- So, first create your different activators ! (3 activator PLAYER_ALL_CLICK in my example)
- Then go out the activators editor and return to the item editor.
- Go in the Variables part.
- Create a new variable. name: randActivator and with default value: 0
- Okay now that you have have configured your variable, you will need to initialize it. So you need to create a new activator with the same option that the activators created in the step 1. for my example its a PLAYER_ALL_CLICK activator.
- In the part of this activator, go in the Variables modification part.
-
Create a new variable Modification
-
Select the variable previously created randActivator
-
Set to type of modification on SET
-
and in modification set the placeholder
%rand:1|X%but replace X by the amount of the activators that you will created in the random list -
for my example
%rand:1|3% -
Save
-
Okay so now, each time the activator will be activated, the variable randActivator will take a value between 1 and 3 (includes).
-
Now we will associate 1 = first activator, 2 = run second activator...
-
So no for each activators created in the step 1, go in their editor, click on the conditions button and placeholders Conditions button.
- Create a new placeholder cdt.
- Type :
PLAYER_NUMBER - First part: %var_randActivator_int%
- Comparator:
EQUALS - Second part: X (example with 3 activators, the first must have X replace by 1, the second X replace by 2 ....)
- Don't touch to the others features, if you don't need it
- Then save the condition
- Repeat that obviously for all the other activator created in the step 1
LAST STEP: you will probably need to open the file (.yml) of your item. because the activator that initialize the variable must be runned first. so in the list of the activator it must be the first !
If its not the case, place it correctly in the first position, save, and reload EI.
FINISH ! I hope you understand now a bit how it works,
Try it now
Copy this into ExecutableItems and reload
From the SCore custom commands reference. Paste it into a config, run the plugin's reload command, and you have a working starting point to edit.
activators:
activator0: # Activator ID, you can create as many activator on the activators list
option: # Here goes an activator that is at least instance of player
playerCommands:
- ABSORPTION amount:5 time:200 # Gives the player absorption
activator1: # Activator ID, you can create as many activator on the activators list
option: # Here goes an activator that is at least instance of target
targetCommands:
- ABSORPTION amount:5 time:200 # Gives the target absorptionPlugin used on this page
ExecutableItemsCustom items with abilities, activators and commands — no code.
- 5.0/5 from 10 reviews
- 3.1K servers running it right now (bStats)
- 52 downloads on SPlugins
€19.99
one-time, lifetime updates