Paste #20302: Untitled Paste

Date: 2015/09/23 09:56:00 UTC-07:00
Type: Denizen Script

View Raw Paste Download This Paste
Copy Link


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16


"PrisonScoreboard":
  type: task
  debug: false
  script:
    - while true {
      - foreach <w@prison.players> {
        - ^if <def[value].has_flag[Prison.rank].not> run GetPlayerRank def:%value%
        - ^define balance <proc[formatmoney].context[<def[value].money>]>
        - ^define nextrank <proc[formatmoney].context[<global.flag[Ranks.<def[value].flag[Prison.nrank]>.Amount]>]>
        - ^define needed <global.flag[Ranks.<def[value].flag[Prison.nrank]>.Amount].sub[<def[value].money>]>
        - ^define needed <proc[formatmoney].context[<tern[<def[needed].as_int.is[LESS].than[0]>]:0||%needed%>]>
#        - sidebar set "title:<red>Ranking Info" "lines:2|4|6|8" "values:<def[value].flag[Prison.rank]>|%balance%|%nextrank%|%needed%" "players:<def[value]>"
        }
      - sidebar set "title:<red>Ranking Info" "lines:2|4|6|8" "values:<player.flag[Prison.rank]>|<proc[formatmoney].context[<player.money>]>|<global.flag[Ranks.<player.flag[Prison.nrank]>.Amount].sub[<player.money>]>|<proc[formatmoney].context[<tern[<global.flag[Ranks.<player.flag[Prison.nrank]>.Amount].sub[<player.money>].is[LESS].than[0]>]:0||<global.flag[Ranks.<player.flag[Prison.nrank]>.Amount].sub[<player.money>]>]>" "players:<w@prison.players>" per_player
      - wait 10s
      }