Advertisement
knugi

Skript Rodzinka

Feb 23rd, 2016
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.15 KB | None | 0 0
  1. command /rodzina [<text="pomoc">] [<text>]:
  2. trigger:
  3. if arg 1 is "pomoc":
  4. send "&6Komendy rodzinki by Knugi:"
  5. send "&a/rodzina stworz <nazwa> &8- &7tworzy rodzine"
  6. send "&a/rodzina dodaj <nick> &8- &7dodaje gracza do rodziny"
  7. send "&a/rodzina wyrzuc <nick> &8- &7wyrzuca gracza z rodziny"
  8. send "&a/rodzina akceptuj &8- &7akceptuje dodanie do rodziny"
  9. send "&a/rodzina opusc &8- &7opuszczasz rodzine"
  10. send "&a/rodzina usun &8- &7usuwa rodzine"
  11. send "&a/rodzina lista &8- &7wyswietla liste dodanych do rodziny"
  12. send "&a/rodzina przekaz <nick> &8- &7przekazujesz glowe rodziny na kogos innego"
  13. send "&a/rodzina chat &8- &7wlacza/wylacza chat rodzinny"
  14. stop
  15. if arg 1 is "stworz":
  16. if arg 2 is not set:
  17. send "&c* &6Podaj nazwe rodziny jaka chcesz zalozyc."
  18. stop
  19. if arg 2 contains "##" or "*" or "?":
  20. send "&c* &6Nazwa zawiera niedozwolone znaki."
  21. stop
  22. if length of arg 2 is larger than 16:
  23. send "&c* &6Nazwa jest za dluga."
  24. stop
  25. if {family.%player%} is set:
  26. send "&c* &6Posiadasz juz rodzine."
  27. stop
  28. if {family::%arg 2%} is set:
  29. send "&c* &6Taka rodzina juz istnieje"
  30. stop
  31. set {family.%player%} to arg 2
  32. set {family::%arg 2%} to player
  33. add player to {family::%arg 2%::members::*}
  34. broadcast "&c* &6Powstala nowa rodzinie o nazwie &3%arg 2%"
  35. stop
  36. if arg 1 is "dodaj":
  37. if {family.%player%} is not set:
  38. send "&c* &6Nie posiadasz rodziny."
  39. stop
  40. if player is not {family::%{family.%player%}%}:
  41. send "&c* &6Nie jestes zalozycielem rodziny."
  42. stop
  43. if arg 2 is not set:
  44. send "&c* &6Podaj nazwe gracza, ktorego chcesz dodac do rodziny."
  45. stop
  46. set {_arg2} to "%arg 2%" parsed as offlineplayer
  47. if {_arg2} is online:
  48. if {family.%{_arg2}%} is not set:
  49. if {familyr.%{_arg2}%.time} is not set:
  50. set {familyr.%{_arg2}%.request} to {family.%player%}
  51. set {familyr.%{_arg2}%.time} to 20
  52. send "&c* &6Rodzina &3%{family.%player%}% &6zaprasza cie do grona. Wpisz &c/rodzina akceptuj&6, by akceptowac." to {_arg2}
  53. stop
  54. send "&c* &6Ten gracz ma juz zaproszenie do rodziny. &8(&7%{familyr.%{_arg2}%.time}%&8)"
  55. stop
  56. send "&c* &6Ten gracz nalezy juz do rodziny."
  57. stop
  58. send "&c* &6Nie ma takiego gracza na serwerze."
  59. stop
  60. if arg 1 is "akceptuj":
  61. if {family.%player%} is set:
  62. send "&c* &6Juz posiadasz rodzine."
  63. stop
  64. if {familyr.%player%.request} is set:
  65. add player to {family::%{familyr.%player%.request}%::members::*}
  66. set {family.%player%} to {familyr.%player%.request}
  67. clear {familyr.%player%.request}
  68. clear {familyr.%player%.time}
  69. send "&c* &6Dolaczyles do rodziny &3%{family.%player%}%."
  70. loop {family::%{family.%player%}%::members::*}:
  71. set {_p} to "%loop-value%" parsed as offlineplayer
  72. if {_p} is not player:
  73. send "&c* &6Gracz &3%player% &6dolaczyl twojej rodziny." to {_p}
  74. stop
  75. send "&c* &6Nie masz co akceptowac."
  76. stop
  77. if arg 1 is "wyrzuc":
  78. if {family.%player%} is not set:
  79. send "&c* &6Nie posiadasz rodziny."
  80. stop
  81. if {family::%{family.%player%}%} is player:
  82. if arg 2 is not set:
  83. send "&c* &6Podaj nick gracza ktorego chcesz wyrzucic z rodziny."
  84. stop
  85. set {_arg2} to "%arg 2%" parsed as offlineplayer
  86. loop {family::%{family.%player%}%::members::*}:
  87. set {_p} to "%loop-value%" parsed as offlineplayer
  88. if {_p} is {_arg2}:
  89. remove loop-value from {family::%{family.%player%}%::members::*}
  90. clear {family.%{_arg2}%}
  91. clear {family.%{_arg2}%.chat}
  92. send "&c* &6Wyrzucono cie z rodziny." to {_arg2}
  93. if {_p} is not {_arg2}:
  94. send "&c* &6Wyrzucono gracza &c%arg 2% &6z twojej rodziny." to {_p}
  95. stop
  96. send "&c* &6Nie jestes zalozycielem rodziny."
  97. stop
  98. if arg 1 is "opusc":
  99. if {family.%player%} is not set:
  100. send "&c* &6Nie jestes w zadnej rodzinie."
  101. stop
  102. if player is {family::%{family.%player%}%}:
  103. send "&c* &6Nie mozesz opuscic rodziny, gdy jestes jej zalozycielem."
  104. stop
  105. loop {family::%{family.%player%}%::members::*}:
  106. set {_p} to "%loop-value%" parsed as offlineplayer
  107. if {_p} is not player:
  108. send "&c* &6Gracz &3%player% &6opuscil twoja rodzine." to {_p}
  109. remove player from {family::%{family.%player%}%::members::*}
  110. clear {family.%player%}
  111. clear {family.%player%.chat}
  112. send "&c* &6Opusciles rodzine."
  113. stop
  114. if arg 1 is "usun":
  115. if {family.%player%} is not set:
  116. send "&c* &6Nie posiadasz rodziny."
  117. stop
  118. if player is not {family::%{family.%player%}%}:
  119. send "&c* &6Nie jestes zalozycielem rodziny."
  120. stop
  121. set {_f} to {family.%player%}
  122. loop {family::%{family.%player%}%::members::*}:
  123. set {_p} to "%loop-value%" parsed as offlineplayer
  124. send "&c* &6Twoja rodzina zostala usunieta." to {_p}
  125. clear {family.%{_p}%}
  126. clear {family.%{_p}%.chat}
  127. clear {family::%{_f}%::members::*}
  128. clear {family::%{_f}%}
  129. stop
  130. if arg 1 is "przekaz":
  131. if {family.%player%} is not set:
  132. send "&c* &6Nie posiadasz rodziny."
  133. stop
  134. if player is not {family::%{family.%player%}%}:
  135. send "&c* &6Nie jestes zalozycielem rodziny."
  136. stop
  137. if arg 2 is not set:
  138. send "&c* &6Podaj nick na kogo chcesz przekazac rodzine."
  139. stop
  140. set {_arg2} to "%arg 2%" parsed as offlineplayer
  141. loop {family::%{family.%player%}%::members::*}:
  142. set {_p} to "%loop-value%" parsed as offlineplayer
  143. if {_p} is {_arg2}:
  144. set {family::%{family.%player%}%} to {_arg2}
  145. send "&c* &6Przekazales rodzine na: &3%{_arg2}%"
  146. send "&c* &6Jestes teraz zalozycielem rodziny" to {_arg2}
  147. stop
  148. send "&c* &6Tego gracza nie ma u Ciebie w rodzinie."
  149. stop
  150. stop
  151. if arg 1 is "lista":
  152. if {family.%player%} is not set:
  153. send "&c* &6Nie posiadasz rodziny."
  154. stop
  155. send "&c* &6Czlonkowie twojej rodziny: &7(%{family.%player%}%)"
  156. loop {family::%{family.%player%}%::members::*}:
  157. set {_p} to "%loop-value%" parsed as offlineplayer
  158. set {_x} to "&cOffline"
  159. if {_p} is online:
  160. set {_x} to "&aOnline"
  161. send "&c%loop-value% &8(%{_x}%&8)"
  162. stop
  163. if arg 1 is "list":
  164. send "&c* &6Lista rodzin:"
  165. loop {family::*}:
  166. send "&a%{family.%loop-value%}%"
  167. stop
  168. if arg 1 is "chat":
  169. if {family.%player%} is not set:
  170. send "&c* &6Nie posiadasz rodziny."
  171. stop
  172. if {family.%player%.chat} is not set:
  173. set {family.%player%.chat} to true
  174. send "&c* &6Wlaczyles chat rodzinny."
  175. stop
  176. clear {family.%player%.chat}
  177. send "&c* &6Wylaczyles chat rodzinny."
  178. stop
  179. send "&c* &6Nie ma takiej komendy."
  180. stop
  181. on chat:
  182. if {family.%player%.chat} is set:
  183. cancel event
  184. loop {family::%{family.%player%}%::members::*}:
  185. set {_p} to "%loop-value%" parsed as offlineplayer
  186. send "&8[&a%{family.%player%}%&8] &6%display name of player%&7: &a%message%" to {_p}
  187. every 1 second:
  188. loop all players:
  189. if {familyr.%loop-player%.time} is 0:
  190. send "&c* &6Nie akceptowales dodania do rodziny." to loop-player
  191. clear {familyr.%loop-player%.request}
  192. clear {familyr.%loop-player%.time}
  193. if {familyr.%loop-player%.time} is larger than 0:
  194. remove 1 from {familyr.%loop-player%.time}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement