Paste #5909: Untitled Paste

Date: 2014/06/28 10:55:23 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


playerdeath:
  type: world
  events:
    on <player> kills <player>:
      - if <context.damager.flag[team]> == red {
        - announce "<RED><context.damager> <WHITE>killed <BLUE><context.entity>"
        - execute as_server "eco give <context.damager> <util.random.int[1].to[5]>"
        - execute as_server "warp bluespawn <context.entity>"
        } else {
        - announce "<BLUE><context.damager> <WHITE>killed <RED><context.entity>"
        - execute as_server "eco give <context.damager> <util.random.int[1].to[5]>"
        - execute as_server "warp redspawn <context.entity>"
        }
      - if <context.entity.flag[class]> == "pyro" {
        - if <p@player.money> >= 100 {
          - execute as_server "tell <context.entity> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "kit pyro <context.entity>"
          } else {
          - flag <context.entity> "class:peasant"
          - execute as_server "tell <context.entity> <GOLD>You do not have enough Faction Points to play as a Pyro again."
          - execute as_server "kit peasant <context.entity>
        } elseif <context.entity.flag[class]> == "alchemist" {
        - if <p@player.money> >= 100 {
          - execute as_server "tell <context.entity> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "kit alchemist <context.entity>"
          } else {
          - flag <context.entity> "class:peasant"
          - execute as_server "tell <context.entity> <GOLD>You do not have enough Faction Points to play as an Alchemist again."
          - execute as_server "kit peasant <context.entity>
        } elseif <context.entity.flag[class]> == "paladin" {
        - if <p@player.money> >= 100 {
          - execute as_server "tell <context.entity> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "kit paladin <context.entity>"
          } else {
          - flag <context.entity> "class:peasant"
          - execute as_server "tell <context.entity> <GOLD>You do not have enough Faction Points to play as a Holy Paladin again."
          - execute as_server "kit peasant <context.entity>
        } else execute as_server "kit <context.entity.flag[class]> <context.entity>"