Advertisement
fleft17

Untitled

Oct 4th, 2014
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.28 KB | None | 0 0
  1.  
  2. command /tpstest [<integer=5>] [<text>]:
  3. permission: skript.tpstest
  4. trigger:
  5. if arg 1 is less than 1:
  6. stop
  7.  
  8. if arg 2 is equal to "bc" or "broadcast":
  9. message "&cTesting Ticks per Second [TPS] over %arg 1% seconds..."
  10. else:
  11. message "&cTesting Ticks per Second [TPS] over %arg 1% seconds..." to command sender
  12.  
  13. wait 1 tick
  14.  
  15. set {_Timespan} to "%arg 1% seconds" parsed as timespan
  16. set {_StartTime} to now
  17. set {_Ticks} to 0
  18. while (difference between {_StartTime} and now) is less than {_Timespan}:
  19. set {_Ticks} to {_Ticks}+1
  20. wait 1 tick
  21.  
  22. set {_TPS} to {_Ticks}/(arg 1)
  23.  
  24. if {_TPS} is more than 17:
  25. set {_Outcome} to "&aRunning fine!"
  26. else if {_TPS} is more than 13:
  27. set {_Outcome} to "&eRunning decent."
  28. else if {_TPS} is more than 8:
  29. set {_Outcome} to "&cRunning bad."
  30. else:
  31. set {_Outcome} to "&4&lExtremely laggy!"
  32.  
  33. if arg 2 is equal to "bc" or "broadcast":
  34. message "&e------------------>>>>&9TEST RESULT&e<<<<------------------"
  35. message "&7%{_TPS}% TPS &3| %{_Outcome}% &3| &7Counted: &9%{_Ticks}% &3| &7Expected: &9%(arg 1)*20%"
  36. message "&e-----------------------------------------------------"
  37. else:
  38. message "&7%{_TPS}% TPS &3| %{_Outcome}% &3| &7Counted: &9%{_Ticks}% &3| &7Expected: &9%(ar
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement