So I am trying to make a skript that opens up a deluxe menu gui which would prevent players from afk mining on skript basically the way im trying to do it is if the player is standing still but im not so sure how to do this efficiently here's what I have right now:
Not sure what's wrong with it but it's not working been trying to troubleshoot trying different things for an hour and I feel very stupid right now because it's probably a simple mistake.
[doublepost=1554067002,1553658434][/doublepost]bump
Code:
on mine:
if event-block is stone or diamond ore or emerald ore or cobblestone or coal ore or iron ore or gold ore or redstone ore or lapis ore:
if {mining.%player%} is not set:
set {mining.%player%} to true
if {mining.%player%} is true:
if {mining.%player%.counter} is not set:
set {mining.%player%.counter} to 1
if {mining.%player%.counter} is set:
if {mining.%player%.counter} is more than or equal to 64:
set {_x-check} to x-coords of player
set {_z-check} to z-coords of player
if {_x-check} isn't {_x}:
set {mining.%player%} to false
set {mining.%player%.counter} to 0
if {_z-check} isn't {_z}:
set {mining.%player%} to false
set {mining.%player%.counter} to 0
if {_x-check} is {_x}:
if {_z-check} is {_z}:
make console execute command "dm open afkmine %player%"
set {mining.%player%} to false
set {mining.%player%.counter} to 0
stop
if {mining.%player%.counter} is less than or equal to 1:
add 1 to {mining.%player%.counter}
set {_x} to x-coords of player
set {_z} to z-coords of player
stop
if {mining.%player%.counter} is more than or equal to 2:
add 1 to {mining.%player%.counter}
stop
if {mining.%player%} is false:
set {mining.%player%} to true
stop
Not sure what's wrong with it but it's not working been trying to troubleshoot trying different things for an hour and I feel very stupid right now because it's probably a simple mistake.
[doublepost=1554067002,1553658434][/doublepost]bump