Slupik98

Statystyki kopania

Aug 21st, 2014
252
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.65 KB | None | 0 0
  1. command /statystyki [<text>]:
  2. aliases: staty
  3. trigger:
  4. if arg 1 is not set:
  5. send "&3&m===== &a&lSkyBlock Statystyki &3&m====="
  6. send "&3/staty stone - &cTOP 5. Wykopanego &8stone/cobblestone &cna serwerze!"
  7. send "&3/staty czas - &cTOP 5. &8Czasu &cgranego na serwerze!"
  8. send "&3/staty diamenty - &cTOP 5. Zdobytych &8diamentow &cna serwerze!"
  9. send "&3&m===== &a&lSkyBlock Statystyki &3&m====="
  10. stop
  11. if arg 1 is "stone":
  12. set {_lista::*} to {Statystyki::gracze::stoneCobblestone::*} sorted from highest to lowest
  13. #send "&3&m===== &a&lStatystyki stone &3&m====="
  14. set {_index} to 0
  15. loop {_lista::*}:
  16. add 1 to {_index}
  17. loop {Statystyki::gracze::stoneCobblestone::*}:
  18. if "%loop-value-2%" is "%loop-value-1%":
  19. set {_gracz} to "%loop-index-2%"
  20. if {_index} is 6:
  21. exit loop
  22. send "&6%{_index}%. &8%{_gracz}% &6%loop-value%"
  23. if {Statystyki::gracz::%player%::stoneCobblestone} is not set:
  24. set {Statystyki::gracz::%player%::stoneCobblestone} to 0
  25. send "&6Wykopanego Cobblestona i Stona: &8%{Statystyki::gracz::%player%::stoneCobblestone}%"
  26. #send "&3&m===== &a&lKoniec statystyk stone &3&m====="
  27. if arg 1 is "czas":
  28. set {_lista::*} to {Statystyki::gracze::online::%player%} sorted from highest to lowest
  29. #send "&3&m===== &a&lStatystyki czasu &3&m====="
  30. set {_index} to 0
  31. loop {_lista::*}:
  32. add 1 to {_index}
  33. loop {Statystyki::gracze::online::*}:
  34. if "%loop-value-2%" is "%loop-value-1%":
  35. set {_gracz} to "%loop-index-2%"
  36. if {_index} is 6:
  37. exit loop
  38. send "&6%{_index}%. &8%{_gracz}% &6%loop-value%"
  39. send "&6Czas online: &8%{Statystyki::gracz::%player%::online}%"
  40. #send "&3&m===== &a&lKoniec statystyk czasu &3&m====="
  41. if arg 1 is "diamenty" or "diaxy":
  42. set {_lista::*} to {Statystyki::gracze::diamenty::*} sorted from highest to lowest
  43. set {_index} to 0
  44. loop {_lista::*}:
  45. add 1 to {_index}
  46. loop {Statystyki::gracze::diamenty::*}:
  47. if "%loop-value-2%" is "%loop-value-1%":
  48. set {_gracz} to "%loop-index-2%"
  49. if {_index} is 6:
  50. exit loop
  51. send "&6%{_index}%. &8%{_gracz}% &6%loop-value%"
  52. if {Statystyki::gracz::%player%::diamenty} is not set:
  53. set {Statystyki::gracz::%player%::diamenty} to 0
  54. send "&6Wykopanych diamentow: &8%{Statystyki::gracz::%player%::diamenty}%"
  55. #send "&3&m===== &a&lKoniec statystyk diamentow &3&m====="
  56. #send "&3&m===== &a&lTwoje statystyki &3&m====="
  57. #if {Statystyki::gracz::%player%::online} is not set:
  58. # set {Statystyki::gracz::%player%::online} to 0
  59. #send "&3&m===== &a&lKoniec statystyk &3&m====="
  60. #
  61. on join:
  62. set {Statystyki::gracz::%player%::czasWejsca} to now
  63. set {_is} to false
  64. loop {Statystyki::gracze::lista::*}:
  65. if "%loop-value%" is "%player%":
  66. set {_is} to true
  67. exit loop
  68. if {_is} is false:
  69. add player to {Statystyki::gracze::lista::*}
  70. wait 2 seconds
  71. if {Statystyki::gracz::%player%::czasWejsca} is not set:
  72. set {_dodaj} to difference between now and {Statystyki::gracz::%player%::czasWejsca}
  73. add {_dodaj} to {Statystyki::gracz::%player%::online}
  74. #
  75. on quit:
  76. set {_dodaj} to difference between now and {Statystyki::gracz::%player%::czasWejsca}
  77. add {_dodaj} to {Statystyki::gracz::%player%::online}
  78. set {Statystyki::gracze::online::%player%} to {Statystyki::gracz::%player%::online}
  79. delete {Statystyki::gracz::%player%::czasWejsca}
  80. #
  81. on kick:
  82. set {_dodaj} to difference between now and {Statystyki::gracz::%player%::czasWejsca}
  83. add {_dodaj} to {Statystyki::gracz::%player%::online}
  84. set {Statystyki::gracze::online::%player%} to {Statystyki::gracz::%player%::online}
  85. delete {Statystyki::gracz::%player%::czasWejsca}
  86. #
Advertisement
Add Comment
Please, Sign In to add comment