summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-05-09 09:49:25 -0300
committerJesusaves <cpntb1@ymail.com>2024-05-09 09:49:25 -0300
commitfec8ffaa3ceca8c4e471b28ff88f49a85f1975fd (patch)
tree947b6d49ac059fa2c3246258059d74b04d2db5fb /npc/functions
parent8a20b84f99bab8dbaf8ff7608adfb5ba48fa8d00 (diff)
downloadserverdata-fec8ffaa3ceca8c4e471b28ff88f49a85f1975fd.tar.gz
serverdata-fec8ffaa3ceca8c4e471b28ff88f49a85f1975fd.tar.bz2
serverdata-fec8ffaa3ceca8c4e471b28ff88f49a85f1975fd.tar.xz
serverdata-fec8ffaa3ceca8c4e471b28ff88f49a85f1975fd.zip
Some improvements to the Botter Syndrome Captcha I introduced yesterday.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/captcha.txt65
1 files changed, 43 insertions, 22 deletions
diff --git a/npc/functions/captcha.txt b/npc/functions/captcha.txt
index 07df2f7ee..81f9a31ca 100644
--- a/npc/functions/captcha.txt
+++ b/npc/functions/captcha.txt
@@ -166,7 +166,7 @@ OnTimer5000:
}
// Maybe we will conduct a captcha
- if (rand2(10) < 3) {
+ if (rand2(12) < 3) {
// This can be slow, beware
.@c = getunits(BL_PC, .@players, MAX_CYCLE_PC);
for (.@i = 0; .@i < .@c; .@i++) {
@@ -233,9 +233,14 @@ OnTimer5000:
// 3.1 This is a good target, lets do this
// If Botter Syndrome is enabled
if ($CAPTCHA & 4) {
+ // Players are exempt of Botting Syndrome until unlocking Tulimshar
+ // But if they're deemed overleveled, this exemption dies
+ if (!getq(General_Narrator) && BaseLevel < 15)
+ continue;
// 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);
// You logged out? LAME! Anyway, carry on
if (!playerattached())
@@ -246,42 +251,54 @@ OnTimer5000:
// You killed less than 4 monsters, fall to 40.0%
if (.@mpk + 4 <= MONSTERS_KILLED)
.@chance -= 300;
- // If you interacted with any NPC, it falls to 30.0%
+ // (If you killed less than 7 monsters, fall to 55.0% instead)
+ else if (.@mpk + 7 <= MONSTERS_KILLED)
+ .@chance -= 150;
+ // If you interacted with any NPC, it falls to 27.5%
if (@npctalk+600 > gettimetick(2))
- .@chance -= 100;
- // You're a light carrier (25%), fall to 27.5%
- if (Weight <= MaxWeight / 4)
+ .@chance -= 125;
+ // You're a light carrier (33% weight), fall to 25.0%
+ if (Weight <= MaxWeight / 3)
.@chance -= 25;
- // You assigned all your stat points, fall to 22.5%
+ // You assigned all your stat points, fall to 20.0%
if (!StatusPoint)
.@chance -= 50;
- // Monster points did not increase, fall to 20.0%
+ // Monster points did not increase, fall to 17.5%
if (Mobpt <= .@mpt)
.@chance -= 25;
- // Your weight decreased or did not increase, fall to 15.0%
+ // Your weight decreased or did not increase, fall to 12.5%
if (Weight <= .@wgt)
.@chance -= 50;
- // Your experience did not increase or level up, fall to 12.5%
+ // Your experience did not increase or level up, fall to 10.0%
if (BaseExp <= .@exp)
.@chance -= 25;
- // Same for job experience, fall to 10.0%
+ // Same for job experience, fall to 7.5%
if (JobExp <= .@jxp)
.@chance -= 25;
- // Your map changed, fall to 5.0%
+ // Your map changed, fall to 2.0%
if (getmap() != .@m$)
- .@chance -= 50;
- // You are/were in a SuperMMO zone, fall to 2.5%
+ .@chance -= 55;
+ // You are/were in a SuperMMO zone, fall to -0.5%
if (getmapinfo(MAPINFO_ZONE, .@m$) == "SuperMMO")
.@chance -= 25;
- // (If it is a MMO zone, fall to 3.5% instead)
+ // (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, possibly fall to 0.0%
+ // Your HP increased or remained, fall to -3.0%
if (Hp >= .@hp)
.@chance -= 25;
- // You are staff or sponsor or whatever, so a 0.5% bonus
+ // You are staff or sponsor or whatever, total at -3.5% bonus
if (getgmlevel())
.@chance -= 5;
+ // You haven't disconnected recently, total at -4.0%
+ if (CHAREG_CLEANUP+3600 < gettimetick(2))
+ .@chance -= 5;
+ // You already used a skill recently/today, total at -5.0%
+ if (@skillId)
+ .@chance -= 10;
+ // You killed someone in PVP or died in PVP, total at -10.0%
+ if (.@hon != HONOR)
+ .@chance -= 50;
// TODO: Total connection time? Item usage? Skill usage? Chat?
// TODO: Reduce chance if you've already contracted the Syndrome
/////////////////////////////////////////////////////////////////
@@ -291,12 +308,15 @@ OnTimer5000:
// TODO FIXME: Make effect start slow and increase
SC_Bonus(3600, SC_BOTTER_SYNDROME, rand2(50));
// Select random Nurse which can cure you
- if (BaseLevel >= 70)
- CAPTCHA_NPC$=any("009-4", "024-8", "004-1", "012-6", "005-7", "006-2-1");
- else if (BaseLevel >= 30)
- CAPTCHA_NPC$=any("004-1", "012-6", "005-7", "006-2-1");
- else
- CAPTCHA_NPC$=any("004-1", "005-7");
+ // But if your symptoms worsen, keep the previous nurse
+ if (CAPTCHA_NPC$ == "") {
+ if (BaseLevel >= 70)
+ CAPTCHA_NPC$=any("009-4", "024-8", "004-1", "012-6", "005-7", "006-2-1");
+ else if (BaseLevel >= 30)
+ CAPTCHA_NPC$=any("004-1", "012-6", "005-7", "006-2-1");
+ else
+ CAPTCHA_NPC$=any("004-1", "005-7");
+ }
// Inform which Nurse can cure you
if (CAPTCHA_NPC$ == "009-4") .@n$=l("Halinarzo");
else if (CAPTCHA_NPC$ == "024-8") .@n$=l("Frostia");
@@ -305,6 +325,7 @@ OnTimer5000:
else if (CAPTCHA_NPC$ == "005-7") .@n$=l("Candor");
else if (CAPTCHA_NPC$ == "006-2-1") .@n$=l("Piou Isles");
else .@n$="???";
+ // Send information message
dispbottom l("----------------------------------------------");
dispbottom l("* You can find a Nurse in %s to heal, wait %s, or drink a %s to dispel.", .@n$, FuzzyTime(gettimetick(2)+3600), getitemlink(ElixirOfLife)); // TODO: FuzzyTime() the actual duration
dispbottom l("OH NOES! You have contracted the %s! Your experience gain and drop rate was greatly reduced!", b(col(l("Botter's Syndrome"), 1)));