Guest User

Untitled

a guest
Sep 19th, 2014
3,348
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 11.73 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.  
  61. command /uniTab [<text>] [<integer>] [<text>]:
  62. permission: uniTab.admin
  63. aliases: ut
  64. permission message: "&7[&3uniTab&7]&c Brak prawa &euniTab.admin&c."
  65. trigger:
  66. if arg 1 isn't set:
  67. send "&7[&3uniTab&7] &7Komendy Administratora:"
  68. send "&8####&3 /uniTab see&7 - podglad TabList"
  69. send "&8####&3 /uniTab set <numer slotu> <tresc>&7 - ustawia slot"
  70. send "&8####&3 /uniTab zmienna&7 - dodawanie wlasnych zmiennych"
  71. send "&8####&3 /uniTab reload&7 - przeladowywuje skrypt"
  72. send "&8####&3 /uniTab autor -&7 wyswietla autora"
  73. stop
  74. if arg 1 is "see":
  75. send "&7[&3uniTab&7] Sloty:"
  76. loop {uniTabSlot::*}:
  77. send "&4&l%loop-index%.&r %loop-value%"
  78. if arg 1 is "set":
  79. if arg 2 isn't set:
  80. send "&7[&3uniTab&7]&c Podaj numer slota!"
  81. stop
  82. if arg 3 isn't set:
  83. send "&7[&3uniTab&7]&c Podaj nowa tresc slota!"
  84. stop
  85. if arg 2 is bigger than 60:
  86. send "&7[&3uniTab&7]&c Za duzy numer slota. Maksymalnie 60."
  87. stop
  88. if arg 2 is smaller than 1:
  89. send "&7[&3uniTab&7]&c Za maly numer slota. Minimum 1."
  90. stop
  91. send "&7[&3uniTab&7]&a Slot &e%arg 2%&a zostal pomyslnie ustawiony na &e%arg 3%&a!"
  92. set {uniTabSlot::%arg 2%} to arg 3
  93. set "slot.%arg 2%" to "%arg 3%" in yaml file "plugins/Skript/uniTab/tab.yml"
  94. if arg 1 is "reload":
  95. send "&7[&3uniTab&7]&7 Rozpoczynam przeladowywanie skryptu."
  96. execute console command "/sk reload %script%"
  97. send "&7[&3uniTab&7]&a Gotowe!"
  98. if arg 1 is "autor":
  99. send "&7[&3uniTab&7]&7 Autorem skryptu jest &6UnixejPL&7 czyli &6Xayanix&7!"
  100. if arg 1 is "zmienna":
  101. send "&7[&3uniTab&7] &7Komendy wlasnych zmiennych:"
  102. send "&8####&3 /uniTabzmienna dodaj <zmienna>&7 - dodaje zmienna"
  103. send "&8####&3 Przyklad:&7 /uniTab zmienna dodaj Ranking.1"
  104. send ""
  105. send "&8####&3 /uniTabzmienna usun <ID>&7 - usuwa zmienna o ID"
  106. send "&8####&3 /uniTabzmienna lista&7 - lista twoich zmiennych"
  107.  
  108. command /uniTabzmienna [<text>] [<text>]:
  109. aliases: utz
  110. permission: uniTab.Admin
  111. permission message: "&7[&3uniTab&7]&c Brak prawa &euniTab.admin&c."
  112. trigger:
  113. if arg 1 isn't set:
  114. send "&7[&3uniTab&7] &7Komendy wlasnych zmiennych:"
  115. send "&8####&3 /uniTabzmienna dodaj <zmienna>&7 - dodaje zmienna"
  116. send "&8####&3 Przyklad:&7 /uniTab zmienna dodaj Ranking.1"
  117. send ""
  118. send "&8####&3 /uniTabzmienna usun <ID>&7 - usuwa zmienna o ID"
  119. send "&8####&3 /uniTabzmienna lista&7 - lista twoich zmiennych"
  120. stop
  121. if arg 1 is "dodaj":
  122. if arg 2 isn't set:
  123. send "&7[&3uniTab&7]&c Podaj jaka zmienna chcesz dodac!"
  124. send "&7[&3uniTab&7]&7 Jezeli wpiszesz &3/utz dodaj Testowa&7, to wpisanie &3{zmienna:Testowa}&7 w konfiguracji bedzie jednoznaczne z wpisaniem &3%%{Testowa}%%&7!."
  125. else:
  126. {%arg 2%} isn't set:
  127. send "&7[&3uniTab&7]&7 Taka zmienna nie istnieje w &6Skript&7."
  128. stop
  129. loop {uniTabzmienne::*}:
  130. loop-value is "%arg 2%":
  131. send "&7[&3uniTab&7]&7 Taka zmienna juz istnieje."
  132. stop
  133. add arg 2 to {uniTabzmienne::*}
  134. send "&7[&3uniTab&7]&a Pomyslnie dodano."
  135. send "&7[&3uniTab&7]&7 Wpisanie zmiennej &3{zmienna:%arg 2%}&7 bedzie zwracac: &3%{%arg 2%}%&7"
  136. if arg 1 is "lista":
  137. if {uniTabzmienne::*} isn't set:
  138. send "&7[&3uniTab&7]&c Nie dodales jeszcze nic."
  139. stop
  140. loop {uniTabzmienne::*}:
  141. send "&aID&l: %loop-index%&7: %loop-value% (Zwraca:&6 %{%loop-value%}%"
  142. if arg 1 is "usun":
  143. if arg 2 isn't set:
  144. send "&7[&3uniTab&7]&7 Podaj &3ID zmiennej&7 ktora chcesz usunac."
  145. send "&7[&3uniTab&7]&7 ID sprawdzisz komenda &3/utz lista&7."
  146. stop
  147. clear {uniTabzmienne::%arg 2%}
  148. send "&7[&3uniTab&7]&a Zmienna usunieta."
  149.  
  150. on join:
  151. player has permission "uniTab.see"
  152. wait 1 tick
  153. loop 60 times:
  154. set {_slot} to colored {uniTabSlot::%loop-number%}
  155. replace all "{playername}" with "%name of player%" in {_slot}
  156. replace all "{playerbalance}" with "%player's balance%" in {_slot}
  157. replace all "{bukkitver}" with "%bukkit version%" in {_slot}
  158. replace all "{hour}" with "%hour%" in {_slot}
  159. replace all "{minute}" with "%minute%" in {_slot}
  160. replace all "{second}" with "%second%" in {_slot}
  161. replace all "{year}" with "%year%" in {_slot}
  162. replace all "{month}" with "%month%" in {_slot}
  163. replace all "{day}" with "%day%" in {_slot}
  164. replace all "{wsver}" with "%wildskript version%" in {_slot}
  165. replace all "{skver}" with "%skript version%" in {_slot}
  166. replace all "{uniTabver}" with "1.0" in {_slot}
  167. loop 5 times:
  168. if {uniTabAdmin::%loop-number-2%} parsed as player is online:
  169. replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  170. else:
  171. replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  172. replace all "{tps}" with "%tps%" in {_slot}
  173. replace all "{servername}" with "%server's name%" in {_slot}
  174. replace all "{rcolor}" with "%colored random color%" in {_slot}
  175. replace all "{online}" with "%amount of all players%" in {_slot}
  176. replace all "{maxplayers}" with "%max players%" in {_slot}
  177. replace all "{kills}" with "%{uniTabKill::%player%}%" in {_slot}
  178. replace all "{deads}" with "%{uniTabDead::%player%}%" in {_slot}
  179. replace all "{now}" with "%now%" in {_slot}
  180. replace all "{freeram}" with "%free memory%" in {_slot}
  181. replace all "{maxram}" with "%max memory%" in {_slot}
  182. replace all "{playerip}" with "%player's ip%" in {_slot}
  183. replace all "{serverip}" with "%server's ip%" in {_slot}
  184. replace all "{serverport}" with "%server's port%" in {_slot}
  185. replace all "{playerprefix}" with "%player's prefix%" in {_slot}
  186. replace all "{gamemode}" with "%player's gamemode%" in {_slot}
  187. replace all "{health}" with "%health of player%" in {_slot}
  188. replace all "{level}" with "%player's level%" in {_slot}
  189. replace all "{location}" with "%player's location%" in {_slot}
  190. replace all "{worldtime}" with "%player's world's time%" in {_slot}
  191. replace all "{uuid}" with "%player's uuid%" in {_slot}
  192. replace all "{world}" with "%player's world%" in {_slot}
  193. loop {uniTabzmienne::*}:
  194. replace all "{zmienna:%loop-value%}" with "%{%loop-value%}%" in {_slot}
  195. "uniTab".Tab.set{loop-number, "%{_slot}%"};
  196. "uniTab".tab.send{player};
  197.  
  198. every 60 second:
  199. {uniTabRef2} is true
  200. loop all players:
  201. loop-player has permission "uniTab.see"
  202. wait 1 tick
  203. loop 60 times:
  204. set {_slot} to colored {uniTabSlot::%loop-number%}
  205. replace all "{playername}" with "%name of loop-player%" in {_slot}
  206. replace all "{playerbalance}" with "%loop-player's balance%" in {_slot}
  207. replace all "{bukkitver}" with "%bukkit version%" in {_slot}
  208. replace all "{hour}" with "%hour%" in {_slot}
  209. replace all "{minute}" with "%minute%" in {_slot}
  210. replace all "{second}" with "%second%" in {_slot}
  211. replace all "{year}" with "%year%" in {_slot}
  212. replace all "{month}" with "%month%" in {_slot}
  213. replace all "{day}" with "%day%" in {_slot}
  214. replace all "{wsver}" with "%wildskript version%" in {_slot}
  215. replace all "{skver}" with "%skript version%" in {_slot}
  216. replace all "{uniTabver}" with "1.0" in {_slot}
  217. loop 5 times:
  218. if {uniTabAdmin::%loop-number-2%} parsed as player is online:
  219. replace all "{admin%loop-number-2%}" with "&a%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  220. else:
  221. replace all "{admin%loop-number-2%}" with "&c%{uniTabAdmin::%loop-number-2%}%" in {_slot}
  222. replace all "{tps}" with "%tps%" in {_slot}
  223. replace all "{servername}" with "%server's name%" in {_slot}
  224. replace all "{rcolor}" with "%colored random color%" in {_slot}
  225. replace all "{online}" with "%amount of all players%" in {_slot}
  226. replace all "{maxplayers}" with "%max players%" in {_slot}
  227. replace all "{kills}" with "%{uniTabKill::%loop-player%}%" in {_slot}
  228. replace all "{deads}" with "%{uniTabDead::%loop-player%}%" in {_slot}
  229. replace all "{now}" with "%now%" in {_slot}
  230. replace all "{freeram}" with "%free memory%" in {_slot}
  231. replace all "{maxram}" with "%max memory%" in {_slot}
  232. replace all "{playerip}" with "%loop-player's ip%" in {_slot}
  233. replace all "{serverip}" with "%server's ip%" in {_slot}
  234. replace all "{serverport}" with "%server's port%" in {_slot}
  235. replace all "{playerprefix}" with "%loop-player's prefix%" in {_slot}
  236. replace all "{gamemode}" with "%loop-player's gamemode%" in {_slot}
  237. replace all "{health}" with "%health of loop-player%" in {_slot}
  238. replace all "{level}" with "%loop-player's level%" in {_slot}
  239. replace all "{location}" with "%loop-player's location%" in {_slot}
  240. replace all "{worldtime}" with "%loop-player's world's time%" in {_slot}
  241. replace all "{uuid}" with "%loop-player's uuid%" in {_slot}
  242. replace all "{world}" with "%loop-player's world%" in {_slot}
  243. loop {uniTabzmienne::*}:
  244. replace all "{zmienna:%loop-value%}" with "%{%loop-value%}%" in {_slot}
  245. "uniTab".Tab.set{loop-number, "%{_slot}%"};
  246. "uniTab".tab.send{loop-player};
  247.  
  248. every 5 second:
  249. #Refowanie configu
  250. {uniTabRef} is true
  251. set {_x::*} to content of file "plugins/Skript/uniTab/tab.yml"
  252. set {_y} to ""
  253. loop {_x::*}:
  254. set {_y} to "%{_y}%%loop-value%}"
  255. set {_y} to hashed {_y}
  256. {_y} isn't {uniTabChanged}:
  257. broadcast "&7[&3uniTab&7] Plik konfiguracyjny ulegl zmianie, przeladowywanie skryptu."
  258. execute console command "/sk reload %script%"
  259.  
  260. on join:
  261. {uniTabKill::%player%} isn't set:
  262. set {uniTabKill::%player%} to 0
  263. {uniTabDead::%player%} isn't set:
  264. set {uniTabDead::%player%} to 0
  265. name of player is "UnixejPL":
  266. send "&7[&3uniTab&7] Ten serwer uzywa twojego skryptu."
  267.  
  268. on death of player:
  269. if attacker is player:
  270. add 1 to {uniTabKill::%attacker%}
  271. add 1 to {uniTabDead::%victim%}
Advertisement
Add Comment
Please, Sign In to add comment