Guest User

Untitled

a guest
Dec 27th, 2014
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.84 KB | None | 0 0
  1. options:
  2. wielkosc.dzialki: 25 #kratek po przekatnej
  3. blok: diamond block #blok, ktory ustawia rogi dzialki
  4. tag: &0[&eDzialki&0]
  5.  
  6. variables:
  7. {dzialka.%player%} = false
  8. command /zniszcz:
  9. trigger:
  10. if {blok1.%player%.dzialki} is set:
  11. if {blok2.%player%.dzialki} is set:
  12. set {dzialka.%player%} to false
  13. set {blok1.%player%.dzialki} to 0
  14. set {blok2.%player%.dzialki} to 0
  15. make console execute command "pex user %player% add worldedit.*"
  16. make player execute command "/region remove dzialka%player%"
  17. make console execute command "pex user %player% remove worldedit.*"
  18. send "{@tag}&cZniszczyles swoja dzialke."
  19.  
  20. on place of {@blok}:
  21. if {dzialka.%player%} is false:
  22. if player can build at block {@wielkosc.dzialki} meters northwest:
  23. if player can build at block {@wielkosc.dzialki} meters north:
  24. if player can build at block {@wielkosc.dzialki} meters northeast:
  25. if player can build at block {@wielkosc.dzialki} meters west:
  26. if player can build at block {@wielkosc.dzialki} meters east:
  27. if player can build at block {@wielkosc.dzialki} meters south:
  28. if player can build at block {@wielkosc.dzialki} meters southeast:
  29. if player can build at block {@wielkosc.dzialki} meters southwest:
  30. if {blok1.%player%.dzialki} is 0:
  31. if {blok2.%player%.dzialki} is 0:
  32. make console execute command "pex user %player% add worldedit.*"
  33. set {_home} to location of player
  34. set {_blok} to location of event-block
  35. teleport player to {_blok}
  36. wait a tick
  37. make player execute command "//pos1"
  38. teleport player to {_home}
  39. set {blok1.%player%.dzialki} to location of {_blok}
  40. send "{@tag}&bUstawiles blok 1"
  41. make console execute command "pex user %player% remove worldedit.*"
  42. stop
  43. if {blok1.%player%.dzialki} is not 0:
  44. if {blok2.%player%.dzialki} is 0:
  45. set {_home} to location of player
  46. set {_blok} to location of event-block
  47. teleport player to {_blok}
  48. set {blok2.%player%.dzialki} to location of {_blok}
  49. make console execute command "pex user %player% add worldedit.*"
  50. make player execute command "//pos2"
  51. make player execute command "//expand vert"
  52. if distance between {blok1.%player%.dzialki} and {blok2.%player%.dzialki} is less than {@wielkosc.dzialki}:
  53. send "%{blok2.%player%.dzialki}%"
  54. send "{@tag}&aBlok 1 znaleziony!"
  55. make player execute command "/region define dzialka%player%"
  56. make player execute command "/region addmember dzialka%player% %player%"
  57. make player execute command "/rg flag dzialka%player% other-explosion deny"
  58. make player execute command "/rg flag dzialka%player% creeper-explosion deny"
  59. make console execute command "pex user %player% remove worldedit.*"
  60. send "{@tag}&aDzialka pomyslnie stworzona. Nie niszcz blokow, bo usuniesz dzialke. Creepery i tnt nie wybuchaja na twojej dzialce."
  61. set {dzialka.%player%} to true
  62. teleport player to {_home}
  63. stop trigger
  64. stop
  65. else:
  66. send "{@tag}&cBlok 2 jest za daleko, lub nie zostal postawiony!"
  67. make console execute command "pex user %player% remove worldedit.*"
  68. teleport player to {_home}
  69. stop trigger
  70. stop
  71. else:
  72. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  73. else:
  74. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  75. else:
  76. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  77. else:
  78. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  79. else:
  80. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  81. else:
  82. end "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  83. else:
  84. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  85. else:
  86. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  87. else:
  88. send "{@tag}&cNie mozesz zbudowac tutaj dzialki, poniewaz inna dzialka jest zbyt blisko"
  89.  
  90. on break of {@blok}:
  91. if {blok1.%player%.dzialki} is not 0:
  92. if {blok2.%player%.dzialki} is not 0:
  93. if location of event-block is location of {blok1.%player%.dzialki}:
  94. send "{@tag}&cNie niszcz tego bloku!"
  95. cancel event
  96. if location of event-block is location of {blok2.%player%.dzialki}:
  97. send "{@tag}&cNie niszcz tego bloku!"
  98. cancel event
Advertisement
Add Comment
Please, Sign In to add comment