Paste #6203: Untitled Paste

Date: 2014/07/03 14:10:31 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


anygamestart:
  type: task
  debug: true
  script:
    - flag server "lobby:false"
    - flag server "autobalance:false"
    - foreach <server.list_online_players> {
      - if <def[value].flag[team]> == "spectator" {
          - execute as_server "vanish <%value%.name>"
          - execute as_server "fly <%value%.name>"
          - execute as_server "warp center %value%"
        }
      - if <def[value].flag[team]> == "" {
          - execute as_server "tell <%value%.name> You have not chosen a class, so you have been made a spectator."
          - flag "team:spectator"
        }
      - execute as_server "warp <%value%.flag[team]>spawn <%value%.name>"
        }
      - if <%value%.flag[class]> == "pyro" {
        - if <%value%.money> >= 100 {
          - execute as_server "tell <%value%.name> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "eco take <%value%.name> 100"
          } else {
          - flag <%value%> "class:peasant"
          - execute as_server "tell <%value%.name> <GOLD>You do not have enough Faction Points to play as a Pyro again."
          }
        }
      - if <%value%.flag[class]> == "alchemist" {
        - if <%value%.money> >= 100 {
          - execute as_server "tell <%value%.name> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "eco take <%value%.name> 100"
          } else {
          - flag <%value%> "class:peasant"
          - execute as_server "tell <%value%.name> <GOLD>You do not have enough Faction Points to play as an Alchemist again."
          }
        }
      - if <%value%.flag[class]> == "paladin" {
        - if <%value%.money> >= 100 {
          - execute as_server "tell <%value%.name> <GOLD>100 Faction Points have been deducted from your account."
          - execute as_server "eco take <%value%.name> 100"
          } else {
          - flag <%value%> "class:peasant"
          - execute as_server "tell <%value%.name> <GOLD>You do not have enough Faction Points to play as a Holy Paladin again."
          }
        }
      - execute as_server "clear <%value%.name> **"
      - if <%value%.flag[team]> != "spectator" execute as_server "kit <%value%.flag[class]> <%value%.name>"
      }
    - flag global "matchon:true"