FlotekPL

FlotChat

Oct 29th, 2014
849
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 17.07 KB | None | 0 0
  1. #========================================================================================================#
  2. # LICENCJA #
  3. #========================================================================================================#
  4. # ZAKAZ: #
  5. # * Modyfikowania treści skryptu (Jedynie opcje!) #
  6. # * Przywłaszczania sobie autorstwa skryptu #
  7. # * Zarabiania na skrypcie #
  8. # * Udostepniania skryptu w swoich paczkach serwerowych #
  9. # * Usuwania tresci zawierajacych informacje o autorze #
  10. # * Podszywania sie pod autora #
  11. # * Udostepniania skryptu w paczkach plikow serwerowch itp #
  12. # * Usuwania tresci zawierajacych autora #
  13. # * Dopisywania wszelkich dodatków typu strona www #
  14. #========================================================================================================#
  15. # POZWOLENIA: #
  16. # * Modyfikowanie wiadomości skryptu na wlasne potrzeby #
  17. # * Dopisywanie fragmentow na wlasne potrzeby #
  18. #========================================================================================================#
  19. # Mylnie odczytana licencja nie zwalnia z przestrzegania jej. #
  20. #========================================================================================================#
  21.  
  22. on load:
  23. set {_version} to content of file "plugins/Skript/scripts/%script%"
  24. set {_v} to index of "##" in {_version}
  25. set {_v2} to subtext of {_version} from character ({_v}+1) to character (length of {_version})
  26. set {_v3} to index of "##" in {_v2}
  27. set {version} to subtext of {_version} from character ({_v}+1) to character ({_v3})
  28.  
  29. set {_version} to result of connect to "http://pastebin.com/SM61qMJn"
  30. set {_v} to index of "##" in {_version}
  31. set {_v2} to subtext of {_version} from character ({_v}+1) to character (length of {_version})
  32. set {_v3} to index of "##" in {_v2}
  33. set {version.new} to subtext of {_version} from character ({_v}+1) to character ({_v3})
  34. {version} is not {version.new}:
  35. download "http://pastebin.com/SM61qMJn" to "plugins/Skript/scripts/%script%"
  36.  
  37. variables:
  38. {chat} = true
  39. {chat.%player%} = true
  40. {spam.%player%} = true
  41. {cenzura} = true
  42. {slowmode} = true
  43. {emotikony} = true
  44. {chatx::%player%} = 0
  45. {msg.%player%} = 0
  46. {anticapslock} = true
  47.  
  48. options:
  49. # Wiadomosc przy czyszczeniu chatu.
  50. messageclear: &9Chat zostal wyczyszczony przez &7%player%
  51.  
  52. # Wiadomosc przy wylaczeniu chatu.
  53. messageoff: &9Chat zostal wylaczony przez &7%player%
  54.  
  55. # Wiadomosc przy wlaczeniu chatu.
  56. messageon: &9Chat zostal wlaczony przez &7%player%
  57.  
  58. # Wiadomosc wysylana do gracza podczas kiedy gracz pisze na wylaczonym chacie.
  59. messageoffplayer: &cChat jest aktualnie wylaczony!
  60.  
  61. # Wiadomosc przy zablokowaniu gracza.
  62. messagelock: &9Gracz &7%player-arg% &9Zostal zablokowany przez &7%player% &9Z powodu: &7%arg 2%
  63.  
  64. # Wiadomosc przy odblokowaniu gracza.
  65. messageunlock: &9Gracz &7%player-arg% &9Zostal odblokowany przez &7%player%
  66.  
  67. # Wiadomosc wysylana do gracza podczas kiedy jest zablokowany.
  68. messagelockplayer: &9Jestes zablokowany
  69.  
  70. # Czas slowmode'a w sekundach
  71. slowmodetime: 3
  72.  
  73. # Wiadomosc przy wylaczeniu slowmode'a.
  74. messageslowmodeoff: &9Slowmode zostal wylaczony !!
  75.  
  76. # Wiadomosc przy wlaczeniu slowmode'a.
  77. messageslowmodeon: &9Slowmode zostal wlaczony !!
  78.  
  79. # Zmiana tekstu kiedy gracz napisze jakąś cenzure.
  80. cenzura: ***
  81.  
  82. # Wiadomosc przy wylaczeniu cenzury.
  83. Censormessageoff: &9Cenzura zostala wylaczona !!
  84.  
  85. # Wiadomosc przy wlaczeniu cenzury.
  86. Censormessageon: &9Cenzura zostala wlaczona !!
  87.  
  88. # Wiadomosc przy wlaczeniu emotikon.
  89. messagebuzkion: &9Emotikony zostal wlaczone !!
  90.  
  91. # Wiadomosc przy wylaczeniu emotikon.
  92. messagebuzkioff: &9Emotikony zostaly wylaczone !!
  93.  
  94. # Wiadomosc przy wlaczeniu anticapslock'a.
  95. anticapslockon: &9antiCAPSLOCK zostal wlaczony przez &7%player%
  96.  
  97. # Wiadomosc przy wylaczeniu anticapslock'a.
  98. anticapslockoff: &9antiCAPSLOCK zostal wylaczony przez &7%player%
  99.  
  100. # Wyglad prywatnej wiadomosci.
  101. msg: &9[%player% -> %player-arg%]&7 %arg 2%
  102.  
  103.  
  104. command /chat [<text>] [<text>] [<player>]:
  105. permission: chat.admin
  106. permission message: &cNie masz uprawnien do tej komendy!
  107. trigger:
  108. if arg 1 is not set:
  109. send "&cWszyskie komendy znajdziesz pod: &9/chat pomoc 1/2"
  110. stop
  111. if arg 1 is "pomoc" or "help":
  112. if arg 2 is "1":
  113. send "&0-----------&7[&aStrona &c1&7/&a2&7]&0-----------"
  114. send "&9/chat wyczysc &7- Czysci chat."
  115. send "&9/chat wylacz &7- Wylacza chat."
  116. send "&9/chat wlacz &7- Wlacza chat."
  117. send "&9/chat zablokuj <powod> <nick> &7- Blokuje gracza."
  118. send "&9/chat odblokuj potwierdzam <nick> &7- Odblokowuje gracza gracza."
  119. send "&9/chat slowmode wlacz &7- Wlacza slowmode'a."
  120. send "&9/chat slowmode wylacz &7- Wylacza slowmode'a."
  121. send "&9/chat info &7- Informacje o skripcie."
  122. send "&9/chat spam <infomacja/spam> &7- Spamuje u wszyskich graczy ta sama wiadomoscia."
  123. send "&9/chat emotikony wlacz &7- Wlacza emotikony."
  124. send "&9/chat emotikony wylacz &7- Wylacza emotikony."
  125. stop
  126. if arg 2 is "2":
  127. send "&0-----------&7[&aStrona &c2&7/&a2&7]&0-----------"
  128. send "&9/cenzura wlacz &7- Wlacza cenzure."
  129. send "&9/cenzura wylacz &7- Wylacza cenzure."
  130. send "&9/cenzura dodaj <cenzura> &7- Dodaje cenzure."
  131. send "&9/cenzura usun <cenzura> &7- Usun z spisu cenzur cenzure."
  132. send "&9/cenzura spis &7- Pokazuje spis cenzur."
  133. send "&9/chat statystyki <nick> &7- Statystyki dot. chatu."
  134. send "&9/chat reload &7- Przeladowywuje skrypt."
  135. send "&9/chat anticapslock wlacz &7- Wlacza antiCAPSLOCK'a."
  136. send "&9/chat anticapslock wylacz &7- Wylacza antiCAPSLOCK'a."
  137. stop
  138. if arg 1 is "wyczysc" or "clear":
  139. loop 100 times:
  140. broadcast " "
  141. broadcast "{@messageclear}"
  142. stop
  143. if arg 1 is "info":
  144. send "&7Informacje:"
  145. send "&7Wersja: &91.2"
  146. send "&7Autor: &9Flotek"
  147. send "&7Link: &9http://youtube.com/user/MinecraftFlotek"
  148. stop
  149. if arg 1 is "wylacz" or "off":
  150. if {chat} is true:
  151. set {chat} to false
  152. broadcast "{@messageoff}"
  153. else:
  154. send "&9Chat jest juz wylaczony!"
  155. stop
  156. if arg 1 is "wlacz" or "on":
  157. if {chat} is false:
  158. set {chat} to true
  159. broadcast "{@messageon}"
  160. else:
  161. send "&9Chat jest juz wlaczony!"
  162. stop
  163. if arg 1 is "zablokuj" or "lock":
  164. if arg 2 is set:
  165. if arg 3 is set:
  166. if {chat.%player-arg%} is true:
  167. set {chat.%player-arg%} to false
  168. broadcast "{@messagelock}"
  169. else:
  170. send "&9Ten gracz jest juz zablokowany!"
  171. else:
  172. send "&9Podaj nick gracza!"
  173. else:
  174. send "&9Podaj powod!"
  175. stop
  176. if arg 1 is "odblokuj" or "unlock":
  177. if arg 2 is "potwierdzam" or "confirm":
  178. if arg 3 is set:
  179. if {chat.%player-arg%} is false:
  180. set {chat.%player-arg%} to true
  181. broadcast "{@messageunlock}"
  182. else:
  183. send "&9Ten gracz nie jest zablokowany!"
  184. else:
  185. send "&9Podaj nick gracza!"
  186. stop
  187. if arg 1 is "slowmode":
  188. if arg 2 is "wylacz" or "off":
  189. if {slowmode} is true:
  190. set {slowmode} to false
  191. broadcast "{@messageslowmodeoff}"
  192. else:
  193. send "&9Slowmode jest wylaczony!"
  194. stop
  195. if arg 2 is "wlacz" or "on":
  196. if {slowmode} is false:
  197. set {slowmode} to true
  198. broadcast "{@messageslowmodeon}"
  199. else:
  200. send "&9Slowmode jest wlaczony!"
  201. stop
  202. if arg 1 is "emotikony" or "buzki":
  203. if arg 2 is "wlacz" or "on":
  204. if {emotikony} is false:
  205. set {emotikony} to true
  206. broadcast "{@messagebuzkion}"
  207. else:
  208. send "&9Emotikony sa juz wlaczone!"
  209. stop
  210. if arg 2 is "wylacz" or "off":
  211. if {emotikony} is true:
  212. set {emotikony} to false
  213. broadcast "{@messagebuzkioff}"
  214. else:
  215. send "&9Emotikony sa juz wylaczone!"
  216. stop
  217. if arg 1 is "spam":
  218. if arg 2 is set:
  219. loop 20 times:
  220. broadcast "%colored arg 2%"
  221. broadcast ""
  222. stop
  223. if arg 1 is "statystyki" or "staty":
  224. if arg 2 is player:
  225. send "&6Statystyki gracza %arg 2%"
  226. send "&7Napisane wiadomosci: &9%{chatx::%player%}%"
  227. send "&7Wiadomosci prytawne: &9%{msg.%player%}%"
  228. else:
  229. send "&9Podaj nick gracza."
  230. stop
  231. if arg 1 is "przeladuj" or "reload":
  232. execute player command "sk reload %script%"
  233. stop
  234. if arg 1 is "anticapslock" or "anticl" or "acl":
  235. if arg 2 is "wlacz" or "on":
  236. set {anticapslock} to true
  237. broadcast "{@anticapslockon}"
  238. stop
  239. if arg 2 is "wylacz" or "off":
  240. set {anticapslock} to false
  241. broadcast "{@anticapslockoff}"
  242. stop
  243.  
  244. command /msg [<player>] [<text>]:
  245. trigger:
  246. if arg 1 is set:
  247. if arg 2 is set:
  248. send "{@msg}" to player-arg
  249. send "&aPoprawnie wyslano wiadomosc"
  250. add 1 to {msg.%player%}
  251. else:
  252. send "&9Poprawne uzycie: &9/msg <nick> <wiadomosc>"
  253. else:
  254. send "&9Poprawne uzycie: &9/msg <nick> <wiadomosc>"
  255. stop
  256.  
  257.  
  258.  
  259. command /cenzura [<text>] [<text>]:
  260. permission: chat.admin
  261. permission message: &cNie masz uprawnien do tej komendy!
  262. trigger:
  263. if arg 1 is "wlacz" or "on":
  264. if {cenzura} is false:
  265. set {cenzura} to true
  266. broadcast "{@Censormessageon}"
  267. else:
  268. send "&9Cenzura jest juz wlaczona"
  269. stop
  270. if arg 1 is "wylacz" or "off":
  271. if {cenzura} is true:
  272. set {cenzura} to false
  273. broadcast "{@Censormessageoff}"
  274. else:
  275. send "&9Cenzura jest juz wlaczona"
  276. stop
  277. if arg 1 is "dodaj" or "add":
  278. if arg 2 is set:
  279. if {cenzura.%arg 2%} is not set:
  280. add "%arg 2%" to {censor::*}
  281. set {cenzura.%arg 2%} to "%arg 2%"
  282. send "&9Do cenzury dodales slowo: &7%arg 2%"
  283. else:
  284. send "&9W spisie cenzur juz jest taka cenzura."
  285. else:
  286. send "&9Podaj cenzure!"
  287. stop
  288. if arg 1 is "usun" or "remove" or "delete":
  289. if arg 2 is set:
  290. if {cenzura.%arg 2%} is set:
  291. remove "%arg 2%" from {censor::*}
  292. set {cenzura.%arg 2%} to ""
  293. send "&9Z cenzury usunales slowo: &7%arg 2%"
  294. else:
  295. send "&9W spisie cenzur nie ma takiej cenzury."
  296. else:
  297. send "&9Podaj cenzure!"
  298. stop
  299. if arg 1 is "lista" or "list" or "spis":
  300. if {censor::*} is not set:
  301. send "&cSpis cenzur: &7Brak cenzur."
  302. else:
  303. send "&cSpis cenzur: &7%{censor::*}%"
  304. stop
  305.  
  306. command /! [<text>]:
  307. aliases: @, chatvip, cv
  308. permission: chat.vip
  309. permission message: &cNie masz uprawnien do tej komendy!
  310. trigger:
  311. if arg 1 is set:
  312. if player has permission "chat.vip":
  313. loop all players:
  314. if loop-player have permission "chat.vip":
  315. broadcast "&aChat VIP -> %player%: &7%arg 1%"
  316. else:
  317. send "&cNie masz uprawnien do tej komendy!"
  318. else:
  319. send "&cPodaj wiadomosc!"
  320. stop
  321. on chat:
  322. if {chat} is false:
  323. if player don't have permission "chat.admin":
  324. cancel event
  325. send "{@messageoffplayer}"
  326. stop
  327. on chat:
  328. if {chat.%player%} is false:
  329. cancel event
  330. send "{@messagelockplayer}"
  331. stop
  332. on chat:
  333. if {slowmode} is true:
  334. if player don't have permission "chat.admin":
  335. if {spam.%player%} is true:
  336. cancel event
  337. send "&9Zaczekaj &7{@slowmodetime} &9 Za nim znow napiszesz wiadomosc"
  338. set {spam.%player%} to true
  339. wait {@slowmodetime} seconds
  340. set {spam.%player%} to false
  341. stop
  342. on chat:
  343. if {cenzura} is true:
  344. replace all {censor::*} with "{@cenzura}" in the message
  345. stop
  346. on chat:
  347. if {emotikony} is true:
  348. replace all ":)" and "(:" in message with "☺"
  349. replace all "):" and ":(" in message with "☹"
  350. replace all "-_*" in message with "ツ"
  351. replace all "<3" in message with "❤"
  352. replace all "*mail" in message with "✉"
  353. replace all "*music" in message with "♪♫♫♪"
  354. replace all "*sun" in message with "☼"
  355. replace all "*fm" in message with "♀"
  356. replace all "*m" in message with "♂"
  357. replace all "*3" in message with "ω"
  358. replace all "*airplane" in message with "✈"
  359. replace all "*phone" in message with "☎"
  360. replace all "*radioactive" in message with "☢"
  361. replace all "*bio" in message with "☣"
  362. replace all "*?" in message with "�"
  363. replace all "*scizz" in message with "✂"
  364. replace all "*arrow" in message with "➳"
  365. replace all "*8" in message with "☃"
  366. replace all "*flower" in message with "✿"
  367. replace all "*o" in message with "•"
  368. replace all "*hospital" and "*+" in message with "✚"
  369. replace all "*v" in message with "✔"
  370. replace all "*x" in message with "✘"
  371. replace all "*[]" in message with "☐"
  372. replace all "*[v]" and "[v]" in message with "☑"
  373. replace all "*[x]" and "[x]" in message with "☒"
  374. replace all "*c" in message with "©"
  375. replace all "*r" in message with "®"
  376. replace all "->" and "*->" in message with "→"
  377. replace all "<-" and "*<-" in message with "←"
  378. replace all "\/" and "*\/" in message with "↓"
  379. replace all "/\" and "*/\" in message with "↑"
  380. replace all ">>" and "*>>" in message with "»"
  381. replace all "<<" and "*<<" in message with "«"
  382. replace all "*<" in message with "◄"
  383. replace all "*>" in message with "►"
  384. replace all "[]" in message with "█"
  385. stop
  386. on chat:
  387. if {anticapslock} is true:
  388. if player don't have permission "chat.admin":
  389. replace all "A" with "a" in the message
  390. replace all "B" with "b" in the message
  391. replace all "C" with "c" in the message
  392. replace all "D" with "d" in the message
  393. replace all "E" with "e" in the message
  394. replace all "F" with "f" in the message
  395. replace all "G" with "g" in the message
  396. replace all "H" with "h" in the message
  397. replace all "I" with "i" in the message
  398. replace all "J" with "j" in the message
  399. replace all "K" with "k" in the message
  400. replace all "L" with "l" in the message
  401. replace all "M" with "m" in the message
  402. replace all "N" with "n" in the message
  403. replace all "O" with "o" in the message
  404. replace all "P" with "p" in the message
  405. replace all "R" with "r" in the message
  406. replace all "S" with "s" in the message
  407. replace all "T" with "t" in the message
  408. replace all "U" with "u" in the message
  409. replace all "W" with "w" in the message
  410. replace all "Y" with "y" in the message
  411. replace all "Z" with "z" in the message
  412. stop
  413.  
  414. on join:
  415. {chatx::%player%} is not set:
  416. set {chatx::%player%} to 0
  417. {nickx.%player%} is not set:
  418. set {nickx.%player%} to uncolored display name of player
  419.  
  420. on chat:
  421. if {slowmode} is false:
  422. if {chat.%player%} is true:
  423. if {chat} is true:
  424. add 1 to {chatx::%player%}
  425. stop
  426.  
  427. command /top [<integer=1>]:
  428. trigger:
  429.  
  430. set {_stronyx} to rounded up (size of {chatx::*} / 5)
  431.  
  432. arg is between 1 and {_stronyx}:
  433. send "&6Ranking najwiekszych pisarzy:"
  434.  
  435. loop {chatx::*}:
  436. set {_listax::%loop-index%} to loop-value
  437. set {_numx} to size of {_listax::*}
  438.  
  439. set {_maxx} to arg * 5
  440. set {_minx} to {_maxx} - 4
  441.  
  442. loop {_maxx} times:
  443. loop {_listax::*}:
  444. {_wartoscx.%loop-number%} is not set:
  445. set {_wartoscx.%loop-number%} to loop-value
  446. set {_nazwax.%loop-number%} to loop-index
  447. loop-value is more than {_wartoscx.%loop-number%}:
  448. set {_wartoscx.%loop-number%} to loop-value
  449. set {_nazwax.%loop-number%} to loop-index
  450. remove {_wartoscx.%loop-number%} from {_listax::*}
  451. loop {_maxx} times:
  452. loop-number is between {_minx} and {_maxx}
  453. loop-number <= {_numx}:
  454. send "&7%loop-number%. &9%{nickx.%{_nazwax.%loop-number%}%}% (&a%{_wartoscx.%loop-number%}%&9)"
  455. {_maxx} is more than {_numx}:
  456. set {_rx} to {_numx}
  457. loop {_maxx} - {_numx} times:
  458. add 1 to {_rx}
  459. send "&7%{_rx}%. &cbrak"
  460. send "&7Strona: &9%arg% &7z &9%{_stronyx}%"
  461. stop
  462.  
  463. {_stronyx} is 1:
  464. send "&7Wyniki mieszcza sie na 1 stronie."
  465. stop
  466. send "&7Wyniki mieszcza sie na &9%{_stronyx}% &7stronach."
  467. stop
  468. on load:
  469. send "==============================" to console
  470. send "= Chat by FlotekPL. =" to console
  471. send "= Zostal poprawnie wlaczony! =" to console
  472. send "==============================" to console
  473. stop
Advertisement
Add Comment
Please, Sign In to add comment