diff options
author | Jesusaves <cpntb1@ymail.com> | 2024-05-16 20:56:17 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2024-05-16 20:56:17 -0300 |
commit | 5dc623a031a21195c6f28b78e1b412a2bc730217 (patch) | |
tree | 820d5d537c37be38bd88debb6fe22191e2f8b7d7 | |
parent | 65dc69b9c61a1b3020653296c22ff1d2b08b48f5 (diff) | |
download | serverdata-5dc623a031a21195c6f28b78e1b412a2bc730217.tar.gz serverdata-5dc623a031a21195c6f28b78e1b412a2bc730217.tar.bz2 serverdata-5dc623a031a21195c6f28b78e1b412a2bc730217.tar.xz serverdata-5dc623a031a21195c6f28b78e1b412a2bc730217.zip |
Polish a bit the botter syndrome captcha
-rw-r--r-- | npc/functions/captcha.txt | 61 |
1 files changed, 47 insertions, 14 deletions
diff --git a/npc/functions/captcha.txt b/npc/functions/captcha.txt index b2c9b5a13..1b7595230 100644 --- a/npc/functions/captcha.txt +++ b/npc/functions/captcha.txt @@ -141,6 +141,15 @@ OnInit: initnpctimer; end; +function syndroCheck { + .@k = getarg(0); + .@t = getarg(1, 2000); + sleep2(.@t); + if (!playerattached()) return false; + if (BaseExp != .@k) return true; + return false; +} + // Restart if it somehow get struck OnTimer60000: OnTimer150000: @@ -172,7 +181,7 @@ OnTimer10000: } // Maybe we will conduct a captcha - if (rand2(12) < 3) { + if (rand2(14) < 3 || $@GM_OVERRIDE) { // This can be slow, beware .@c = getunits(BL_PC, .@players, MAX_CYCLE_PC); for (.@i = 0; .@i < .@c; .@i++) { @@ -252,35 +261,59 @@ OnTimer10000: // We will now study you for a short while. First, take a sample .@exp = BaseExp; .@jxp = JobExp; .@mpt = Mobpt; .@hp = Hp; .@wgt = Weight; .@m$ = getmap(); .@mpk = MONSTERS_KILLED; - .@hon = HONOR; - sleep2(15000); + .@hon = HONOR; .@k = BaseExp; + // We'll now wait in some intervals. Killing in them cause + // the K variables to be set, and contribute towards bot score. + .@k1 = syndroCheck(.@k); .@k = BaseExp; + .@k2 = syndroCheck(.@k); .@k = BaseExp; + .@k3 = syndroCheck(.@k); .@k = BaseExp; + .@k4 = syndroCheck(.@k); .@k = BaseExp; + .@k5 = syndroCheck(.@k); .@k = BaseExp; + .@k6 = syndroCheck(.@k); .@k = BaseExp; + .@k7 = syndroCheck(.@k); .@k = BaseExp; + sleep2(1000); // You logged out? LAME! Anyway, carry on if (!playerattached()) break; ///////////////////////////////////////////////////////////////// // The chance of you contracting the Syndrome starts at 65.0% - .@chance = 650; + .@chance = 600; + // Every 2 seconds you spent without killing is 1.5% + if (!.@k1) + .@chance -= 15; + if (!.@k2) + .@chance -= 15; + if (!.@k3) + .@chance -= 15; + if (!.@k4) + .@chance -= 15; + if (!.@k5) + .@chance -= 15; + if (!.@k6) + .@chance -= 15; + if (!.@k7) + .@chance -= 15; // You killed less than 7 monsters, fall to 40.0% if (.@mpk + 7 > MONSTERS_KILLED) - .@chance -= 250; + .@chance -= 200; // (If you killed less than 12 monsters, fall to 55.0% instead) else if (.@mpk + 12 > MONSTERS_KILLED) - .@chance -= 150; + .@chance -= 125; // If you interacted with any NPC, it falls to 27.5% if (@npctalk+600 > gettimetick(2)) - .@chance -= 125; - // You're a light carrier (33% weight), fall to 25.0% - if (Weight <= MaxWeight / 3) - .@chance -= 25; + .@chance -= 100; + // You're a light carrier (40% weight), fall to 25.0% + if (Weight * 4 <= MaxWeight / 10) + .@chance -= 30; // You assigned all your stat points, fall to 20.0% if (!StatusPoint) - .@chance -= 50; + .@chance -= 25; // Monster points did not increase, fall to 17.5% if (Mobpt <= .@mpt) .@chance -= 25; // Your weight decreased or did not increase, fall to 12.5% if (Weight <= .@wgt) - .@chance -= 50; + .@chance -= 25; // Your experience did not increase or level up, fall to 10.0% if (BaseExp <= .@exp) .@chance -= 25; @@ -292,13 +325,13 @@ OnTimer10000: .@chance -= 55; // You are/were in a SuperMMO zone, fall to -0.5% if (getmapinfo(MAPINFO_ZONE, .@m$) == "SuperMMO") - .@chance -= 25; + .@chance -= 30; // (If it is a MMO zone, fall to 0.5% instead) else if (getmapinfo(MAPINFO_ZONE, .@m$) == "MMO") .@chance -= 15; // Your HP increased or remained, fall to -3.0% if (Hp >= .@hp) - .@chance -= 25; + .@chance -= 40; // You are staff or sponsor or whatever, total at -3.5% bonus if (getgmlevel()) .@chance -= 5; |