on right-click:
if player's tool is wooden axe named "&aWorldEdit Baltası":
world is "ASkyBlock":
askyblock owner of island at player is player:
if clicked block isn't air block:
if player's tool is wooden axe named "&aWorldEdit Baltası":
if player has permission "Skyblockedit":
set {blocklocation-1::%player%} to block at clicked block
set {_n::*} to blocksBetween({blocklocation-1::%player%},{blocklocation-2::%player%})
send "&3World Edit &8» &c%size of {_n::*}% &eblok seçildi." to player
cancel event
else:
send "&3World Edit &8» &eBunun için VIP olmalısın."
else:
send "&3World Edit &8» &eBunun için kendi adanda olman gerekiyor."
else:
send "&3World Edit &8» &eBunun için kendi adanda olman gerekiyor."
on left-click:
if player's tool is wooden axe named "&aWorldEdit Baltası":
world is "ASkyBlock":
askyblock owner of island at player is player:
if clicked block isn't air block:
if player has permission "Skyblockedit":
set {blocklocation-2::%player%} to block at clicked block
set {_n::*} to blocksBetween({blocklocation-1::%player%},{blocklocation-2::%player%})
send "&3World Edit &c%size of {_n::*}% &eblok seçildi." to player
cancel event
else:
send "&3World Edit &8» &eBunun için baltayı satın almalısın."
else:
send "&3World Edit &8» &eBunun için kendi adanda olman gerekiyor."
else:
send "&3World Edit &8» &eBunun için kendi adanda olman gerekiyor."
command /wedebug:
trigger:
delete {blocklocation-2::%player%}
delete {blocklocation-1::%player%}
command set [<itemtype>]:
trigger:
set {_n::*} to blocksBetween({blocklocation-1::%player%},{blocklocation-2::%player%})
set {_s} to 0
loop {_n::*}:
add 1 to {_s}
{_s} is 301:
send "&3World Edit &8» &eMaksimum 300 blok koyabilirsin"
stop loop
if player has 1 of argument-1:
remove 1 of argument-1 from player
set block at loop-value to argument-1
else:
send "&3World Edit &8» &eEnvanterinde yeteri kadar malzemen yok"
stop
function blocksBetween(loc1: location, loc2: location) :: blocks:
set {_world} to world of {_loc1}
if world of {_loc2} is not {_world}:
stop
set {_x1} to x coord of {_loc1}
set {_y1} to y coord of {_loc1}
set {_z1} to z coord of {_loc1}
set {_x2} to x coord of {_loc2}
set {_y2} to y coord of {_loc2}
set {_z2} to z coord of {_loc2}
set {_minLoc} to location min({_x1}, {_x2}), min({_y1}, {_y2}), min({_z1}, {_z2}) in {_world}
set {_maxLoc} to location max({_x1}, {_x2}), max({_y1}, {_y2}), max({_z1}, {_z2}) in {_world}
loop numbers between x coord of {_minLoc} and x coord of {_maxLoc}:
loop numbers between y coord of {_minLoc} and y coord of {_maxLoc}:
loop numbers between z coord of {_minLoc} and z coord of {_maxLoc}:
add block at location loop-number-1, loop-number-2, loop-number-3 in {_world} to {_blocks::*}
return {_blocks::*}
command /skybalta:
trigger:
if player has permission "Skyblockedit":
give wooden axe named "&aWorldEdit Baltası" to player
send "&3World Edit &8» &aÖzel edit baltası alındı" to player