summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-05-09 10:31:42 -0300
committerJesusaves <cpntb1@ymail.com>2024-05-09 10:31:42 -0300
commit87eb4e5c32a49b58710e9be00dc90bfb46e820e9 (patch)
tree361e0882bd5119ab400921b8f0d74bc1fa89b64c /npc/functions
parent4ccb17dd1a3510b676c984e9fb346d3a5b1cf612 (diff)
downloadserverdata-87eb4e5c32a49b58710e9be00dc90bfb46e820e9.tar.gz
serverdata-87eb4e5c32a49b58710e9be00dc90bfb46e820e9.tar.bz2
serverdata-87eb4e5c32a49b58710e9be00dc90bfb46e820e9.tar.xz
serverdata-87eb4e5c32a49b58710e9be00dc90bfb46e820e9.zip
Tackle some TODOs and fix a bad syntax in Botter Syndrome code.
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/captcha.txt38
1 files changed, 29 insertions, 9 deletions
diff --git a/npc/functions/captcha.txt b/npc/functions/captcha.txt
index 81f9a31ca..05c83178b 100644
--- a/npc/functions/captcha.txt
+++ b/npc/functions/captcha.txt
@@ -143,7 +143,9 @@ OnInit:
// Restart if it somehow get struck
OnTimer60000:
OnTimer150000:
+OnTimer470000:
OnTimer600000:
+OnTimer800000:
initnpctimer;
end;
@@ -177,7 +179,13 @@ OnTimer5000:
// Okay, lets do it
attachrid(.@players[.@i]);
+ // Inform the GM Override Console about ongoing botcheck
+ if ($@GM_OVERRIDE)
+ debugmes "[BOT] Conducting botcheck for %d", getcharid(3);
+
// TODO: What about jailed players?
+ //if (getstatus(SC_JAILED))
+ // continue;
// 1. Player in immunity, who is next one
if (CAPTCHA_OK > gettimetick(2)) {
@@ -249,10 +257,10 @@ OnTimer5000:
// The chance of you contracting the Syndrome starts at 70.0%
.@chance = 700;
// You killed less than 4 monsters, fall to 40.0%
- if (.@mpk + 4 <= MONSTERS_KILLED)
+ if (.@mpk + 4 > MONSTERS_KILLED)
.@chance -= 300;
// (If you killed less than 7 monsters, fall to 55.0% instead)
- else if (.@mpk + 7 <= MONSTERS_KILLED)
+ else if (.@mpk + 7 > MONSTERS_KILLED)
.@chance -= 150;
// If you interacted with any NPC, it falls to 27.5%
if (@npctalk+600 > gettimetick(2))
@@ -299,14 +307,26 @@ OnTimer5000:
// 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
+ // TODO: Total connection time? Item usage? Chat?
+ // TODO: Reduce chance if you've already contracted the Syndrome?
/////////////////////////////////////////////////////////////////
- //debugmes "Botter Syndrome [%s] %d%%", strcharinfo(0), .@chance;
+ if ($@GM_OVERRIDE)
+ debugmes "Botter Syndrome [%s] %d%%", strcharinfo(0), .@chance/10;
if (rand2(1000) < .@chance) {
// You've contracted the Botter Syndrome!
- // TODO FIXME: Make effect start slow and increase
- SC_Bonus(3600, SC_BOTTER_SYNDROME, rand2(50));
+ // Your rate drop in 1% ~ 15% depending on your botting score
+ .@eff = 1 + (.@chance / 50);
+ // If you already have one running, change effects
+ if (getstatus(SC_BOTTER_SYNDROME)) {
+ .@t = 1 + getstatus(SC_BOTTER_SYNDROME, 5) / 3600000;
+ .@eff += .@t + min(100, getstatus(SC_BOTTER_SYNDROME, 1));
+ }
+ // Sanitize the effect (it can go past 100% but...)
+ .@eff = min(100, .@eff);
+ // The syndrome starts weak and gradually strengthens
+ SC_Bonus(3600, SC_BOTTER_SYNDROME, .@eff);
+ .@t = getstatus(SC_BOTTER_SYNDROME, 5) / 1000;
+ .@eff = limit(0, getstatus(SC_BOTTER_SYNDROME, 1), 100);
// Select random Nurse which can cure you
// But if your symptoms worsen, keep the previous nurse
if (CAPTCHA_NPC$ == "") {
@@ -327,8 +347,8 @@ OnTimer5000:
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)));
+ dispbottom l("* You can find a Nurse in %s to heal, wait %s, or drink a %s to dispel.", b(.@n$), FuzzyTime(gettimetick(2)+.@t), getitemlink(ElixirOfLife));
+ dispbottom l("OH NOES! You have contracted the %s! Your experience gain and drop rate was greatly reduced by %d%%!", b(col(l("Botter's Syndrome"), 1)), .@eff);
}
}