Hello, I am trying to make an anti-autofishing captcha.
The code works - almost. The only issue I am having is when a player types in the CORRECT captcha they are being kicked regardless.
Could anyone help with this and tell me where I am going wrong? I am using skRay and MundoSK.
The code works - almost. The only issue I am having is when a player types in the CORRECT captcha they are being kicked regardless.
Could anyone help with this and tell me where I am going wrong? I am using skRay and MundoSK.
Code:
on script load:
delete {aaf.location::*}
delete {aaf.infractions::*}
on fish:
set {_p::synergy} to 1
set {_p::ynergys} to 2
set {_p::nergysy} to 3
set {_p::ergysyn} to 4
set {_p::rgysyne} to 5
set {captcha.verify} to random from {_p::*} probs
if {aaf.location::%event-player%} is not set:
set {aaf.location::%event-player%} to event-player's location
else if {aaf.location::%event-player%} = event-player's location:
add 1 to {aaf.infractions::%event-player%}
if {aaf.infractions::%event-player%} >= 50:
delete {aaf.infractions::%event-player%}
delete {aaf.location::%event-player%}
send player title {captcha.verify} with subtitle "&c&lPlease type this Captcha in chat" for 15 seconds
set {captcha.status} to 1
else if {aaf.location::%event-player%} != event-player's location:
delete {aaf.infractions::%event-player%}
delete {aaf.location::%event-player%}
delete {captcha.verify}
delete {captcha.status}
stop
on chat:
if {captcha.status} is equal to 1:
cancel event
if message contains {captcha.verify}:
message "&a&lCaptcha Complete"
delete {captcha.verify}
delete {captcha.status}
else:
cancel event
kick event-player due to "AFK-Fishing is not allowed"
delete {captcha.verify}
delete {captcha.status}
On fish:
if {captcha.status} is equal to 1:
wait 30 seconds
if {captcha.status} is equal to 1:
kick event-player due to "AFK-Fishing is not allowed"
delete {captcha.verify}
delete {captcha.status}