AdamGrzegorz

InstantPlot

Dec 24th, 2014
477
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.64 KB | None | 0 0
  1. options:
  2. zalozenie.itemy: 5 diamond and 5 gold ingot
  3. zalozenie.blok: bedrock
  4. powieksz.item.1: 5 diamond
  5. powieksz.item.2: 20 diamond
  6. powieksz.item.3: 45 diamond
  7. powieksz.item.4: 64 diamond
  8. powieksz.item.5: 128 diamond
  9.  
  10. command /insp [<text>] [<text>] [<text>]:
  11. aliases: instantplot, instantp, insplot
  12. trigger:
  13. if player has permission "instantplot.admin":
  14. if arg 1 is "createwand":
  15. give 1 blaze rod of unbreaking 10 named "&6&l[INSP] Zaloz dzialke!" with lore "&7Kliknij prawym by zalozyc||&7dzialke &e15x15" to the player
  16. send "&6[INSP] &eOtrzymales rozdzke ''Create Plot Wand''!"
  17. stop
  18. if arg 1 is "largewand":
  19. give 1 blaze rod of unbreaking 9 named "&6&l[INSP] Powieksz dzialke!" with lore "&7Kliknij prawym by powiekszyc||&7twoja dzialke!" to the player
  20. send "&6[INSP] &eOtrzymales rozdzke ''Large Plot Wand''!"
  21. stop
  22. if arg 1 is "deletewand":
  23. give 1 blaze rod of unbreaking 8 named "&6&l[INSP] Usun dzialke!" with lore "&7Kliknij prawym by usunac dzialke!" to the player
  24. send "&6[INSP] &eOtrzymales rozdzke ''Delete Plot Wand''!"
  25. stop
  26. if arg 1 is "addplayerwand":
  27. give 1 blaze rod of unbreaking 7 named "&6&l[INSP] Dodaj gracza!" with lore "&7Kliknij prawym na gracza ktorego||&7chcesz dodac do dzialki!" to the player
  28. send "&6[INSP] &eOtrzymales rozdzke ''Add Player To Plot Wand''!"
  29. stop
  30. if arg 1 is "remplayerwand":
  31. give 1 blaze rod of unbreaking 6 named "&6&l[INSP] Usun gracza!" with lore "&7Kliknij prawym na gracza ktorego||&7chcesz wyrzucic z dzialki!" to the player
  32. send "&6[INSP] &eOtrzymales rozdzke ''Remove Player From Plot Wand''!"
  33. stop
  34. if arg 1 is "delete":
  35. if arg 2 is set:
  36. if region "%arg 2%" is exists:
  37. loop all players:
  38. loop {INSP::Czlonkowie::%arg 2%::*}:
  39. "%arg 2%".Region.delete{}
  40. set {INSP::inPlot::%arg 2%} to none
  41. delete {INSP::PVP::%arg 2%}
  42. delete {INSP::Lider::%arg 2%}
  43. delete {INSP::Czlonkowie::%arg 2%::*}
  44. delete {INSP::Powieksz::%arg 2%::1}
  45. delete {INSP::Powieksz::%arg 2%::2}
  46. delete {INSP::Powieksz::%arg 2%::3}
  47. delete {INSP::Powieksz::%arg 2%::4}
  48. delete {INSP::Powieksz::%arg 2%::5}
  49. set block at {INSP::Lokacja::%arg 2%} to air
  50. delete {INSP::Lokacja::%arg 2%}
  51. send "&6&l[INSP] Poprawnie usunales dzialke!"
  52. stop
  53. else:
  54. send "&c&l[INSP] Ten gracz nie posiada dzialki!"
  55. else:
  56. send "&c&l[INSP] Poprawne uzycie: /insp delete <nick>"
  57. if arg 1 is "adminhelp":
  58. send "&6&l====[ InstantPlot ]===="
  59. send "&6/insp createwand"
  60. send "&6/insp deletewand"
  61. send "&6/insp largewand"
  62. send "&6/insp addplayerwand"
  63. send "&6/insp remplayerwand"
  64. send "&6/insp delete"
  65. send "&6&l====[ InstantPlot ]===="
  66. else:
  67. send "&c&l[INSP] Nie masz do tego uprawnien! &7(instantplot.admin)"
  68. if player has permission "instantplot.player":
  69. if arg 1 is "pvp":
  70. if {INSP::inPlot::%player%} is set:
  71. if {INSP::Lider::%player%} is player:
  72. if {INSP::PVP::%player%} is true:
  73. set {INSP::PVP::%player%} to false
  74. send "&a&l[INSP] Wylaczyles PVP na dzialce!"
  75. stop
  76. if {INSP::PVP::%player%} is false:
  77. set {INSP::PVP::%player%} to true
  78. send "&a&l[INSP] Wlaczyles PVP na dzialce!"
  79. stop
  80. else:
  81. send "&c&l[INSP] Nie jestes liderem dzialki!"
  82. else:
  83. send "&c&l[INSP] Nie posiadasz dzialki!"
  84. if arg 1 is "wands":
  85. give 1 blaze rod of unbreaking 6 named "&6&l[INSP] Usun gracza!" with lore "&7Kliknij prawym na gracza ktorego||&7chcesz wyrzucic z dzialki!" to the player
  86. give 1 blaze rod of unbreaking 7 named "&6&l[INSP] Dodaj gracza!" with lore "&7Kliknij prawym na gracza ktorego||&7chcesz dodac do dzialki!" to the player
  87. give 1 blaze rod of unbreaking 8 named "&6&l[INSP] Usun dzialke!" with lore "&7Kliknij prawym by usunac dzialke!" to the player
  88. give 1 blaze rod of unbreaking 9 named "&6&l[INSP] Powieksz dzialke!" with lore "&7Kliknij prawym by powiekszyc||&7twoja dzialke" to the player
  89. give 1 blaze rod of unbreaking 10 named "&6&l[INSP] Zaloz dzialke!" with lore "&7Kliknij prawym by zalozyc||&7dzialke &e15x15" to the player
  90. send "&6[INSP] &eOtrzymales wszystkie rozdzki!"
  91. stop
  92. if arg 1 is "leave":
  93. if {INSP::inPlot::%player%} is set:
  94. if {INSP::Lider::%{INSP::inPlot::%player%}%} is not player:
  95. set {_plot} to {INSP::inPlot::%player%}
  96. remove player from {INSP::Czlonkowie::%{_plot}%::*}
  97. send "&9&l[INSP] Opusciles dzialke gracza %{_plot}%!" to player
  98. send "&9&l[INSP] Gracz %player% opuscil Twoja dzialke!" to {_plot} parsed as player
  99. delete {INSP::inPlot::%player%}
  100. stop
  101. else:
  102. send "&c&l[INSP] Jestes liderem, nie mozesz opusic wlasnej dzialki! Usun ja!"
  103. else:
  104. send "&c&l[INSP] Nie jestes w zadnej dzialce!"
  105. if arg 1 is "info":
  106. if arg 2 is set:
  107. set {_size} to size of {INSP::Czlonkowie::%arg 2%::*}
  108. send "&9&l[INSP] Lider: &9%{INSP::Lider::%arg 2%}%"
  109. send "&9&l[INSP] Czlonkowie [%{_size}%]: &9%{INSP::Czlonkowie::%arg 2%::*}%"
  110. loop {INSP::Czlonkowie::%arg 2%::*}:
  111. if loop-value is player:
  112. send "&9&l[INSP] Czy jestes dodany: &a&lTAK"
  113. stop
  114. else:
  115. send "&9&l[INSP] Czy jestes dodany: &c&lNIE"
  116. stop
  117. else:
  118. send "&c&l[INSP] Poprawne uzycie: /insp info <dzialka/gracz>"
  119. if arg 1 is "help":
  120. send "&6&l====[ InstantPlot ]===="
  121. send "&6/insp pvp"
  122. send "&6/insp wands"
  123. send "&6/insp leave"
  124. send "&6/insp info"
  125. send "&6&l====[ InstantPlot ]===="
  126. else:
  127. send "&c&l[INSP] Nie masz do tego uprawnien! &7(instantplot.player)"
  128.  
  129.  
  130. on rightclick:
  131. if player's tool is blaze rod of unbreaking 10:
  132. loop blocks around player in radius 45:
  133. set {_region} to Region.getAt{location of loop-block};
  134. if distance between {_region} and location of player is less than 10:
  135. send "&c&l[INSP] W poblizu jest juz dzialka!"
  136. stop
  137. if region "%player%" is exists:
  138. send "&c&l[INSP] Posiadasz juz dzialke!"
  139. stop
  140. if player has {@zalozenie.itemy}:
  141. loop all players:
  142. remove {@zalozenie.itemy} from the player
  143. set {INSP::Wielkosc::%player%} to 15
  144. "%player%".Region.selectLS{location of player, {INSP::Wielkosc::%player%}};
  145. set {INSP::inPlot::%player%} to player
  146. set {INSP::Lider::%player%} to player
  147. set {INSP::PVP::%player%} to false
  148. add player to {INSP::Czlonkowie::%player%::*}
  149. set {INSP::Powieksz::%player%::1} to false
  150. set {INSP::Powieksz::%player%::2} to false
  151. set {INSP::Powieksz::%player%::3} to false
  152. set {INSP::Powieksz::%player%::4} to false
  153. set {INSP::Powieksz::%player%::5} to false
  154. set {INSP::Lokacja::%player%} to location of player
  155. set block at location of player to {@zalozenie.blok}
  156. send "&6&l[INSP] Poprawnie zalozyles wlasna dzialke!"
  157. stop
  158. else:
  159. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na zalozenie dzialki!"
  160. send "&c&l[INSP] Potrzebujesz: &7&l{@zalozenie.itemy}"
  161. stop
  162. if player's tool is blaze rod of unbreaking 9:
  163. if {INSP::inPlot::%player%} is set:
  164. if {INSP::Lider::%player%} is player:
  165. if {INSP::Powieksz::%player%::1} is false:
  166. if player has {@powieksz.item.1}:
  167. remove {@powieksz.item.1} from the player
  168. set {INSP::Powieksz::%player%::1} to true
  169. set {INSP::Wielkosc::%player%} to 20
  170. "%player%".Region.selectLS{{INSP::Lokacja::%player%} , {INSP::Wielkosc::%player%} };
  171. send "&a&l[INSP] Powiekszyles dzialke!"
  172. send "&a&l[INSP] Aktualnie: %{INSP::Wielkosc::%player%}%x%{INSP::Wielkosc::%player%}%"
  173. stop
  174. else:
  175. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na powiekszenie dzialki!"
  176. send "&c&l[INSP] Potrzebujesz: &7&l{@powieksz.item.1}"
  177. stop
  178. if {INSP::Powieksz::%player%::2} is false:
  179. if player has {@powieksz.item.2}:
  180. remove {@powieksz.item.2} from the player
  181. set {INSP::Powieksz::%player%::2} to true
  182. set {INSP::Wielkosc::%player%} to 25
  183. "%player%".Region.selectLS{{INSP::Lokacja::%player%} , {INSP::Wielkosc::%player%} };
  184. send "&a&l[INSP] Powiekszyles dzialke!"
  185. send "&a&l[INSP] Aktualnie: %{INSP::Wielkosc::%player%}%x%{INSP::Wielkosc::%player%}%"
  186. stop
  187. else:
  188. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na powiekszenie dzialki!"
  189. send "&c&l[INSP] Potrzebujesz: &7&l{@powieksz.item.2}"
  190. stop
  191. if {INSP::Powieksz::%player%::3} is false:
  192. if player has {@powieksz.item.3}:
  193. remove {@powieksz.item.3} from the player
  194. set {INSP::Powieksz::%player%::3} to true
  195. set {INSP::Wielkosc::%player%} to 30
  196. "%player%".Region.selectLS{{INSP::Lokacja::%player%} , {INSP::Wielkosc::%player%} };
  197. send "&a&l[INSP] Powiekszyles dzialke!"
  198. send "&a&l[INSP] Aktualnie: %{INSP::Wielkosc::%player%}%x%{INSP::Wielkosc::%player%}%"
  199. stop
  200. else:
  201. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na powiekszenie dzialki!"
  202. send "&c&l[INSP] Potrzebujesz: &7&l{@powieksz.item.3}"
  203. stop
  204. if {INSP::Powieksz::%player%::4} is false:
  205. if player has {@powieksz.item.4}:
  206. remove {@powieksz.item.4} from the player
  207. set {INSP::Powieksz::%player%::4} to true
  208. set {INSP::Wielkosc::%player%} to 35
  209. "%player%".Region.selectLS{{INSP::Lokacja::%player%} , {INSP::Wielkosc::%player%} };
  210. send "&a&l[INSP] Powiekszyles dzialke!"
  211. send "&a&l[INSP] Aktualnie: %{INSP::Wielkosc::%player%}%x%{INSP::Wielkosc::%player%}%"
  212. stop
  213. else:
  214. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na powiekszenie dzialki!"
  215. send "&c&l[INSP] Potrzebujesz: &7&l{@powieksz.item.4}"
  216. stop
  217. if {INSP::Powieksz::%player%::5} is false:
  218. if player has {@powieksz.item.5}:
  219. remove {@powieksz.item.5} from the player
  220. set {INSP::Powieksz::%player%::5} to true
  221. set {INSP::Wielkosc::%player%} to 40
  222. "%player%".Region.selectLS{{INSP::Lokacja::%player%} , {INSP::Wielkosc::%player%} };
  223. send "&a&l[INSP] Powiekszyles dzialke!"
  224. send "&a&l[INSP] Aktualnie: %{INSP::Wielkosc::%player%}%x%{INSP::Wielkosc::%player%}%"
  225. stop
  226. else:
  227. send "&c&l[INSP] Nie posiadasz wymaganych przedmiotow na powiekszenie dzialki!"
  228. send "&c&l[INSP] Potrzebujesz: &7&l{@powieksz.item.5}"
  229. stop
  230. else:
  231. send "&c&l[INSP] Osiagnales maksymalny rozmiar terenu!"
  232. else:
  233. send "&c&l[INSP] Nie jestes liderem tej dzialki!"
  234. else:
  235. send "&c&l[INSP] Nie masz zadnej dzialki!"
  236. stop
  237. if player's tool is blaze rod of unbreaking 8:
  238. if region "%player%" is not exists:
  239. send "&c&l[INSP] Nie posiadasz dzialki!"
  240. stop
  241. loop all players:
  242. loop {INSP::Czlonkowie::%player%::*}:
  243. "%player%".Region.delete{}
  244. set {INSP::inPlot::%player%} to none
  245. delete {INSP::PVP::%player%}
  246. delete {INSP::Lider::%player%}
  247. delete {INSP::Czlonkowie::%player%::*}
  248. delete {INSP::Powieksz::%player%::1}
  249. delete {INSP::Powieksz::%player%::2}
  250. delete {INSP::Powieksz::%player%::3}
  251. delete {INSP::Powieksz::%player%::4}
  252. delete {INSP::Powieksz::%player%::5}
  253. set block at {INSP::Lokacja::%player%} to air
  254. delete {INSP::Lokacja::%player%}
  255. send "&6&l[INSP] Poprawnie usunales dzialke!"
  256. stop
  257.  
  258. on rightclick on player:
  259. if player's tool is blaze rod of unbreaking 7:
  260. if region "%player%" is exists:
  261. if region "%clicked player%" is not exists:
  262. set {INSP::Zaproszenie::%player%} to clicked player
  263. set {INSP::OtrzymanoZaproszenie::%clicked player%} to player
  264. send "&9&l[INSP] Zostales zaproszony do dzialki gracza %player%!" to clicked player
  265. send "&9&l[INSP] Wpisz /paccept %player% lub /pdeny %player%!" to clicked player
  266. send "&9&l[INSP] Zaprosiles gracza %clicked player% do dzialki!" to player
  267. else:
  268. send "&c&l[INSP] Ten gracz posiada juz dzialke!"
  269. else:
  270. send "&c&l[INSP] Nie posiadasz dzialki!"
  271. if player's tool is blaze rod of unbreaking 6:
  272. if region "%player%" is exists:
  273. loop {INSP::Czlonkowie::%player%::*}:
  274. if loop-value is player:
  275. remove clicked player from {INSP::Czlonkowie::%player%::*}
  276. send "&9&l[INSP] Zostales wyrzucony z dzialki gracza %player%!" to clicked player
  277. send "&9&l[INSP] Wyrzuciles gracza %clicked player% z dzialki!" to player
  278. else:
  279. send "&c&l[INSP] Ten gracz nie jest w twojej dzialce!"
  280. else:
  281. send "&c&l[INSP] Nie posiadasz dzialki!"
  282.  
  283. command /paccept [<text>]:
  284. trigger:
  285. if arg 1 is set:
  286. if {INSP::OtrzymanoZaproszenie::%player%} is arg 1:
  287. loop {INSP::Czlonkowie::%arg 1%::*}:
  288. add player to {INSP::Czlonkowie::%arg 1%::*}
  289. set {INSP::inPlot::%player%} to arg 1
  290. send "&9&l[INSP] Dolaczyles do dzialki gracza %arg 1%!"
  291. send "&9&l[INSP] Gracz %player% dolaczyl do Twojej dzialki!" to arg 1 parsed as player
  292. delete {INSP::OtrzymanoZaproszenie::%player%}
  293. stop
  294. else:
  295. send "&c&l[INSP] Nie otrzymales zaproszenia od tej osoby!"
  296. else:
  297. send "&c&l[INSP] Poprawne uzycie: /paccept <nick>"
  298. command /pdeny [<text>]:
  299. trigger:
  300. if arg 1 is set:
  301. if {INSP::OtrzymanoZaproszenie::%player%} is arg 1:
  302. send "&9&l[INSP] Odrzuciles zaproszenie do dzialki od gracza %arg 1%!"
  303. send "&9&l[INSP] Gracz %player% odrzucil Twoje zaproszenie!" to arg 1 parsed as player
  304. delete {INSP::OtrzymanoZaproszenie::%player%}
  305. stop
  306. else:
  307. send "&c&l[INSP] Nie otrzymales zaproszenia od tej osoby!"
  308. else:
  309. send "&c&l[INSP] Poprawne uzycie: /pdeny <nick>"
  310.  
  311. # ============================ NISZCZENIE/BUDOWANIE NA DZIALCE ==============================
  312. on break:
  313. if player doesn't have permission "instantplot.admin":
  314. if location of event-block is in any region:
  315. set {_region} to Region.getAt{location of player};
  316. loop {INSP::Czlonkowie::%{_region}%::*}:
  317. if loop-value is player:
  318. send "%{INSP::Czlonkowie::%{_region}%::*}%" to player
  319. stop
  320. else:
  321. cancel event
  322. send "&c&l[INSP] Nie mozesz niszczyc na cudzej dzialce!"
  323. stop
  324. on place:
  325. if player doesn't have permission "instantplot.admin":
  326. if location of event-block is in any region:
  327. set {_region} to Region.getAt{location of player};
  328. loop {INSP::Czlonkowie::%{_region}%::*}:
  329. if loop-value is player:
  330. stop
  331. else:
  332. cancel event
  333. send "&c&l[INSP] Nie mozesz stawiac blokow na cudzej dzialce!"
  334. stop
  335.  
  336. # ============================ PVP NA DZIALCE ==============================
  337. on damage of player:
  338. if {INSP::inPlot::%attacker%} is set:
  339. if {INSP::inPlot::%victim%} is set:
  340. loop {INSP::Czlonkowie::%{INSP::inPlot::%attacker%}%::*}:
  341. if loop-value is attacker:
  342. if {INSP::PVP::%{INSP::inPlot::%attacker%}%} is false:
  343. cancel event
  344. send "&c&l[INSP] PVP na dzialce jest wylaczone!" to attacker
  345. stop
  346. loop {INSP::Czlonkowie::%{INSP::inPlot::%victim%}%::*}:
  347. if loop-value is attacker:
  348. if {INSP::PVP::%{INSP::inPlot::%victim%}%} is false:
  349. cancel event
  350. stop
  351.  
  352. # ============================ WIADOMOSC O TERENIE DZIALKI ==============================
  353. on anymove:
  354. if {INST::%player%::PLOT} is not set:
  355. set {INST::%player%::PLOT} to "&cBRAK DANYCH :("
  356. if Region.getAt{location of player} is not set:
  357. set {_plot} to "&cBRAK DANYCH :("
  358. else:
  359. set {_plot} to Region.getAt{location of player}
  360. if {_plot} is not {INST::%player%::PLOT}:
  361. if {_plot} is "None" or "<none>" or "&cBRAK DANYCH :(":
  362. display "&6&l[INSP] Teren dzialki: %{INST::%player%::PLOT}%" on bossbar with 100 percent by 3 seconds for player
  363. stop
  364. else:
  365. display "&6&l[INSP] Teren dzialki: %{_plot}%" on bossbar with 100 percent by 3 seconds for player
  366. stop
  367. set {INST::%player%::PLOT} to {_plot}
Advertisement
Add Comment
Please, Sign In to add comment