Guest User

Example of a ConditionalEvents RoT Race Trait

a guest
May 30th, 2022
695
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 1.60 KB | None | 0 0
  1. # The following is a brief tutorial/example of how to set up a racial trait through ConditionalEvents using
  2. # Races of Thana and PlaceholderAPI. This specific example is one that allows the Goblin race to go invisible for a while after they
  3. # have been sneaking in the dark.
  4. # First we give our event a name, this must be unique from other event names listed in our CE config.yml
  5.   GoblinSneak:
  6. # The type is repetitive, which means it will constantly check if the given conditions are true
  7.     type: repetitive
  8. # If we use the repetitive type event we must also specify a repetitive time. This is in ticks, so for example in this event
  9. # the conditions are checked every 40 ticks, equal to every 2 seconds.
  10.     repetitive_time: 40
  11. # Now we list our conditions
  12.     conditions:
  13. # First we're going to check that the player is, in fact, a member of the Goblin race. Make sure to put the race in all-caps.
  14.     - '%racesofthana_player_race% equals GOBLIN'
  15. # Next we'll check that the light level where the player is located is under a certain amount.
  16.     - '%player_light_level% < 5'
  17. # Finally we check that the player is sneaking.
  18.     - '%player_is_sneaking% equals true'
  19. # If all of these conditions are met, our actions will be carried out, defined below
  20.     actions:
  21.       default:
  22.       - 'give_potion_effect: INVISIBILITY;200;1'  
  23.  
  24. # For more information on the different conditions and actions you can use, check out the CE wiki:
  25. # https://ajneb97.gitbook.io/conditionalevents
  26. # Also you can check that your placeholders give the output you expect by using the parse commands listed on the PlaceholderAPI page
Advertisement
Add Comment
Please, Sign In to add comment