Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- command /gschema [<text>] [<text>]:
- permission: qg.admin
- permission message: &cNie masz uprawnien.
- trigger:
- if arg-1 is not set:
- give player blaze rod named "&eQ&6Admin"
- if arg-1 is "zapisz":
- if arg-2 is set:
- if file "plugins/QGildie/schematy/%arg-2%.yml" doesn't exists:
- set {m::%player%} to true
- create file "plugins/QGildie/schematy/%arg-2%.yml"
- wait 2 ticks
- set {num} to 0
- loop blocks within {qg::sel::loc1} to {qg::sel::loc2}:
- if loop-block is not air:
- add 1 to {num}
- set {_xp} to x-coordinate of player
- set {_yp} to y-coordinate of player
- set {_zp} to z-coordinate of player
- set {shloc::%{num}%} to location of loop-block
- set {_rxp} to "%x-coordinate of {shloc::%{num}%} - {_xp}%" parsed as number
- set {_ryp} to "%y-coordinate of {shloc::%{num}%} - {_yp}%" parsed as number
- set {_rzp} to "%z-coordinate of {shloc::%{num}%} - {_zp}%" parsed as number
- set x-coordinate of {shloc::%{num}%} to {_rxp}
- set y-coordinate of {shloc::%{num}%} to {_ryp}
- set z-coordinate of {shloc::%{num}%} to {_rzp}
- set {blok::%{num}%} to loop-block
- set {bnum} to "b%{num}%"
- wait a tick
- set "bloki.%{num}%" to "%{blok::%{num}%}%" in yaml file "plugins/QGildie/schematy/%arg-2%.yml"
- set "x.%{num}%" to "%{_rxp}%" in yaml file "plugins/QGildie/schematy/%arg-2%.yml"
- set "y.%{num}%" to "%{_ryp}%" in yaml file "plugins/QGildie/schematy/%arg-2%.yml"
- set "z.%{num}%" to "%{_rzp}%" in yaml file "plugins/QGildie/schematy/%arg-2%.yml"
- send "%{qg::opt::prefix}% &aZapisano schemat &e%arg-2%.yml%{qg::opt::suffix}%"
- delete {m::%player%}
- if arg-1 is "wczytaj":
- if arg-2 is set:
- set {m::%player%} to true
- loop {num} times:
- set {_xp} to x-coordinate of player
- set {_yp} to y-coordinate of player
- set {_zp} to z-coordinate of player
- set {_lop} to location of player
- wait 2 ticks
- set {_b} to single value "bloki.%loop-number%" get of "plugins/QGildie/schematy/%arg-2%.yml" parsed as material
- set {_lx} to single value "x.%loop-number%" get of "plugins/QGildie/schematy/%arg-2%.yml" parsed as number
- set {_ly} to single value "y.%loop-number%" get of "plugins/QGildie/schematy/%arg-2%.yml" parsed as number
- set {_lz} to single value "z.%loop-number%" get of "plugins/QGildie/schematy/%arg-2%.yml" parsed as number
- increase x-coordinate of {_lop} by {_lx}
- increase y-coordinate of {_lop} by {_ly}
- increase z-coordinate of {_lop} by {_lz}
- set block at {_lop} to {_b}
- show 10 "flame" particles at {_lop} for player offset by 0 , 0.2 , 0
- send "%{qg::opt::prefix}% &aWczytano schemat &e%arg-2%.yml%{qg::opt::suffix}%"
- delete {m::%player%}
- on right click:
- if tool of player is blaze rod named "&eQ&6Admin":
- if clicked block is not air:
- set {qg::sel::loc1} to location of clicked block
- send "&aPozycja 1 ustawiona&8. &e%location of clicked block%"
- on left click:
- if tool of player is blaze rod named "&eQ&6Admin":
- if clicked block is not air:
- set {qg::sel::loc2} to location of clicked block
- send "&aPozycja 2 ustawiona&8. &e%location of clicked block%"
- cancel event
- on any move:
- if {m::%player%} is set:
- cancel event
Advertisement
Add Comment
Please, Sign In to add comment