Conditions (v2.0.0+) - English

Conditions for v2.0.0+

The [...] means that there can be code in this place, do not type that in your yaml files...

The conditions part is a part of your yaml reward file.

For example you want to reward the player at MINING level 250 you create the file SKILLS/MINING/ONE/250.yml.
Inside this file you must have a scenario so you must find a name to define it :

all:
  My First Scenario:


The conditions part is a part of a scenario:

all:
  My First Scenario:
    conditions:


After the 'conditions:' node you set some condition using available conditions.
If one condition is not fulfill the rewards process is stopped.

Money

conditions:
  [...]
  money:
  - '+200'
  - '-1000'

You must indicate '-' understand 'less than' or '+' understand 'more than'.

  • +200 -> the player must have more than 200 on its money balance
  • -1000 -> the player must have less than 1000 on its money balance

Permission

conditions:
  [...]
  perm:
  - -[Base]boo.perms.perm1
  - +[Liberty]boo.perms.perm2
  - +boo.perms.perm3
  - -boo.perms.perm4

You must indicate '-' understand 'must not have' or '+' understand 'must have'.

  • -[Base]boo.perms.perm1 -> player must not have boo.perms.perm1 for World Base
  • +[Liberty]boo.perms.perm2 -> player must have boo.perms.perm2 for World Liberty
  • +boo.perms.perm3 -> player must have boo.perms.perm3
  • -boo.perms.perm4 -> player must not have boo.perms.perm4

Group

conditions:
  [...]
  group:
  - -default
  - +sysop

You must indicate '-' understand 'not in group' or '+' understand 'is in group'.

  • -default -> player must not be in default group
  • +sysop -> player must be in sysop group

Power

conditions:
  [...]
  power:
  - '+10'
  - '-2000'

You must indicate '-' understand 'less than' or '+' understand 'more than'.

  • +10 -> the globalpower of its player must be more than 10
  • -2000 -> the globalpower of its player must be less than 2000

Skill

conditions:
  [...]  
  skill:
    herbalism:
      level:
      - '+10'
      - '-2000'

You must define for what skill you need this condition.
You must add a level node with the conditions to fulfill.
You must indicate '-' understand 'less than' or '+' understand 'more than'.

  • +10 -> the herbalism level of its player must be more than 10
  • -2000 -> the herbalism level of its player must be less than 2000

World

conditions:
  [...]
  world: Base

The World where the player must be.


Conclusion

A complete usage of all available conditions can be:

all:
  My First Scenario:
    conditions:
      money:
      - '+200'
      - '-1000'
      perm:
      - -[Base]boo.perms.perm1
      - +[Liberty]boo.perms.perm2
      - +boo.perms.perm3
      - -boo.perms.perm4
      group:
      - -default
      - +sysop
      power:
      - '+10'
      - '-2000'
      skill:
        herbalism:
          level:
          - '+10'
          - '-2000'
      world: Base



Comments

Posts Quoted:
Reply
Clear All Quotes