Paste #5963: Untitled Paste

Date: 2014/06/29 12:36:47 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


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