I've made nearly all of my script for claiming in factions, but I've run into a problem which I don't know how to solve. So I each faction has 4 variables for claims:
{factionClaim1x.%{faction}%} {factionClaim2x.%{faction}%} {factionClaim1z.%{faction}%} {factionClaim2z.%{faction}%}
And when claiming, before the claim is complete:
{factionClaiming1x.%{faction}%} {factionClaiming2x.%{faction}%} {factionClaiming1z.%{faction}%} {factionClaiming2z.%{faction}%}
I want to stop people being able to claim other factions land. It would be easy to check if the 4 corner variables listed above were within the claim but it is possible to claim on either side of a claim without including any of the corners. Here is an image of what I am trying to say:
https://gyazo.com/eb2a0247beb110511874ad4cc1d3cf42
Claim A is currently claiming and has not claimed the land yet. When the player is trying to claim the land I want it to cancel since Claim A has blocks in Claim B inside of the 2 positions.
I want to find a way to stop this somehow. Here is how it starts but I have no idea what to check for next:
{factionClaim1x.%{faction}%} {factionClaim2x.%{faction}%} {factionClaim1z.%{faction}%} {factionClaim2z.%{faction}%}
And when claiming, before the claim is complete:
{factionClaiming1x.%{faction}%} {factionClaiming2x.%{faction}%} {factionClaiming1z.%{faction}%} {factionClaiming2z.%{faction}%}
I want to stop people being able to claim other factions land. It would be easy to check if the 4 corner variables listed above were within the claim but it is possible to claim on either side of a claim without including any of the corners. Here is an image of what I am trying to say:
https://gyazo.com/eb2a0247beb110511874ad4cc1d3cf42
Claim A is currently claiming and has not claimed the land yet. When the player is trying to claim the land I want it to cancel since Claim A has blocks in Claim B inside of the 2 positions.
I want to find a way to stop this somehow. Here is how it starts but I have no idea what to check for next:
Code:
on left click:
if player's tool is golden hoe named "&6Claiming Wand" with lore "", and "&eRight/Left Click &6Block", and "&b- &fSelect claim's corners", and "", and "&eRight Click &6Air", and "&b- &fCancel current claim", and "", and "&9Crouch Left Click &6Block/Air", and "&b- &fPurchase current claim":
if player is sneaking:
if {factionClaiming.%player%} isn't set:
send "&cYou have not set both positions of this claim selection."
if {factionClaiming.%player%} is set:
send "&cYou have not set both positions of this claim selection."
else:
loop all offline players:
if {factionOfPlayer.%loop-value%} is set: