summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-07-13 14:57:55 +0000
committerJesusalva Jesusalva <jesusalva@tmw2.org>2024-07-13 14:57:55 +0000
commit75539010c8fa9af2296b251a3416f05efb536f49 (patch)
tree56de448f70cfdea90d006592ed3a63705fd13f9b
parentad0b1ec6af79367aba7020b14425066e27611e47 (diff)
downloadserverdata-75539010c8fa9af2296b251a3416f05efb536f49.tar.gz
serverdata-75539010c8fa9af2296b251a3416f05efb536f49.tar.bz2
serverdata-75539010c8fa9af2296b251a3416f05efb536f49.tar.xz
serverdata-75539010c8fa9af2296b251a3416f05efb536f49.zip
Correct incorrect calls to getareausers
Grotto was being reset with players inside. Have not tested other areas, but likely affected were also soren's island and heroes hold. Explanation thus far: it seems that, with only map name being given, it only checks the OnTouch area around the NPC that has the reset code attached. See `else if (nd->u.scr.xs != -1 && nd->u.scr.ys != -1) {` branch of getareausers() in herc. It cannot be any other branch as they all return -1 and the one above is only entered when a range parameter is passed. A reset needs all calls to return 0. It might be possible to prevent reset of grotto by standing ~~in the doorway of Soren's house~~ at 105,57 in one of the three chambers it checks. But they're all too small for this to be possible. A review of all other getareausers() calls is advised. Btw, why is grotto reset a part of soren's reset script? * correct incorrect correction * Correct incorrect calls to getareausers Grotto was being reset with players inside. Have not tested other areas, but likely affected were also soren's island and heroes hold. **** Approved-by: Jesusalva Jesusalva <jesusalva@tmw2.org>
-rw-r--r--npc/018-2-2/main.txt2
-rw-r--r--npc/soren/main.txt14
2 files changed, 8 insertions, 8 deletions
diff --git a/npc/018-2-2/main.txt b/npc/018-2-2/main.txt
index 36354f2cd..55629fd3e 100644
--- a/npc/018-2-2/main.txt
+++ b/npc/018-2-2/main.txt
@@ -77,7 +77,7 @@ OnMasterBossKilled:
// So every day, at 03:23 AM, if no one is trying the quest, it'll get rid
// of Heroes Hold Master Dungeon
OnClock0323:
- if (getareausers("018-2-5@Ma") == 0) {
+ if (getmapusers("018-2-5@Ma") == 0) {
killmonster("018-2-5@Ma", "#HH_CONTROLLER01::OnMasterBossKilled");
monster "018-2-5@Ma", any(52,188), any(29,196), "Master Dungeon Boss", MonsterKing, 1, "#HH_CONTROLLER01::OnMasterBossKilled";
}
diff --git a/npc/soren/main.txt b/npc/soren/main.txt
index 845c662d0..6cbd42bc8 100644
--- a/npc/soren/main.txt
+++ b/npc/soren/main.txt
@@ -59,17 +59,17 @@ OnTouch:
// of the non-permanent monsters on Soren Village & Soren House.
// FIXME: It also clears up Groata Grotto
OnClock0323:
- if (getareausers("soren") == 0 &&
- getareausers("soren-2") == 0 &&
- getareausers("001-6") == 0 &&
- getareausers("001-7") == 0) {
+ if (getmapusers("soren") == 0 &&
+ getmapusers("soren-2") == 0 &&
+ getmapusers("001-6") == 0 &&
+ getmapusers("001-7") == 0) {
killmonster("soren", "all");
killmonster("soren-2", "all");
}
if ($@GROTTO &&
- getareausers("006-0") == 0 &&
- getareausers("006-3") == 0 &&
- getareausers("006-5") == 0) {
+ getmapusers("006-0") == 0 &&
+ getmapusers("006-3") == 0 &&
+ getmapusers("006-5") == 0) {
killmonster("006-5", "all");
$@GROATA = 0;
$@GROTTO = 0;