jan_kk

youChat v1.1

Nov 17th, 2014
877
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 14.25 KB | None | 0 0
  1. # ------------------------------------------- #
  2. # youChat #
  3. # ------------------------------------------- #
  4. # Witam, to moj trzeci skrypt (drugi dobry) o nazwie "youChat". #
  5. # Wprowadzam nam: #
  6. # - Mozliwosc robienia konferencji (admini wszystko widza) #
  7. # - Dawanie niestandardowych prefix'ów #
  8. # - Czyszczenie chatu #
  9. # - Zablokowanie pisania uzytkownikowi (mute) #
  10. # - Zablokowanie tworzenia i dolaczania do konferencji uzytkownikowi #
  11. # - Przelaczanie chatu #
  12. # - Dodawanie godziny i daty do chatu #
  13. # ------------------------------------------- #
  14. # Wersja: v1.1 #
  15. # Autor: Jan kk #
  16. # Dla skript.pl #
  17. # ------------------------------------------- #
  18. # Zabraniam: #
  19. # - Jakiegolwiek modyfikowania kodu! #
  20. # - Podszywania sie pod autora! #
  21. # Zezwalam na: #
  22. # - Używanie skryptu na serwerach publicznych! #
  23. # ------------------------------------------- #
  24. options:
  25. prefix: &f[&ayouChat&f]
  26. command /youChat [<text>] [<text>]:
  27. aliases: chat
  28. trigger:
  29. if arg 1 is "zaloz" or "stworz" or "create":
  30. if {youChat::zakaz::%player%} is true:
  31. send "{@prefix} &cMasz zakaz tworzenia konferencji!"
  32. stop
  33. if {youChat::konferencja::%player%} is set:
  34. send "{@prefix} &cStworzyles juz konferencje!"
  35. stop
  36. if arg 2 is not set:
  37. send "{@prefix} &cPodaj nazwe nowej konferencji!"
  38. stop
  39. add "%arg 2%" to {youChat::konferencje::*}
  40. set {youChat::konferencja::%player%} to "%arg 2%"
  41. set {youChat::konferencja.admin::%arg 2%} to "%player%"
  42. send "{@prefix} &2Poprawnie utworzono konferencje o nazwie '%arg 2%'"
  43. add player to {youChat::czlonkowie::%arg 2%::*}
  44. stop
  45. if arg 1 is "usun" or "delete":
  46. if {youChat::zakaz::%player%} is true:
  47. send "{@prefix} &cMasz zakaz tworzenia konferencji!"
  48. stop
  49. if {youChat::konferencja::%player%} is not set:
  50. send "{@prefix} &cNie masz zadnej konferencji!"
  51. stop
  52. if {youChat::konferencja.admin::%{youChat::konferencja::%player%}%} is not "%player%":
  53. send "{@prefix} &cNie jestes administratorem danej konferencji"
  54. stop
  55. remove "%{youChat::konferencja::%player%}%" from {youChat::konferencje::*}
  56. loop all players:
  57. if {youChat::konferencja::%loop-player%} is {youChat::konferencja::%player%}:
  58. clear {youChat::konferencja::%loop-player%}
  59. clear {youChat::konferencja.admin::%{youChat::konferencja::%player%}%}
  60. send "{@prefix} &2Pomyslnie usunieto konferencje!"
  61. stop
  62. if arg 1 is "list" or "lista":
  63. if {youChat::konferencje::*} is not set:
  64. send "{@prefix} &cNie ma zadnych konferencji!"
  65. stop
  66. send "{@prefix} &2Lista wszystkich konferencji:"
  67. send "&6%{youChat::konferencje::*}%"
  68. stop
  69. if arg 1 is "dodaj" or "add":
  70. if {youChat::zakaz::%player%} is true:
  71. send "{@prefix} &cMasz zakaz tworzenia konferencji!"
  72. stop
  73. if {youChat::konferencja::%player%} is not set:
  74. send "{@prefix} &cNie masz zadnej konferencji!"
  75. stop
  76. if {youChat::konferencja.admin::%{youChat::konferencja::%player%}%} is not "%player%":
  77. send "{@prefix} &cNie jestes administratorem danej konferencji"
  78. stop
  79. if arg 2 is not set:
  80. send "{@prefix} &cPodaj, kogo chcesz zaprosic!"
  81. stop
  82. set {youChat::zaproszenie::%{youChat::konferencja::%player%}%::%argument 2%} to true
  83. loop all players:
  84. if loop-player is "%argument 2%":
  85. send "{@prefix} &aZostales zaproszony do konferencji &6%{youChat::konferencja::%player%}%" to loop-player
  86. send "{@prefix} &aAby zaakceptować wpisz: &6/youChat dolacz %{youChat::konferencja::%player%}%"
  87. send "{@prefix} &2Zaprosiles do konferencji gracza o nazwie: &6%argument 2%"
  88. stop
  89. if arg 1 is "dolacz" or "join":
  90. if {youChat::zakaz::%player%} is true:
  91. send "{@prefix} &cMasz zakaz tworzenia konferencji!"
  92. stop
  93. if arg 2 is not set:
  94. send "{@prefix} &cPodaj, do jakiej konferencji chcesz dolaczyc!"
  95. stop
  96. if {youChat::zaproszenie::%argument 2%::%player%} is true:
  97. clear {youChat::zaproszenie::%argument 2%::%player%}
  98. set {youChat::konferencja::%player%} to "%arg 2%"
  99. add player to {youChat::czlonkowie::%arg 2%::*}
  100. send "{@prefix} &2Poprawnie dolaczyles do: %arg 2%"
  101. stop
  102. send "{@prefix} &cNie dostales zaproszenia od tej konferencji!"
  103. stop
  104. if arg 1 is "data":
  105. if player is an op:
  106. if arg 2 is "on":
  107. if {youChat::data.status} is true:
  108. send "{@prefix} &cWyswietlanie daty jest juz wlaczone!"
  109. stop
  110. set {youChat::data.status} to true
  111. send "&2Ustawiono wyswietlanie daty na wlaczone!"
  112. stop
  113. if arg 2 is "off":
  114. if {youChat::data.status} is not set:
  115. send "{@prefix} &cWyswietlanie daty jest juz wylaczone!"
  116. stop
  117. clear {youChat::data.status}
  118. send "&2Ustawiono wyswietlanie daty na wylaczone!"
  119. stop
  120. if arg 2 is "przelacz":
  121. if {youChat::data.status} is true:
  122. clear {youChat::data.status}
  123. send "{@prefix} &2Ustawiono wyswietlanie daty na wylaczone!"
  124. stop
  125. if {youChat::data.status} is not set:
  126. set {youChat::data.status} to true
  127. send "{@prefix} &2Ustawiono wyswietlanie daty na wlaczone!"
  128. stop
  129. send "&7Ta opcja ustawia wyswietlanie daty i godziny przed wiadomoscia!"
  130. send "&f/&2youChat data on &f- Wlaczanie daty"
  131. send "&f/&2youChat data off &f- Wylaczanie daty"
  132. send "&f/&2youChat data przelacz &f- Przelaczanie daty (on>off, off>on)"
  133. stop
  134. if arg 1 is "reload":
  135. execute player command "sk reload %script%"
  136. stop
  137. send "&f------ &ayouChat &f------"
  138. send "&f/&2youChat zaloz <nazwa konferencji> &f- zaklada konferencje"
  139. send "&f/&2youChat usun &f- usuwa konferencje"
  140. send "&f/&2youChat lista &f- lista konferencji"
  141. send "&f/&2youChat dodaj <gracz> &f- dodaje gracza do konferencji"
  142. send "&f/&2youChat dolacz <nazwa konferencji &f- akceptuje zaproszenie"
  143. send "&f/&2youChat reload &f- przeladowywuje skrypt"
  144. send "&f/&2youChat data &f- wlacza/wylacza wyswietlanie daty"
  145. send "&f--- &aAutor: Jan kk &f---"
  146. command /prefix [<offlineplayer>] [<text>]:
  147. trigger:
  148. if player is an op:
  149. if argument-offlineplayer is not set:
  150. send "{@prefix} &cPodaj, komu chcesz zmienic prefix!"
  151. stop
  152. if arg 2 is not set:
  153. clear {youChat::prefix::%argument-offlineplayer%}
  154. send "{@prefix} &2Wyczysciles niestandardowy prefix!"
  155. stop
  156. set {youChat::prefix::%argument-offlineplayer%} to "%arg 2%"
  157. send "{@prefix} &2Ustawiles niestandardowy prefix!"
  158. stop
  159. send "{@prefix} &cNie masz uprawnien!"
  160. stop
  161. command /cc:
  162. trigger:
  163. if player is an op:
  164. loop 100 times:
  165. broadcast ""
  166. send "{@prefix} &2Wyczysciles chat!"
  167. stop
  168. send "&cNie masz uprawnien!"
  169. stop
  170. command /mute [<offlineplayer>] [<integer>] [<text>]:
  171. trigger:
  172. if argument-offlineplayer is not set:
  173. send "{@prefix} &cPodaj, kogo chcesz wyciszyc!"
  174. stop
  175. if argument-integer is not set:
  176. send "{@prefix} &cPodaj, na jaki czas chcesz kogos wyciszyc!"
  177. stop
  178. if arg 1 is not set:
  179. send "{@prefix} &cPodaj powod!"
  180. stop
  181. set {youChat::mute::czas::%argument-offlineplayer%} to argument-integer
  182. add player to {youChat::czekanie::*}
  183. broadcast "&a%player% &fwyciszyl &a%argument-offlineplayer% &fza &a%arg 1% &fna &a%argument-integer% minut"
  184. stop
  185. command /zakaz [<offlineplayer>]:
  186. trigger:
  187. if player is an op:
  188. if argument-offlineplayer is not set:
  189. send "{@prefix} &cPodaj gracza!"
  190. stop
  191. if {youChat::zakaz::%argument-offlineplayer%} is true:
  192. clear {youChat::zakaz::%argument-offlineplayer%}
  193. broadcast "&fGracz &a%argument-offlineplayer% &fznow moze robic konferencje!"
  194. stop
  195. if {youChat::zakaz::%argument-offlineplayer%} is not set:
  196. set {youChat::zakaz::%argument-offlineplayer%} to true
  197. broadcast "&fGracz &a%argument-offlineplayer% &fnie moze robic konferencji!"
  198. stop
  199. send "{@prefix} &cNie masz uprawnien!"
  200. stop
  201. every 1 minute:
  202. loop {youChat::czekanie::*}:
  203. add -1 to {youChat::czas::%loop-value%}
  204. if {youChat::czas::%loop-value%} is 0:
  205. clear {youChat::czas::%loop-value%}
  206. remove loop-value from {youChat::czekanie::*}
  207. on chat:
  208. cancel event
  209. if {youChat::data.status} is true:
  210. set {_g} to result of connect to "http://nicc0.pl/godzina.txt"
  211. set {_d} to result of connect to "http://nicc0.pl/data.txt"
  212. set {_x} to "%{_d}% %{_g}%"
  213. if {youChat::prefix::%player%} is set:
  214. if {youChat::konferencja::%player%} is set:
  215. loop {youChat::czlonkowie::%{youChat::konferencja::%player%}%::*}:
  216. loop all players:
  217. if loop-player is "%loop-value%":
  218. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] %{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%" to loop-player
  219. loop all players:
  220. if loop-player is not "%loop-value%":
  221. if loop-player is an op:
  222. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] %{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%" to all ops
  223. stop
  224. else:
  225. broadcast "&7%{_x}% &f>> %{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%"
  226. stop
  227. else:
  228. if {youChat::konferencja::%player%} is set:
  229. loop {youChat::czlonkowie::%{youChat::konferencja::%player%}%::*}:
  230. loop all players:
  231. if loop-player is "%loop-value%":
  232. if player is an op:
  233. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&cAdministrator&7] %player%&f: &7%uncolored message%" to loop-player
  234. loop all players:
  235. if loop-player-2 is not "%loop-value%":
  236. if loop-player-2 is an op:
  237. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&cAdministrator&7] %player%&f: &7%uncolored message%" to all ops
  238. stop
  239. if player has permission "youchat.svip":
  240. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&9SVIP&7] %player%&f: &7%uncolored message%" to loop-player
  241. loop all players:
  242. if loop-player-2 is not "%loop-value%":
  243. if loop-player-2 is an op:
  244. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&9SVIP&7] %player%&f: &7%uncolored message%" to loop-player-2
  245. stop
  246. if player has permission "youchat.vip":
  247. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&6VIP&7] %player%&f: &7%uncolored message%" to loop-player
  248. loop all players:
  249. if loop-player-2 is not "%loop-value%":
  250. if loop-player-2 is an op:
  251. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&6VIP&7] %player%&f: &7%uncolored message%" to loop-player-2
  252. stop
  253. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&fGracz&7] %player%&f: &7%uncolored message%" to loop-player
  254. loop all players:
  255. if loop-player-2 is not "%loop-value%":
  256. if loop-player-2 is an op:
  257. send "&7%{_x}% &f>> &7[&f%{youChat::konferencja::%player%}%&7] [&fGracz&7] %player%&f: &7%uncolored message%" to loop-player-2
  258. stop
  259. else:
  260. if player is an op:
  261. broadcast "&7%{_x}% &f>> [&cAdministrator&7] %player%&f: &7%uncolored message%"
  262. stop
  263. if player has permission "youchat.svip":
  264. broadcast "&7%{_x}% &f>> [&9SVIP&7] %player%&f: &7%uncolored message%"
  265. stop
  266. if player has permission "youchat.vip":
  267. broadcast "&7%{_x}% &f>> [&6VIP&7] %player%&f: &7%uncolored message%"
  268. stop
  269. broadcast "&7%{_x}% &f>> [&fGracz&7] %player%&f: &7%uncolored message%"
  270. stop
  271. if {youChat::data.status} is not set:
  272. if {youChat::prefix::%player%} is set:
  273. if {youChat::konferencja::%player%} is set:
  274. loop {youChat::czlonkowie::%{youChat::konferencja::%player%}%::*}:
  275. loop all players:
  276. if loop-player is "%loop-value%":
  277. send "&7[&f%{youChat::konferencja::%player%}%&7] %{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%" to loop-player
  278. loop all players:
  279. if loop-player is not "%loop-value%":
  280. if loop-player is an op:
  281. send "&7[&f%{youChat::konferencja::%player%}%&7] %{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%" to all ops
  282. stop
  283. else:
  284. broadcast "%{youChat::prefix::%player%}% &7%player%&f: &7%uncolored message%"
  285. stop
  286. else:
  287. if {youChat::konferencja::%player%} is set:
  288. loop {youChat::czlonkowie::%{youChat::konferencja::%player%}%::*}:
  289. loop all players:
  290. if loop-player is "%loop-value%":
  291. if player is an op:
  292. send "&7[&f%{youChat::konferencja::%player%}%&7] [&cAdministrator&7] %player%&f: &7%uncolored message%" to loop-player
  293. loop all players:
  294. if loop-player-2 is not "%loop-value%":
  295. if loop-player-2 is an op:
  296. send "&7[&f%{youChat::konferencja::%player%}%&7] [&cAdministrator&7] %player%&f: &7%uncolored message%" to all ops
  297. stop
  298. if player has permission "youchat.svip":
  299. send "&7[&f%{youChat::konferencja::%player%}%&7] [&9SVIP&7] %player%&f: &7%uncolored message%" to loop-player
  300. loop all players:
  301. if loop-player-2 is not "%loop-value%":
  302. if loop-player-2 is an op:
  303. send "&7[&f%{youChat::konferencja::%player%}%&7] [&9SVIP&7] %player%&f: &7%uncolored message%" to loop-player-2
  304. stop
  305. if player has permission "youchat.vip":
  306. send "&7[&f%{youChat::konferencja::%player%}%&7] [&6VIP&7] %player%&f: &7%uncolored message%" to loop-player
  307. loop all players:
  308. if loop-player-2 is not "%loop-value%":
  309. if loop-player-2 is an op:
  310. send "&7[&f%{youChat::konferencja::%player%}%&7] [&6VIP&7] %player%&f: &7%uncolored message%" to loop-player-2
  311. stop
  312. send "&7[&f%{youChat::konferencja::%player%}%&7] [&fGracz&7] %player%&f: &7%uncolored message%" to loop-player
  313. loop all players:
  314. if loop-player-2 is not "%loop-value%":
  315. if loop-player-2 is an op:
  316. send "&7[&f%{youChat::konferencja::%player%}%&7] [&fGracz&7] %player%&f: &7%uncolored message%" to loop-player-2
  317. stop
  318. else:
  319. if player is an op:
  320. broadcast "[&cAdministrator&7] %player%&f: &7%uncolored message%"
  321. stop
  322. if player has permission "youchat.svip":
  323. broadcast "[&9SVIP&7] %player%&f: &7%uncolored message%"
  324. stop
  325. if player has permission "youchat.vip":
  326. broadcast "[&6VIP&7] %player%&f: &7%uncolored message%"
  327. stop
  328. broadcast "[&fGracz&7] %player%&f: &7%uncolored message%"
  329. stop
Advertisement
Add Comment
Please, Sign In to add comment