Hi im having an issue with this cell skript im making. When you claim with the stick, it set coordinates.
The issue is that it changes the coordinate depending on the server. It claims wrongly (Is that a word?). Sometimes it adds 1 more or 1 less on the z or x coordinate.
Thats when you claim the coordinates.
I can't understand why it changes coordinates depending on the server.
And is it possible to get the coordinate of a block without the 0.5?
The issue is that it changes the coordinate depending on the server. It claims wrongly (Is that a word?). Sometimes it adds 1 more or 1 less on the z or x coordinate.
Code:
on click:
player's tool is blaze rod named colored "&c&lCeller":
if {cells.claiming.%player%} is not true:
set {cells.claiming12.%player%} to location of targeted block
set {cells.claiming.%player%} to true
send "&6&lClaiming: &6Position 1 set: (%x coordinate of {cells.claiming12.%player%}%, %y coordinate of {cells.claiming12.%player%}%, %z coordinate of {cells.claiming12.%player%}%)"
cancel event
stop
else if {cells.claiming.%player%} is true:
set {cells.claiming22.%player%} to location of targeted block
set {cells.claiming.%player%} to false
if y coordinate of {cells.claiming12.%player%} is bigger than y coordinate of {cells.claiming22.%player%}:
set {cells.claiming2.%player%} to {cells.claiming12.%player%}
set {cells.claiming1.%player%} to {cells.claiming22.%player%}
else:
set {cells.claiming2.%player%} to {cells.claiming22.%player%}
set {cells.claiming1.%player%} to {cells.claiming12.%player%}
if y coordinate of {cells.claiming22.%player%} is equal to y coordinate of {cells.claiming12.%player%}:
set {cells.claiming1.%player%} to {cells.claiming12.%player%}
set {cells.claiming2.%player%} to {cells.claiming22.%player%}
send "&6&lClaiming &a&l✔ &6Positions: (%x coordinate of {cells.claiming1.%player%}%, %y coordinate of {cells.claiming1.%player%}%, %z coordinate of {cells.claiming1.%player%}%) (%x coordinate of {cells.claiming2.%player%}%, %y coordinate of {cells.claiming2.%player%}%, %z coordinate of {cells.claiming2.%player%}%)"
cancel event
Code:
set {_1} to "%x coordinate of {cells.claiming1.%player%}%"
set {_2} to "%y coordinate of {cells.claiming1.%player%}%"
set {_3} to "%z coordinate of {cells.claiming1.%player%}%"
set {_4} to "%x coordinate of {cells.claiming2.%player%}%"
set {_5} to "%y coordinate of {cells.claiming2.%player%}%"
set {_6} to "%z coordinate of {cells.claiming2.%player%}%"
loop 6 times:
replace all ",5" in {_%loop-number%} with ""
replace all ".5" in {_%loop-number%} with ""
set {_%loop-number%} to {_%loop-number%} parsed as an integer
wait 1 tick
remove 1 from {_3}
remove 1 from {_6}
set {_p1} to "%({_1})%,%({_2})%,%({_3})%"
set {_p2} to "%({_4})%,%{_5}%,%({_6})%"
execute player command "//pos1 %{_p1}%"
execute player command "//pos2 %{_p2}%"
wait 1 tick
clear {cell.%arg-2%.owner}
set {cell.%arg-2%.world} to world of targeted block
clear {cell.%arg-2%.Members::*}
set {cell.%arg-2%.signcoords} to targeted block
set {cell.%arg-2%} to arg-2
set {cell.%arg-2%.l1} to {cells.claiming1.%player%}
set {cell.%arg-2%.l2} to {cells.claiming2.%player%}
clear {cells.claiming1.%player%}
clear {cells.claiming2.%player%}
add arg-2 to {cells.all::*}
execute player command "/rg d %arg-2%"
wait 2 ticks
execute player command "//sel"
And is it possible to get the coordinate of a block without the 0.5?