Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on place of diamond block:
- if {blok1.%player%} is not set:
- set {blok1.%player%} to location of event-block
- send "%{blok1.%player%}%"
- send "&aPostawiles pierwszy blok dzialki"
- stop
- else:
- if {blok2.%player%} is not set:
- set {blok2.%player%} to location of event-block
- set {_x1} to x-coordinate of {blok1.%player%}
- set {_x2} to x-coordinate of {blok2.%player%}
- set {_z1} to z-coordinate of {blok1.%player%}
- set {_z2} to z-coordinate of {blok2.%player%}
- if {_x1} < 0:
- set {_x1} to {_x1}*-1
- if {_x2} < 0:
- set {_x2} to {_x2}*-1
- if {_z1} < 0:
- set {_z1} to {_z1}*-1
- if {_z2} < 0:
- set {_z2} to {_z2}*-1
- send "&aPostawiles drugi blok dzialki"
- stop
- command /rozdzka:
- trigger:
- give 1 stick named "&6Stworz dzialke" to player
- remove 1 stick named "&6Stworz dzialke" from player's inventory
- on rightclick on diamond block:
- if player is holding stick named "&6Stworz dzialke":
- set {_x1} to x-coordinate of {blok1.%player%}
- set {_x2} to x-coordinate of {blok2.%player%}
- set {_z1} to z-coordinate of {blok1.%player%}
- set {_z2} to z-coordinate of {blok2.%player%}
- loop blocks within {blok1.%player%} to {blok2.%player%}:
- if player can build at loop-block:
- set {_x} to 1
- else:
- send "&cNa terenie twojej dzialki jest inna, dlatego nie mozesz stworzyc tu dzialki."
- stop loop
- stop
- if {_x1} < 0:
- set {_x1} to {_x1}*-1
- if {_x2} < 0:
- set {_x2} to {_x2}*-1
- if {_z1} < 0:
- set {_z1} to {_z1}*-1
- if {_z2} < 0:
- set {_z2} to {_z2}*-1
- set {_x} to {_x1}-{_x2}
- set {_z} to {_z1}-{_z2}
- if {_x} = 0 or 1 or 2 or 3:
- send "&cTwoja dzialka jest zbyt waska"
- stop
- if {_z} = 0 or 1 or 2 or 3:
- send "&cTwoja dzialka jest zbyt waska"
- stop
- if {_x} < 0:
- set {_x} to {_x}*-1
- if {_z} < 0:
- set {_z} to {_z}*-1
- set {_x} to {_x}+1
- set {_z} to {_z}+1
- set {_dzialka} to {_x}*{_z}
- if {_dzialka} < 400:
- set {_pos} to player's position
- teleport player to {blok1.%player%}
- wait a tick
- run player command "//pos1" as op
- wait a tick
- teleport player to {blok2.%player%}
- wait a tick
- run player command "//pos2" as op
- teleport player to {_pos}
- run player command "//expand vert" as op
- run player command "/region create dzialka_%player%" as op
- send "&aStworzyles dzialke"
- else:
- send "&cDzialka jest za duza"
- on break of diamond block:
- if location of event-block is {blok1.%player%}:
- clear {blok1.%player%}
- execute console command "region remove dzialka_%player% -w %world%"
- send "&cZniszczyles blok dzialki"
- stop
- if location of event-block is {blok2.%player%}:
- clear {blok2.%player%}
- execute console command "region remove dzialka_%player% -w %world%"
- send "&cZniszczyles blok dzialki"
- stop
Advertisement
Add Comment
Please, Sign In to add comment