summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-08-05 22:24:12 -0300
committerJesusaves <cpntb1@ymail.com>2024-08-05 22:24:12 -0300
commit29948f991e8f6e9e514eacfeb2badfcfbd644874 (patch)
tree5a43a4dcb5f7fa71fa216f85c112d0e6b5da7827
parent01f04ef692dfefecbdd0b1391c83026cf16924ee (diff)
downloadserverdata-29948f991e8f6e9e514eacfeb2badfcfbd644874.tar.gz
serverdata-29948f991e8f6e9e514eacfeb2badfcfbd644874.tar.bz2
serverdata-29948f991e8f6e9e514eacfeb2badfcfbd644874.tar.xz
serverdata-29948f991e8f6e9e514eacfeb2badfcfbd644874.zip
Fix an assortment of miscellaneous major bugs.
-rw-r--r--npc/003-10/arnea.txt8
-rw-r--r--npc/003-3/malindou.txt12
-rw-r--r--npc/006-9/ctrl.txt8
-rw-r--r--npc/025-2-3/boss.txt2
-rw-r--r--npc/functions/timer.txt7
5 files changed, 31 insertions, 6 deletions
diff --git a/npc/003-10/arnea.txt b/npc/003-10/arnea.txt
index 8327e568b..78557620f 100644
--- a/npc/003-10/arnea.txt
+++ b/npc/003-10/arnea.txt
@@ -90,6 +90,8 @@ L_NewArena:
mes l("Arena created, it can be used for 30 minutes.");
mes l("Room password: @@", .@user_password$);
if (is_staff()) mes l("Inst @@ Map @@", .@INSTID, .@instanceMapName$);
+ // Store it in a rainbow table
+ .instctrl[.@ID] = .@INSTID;
next;
goto L_Menu;
@@ -124,6 +126,11 @@ L_JoinArena:
mesq l("All arenas stay open for only 30 minutes after being purchased.");
} else {
closeclientdialog;
+ // To prevent console spam
+ if (.instctrl[.@m]) {
+ if (instanceowner(.instctrl[.@m]) < 1)
+ end;
+ }
// If the arena has expired, this will fail.
// But because dialog was closed, players won't notice anything.
// It won't have any visual effect, just like when you don't use a password.
@@ -205,6 +212,7 @@ OnMinute60:
OnDay1231:
OnDay0101:
disablenpc(.name$);
+ deletearray(.instctrl);
end;
OnDay0102:
diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt
index 16d3e7b5e..985d9752a 100644
--- a/npc/003-3/malindou.txt
+++ b/npc/003-3/malindou.txt
@@ -993,6 +993,18 @@ OnInit:
debugmes "* Invalidate quest ID 0";
debugmes "";
}
+ // Current UPDATE value: Seg 05 Ago 2024 21:49:55 -03
+ // Accumulated bugs cleanup
+ if ($UPDATE < 1722905395) {
+ query_sql("DELETE FROM `quest` WHERE `quest`.`quest_id` = '0'");
+ query_sql("DELETE FROM `sc_data` WHERE `type` = '"+SC_OVERLAPEXPUP+"'");
+ DelChrRegFromEveryPlayer("ALC_DELAYTIME");
+ DelChrRegFromEveryPlayer("ALC_THRESHOLD");
+ $UPDATE=1722905395;
+ debugmes "";
+ debugmes "* Invalidate quest ID 0";
+ debugmes "";
+ }
// This mensures Contributors Credits, and changes only during updates.
diff --git a/npc/006-9/ctrl.txt b/npc/006-9/ctrl.txt
index 836e1c389..6766f6bad 100644
--- a/npc/006-9/ctrl.txt
+++ b/npc/006-9/ctrl.txt
@@ -330,8 +330,8 @@ function spawn {
// Increase attack range in 2
setunitdata(.@lucky, UDT_ATKRANGE, .@atkR + 2);
// Make them faster, both to move as to attack
- setunitdata(.@lucky, UDT_ADELAY, min(100, .@aspd - 80));
- setunitdata(.@lucky, UDT_SPEED, min(100, .@wspd - 35));
+ setunitdata(.@lucky, UDT_ADELAY, max(100, .@aspd - 80));
+ setunitdata(.@lucky, UDT_SPEED, max(100, .@wspd - 35));
// Set their AI to something more fearsome, if it isn't set yet
.@mode = .@mode | MD_NOKNOCKBACK;
.@mode = .@mode | MD_ANGRY;
@@ -347,8 +347,8 @@ function spawn {
// It'll be more difficult to notice these
.@aspd = getunitdata(.@lucky, UDT_ADELAY);
.@wspd = getunitdata(.@lucky, UDT_SPEED);
- setunitdata(.@lucky, UDT_ADELAY, min(100, .@aspd - 40));
- setunitdata(.@lucky, UDT_SPEED, min(100, .@wspd - 25));
+ setunitdata(.@lucky, UDT_ADELAY, max(100, .@aspd - 40));
+ setunitdata(.@lucky, UDT_SPEED, max(100, .@wspd - 25));
}
} else {
// Otherwise, nothing happens (although you could get a penalty?)
diff --git a/npc/025-2-3/boss.txt b/npc/025-2-3/boss.txt
index ad0f200fd..a427aca8b 100644
--- a/npc/025-2-3/boss.txt
+++ b/npc/025-2-3/boss.txt
@@ -23,7 +23,7 @@ OnBossDeath:
getitem StrangeCoin, 1;
announce_bosskill(getmap(), PinkieEmperor);
if (.@party > 0) {
- partytimer("025-2-3", 200, "#BossCtrl_025-2-3::OnBossReward");
+ partytimer("025-2-3", 200, "#BossCtrl_025-2-3::OnBossReward", .@party);
} else {
addtimer(200, "#BossCtrl_025-2-3::OnBossReward");
}
diff --git a/npc/functions/timer.txt b/npc/functions/timer.txt
index 79a33a851..0a808efc2 100644
--- a/npc/functions/timer.txt
+++ b/npc/functions/timer.txt
@@ -91,6 +91,11 @@ function script mapdeltimer {
// partytimer("<map>", <tick>, "<npc>::<event>", partyid, dead=False)
function script partytimer {
+ if (playerattached())
+ .@party = getarg(3, getcharid(1));
+ else
+ .@party = getarg(3);
+
.@c = getunits(BL_PC, .@players, false, getarg(0));
for (.@i = 0; .@i < .@c; .@i++) {
if (!getarg(4, false)) {
@@ -98,7 +103,7 @@ function script partytimer {
continue;
}
}
- if (getcharid(1, strcharinfo(0,"",.@players[.@i]) ) == getarg(3))
+ if (getcharid(1, strcharinfo(0,"",.@players[.@i]) ) == .@party)
addtimer(getarg(1), getarg(2), .@players[.@i]);
}
return .@i;