Guest User

Untitled

a guest
May 9th, 2016
278
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.85 KB | None | 0 0
  1. ##########################################
  2. # Bg-chat #
  3. # Zezwalam na kopie #
  4. # Pozwalam na podszywanie sie pod autora#
  5. # Nie pozwalam na zmienianeie uprawnien i wiadomosci#
  6. # v0.1(bedzie większy update) #
  7. # autor : xBG #
  8. ##########################################
  9.  
  10.  
  11.  
  12.  
  13.  
  14. # Dostepne permissje do skryptu/komendy :
  15.  
  16. # xbg.chat.on - komenda /chat on
  17. # xbg.chat.off - komenda /chat off
  18. # xbg.chat.clear - komenda /chat clear
  19. # xbg.chat.auto - komenda /char aon/off
  20. # xbg.chat.write - pozwala na pisanie przy wylaczonym czacie
  21. # xbg.chat.write2 - pozwala na pisanie zawsze i ciągle
  22. # xbg.chat.caps - pozwala pisac duzymi literami
  23. # xbg.chat.help - komeda /chat
  24. #
  25. options:
  26. time: 30 # Co ile minut ma byc czyszczony chat
  27.  
  28. variables:
  29. {chat} = true
  30. {auto} = true
  31.  
  32. # KOD (taki fajny)
  33.  
  34. command /chat [<text>]:
  35. trigger:
  36. if arg 1 is not set:
  37. if player has permission "xbg.chat.help"
  38. send "&8######## &4BG-chat &8######## "
  39. send "&3/chat on &7- wlacza chat"
  40. send "&3/chat off &7- wylacza chat"
  41. send "&3/chat clear &7- czysci chat"
  42. send "&3/chat aon &7- wlacza auto chat"
  43. send "&3/chat aoff &7 wylacza auto chat"
  44. send "&3/chat mute &7 - wycisza gracza"
  45. send "&8######## &4BG-chat &8######## "
  46. if arg 1 is "on":
  47. if {chat} is false:
  48. if player has permission "xbg.chat.on":
  49. set {chat} to true
  50. broadcast ""
  51. broadcast "&2» &6Chat zostal &aWlaczony"
  52. broadcast ""
  53. stop
  54. else:
  55. send "&7Nie masz &auprawnienia&7 do tej komendy!"
  56. stop
  57. else:
  58. send "&6Chat jest juz &aWlaczony"
  59. stop
  60. if arg 1 is "off":
  61. if {chat} is true:
  62. if player has permission "xbg.chat.off":
  63. set {chat} to false
  64. broadcast ""
  65. broadcast "&2» &6Chat zostal &aWylaczony"
  66. broadcast ""
  67. stop
  68. else:
  69. send "&7Nie masz &auprawnienia&7 do tej komendy!"
  70. stop
  71. else:
  72. send "&6Chat jest juz &aWylaczony"
  73. stop
  74. if arg 1 is "clear":
  75. if player has permission "xbg.chat.clear":
  76. loop 100 times:
  77. message "" to all players
  78. send "&2BG-chat» &6Chat został wyczyszczony przez &c %name of player%&a!" to all players
  79. stop
  80. else:
  81. send "&7Nie masz &auprawnienia&7 do tej komendy!"
  82. stop
  83. if arg 1 is "aon":
  84. if player has permission "xbg.chat.auto":
  85. set {auto} to true
  86. send "&6Auto czyszczenie chatu uruchomione!"
  87. stop
  88. else:
  89. send "&2BG-chat» Nie masz uprawnien aby to robic!"
  90. if arg 1 is "aoff":
  91. if player has permission "xbg.chat.auto":
  92. set {auto} to false
  93. send "&2BG-chat» &6Auto czyszczenie chatu wylaczone!"
  94. else:
  95. send "&2BG-chat» Nie masz uprawnien aby to robic!"
  96. if arg 1 is "wycisz" or "mute":
  97. if player has permission "xbg.chat.mute":
  98. if arg 2 is set:
  99. if {xbg.chat.mute::%name of arg 2%} is false:
  100. set {xbg.chat.mute::%name of arg 2%} to true
  101. send "&2BG-chat» &cGracz %name of arg 2% zostal wyciszony na czacie!"
  102. send "&2BG-chat» &cZostales wyciszony na czacie przez &e%name of player%&c." to arg 2
  103. stop
  104. if {xbg.chat.mute::%name of arg 2%} is true:
  105. set {xbg.chat.mute::%name of arg 2%} to false
  106. send "&2BG-chat» &aGracz %name of arg 2% zostal odciszony na czacie!"
  107. send "&2BG-chat» &aZostales odciszony na czacie przez &e%name of player%&c." to arg 2
  108. stop
  109. else:
  110. send "&2BG-chat» &cNieprawidlowa komenda! Uzyj - &e/chat wycisz <nick>"
  111. stop
  112. every {@time} minutes:
  113. if {auto} is true:
  114. loop 100 times:
  115. message "" to all players
  116. send "&2BG-chat» &6Chat zostal wyczyszczony &cAutomatycznie&a!" to all players
  117.  
  118. on chat:
  119. if {chat} is false:
  120. if player has permission "xbg.chat.write":
  121. stop
  122. else:
  123. cancel event
  124. send "&2BG-chat» &6Chat jest aktualnie &aWylaczony!"
  125. stop
  126. else:
  127. if player has permission "xbg.chat.write2":
  128. stop
  129. set {_waited} to difference between {chat.%player%.spam} and now
  130. if {_waited} is less than 3 real seconds seconds:
  131. send "&2BG-chat» &6astepna&a wiadomosc&6 bedziesz mogl wyslac za &c3 sekundy"
  132. cancel event
  133. stop
  134. set {chat.%player%.spam} to now
  135. stop
  136. on chat:
  137. if player has permission "xbg.chat.caps"
  138. replace all "A" with "a" in the message
  139. replace all "B" with "b" in the message
  140. replace all "C" with "c" in the message
  141. replace all "D" with "d" in the message
  142. replace all "E" with "e" in the message
  143. replace all "F" with "f" in the message
  144. replace all "G" with "g" in the message
  145. replace all "H" with "h" in the message
  146. replace all "I" with "i" in the message
  147. replace all "J" with "j" in the message
  148. replace all "K" with "k" in the message
  149. replace all "L" with "l" in the message
  150. replace all "M" with "m" in the message
  151. replace all "N" with "n" in the message
  152. replace all "O" with "o" in the message
  153. replace all "P" with "p" in the message
  154. replace all "R" with "r" in the message
  155. replace all "S" with "s" in the message
  156. replace all "T" with "t" in the message
  157. replace all "U" with "u" in the message
  158. replace all "W" with "w" in the message
  159. replace all "Y" with "y" in the message
  160. replace all "Z" with "z" in the message
  161.  
  162. # Kolorowy nick
  163.  
  164. command /kolornick [<player>] [<text>]:
  165. permission: xbg.chat.kolor
  166. trigger:
  167. if arg-2 is set:
  168. send "&2BG-chat» Ustawiles kolor nicku gracza %player-arg%"
  169. set {kolorchat::%player-arg%} to "%arg-2%"
  170. if arg-1 is not set:
  171. send "&2BG-chat» Poprawne uzycie /kolornick {gracz} {kolor}"
  172. on chat:
  173. if {kolorchat::%player%} is not set:
  174. set player's display name to "&7%player%"
  175. stop
  176. if {kolorchat::%player%} is "6":
  177. set player's display name to "&6%player%"
  178. stop
  179. if {kolorchat::%player%} is "e":
  180. set player's display name to "&e%player%"
  181. stop
  182. if {kolorchat::%player%} is "9":
  183. set player's display name to "&9%player%"
  184. stop
  185. if {kolorchat::%player%} is "A":
  186. set player's display name to "&a%player%"
  187. stop
  188. if {kolorchat::%player%} is "2":
  189. set player's display name to "&2%player%"
  190. stop
  191. if {kolorchat::%player%} is "3":
  192. set player's display name to "&3%player%"
  193. stop
  194. if {kolorchat::%player%} is "b":
  195. set player's display name to "&b%player%"
  196. stop
  197. if {kolorchat::%player%} is "yt":
  198. set player's display name to "&8[&4YT&8]&7%player%"
  199. stop
  200.  
  201. # Dodawanie cenuzury
  202.  
  203. command /cenzor [<text>] [<text>]:
  204. trigger:
  205. if player has permission "xbg.chat.cenzura":
  206. if arg 1 is not set:
  207. send "&cBG-cenzura"
  208. stop
  209. if arg 1 is set:
  210. if arg 2 is set:
  211. set {xbg.chat.cenzura::%arg 1%} to "%arg 2%"
  212. send "&2BG-chat» Dodales cenzure wyrazu &c%arg 1%&9. Cenzura: &c%arg 2%&9."
  213. stop
  214. else:
  215. send "&2BG-chat» Nieprawidlowa komenda! Uzyj: &2/cenzura [slowo] [cenzura]"
  216. else:
  217. send "&2BG-chat» Nieprawidlowa komenda! Uzyj: &2/cenzura [slowo] [cenzura]"
  218. stop
Advertisement
Add Comment
Please, Sign In to add comment