Paste #5970: Untitled Paste

Date: 2014/06/29 16:27:44 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


blueking:
  type: Assignment
  Interact scripts:
  - 1 killtheking
  actions:
    on death:
      - if <context.killer> == "" {
        - execute as_server "eco give <context.shooter> 25"
        - Announce "<RED><context.shooter> <WHITE>has killed the <BLUE>Blue teams' king!"
        }
      - if <context.shooter> == "" {
        - execute as_server "eco give <context.killer> 25"
        - Announce "<RED><context.killer> <WHITE>has killed the <BLUE>Blue teams' king!"
        }
      - announce "<RED>Red <WHITE>has won the game!"
      - flag global "matchon:false"
      - foreach <server.list_online_players> {
        - if  <%value%.flag[team]> == "red" execute as_server "eco give <%value%.name> 25"
        - execute as_server "warp lobby <%value%.name>"
        }
      - execute as_server "npc select 13"
      - execute as_server "npc despawn"
      - flag global "lobby:true" duration:20
redking:
  type: Assignment
  Interact scripts:
  - 1 killtheking
  actions:
    on death:
      - if <context.killer> == "" {
        - execute as_server "eco give <context.shooter> 25"
        - Announce "<BLUE><context.shooter> <WHITE>has killed the <RED>Red teams' king!"
      - if <context.shooter> == "" {
        - execute as_server "eco give <context.killer> 25"
        - Announce "<BLUE><context.killer> <WHITE>has killed the <RED>Red teams' king!"
      - announce "<BLUE>Blue <WHITE>has won the game!"
      - flag global "matchon:false"
      - foreach <server.list_online_players> {
        - if  <%value%.flag[team]> == "blue" execute as_server "eco give <%value%.name> 25"
        - execute as_server "warp lobby <%value%.name>"
        }
      - execute as_server "npc select 14"
      - execute as_server "npc despawn"
      - flag global "lobby:true" duration:20
gamemgmt: 
  type: world 
  debug: true 
  events: 
    on blue command: 
    - if <server.flag[matchon]> determine CANCELLED 
killtheking:
  type: world
  events:
    on player opens inventory:
      - run killthekingstart

killthekingstart:
  type: task
  script:
    - announce "Kill the King will begin in 10"
    - wait 1
    - announce "Kill the King will begin in 9"
    - wait 1
    - announce "Kill the King will begin in 8"
    - wait 1
    - announce "Kill the King will begin in 7"
    - wait 1
    - announce "Kill the King will begin in 6"
    - wait 1
    - announce "Kill the King will begin in 5"
    - wait 1
    - announce "Kill the King will begin in 4"
    - wait 1
    - announce "Kill the King will begin in 3"
    - wait 1
    - announce "Kill the King will begin in 2"
    - wait 1
    - announce "Kill the King will begin in 1"
    - wait 1
    - foreach <server.list_online_players> {
      - if <player[%value%].flag[team]> == "spectator" {
          - execute as_server "vanish <%value%.name>"
          - execute as_server "fly <%value%.name>"
          - execute as_server "warp center %value%"
        }
      - if <player[%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"
        }
      - if <player[%value%].flag[team]> == "red" {
        - execute as_server "warp redspawn <%value%.name>"
        } else {
        - execute as_server "warp bluespawn <%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> **"
      - execute as_server "kit <%value%.flag[class]> 
      }
    - flag global "matchon:true"
    - execute as_server "npc select 12"
    - execute as_server "npc spawn"
    - execute as_server "npc select 14"
    - execute as_server "npc spawn"