Solved Human Verify

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

metclocker

Member
Jul 28, 2019
3
1
0
24
Category: Anti Bot

Suggested name: HumanVerify

Spigot/Skript Version: 1.14.4

What I want:
I want anyone continue my work on doing HumanVerify, here's my code https://pastebin.com/KiwwDNJA. To prevent player for do macro, get captcha by jumping in water for couple times (?), and gave a chance to get the captcha
And if the player is on AFK condition, the humanverify is not appear.
Ideas for commands:
No Commands
Ideas for permissions:
human.bypass - Player didn't get the captcha / human verify
When I'd like it by: A soon as possible
 
  • Like
Reactions: malia
Hey @metclocker

I can work on this for you, however, the size of this script would be big.
DM me on Discord for this (Invalid#1408), and we can arrange the cost (due to how much time it'll take to make) (paypal)

Thank you!
Invalid#1408
 
The size of this skript won't be big wtf

Edit:
Wrote this super simple Skript, didn't test it but I'm pretty sure it requires MundoSK, also keep in mind this is only pseudo code.

Code:
on load:
  if file "plugins/Malia/core/captcha/config.yml" doesn't exist:
    create file "plugins/Malia/core/captcha/config.yml"
  else:
    set {CAPTCHA::CONFIG::METHOD} to yml value "method" of file "plugins/Malia/core/captcha/config.yml"

on join:
  if file "plugins/Malia/core/captcha/{%player%}.yml" doesn't exist:
    create file "plugins/Malia/core/captcha/{%player%}.yml"
    set yml value "passed" of file "plugins/Malia/core/captcha/{%player%}.yml" to false
  else:
    set {CAPTCHA::%player%} to yml value "passed" of file "plugins/Malia/core/captcha/{%player%}.yml"
  if {CAPTCHA::%player%} is false:
    switch {CAPTCHA::CONFIG::METHOD}:
      case "math":
        set {CAPTCHA::TYPE} to random integer between 1 and 4
        switch {CAPTCHA::TYPE}:
          case 1: # -
            set {CAPTCHA::FIRST} to random integer between 1 and 10
            set {CAPTCHA::SECND} to random integer between 1 and 10
            send "&c[ M.A.L.I.A ] Captcha: &7%{CAPTCHA::FIRST}% - %{CAPTCHA::SECND}%" to player
            set {CAPTCHA::%player%::ACTIVE} to true
            stop
          case 2: # +
            set {CAPTCHA::FIRST} to random integer between 1 and 10
            set {CAPTCHA::SECND} to random integer between 1 and 10
            send "&c[ M.A.L.I.A ] Captcha: &7%{CAPTCHA::FIRST}% + %{CAPTCHA::SECND}%" to player
            set {CAPTCHA::%player%::ACTIVE} to true
            stop
          case 3: # *
            set {CAPTCHA::FIRST} to random integer between 1 and 10
            set {CAPTCHA::SECND} to random integer between 1 and 10
            send "&c[ M.A.L.I.A ] Captcha: &7%{CAPTCHA::FIRST}% * %{CAPTCHA::SECND}%" to player
            set {CAPTCHA::%player%::ACTIVE} to true
            stop
          case 4: # /
            set {CAPTCHA::FIRST} to random integer between 1 and 10
            set {CAPTCHA::SECND} to random integer between 1 and 10
            send "&c[ M.A.L.I.A ] Captcha: &7%{CAPTCHA::FIRST}% / %{CAPTCHA::SECND}%" to player
            set {CAPTCHA::%player%::ACTIVE} to true
            stop
        stop
      case "interactive":
        # do some interactive captcha
        stop
      default:
        stop

on chat:
  if {CAPTCHA::%player%::ACTIVE} is true:
    cancel event
    switch {CAPTCHA::TYPE}:
      case 1: # -
        if {CAPTCHA::FIRST} - {CAPTCHA::SECND} = player's message:
          send "&c[ M.A.L.I.A ] Good job! You were verified :)"
          set {CAPTCHA::%player%::ACTIVE} to false
          set {CAPTCHA::%player%} to true
        stop
      case 2: # +
        if {CAPTCHA::FIRST} + {CAPTCHA::SECND} = player's message:
          send "&c[ M.A.L.I.A ] Good job! You were verified :)"
          set {CAPTCHA::%player%::ACTIVE} to false
          set {CAPTCHA::%player%} to true
        stop
      case 3: # *
        if {CAPTCHA::FIRST} * {CAPTCHA::SECND} = player's message:
          send "&c[ M.A.L.I.A ] Good job! You were verified :)"
          set {CAPTCHA::%player%::ACTIVE} to false
          set {CAPTCHA::%player%} to true
        stop
      case 4: # /
        if {CAPTCHA::FIRST} / {CAPTCHA::SECND} = player's message:
          send "&c[ M.A.L.I.A ] Good job! You were verified :)"
          set {CAPTCHA::%player%::ACTIVE} to false
          set {CAPTCHA::%player%} to true
        stop

on quit:
  if file "plugins/Malia/core/captcha/{%player%}.yml" doesn't exist:
    create file "plugins/Malia/core/captcha/{%player%}.yml"
    set yml value "passed" of file "plugins/Malia/core/captcha/{%player%}.yml" to false
  else:
    set yml value "passed" of file "plugins/Malia/core/captcha/{%player%}.yml" to true
Nice skript but, it's not a skript that i want.
The skript suppose to be give captcha to players on server not when they joined the server, but in random time (Look my code). To prevent player for doing AfkFarm, AfkPool, and afk soulsand.