- D1 Meta Docs - Denizen Script -
Home Page / Pi to one million places / Contact mcmonkey / Donate / Paste Scripts / Denizen Help /
You are browsing as a guest.
Login | Register


Click here to create your own public paste ~ ~ click to duplicate and edit this paste


TitleBaltop
TypeDenizen Script
Date2017/12/12 12:46:27 UTC-08:00
ByGuest
Other
Paste
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
3100
BaltopCommand:
  type: command
  debug: false
  name: baltop
  usage: /baltop (page#)
  description: Checks the top balances on the server.
  script:
  - if <player.has_flag[baltop]> {
    - narrate "<&c>Please do not spam this command."
    - queue clear
    }
  - narrate "<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=<&2>=<&6>=" 
  - if <context.args.size.is[OR_MORE].than[1]> && <context.args.get[1]> matches number {
    - define page <context.args.get[1]>
    }
    else {
    - define page 1
    - narrate "<&6>Ordering balances for <&a><server.list_players.size> <&6>players..."
    }
  - define li li@
  - foreach <server.list_players.filter[money.is[MORE].than[0]].sort_by_number[money].reverse>:
    - define li <def[li].include[<def[value]>]>
  - repeat 10:
    - if <def[li].get[<def[value].add[<el@10.mul[<def[page].sub[1]>]>]>]||null> == null {
      - narrate "<&e>---- Page <&6><def[page]> <&e>of <&6><def[page]> <&e>----"
      - queue clear
      }
    - narrate "  <&6><def[value].add[<el@10.mul[<def[page].sub[1]>]>]> <&f><def[li].get[<def[value].add[<el@10.mul[<def[page].sub[1]>]>]>].name> <&7><&a>$<&e><def[li].get[<def[value].add[<el@10.mul[<def[page].sub[1]>]>]>].money.format_number>"
  - narrate "<&e>---- Page <&6><def[page]> <&e>of <&6><def[li].size.div[10].round_up> <&e>----"
  - flag <player> baltop duration:3s



RawRaw



Pastes made: 76108