PVP toggle


Author: KeangDavid
Created: 2014-05-03T19:08:04-0400
Edited: 2014-05-03T20:27:29-0400
Denizen Version: 0.9.4-SNAPSHOT (build 1455)
Views: 7
Downloads: 685
Likes: 1


WGET
Description: Toggles players pvp setting on or off.

ToDo:
- add cooldown
- add customization

#Made by: KeangDavid
#Server: mc.keangdom.com
#uses /pvpon and pvpoff to toggle a players ability to fight other players
pvp:
    type: world
    events:
        on pvpon command:
        - if !<player.flag[pvp]> flag player pvp
        - narrate "<green>You<blue> have turned pvp ON."
        - determine FULFILLED
        on pvpoff command:
        - if <player.flag[pvp]> flag player pvp:!
        - narrate "<green>You<red> have turned pvp OFF."
        - determine FULFILLED
        on player damages player:
        - if !<player.flag[pvp]> {
          - narrate "<red>You have pvp turned off."
          - determine CANCELLED
          }
        - if !<<context.entity>.flag[pvp]> {
          - narrate "<red>Target has pvp turned off."
          - determine CANCELLED
          }




Comments
No one has posted a comment! Post one below: