Msczosnal

Untitled

Apr 3rd, 2016
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.77 KB | None | 0 0
  1. on place of diamond block:
  2. if {blok1.%player%} is not set:
  3. set {blok1.%player%} to location of event-block
  4. send "%{blok1.%player%}%"
  5. send "&aPostawiles pierwszy blok dzialki"
  6. stop
  7. else:
  8. if {blok2.%player%} is not set:
  9. set {blok2.%player%} to location of event-block
  10. set {_x1} to x-coordinate of {blok1.%player%}
  11. set {_x2} to x-coordinate of {blok2.%player%}
  12. set {_z1} to z-coordinate of {blok1.%player%}
  13. set {_z2} to z-coordinate of {blok2.%player%}
  14. if {_x1} < 0:
  15. set {_x1} to {_x1}*-1
  16. if {_x2} < 0:
  17. set {_x2} to {_x2}*-1
  18. if {_z1} < 0:
  19. set {_z1} to {_z1}*-1
  20. if {_z2} < 0:
  21. set {_z2} to {_z2}*-1
  22. send "&aPostawiles drugi blok dzialki"
  23. stop
  24. command /rozdzka:
  25. trigger:
  26. give 1 stick named "&6Stworz dzialke" to player
  27. remove 1 stick named "&6Stworz dzialke" from player's inventory
  28. on rightclick on diamond block:
  29. if player is holding stick named "&6Stworz dzialke":
  30. set {_x1} to x-coordinate of {blok1.%player%}
  31. set {_x2} to x-coordinate of {blok2.%player%}
  32. set {_z1} to z-coordinate of {blok1.%player%}
  33. set {_z2} to z-coordinate of {blok2.%player%}
  34. loop blocks within {blok1.%player%} to {blok2.%player%}:
  35. if player can build at loop-block:
  36. set {_x} to 1
  37. else:
  38. send "&cNa terenie twojej dzialki jest inna, dlatego nie mozesz stworzyc tu dzialki."
  39. stop loop
  40. stop
  41. if {_x1} < 0:
  42. set {_x1} to {_x1}*-1
  43. if {_x2} < 0:
  44. set {_x2} to {_x2}*-1
  45. if {_z1} < 0:
  46. set {_z1} to {_z1}*-1
  47. if {_z2} < 0:
  48. set {_z2} to {_z2}*-1
  49. set {_x} to {_x1}-{_x2}
  50. set {_z} to {_z1}-{_z2}
  51. if {_x} = 0 or 1 or 2 or 3:
  52. send "&cTwoja dzialka jest zbyt waska"
  53. stop
  54. if {_z} = 0 or 1 or 2 or 3:
  55. send "&cTwoja dzialka jest zbyt waska"
  56. stop
  57. if {_x} < 0:
  58. set {_x} to {_x}*-1
  59. if {_z} < 0:
  60. set {_z} to {_z}*-1
  61. set {_x} to {_x}+1
  62. set {_z} to {_z}+1
  63. set {_dzialka} to {_x}*{_z}
  64. if {_dzialka} < 400:
  65. set {_pos} to player's position
  66. teleport player to {blok1.%player%}
  67. wait a tick
  68. run player command "//pos1" as op
  69. wait a tick
  70. teleport player to {blok2.%player%}
  71. wait a tick
  72. run player command "//pos2" as op
  73. teleport player to {_pos}
  74. run player command "//expand vert" as op
  75. run player command "/region create dzialka_%player%" as op
  76. send "&aStworzyles dzialke"
  77. else:
  78. send "&cDzialka jest za duza"
  79. on break of diamond block:
  80. if location of event-block is {blok1.%player%}:
  81. clear {blok1.%player%}
  82. execute console command "region remove dzialka_%player% -w %world%"
  83. send "&cZniszczyles blok dzialki"
  84. stop
  85. if location of event-block is {blok2.%player%}:
  86. clear {blok2.%player%}
  87. execute console command "region remove dzialka_%player% -w %world%"
  88. send "&cZniszczyles blok dzialki"
  89. stop
Advertisement
Add Comment
Please, Sign In to add comment