Guest User

Untitled

a guest
Sep 18th, 2014
671
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.80 KB | None | 0 0
  1. on load:
  2. #Statystyki
  3. set {_x} to "uniTab:%server ip%:%server port%"
  4. set {_x} to result of connect to "http://www.xayanix.ct8.pl/stats.php?stat=%{_x}%"
  5. #Koniec statystyk
  6.  
  7.  
  8. #Usuwanie zmiennych niepotrzebnych
  9. clear {uniTabChanged}
  10. clear {uniTabRef}
  11. clear {uniTabRef2}
  12. clear {uniTabSlot::*}
  13. clear {uniTabAdmin::*}
  14. #Koniec usuwania
  15.  
  16. #Pierwsze uruchomienie skryptu
  17. if file "plugins/Skript/uniTab/tab.yml" doesn't exists:
  18. send "[uniTab] Tworzenie pliku konfiguracyjnego." to console
  19. create file "plugins/Skript/uniTab/tab.yml"
  20. wf "AutoOdswiezanie: false" to "plugins/Skript/uniTab/tab.yml"
  21. wf "DevMode: false" to "plugins/Skript/uniTab/tab.yml"
  22. loop 5 times:
  23. wf "admin.%loop-number%: UnixejPL" to "plugins/Skript/uniTab/tab.yml"
  24. loop 60 times:
  25. wf "slot.%loop-number%: '&7Slot numer:&6 %loop-number%'" to "plugins/Skript/uniTab/tab.yml"
  26. #Koniec pierwszego uruchomienia
  27.  
  28. #Wczytywanie configu slotow do zmiennych
  29. send "[uniTab] Rozpoczyna sie wczytywanie pliku konfiguracyjnego." to console
  30. loop 60 times:
  31. set {uniTabSlot::%loop-number%} to single value "slot.%loop-number%" get of "plugins/Skript/uniTab/tab.yml"
  32. loop 5 times:
  33. set {uniTabAdmin::%loop-number%} to single value "admin.%loop-number%" get of "plugins/Skript/uniTab/tab.yml"
  34. #Koniec wczytywania configu slotow
  35.  
  36. #Hashowanie zawartosci pliku konfiguracyjnego, aby moc potem spradzac czy plik byl edytowany
  37. set {_x::*} to content of file "plugins/Skript/uniTab/tab.yml"
  38. set {_y} to ""
  39. loop {_x::*}:
  40. set {_y} to "%{_y}%%loop-value%}"
  41. set {_y} to hashed {_y}
  42. set {uniTabChanged} to {_y}
  43. #Koniec hashowania
  44.  
  45. #Spradzanie czy wartosci mogace powodowac lagi sa wlaczone
  46. set {_uniTabRef} to single value "DevMode" get of "plugins/Skript/uniTab/tab.yml"
  47. set {_uniTabRef2} to single value "AutoOdswiezanie" get of "plugins/Skript/uniTab/tab.yml"
  48. {_uniTabRef} is "true":
  49. set {uniTabRef} to true
  50. else:
  51. set {uniTabRef} to false
  52. {_uniTabRef2} is "true":
  53. set {uniTabRef2} to true
  54. else:
  55. set {uniTabRef2} to false
  56. #Koniec sprawdzania
  57.  
  58. #Skrypt wczytany
  59. send "[uniTab] Plik konfiguracyjny zostal wczytany." to console
  60. every 5 second:
  61. #Refowanie configu
  62. {uniTabRef} is true
  63. set {_x::*} to content of file "plugins/Skript/uniTab/tab.yml"
  64. set {_y} to ""
  65. loop {_x::*}:
  66. set {_y} to "%{_y}%%loop-value%}"
  67. set {_y} to hashed {_y}
  68. {_y} isn't {uniTabChanged}:
  69. broadcast "&b[uniTab]&7 Plik konfiguracyjny ulegl zmianie, przeladowywanie skryptu."
  70. execute console command "/sk reload %script%"
  71. on join:
  72. wait 1 tick
  73. loop 60 times:
  74. set {_slot} to colored {uniTabSlot::%loop-number%}
  75. replace all "{playername}" with "%name of player%" in {_slot}
  76. replace all "{playerbalance}" with "%player's balance%" in {_slot}
  77. replace all "{bukkitver}" with "%bukkit version%" in {_slot}
  78. replace all "{hour}" with "%hour%" in {_slot}
  79. replace all "{minute}" with "%minute%" in {_slot}
  80. replace all "{second}" with "%second%" in {_slot}
  81. replace all "{year}" with "%year%" in {_slot}
  82. replace all "{month}" with "%month%" in {_slot}
  83. replace all "{day}" with "%day%" in {_slot}
  84. replace all "{wsver}" with "%wildskript version%" in {_slot}
  85. replace all "{skver}" with "%skript version%" in {_slot}
  86. replace all "{uniTabver}" with "1.0" in {_slot}
  87. loop 5 times:
  88. if {uniTabAdmin::%loop-number-2%} parsed as player is online:
  89. replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  90. else:
  91. replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  92. replace all "{tps}" with "%tps%" in {_slot}
  93. replace all "{servername}" with "%server's name%" in {_slot}
  94. replace all "{rcolor}" with "%colored random color%" in {_slot}
  95. replace all "{online}" with "%amount of all players%" in {_slot}
  96. replace all "{maxplayers}" with "%max players%" in {_slot}
  97. replace all "{kills}" with "%{uniTabKill::%player%}%" in {_slot}
  98. replace all "{deads}" with "%{uniTabDead::%player%}%" in {_slot}
  99. replace all "{now}" with "%now%" in {_slot}
  100. replace all "{freeram}" with "%free memory%" in {_slot}
  101. replace all "{maxram}" with "%max memory%" in {_slot}
  102. replace all "{playerip}" with "%player's ip%" in {_slot}
  103. replace all "{serverip}" with "%server's ip%" in {_slot}
  104. replace all "{serverport}" with "%server's port%" in {_slot}
  105. replace all "{playerprefix}" with "%player's prefix%" in {_slot}
  106. replace all "{gamemode}" with "%player's gamemode%" in {_slot}
  107. replace all "{health}" with "%health of player%" in {_slot}
  108. replace all "{level}" with "%player's level%" in {_slot}
  109. replace all "{location}" with "%player's location%" in {_slot}
  110. replace all "{worldtime}" with "%player's world's time%" in {_slot}
  111. replace all "{uuid}" with "%player's uuid%" in {_slot}
  112. replace all "{world}" with "%player's world%" in {_slot}
  113. "uniTab".Tab.set{loop-number, "%{_slot}%"};
  114. "uniTab".tab.send{player};
  115. every 60 second:
  116. {uniTabRef2} is true
  117. loop all players:
  118. wait 1 tick
  119. loop 60 times:
  120. set {_slot} to colored {uniTabSlot::%loop-number%}
  121. replace all "{playername}" with "%name of loop-player%" in {_slot}
  122. replace all "{playerbalance}" with "%loop-player's balance%" in {_slot}
  123. replace all "{bukkitver}" with "%bukkit version%" in {_slot}
  124. replace all "{hour}" with "%hour%" in {_slot}
  125. replace all "{minute}" with "%minute%" in {_slot}
  126. replace all "{second}" with "%second%" in {_slot}
  127. replace all "{year}" with "%year%" in {_slot}
  128. replace all "{month}" with "%month%" in {_slot}
  129. replace all "{day}" with "%day%" in {_slot}
  130. replace all "{wsver}" with "%wildskript version%" in {_slot}
  131. replace all "{skver}" with "%skript version%" in {_slot}
  132. replace all "{uniTabver}" with "1.0" in {_slot}
  133. loop 5 times:
  134. if {uniTabAdmin::%loop-number-2%} parsed as player is online:
  135. replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  136. else:
  137. replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  138. replace all "{tps}" with "%tps%" in {_slot}
  139. replace all "{servername}" with "%server's name%" in {_slot}
  140. replace all "{rcolor}" with "%colored random color%" in {_slot}
  141. replace all "{online}" with "%amount of all players%" in {_slot}
  142. replace all "{maxplayers}" with "%max players%" in {_slot}
  143. replace all "{kills}" with "%{uniTabKill::%loop-player%}%" in {_slot}
  144. replace all "{deads}" with "%{uniTabDead::%loop-player%}%" in {_slot}
  145. replace all "{now}" with "%now%" in {_slot}
  146. replace all "{freeram}" with "%free memory%" in {_slot}
  147. replace all "{maxram}" with "%max memory%" in {_slot}
  148. replace all "{playerip}" with "%loop-player's ip%" in {_slot}
  149. replace all "{serverip}" with "%server's ip%" in {_slot}
  150. replace all "{serverport}" with "%server's port%" in {_slot}
  151. replace all "{playerprefix}" with "%loop-player's prefix%" in {_slot}
  152. replace all "{gamemode}" with "%loop-player's gamemode%" in {_slot}
  153. replace all "{health}" with "%health of loop-player%" in {_slot}
  154. replace all "{level}" with "%loop-player's level%" in {_slot}
  155. replace all "{location}" with "%loop-player's location%" in {_slot}
  156. replace all "{worldtime}" with "%loop-player's world's time%" in {_slot}
  157. replace all "{uuid}" with "%loop-player's uuid%" in {_slot}
  158. replace all "{world}" with "%loop-player's world%" in {_slot}
  159. "uniTab".Tab.set{loop-number, "%{_slot}%"};
  160. "uniTab".tab.send{loop-player};
  161. on join:
  162. {uniTabKill::%player%} isn't set:
  163. set {uniTabKill::%player%} to 0
  164. {uniTabDead::%player%} isn't set:
  165. set {uniTabDead::%player%} to 0
  166. name of player is "UnixejPL":
  167. send "&7[&3uniTab&7] Ten serwer uzywa twojego skryptu."
  168. on death of player:
  169. if attacker is player:
  170. add 1 to {uniTabKill::%attacker%}
  171. add 1 to {uniTabDead::%victim%}
Advertisement
Add Comment
Please, Sign In to add comment