Paste #6236: Untitled Paste

Date: 2014/07/03 19:02:53 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


playerjoinsingame:
  type: world
  events:
    on player joins:
      - if <server.flag[redplayers]> > <server.flag[blueplayers]> {
        - flag "team:blue"
        - flag global "blueplayers:<server.flag[blueplayers].add[1]>"
        - execute as_server "warp <player.name> bluespawn"
        - if <context.entity.flag[class]> == "pyro" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "class:peasant"
            - execute as_server "tell <context.entity.name> <GOLD>You do not have enough Faction Points to play as a Pyro again."
            }
          }
        - if <context.entity.flag[class]> == "alchemist" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "class:peasant"
            - execute as_server "tell <context.entity.name> <GOLD>You do not have enough Faction Points to play as an Alchemist again."
            }
          }
        - if <context.entity.flag[class]> == "paladin" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "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 "clear <context.entity.name> **"
        - execute as_server "kit <context.entity.flag[class]> <context.entity.name>"
      } else if <server.flag[blueplayers]> >= <server.flag[redplayers]> {
        - flag "team:blue"
        - flag global "blueplayers:<server.flag[blueplayers].add[1]>"
        - execute as_server "warp <player.name> bluespawn"
        - if <context.entity.flag[class]> == "pyro" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "class:peasant"
            - execute as_server "tell <context.entity.name> <GOLD>You do not have enough Faction Points to play as a Pyro again."
            }
          }
        - if <context.entity.flag[class]> == "alchemist" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "class:peasant"
            - execute as_server "tell <context.entity.name> <GOLD>You do not have enough Faction Points to play as an Alchemist again."
            }
          }
        - if <context.entity.flag[class]> == "paladin" {
          - if <context.entity.money> >= 100 {
            - execute as_server "tell <context.entity.name> <GOLD>100 Faction Points have been deducted from your account."
            - execute as_server "eco take <context.entity.name> 100"
            } else {
            - flag <context.entity> "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 "clear <context.entity.name> **"
        - execute as_server "kit <context.entity.flag[class]> <context.entity.name>"
        }
      }