SHARE
TWEET

asdasd

a guest Feb 19th, 2020 92 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. options:
  2.     command: playtime
  3.     permission: playtime.use
  4.     prefix: &2[&a&lVaratix&2]
  5.    
  6.    
  7.  
  8. variables:
  9.     {second::%player%} = 0
  10.     {minute::%player%} = 0
  11.     {hour::%player%} = 0
  12.  
  13. every second:
  14.     loop all players:
  15.         add 1 to {second::%loop-player%}
  16.         if {second::%loop-player%} is 60:
  17.             subtract 60 from {second::%loop-player%}
  18.             add 1 to {minute::%loop-player%}
  19.         if {minute::%loop-player%} is 60:
  20.             subtract 60 from {minute::%loop-player%}
  21.             add 1 to {hour::%loop-player%}
  22.            
  23. command /{@command} [<offline player>]:
  24.     permission: {@permission}
  25.     trigger:
  26.         if arg 1 is not set:
  27.             send "{@prefix} &aYour play time is &2%{hour::%player%}% &ahours &2%{minute::%player%}% &aminutes"
  28.             stop
  29.         if arg 1 is set:
  30.             if arg 1 is "top":
  31.                 loop {hour::*}:
  32.                     add 1 to {_size}
  33.                     if {_low.to.high.list::%loop-value%} is not set:
  34.                         set {_low.to.high.list::%loop-value%} to loop-index
  35.     else:
  36.                         set {_n} to 0
  37.                         loop {_size} times:
  38.                             set {_n} to {_n}+1
  39.                             {_low.to.high.list::%loop-value-1%.%{_n}%} is not set
  40.                             set {_low.to.high.list::%loop-value-1%.%{_n}%} to loop-index
  41.                             stop loop
  42.                 wait 1 tick
  43.                 set {_n} to size of {_low.to.high.list::*}
  44.                 loop {_low.to.high.list::*}:
  45.                     set {_high.to.low.list::%{_n}%} to loop-value
  46.                     set {_n} to {_n}-1
  47.                 wait 1 tick
  48.                 message "&2&m------------&r &a&lPlaytime &nTop 10&r &2&m------------"
  49.                 loop {_high.to.low.list::*}:
  50.                     add 1 to {_result}
  51.                     send "&2%loop-value%&7: &a%{hour::%loop-value%}% hours"
  52.                     if {_result} is 10:
  53.                         stop
  54.             else:
  55.                 if {days.%arg 1%} is not set:
  56.                     set {days.%arg 1%} to 0
  57.                 if {hour::%arg 1%} is not set:
  58.                     set {hour::%arg 1%} to 0
  59.                 if {minute::%arg 1%} is not set:
  60.                     set {minute::%arg 1%} to 0
  61.                 send "{@prefix} &a%arg 1%&7's &2play time is &a%{hour::%arg 1%}% &2hours &a%{minute::%arg 1%}% &2minutes"
  62.                 stop
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top