summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-05-25 10:29:27 -0300
committerJesusaves <cpntb1@ymail.com>2024-05-25 10:29:27 -0300
commit2fadeb1fc03644079c8cdae88dc1daeae4817fdd (patch)
treed2250bf86c1569431c57d0653653717f061c0f53
parentd25606446fe111634ccec1530d6fca182cd24f6c (diff)
downloadserverdata-2fadeb1fc03644079c8cdae88dc1daeae4817fdd.tar.gz
serverdata-2fadeb1fc03644079c8cdae88dc1daeae4817fdd.tar.bz2
serverdata-2fadeb1fc03644079c8cdae88dc1daeae4817fdd.tar.xz
serverdata-2fadeb1fc03644079c8cdae88dc1daeae4817fdd.zip
Include Ritual Cave (currently disabled). Minor cleanup/fixes.
-rw-r--r--conf/map/maps.conf1
-rw-r--r--db/constants.conf17
-rw-r--r--db/map_index.txt397
-rw-r--r--maps/re/017-1.mcachebin4288 -> 4298 bytes
-rw-r--r--maps/re/017-2-1.mcachebin523 -> 526 bytes
-rw-r--r--maps/re/018-8.mcachebin0 -> 3386 bytes
-rwxr-xr-xnpc/00000SAVE/katze.txt185
-rw-r--r--npc/010-4-1/katze.txt2
-rw-r--r--npc/017-1/inspector.txt2
-rw-r--r--npc/018-8/_import.txt5
-rw-r--r--npc/018-8/_mobs.txt37
-rw-r--r--npc/018-8/_warps.txt3
-rw-r--r--npc/018-8/ctrl.c745
-rw-r--r--npc/026-4/ctrl.c4
-rw-r--r--npc/026-5/ctrl.c3
-rw-r--r--npc/_import.txt1
-rw-r--r--npc/functions/hub.txt14
17 files changed, 1030 insertions, 386 deletions
diff --git a/conf/map/maps.conf b/conf/map/maps.conf
index 548abe8d4..c5adbe8ce 100644
--- a/conf/map/maps.conf
+++ b/conf/map/maps.conf
@@ -221,6 +221,7 @@ map_list: (
"018-6-3",
"018-7-1",
"018-7",
+ "018-8",
"019-1-1",
"019-1",
"019-2",
diff --git a/db/constants.conf b/db/constants.conf
index 280fe53a3..e13366cba 100644
--- a/db/constants.conf
+++ b/db/constants.conf
@@ -1845,6 +1845,7 @@ constants_db: {
NPC_LOF_STRANGER: 234
NPC_LOF_NOBLEMAN: 235
NPC_SHEILA: 236
+ NPC_ANGELA2: 238
NPC_DIMOND: 240
NPC_BARD_HARPS: 241
NPC_VAULT: 243
@@ -1900,6 +1901,7 @@ constants_db: {
NPC_JOURNALMAN: 309
NPC_FISHERMAN_HALI: 311
NPC_DARK_SORCERER_F: 312
+ NPC_CAUL: 313
NPC_ANSELMO_BR: 315
NPC_FAIRY_A: 316
NPC_FAIRY_B: 317
@@ -2269,6 +2271,21 @@ constants_db: {
FRAG_LETTER: 64
FRAG_LADDER: 128
+ comment__: "Rossy Quest Constants"
+ ROSSY_INSTIME: 1200 // 20 minutes
+ ROSSY_QUESTST: 7 // QUEST STate
+ ROSSY_PROLOGUE: 1
+ ROSSY_CAVE1: 2
+ ROSSY_CAVE2: 4
+ ROSSY_CAVE3: 8
+ ROSSY_CAVE4: 16
+ ROSSY_CAVE5: 32
+ ROSSY_CAVE6: 64
+ ROSSY_CAVE7: 128
+ ROSSY_CAVE8: 256
+ ROSSY_CAVE9: 512
+ ROSSY_READY: 1023
+ ROSSY_BOSSCAVE: 1024
comment__: "Event Feat Constants"
EVFEAT_EASTER: 1
diff --git a/db/map_index.txt b/db/map_index.txt
index b6b0722da..dd1849fcf 100644
--- a/db/map_index.txt
+++ b/db/map_index.txt
@@ -218,201 +218,202 @@
018-6-3 218
018-7-1 219
018-7 220
-019-1-1 221
-019-1 222
-019-2 223
-019-3 224
-019-4-1 225
-019-4 226
-019-5-1 227
-019-5-2 228
-019-5-3 229
-019-5 230
-019-6 231
-020-1 232
-020-2 233
-020-3 234
-020-4 235
-020-5 236
-020-6 237
-020-7-1 238
-020-7-2 239
-020-7 240
-021-0 241
-021-1 242
-021-2 243
-021-3 244
-021-4 245
-022-1 246
-023-1 247
-023-2 248
-023-3-1 249
-023-3-2 250
-023-3 251
-023-4 252
-024-1 253
-024-10 254
-024-11 255
-024-12 256
-024-13 257
-024-14 258
-024-15 259
-024-16 260
-024-2 261
-024-3 262
-024-4 263
-024-5 264
-024-6 265
-024-7 266
-024-8 267
-024-9 268
-025-1 269
-025-2-1 270
-025-2-2 271
-025-2-3 272
-025-2-4 273
-025-2 274
-025-3 275
-025-4-1 276
-025-4 277
-026-0 278
-026-1 279
-026-2 280
-026-3 281
-026-6 282
-026-7 283
-027-0 284
-027-1 285
-027-2 286
-027-3 287
-027-4 288
-027-5 289
-027-6 290
-027-7 291
-029-0 292
-029-1 293
-029-2 294
-029-3 295
-029-4 296
-029-5 297
-029-6 298
-029-7 299
-029-8 300
-029-9 301
-030-01 302
-030-02 303
-030-03 304
-030-04 305
-030-05 306
-030-06 307
-030-07 308
-030-08 309
-030-09 310
-030-10 311
-030-11 312
-030-12 313
-030-13 314
-030-14 315
-030-15 316
-030-16 317
-030-17 318
-030-18 319
-030-19 320
-030-20 321
-030-21 322
-030-22 323
-030-23 324
-030-24 325
-030-25 326
-030-26 327
-030-27 328
-030-28 329
-030-29 330
-030-30 331
-030-31 332
-030-32 333
-030-33 334
-030-34 335
-030-35 336
-030-36 337
-030-37 338
-030-38 339
-030-39 340
-030-40 341
-030-41 342
-030-42 343
-030-43 344
-030-44 345
-030-45 346
-030-46 347
-030-47 348
-030-48 349
-030-49 350
-030-50 351
-030-51 352
-030-52 353
-030-53 354
-030-54 355
-030-55 356
-030-56 357
-030-57 358
-030-58 359
-030-59 360
-030-60 361
-030-61 362
-030-62 363
-030-63 364
-030-64 365
-030-65 366
-030-66 367
-030-67 368
-030-68 369
-030-69 370
-030-70 371
-030-71 372
-030-72 373
-030-73 374
-030-74 375
-030-75 376
-031-0 377
-031-1 378
-031-2 379
-031-3 380
-031-4 381
-031-5 382
-031-6 383
-031-7 384
-031-8 385
-031-9 386
-032-1 387
-032-2 388
-032-3 389
-032-4 390
-032-5 391
-033-1 392
-033-2 393
-033-3 394
-033-4 395
-033-5 396
-034-1 397
-034-2 398
-034-3 399
-034-4 400
-042-0 401
-042-1 402
-042-10 403
-042-11 404
-042-2 405
-042-3 406
-042-4 407
-042-5 408
-042-6 409
-042-7 410
-042-8 411
-042-9 412
-boss 413
-botcheck 414
-guilds 415
-sec_pri 416
-soren-2 417
-soren 418
+018-8 221
+019-1-1 222
+019-1 223
+019-2 224
+019-3 225
+019-4-1 226
+019-4 227
+019-5-1 228
+019-5-2 229
+019-5-3 230
+019-5 231
+019-6 232
+020-1 233
+020-2 234
+020-3 235
+020-4 236
+020-5 237
+020-6 238
+020-7-1 239
+020-7-2 240
+020-7 241
+021-0 242
+021-1 243
+021-2 244
+021-3 245
+021-4 246
+022-1 247
+023-1 248
+023-2 249
+023-3-1 250
+023-3-2 251
+023-3 252
+023-4 253
+024-1 254
+024-10 255
+024-11 256
+024-12 257
+024-13 258
+024-14 259
+024-15 260
+024-16 261
+024-2 262
+024-3 263
+024-4 264
+024-5 265
+024-6 266
+024-7 267
+024-8 268
+024-9 269
+025-1 270
+025-2-1 271
+025-2-2 272
+025-2-3 273
+025-2-4 274
+025-2 275
+025-3 276
+025-4-1 277
+025-4 278
+026-0 279
+026-1 280
+026-2 281
+026-3 282
+026-6 283
+026-7 284
+027-0 285
+027-1 286
+027-2 287
+027-3 288
+027-4 289
+027-5 290
+027-6 291
+027-7 292
+029-0 293
+029-1 294
+029-2 295
+029-3 296
+029-4 297
+029-5 298
+029-6 299
+029-7 300
+029-8 301
+029-9 302
+030-01 303
+030-02 304
+030-03 305
+030-04 306
+030-05 307
+030-06 308
+030-07 309
+030-08 310
+030-09 311
+030-10 312
+030-11 313
+030-12 314
+030-13 315
+030-14 316
+030-15 317
+030-16 318
+030-17 319
+030-18 320
+030-19 321
+030-20 322
+030-21 323
+030-22 324
+030-23 325
+030-24 326
+030-25 327
+030-26 328
+030-27 329
+030-28 330
+030-29 331
+030-30 332
+030-31 333
+030-32 334
+030-33 335
+030-34 336
+030-35 337
+030-36 338
+030-37 339
+030-38 340
+030-39 341
+030-40 342
+030-41 343
+030-42 344
+030-43 345
+030-44 346
+030-45 347
+030-46 348
+030-47 349
+030-48 350
+030-49 351
+030-50 352
+030-51 353
+030-52 354
+030-53 355
+030-54 356
+030-55 357
+030-56 358
+030-57 359
+030-58 360
+030-59 361
+030-60 362
+030-61 363
+030-62 364
+030-63 365
+030-64 366
+030-65 367
+030-66 368
+030-67 369
+030-68 370
+030-69 371
+030-70 372
+030-71 373
+030-72 374
+030-73 375
+030-74 376
+030-75 377
+031-0 378
+031-1 379
+031-2 380
+031-3 381
+031-4 382
+031-5 383
+031-6 384
+031-7 385
+031-8 386
+031-9 387
+032-1 388
+032-2 389
+032-3 390
+032-4 391
+032-5 392
+033-1 393
+033-2 394
+033-3 395
+033-4 396
+033-5 397
+034-1 398
+034-2 399
+034-3 400
+034-4 401
+042-0 402
+042-1 403
+042-10 404
+042-11 405
+042-2 406
+042-3 407
+042-4 408
+042-5 409
+042-6 410
+042-7 411
+042-8 412
+042-9 413
+boss 414
+botcheck 415
+guilds 416
+sec_pri 417
+soren-2 418
+soren 419
diff --git a/maps/re/017-1.mcache b/maps/re/017-1.mcache
index d23edaa69..efd4ba647 100644
--- a/maps/re/017-1.mcache
+++ b/maps/re/017-1.mcache
Binary files differ
diff --git a/maps/re/017-2-1.mcache b/maps/re/017-2-1.mcache
index f75ff33d2..1078e2706 100644
--- a/maps/re/017-2-1.mcache
+++ b/maps/re/017-2-1.mcache
Binary files differ
diff --git a/maps/re/018-8.mcache b/maps/re/018-8.mcache
new file mode 100644
index 000000000..1dfb2b2b5
--- /dev/null
+++ b/maps/re/018-8.mcache
Binary files differ
diff --git a/npc/00000SAVE/katze.txt b/npc/00000SAVE/katze.txt
deleted file mode 100755
index 0647abc6a..000000000
--- a/npc/00000SAVE/katze.txt
+++ /dev/null
@@ -1,185 +0,0 @@
-
-015-3,32,25,0 script Katze NPC172,{
- @cat = ((Katze & NIBBLE_0_MASK) >> NIBBLE_0_SHIFT);
-
- if (@cat == 1 && @catNeedsAlone == 0) goto L_NeedsFood;
- if (@cat == 1) goto L_NeedsFood;
- if (@cat == 2 && @catNeedsAlone == 0) goto L_NeedsFur;
- if (@cat == 2) goto L_NeedsFur;
- if (@cat == 3) goto L_NeedsWood;
- if (@cat == 4 && @catNeedsAlone == 0) goto L_NeedsStuff;
- if (@cat == 4) goto L_PreNeedsStuff;
- if (@cat == 5) goto L_NeedsStuff2;
- if (@cat == 6 && @catNeedsAlone == 0) goto L_GainEars;
- if (@cat == 6) goto L_PreGainEars;
- if (@cat == 7) goto L_Finished;
- goto L_NeedsMilk;
-
-L_NeedsMilk:
- mes "[Katze]";
- mes "\"Meow.\"";
- next;
- menu "Throw a stone at the cat.", L_ThrowStone,
- "Leave the cat alone.", L_close;
-
-L_ThrowStone:
- @cat = 0;
- callsub S_Update_Katze;
- heal ((MaxHp/100) * -30), 0;
- warp "015-1", 60, 32;
- mes "\"GRAAUWL! Hissss...\"";
- mes "Yikes, the cat attacked you! Your whole body is scratched. Maybe throwing a stone wasn't such a great idea...";
- goto L_close;
-
-L_NeedsFood:
- mes "[Katze]";
- mes "\"Meow, prrrr...\"";
- next;
- menu
- "Throw a stone at the cat.", L_ThrowStone,
- "Leave the cat alone.", L_close;
-
-L_NeedsFur:
- mes "[Katze]";
- mes "\"Prrr. Meow, prrr...\"";
- next;
- if (countitem("WhiteFur") > 0)
- menu
- "Make funny movements with the fur near the ground.", L_MoveFur,
- "Throw a stone at the cat.", L_ThrowStone,
- "Leave the cat alone.", L_close;
- if (countitem("WhiteFur") == 0)
- menu
- "Throw a stone at the cat.", L_ThrowStone,
- "Leave the cat alone.", L_close;
- goto L_close;
-
-L_MoveFur:
- delitem "WhiteFur", 1;
- @cat = 3;
- callsub S_Update_Katze;
- mes "The cat jumps at the fur! You quickly let go of it. The cat happily returns to its spot, carrying the fur in its mouth.";
- next;
- mes "The cat drops the fur and looks at you with half opened eyes. Suddenly she starts talking, and says: \"That was very kind of you.\" She seems to be smiling.";
- goto L_close;
-
-L_NeedsWood:
- mes "[Katze]";
- mes "\"Prrrr, now I'd like something to sharpen my claws on.\"";
- next;
-
- if (countitem("RawLog") > 0)
- menu
- "Want this piece of wood?", L_GiveWood,
- "Ok, see you later.", L_close;
- goto L_close;
-
-L_GiveWood:
- mes "[Katze]";
- mes "\"Sure! Please put it next to the pot.\"";
- goto L_close;
-
-L_PreNeedsStuff:
- mes "The cat is still eyeing the piece of wood. She probably needs to be left alone for a bit again.";
- goto L_close;
-
-L_NeedsStuff:
- @cat = 5;
- callsub S_Update_Katze;
- mes "[Katze]";
- mes "\"You've been really kind to me. I can make you something nice, but I will need";
- mes "2 Snake Skins,";
- mes "2 Snake Tongues,";
- mes "2 Maggot Slimes,";
- mes "2 White Furs,";
- mes "2 Hard Spikes and";
- mes "2 Tiny Healing Potions.\"";
- goto L_close;
-
-L_NeedsStuff2:
- mes "[Katze]";
- mes "\"Did you bring what I asked you for?\"";
- next;
- menu
- "Look here.", L_CatChecksStuff,
- "What do you need again?", L_WhatsNeeded,
- "No, I haven't got everything yet.", L_close;
-
-L_WhatsNeeded:
- mes "[Katze]";
- mes "\"Actually, you should have remembered yourself.\"";
- next;
- menu
- "Please tell me.", L_Please,
- "Never mind.", L_close;
-
-L_Please:
- mes "[Katze]";
- mes "\"Alright... [the cat glares at you] it was";
- mes "2 Snake Skins,";
- mes "2 Snake Tongues,";
- mes "2 Maggot Slimes,";
- mes "2 White Furs,";
- mes "2 Hard Spikes and";
- mes "2 Tiny Healing Potions.\"";
- goto L_close;
-
-L_CatChecksStuff:
- if (countitem("SnakeSkin") > 1
- && countitem("SnakeTongue") > 1
- && countitem("MaggotSlime") > 1
- && countitem("WhiteFur") > 1
- && countitem("HardSpike") > 1
- && countitem("TinyHealingPotion") > 1)
- goto L_GiveStuff;
- mes "[Katze]";
- mes "\"You don't seem to have everything yet. Come back later when you do.\"";
- goto L_close;
-
-L_GiveStuff:
- delitem "SnakeSkin", 2;
- delitem "SnakeTongue", 2;
- delitem "MaggotSlime", 2;
- delitem "WhiteFur", 2;
- delitem "HardSpike", 2;
- delitem "TinyHealingPotion", 2;
- @cat = 6;
- callsub S_Update_Katze;
- @catNeedsAlone = 1;
- mes "[Katze]";
- mes "\"Nicely done! Now leave me alone for a while, I need some time to prepare your present.\"";
- goto L_close;
-
-L_PreGainEars:
- mes "[Katze]";
- mes "\"Please leave me alone for a while, so I can prepare your present.\"";
- goto L_close;
-
-L_GainEars:
- getitem "CatEars", 1;
- @xpval = 5000;
- getexp @xpval, 0;
- @cat = 7;
- callsub S_Update_Katze;
- mes "[Katze]";
- mes "\"Look what I made for you! It makes you look a bit like me! Maybe it will give you a feeling of what it is like to be a cat.\"";
- mes "The cat winks at you.";
- mes "[You gain " + @xpval + " experience points]";
- goto L_close;
-
-L_Finished:
- mes "[Katze]";
- if (getequipid(equip_head) == 1217) // Cat ears
- mes "\"Meow, fellow cat.\"";
- if (getequipid(equip_head) != 1217)
- mes "\"Meow. Lost your ears?\"";
- goto L_close;
-
-L_close:
- @cat = 0;
- close;
-
-S_Update_Katze:
- Katze = (Katze & ~(NIBBLE_0_MASK)) | (@cat << NIBBLE_0_SHIFT);
- return;
-}
diff --git a/npc/010-4-1/katze.txt b/npc/010-4-1/katze.txt
index 16ffde820..f7ee65e87 100644
--- a/npc/010-4-1/katze.txt
+++ b/npc/010-4-1/katze.txt
@@ -2,7 +2,7 @@
// Author:
// Jesusalva
// Description:
-// THIS IS A PLACEHOLDER
+// Katze the Cat, guardian of Katzei Village.
// Variables:
// $KATZE_DONATION = int
// CaveQuest_Katze ( state, today_contribution, date )
diff --git a/npc/017-1/inspector.txt b/npc/017-1/inspector.txt
index 54e58b6f3..fb170dbaf 100644
--- a/npc/017-1/inspector.txt
+++ b/npc/017-1/inspector.txt
@@ -9,7 +9,7 @@
017-1,77,104,0 script Anselmo NPC_ANSELMO_BR,{
.@q = getq(LoFQuest_Inspector);
// TODO: Require orange pants like originally planned?
- //if (getequipcardid(EQI_HEAD_TOP, 0) == GreenDye)
+ //if (getequipcardid(EQI_HEAD_TOP, 0) == OrangeDye)
mesn;
mesq l("Hello. My name is Anselmo and I'm investigating a recent string of robberies.");
next;
diff --git a/npc/018-8/_import.txt b/npc/018-8/_import.txt
new file mode 100644
index 000000000..b5a8570da
--- /dev/null
+++ b/npc/018-8/_import.txt
@@ -0,0 +1,5 @@
+// Map 018-8: Ritual Cave
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/018-8/_mobs.txt",
+"npc/018-8/_warps.txt",
+"npc/018-8/ctrl.c",
diff --git a/npc/018-8/_mobs.txt b/npc/018-8/_mobs.txt
new file mode 100644
index 000000000..252695554
--- /dev/null
+++ b/npc/018-8/_mobs.txt
@@ -0,0 +1,37 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-8: Ritual Cave mobs
+018-8,30,113,7,14 monster Red Mushroom 1042,5,500,2000
+018-8,102,116,14,8 monster Red Mushroom 1042,5,500,2000
+018-8,79,144,10,6 monster Red Mushroom 1042,7,500,2000
+018-8,158,87,10,12 monster Red Mushroom 1042,7,500,2000
+018-8,34,28,3,4 monster Black Slime 1178,1,35000,60000
+018-8,160,124,5,3 monster Old Snake 1199,4,35000,15000
+018-8,155,163,1,7 monster Old Snake 1199,4,35000,15000
+018-8,128,146,5,3 monster Old Snake 1199,4,35000,15000
+018-8,120,61,5,3 monster Old Snake 1199,4,35000,15000
+018-8,138,64,10,7 monster Dark Lizard 1051,10,1000,120000
+018-8,129,102,11,6 monster Dark Lizard 1051,6,1000,120000
+018-8,67,114,10,2 monster Black Scorpion 1074,3,4000,8000
+018-8,109,145,4,10 monster Black Scorpion 1074,5,4000,8000
+018-8,68,84,3,7 monster Black Scorpion 1074,4,4000,8000
+018-8,113,60,23,8 monster Red Mushroom 1042,7,500,2000
+018-8,199,68,8,9 monster Dark Lizard 1051,5,1000,60000
+018-8,160,47,17,5 monster Dark Lizard 1051,5,1000,120000
+018-8,119,200,20,4 monster Black Scorpion 1074,5,4000,8000
+018-8,34,193,11,9 monster Black Scorpion 1074,5,4000,8000
+018-8,26,115,5,17 monster Black Scorpion 1074,5,4000,8000
+018-8,82,60,21,7 monster Red Mushroom 1042,5,500,2000
+018-8,38,193,16,4 monster Red Mushroom 1042,5,500,2000
+018-8,114,199,12,3 monster Old Snake 1199,4,35000,15000
+018-8,106,30,10,7 monster Dark Lizard 1051,5,1000,120000
+018-8,78,128,11,21 monster Old Snake 1199,4,35000,15000
+018-8,117,141,35,11 monster Dark Lizard 1051,10,1000,120000
+018-8,117,101,18,11 monster Old Snake 1199,7,35000,15000
+018-8,101,27,3,4 monster Black Slime 1178,1,35000,60000
+018-8,165,28,3,4 monster Black Slime 1178,1,35000,60000
+018-8,199,67,3,4 monster Black Slime 1178,1,35000,60000
+018-8,199,109,3,4 monster Black Slime 1178,1,35000,60000
+018-8,197,194,3,4 monster Black Slime 1178,1,35000,60000
+018-8,133,199,3,4 monster Black Slime 1178,1,35000,60000
+018-8,34,194,3,4 monster Black Slime 1178,1,35000,60000
+018-8,26,111,3,4 monster Black Slime 1178,1,35000,60000
diff --git a/npc/018-8/_warps.txt b/npc/018-8/_warps.txt
new file mode 100644
index 000000000..fe47d1380
--- /dev/null
+++ b/npc/018-8/_warps.txt
@@ -0,0 +1,3 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 018-8: Ritual Cave warps
+018-8,130,113,0 warp #018-8_130_113 1,0,017-2-1,63,24
diff --git a/npc/018-8/ctrl.c b/npc/018-8/ctrl.c
new file mode 100644
index 000000000..959821c9f
--- /dev/null
+++ b/npc/018-8/ctrl.c
@@ -0,0 +1,745 @@
+// The Mana World rEvolt scripts.
+// Author:
+// Jesusalva
+// Description:
+// Core for rescuing Rossy. Integrated into Inspector Quest for ML.
+// So yes - the CHEESE kidnapped Rossy this time. Poor Rossy!
+018-8 mapflag zone MMO
+
+017-2-1,63,23,0 script #RitualCaveE NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ if (getq(LoFQuest_Inspector) < ROSSY_QUESTST && !is_sponsor()) {
+ dispbottom l("You see a \"DO NOT TRESPASS\" sign. For a short moment you consider ignoring it, but you notice an odd eye-shaped device next to it, so you reconsider.");
+ } else if (getq(LoFQuest_Inspector) == ROSSY_QUESTST) {
+ // LoFQuest_Inspector
+ // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL)
+ .@inst=getq3(LoFQuest_Inspector);
+ .@mapn$="ross@"+getcharid(0);
+ if (isinstance(.@inst) && instanceowner(.@inst) == getcharid(3))
+ {
+ // Reset instance duration
+ //instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst);
+ // FIXME: Clean unkilled monsters
+ } else {
+ .@inst = instance_create("ROSSY "+getcharid(0), getcharid(3), IOT_CHAR);
+ instance_attachmap("018-8", .@inst, false, .@mapn$);
+ // Instance lasts 20 minutes
+ instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst);
+ instance_init(.@inst);
+ setq3 LoFQuest_Inspector, .@inst;
+ // Reset quest progress
+ setq2 LoFQuest_Inspector, 0;
+ @rossylock=false;
+ }
+ // Warp to instanced map
+ warp .@mapn$, 129, 112;
+ } else {
+ warp "018-8", 130, 112;
+ }
+ end;
+}
+
+018-8,129,94,0 script Clauquer NPC_CAUL,{
+ function clauquerPrologue;
+
+ // LoFQuest_Inspector
+ // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL)
+ .@q=getq(LoFQuest_Inspector);
+ .@q2=getq2(LoFQuest_Inspector);
+ .@inst=getq3(LoFQuest_Inspector);
+
+ // Instance zero is reserved
+ if (instance_id() <= 0 || .@q != ROSSY_QUESTST) {
+ mesn;
+ mesq l("Huh? Why are you here? Get out.");
+ close;
+ }
+ mesn;
+ mesq l("Hello stranger, are you lost?");
+ if (.@q < ROSSY_QUESTST)
+ close;
+ if (!.@q2) {
+ clauquerPrologue();
+ close;
+ }
+ next;
+ .@caves=bitmask_count(.@q2)-1;
+ mesn;
+ if (.@q2 > ROSSY_BOSSCAVE || .@q > ROSSY_QUESTST)
+ .@msg$=l("Good job rescuing the little girl!");
+ else if (.@q2 == ROSSY_READY)
+ .@msg$=l("I am amazed... You eliminated all the 9 energy sources. Now is the difficult part. To save the girl, you need to eliminate the last and most powerful barrier. Good Luck!");
+ else if (.@q2 <= ROSSY_PROLOGUE)
+ .@msg$=l("Well... You didn't eliminate any of the barriers, so that means there are still 9 caves and the tenth one, the strongest...");
+ else
+ .@msg$=l("You are doing good... If I am right, you already eliminated %d of the 9 energy sources of the barrier that protects the cave in which the girl is being kept captive.", .@caves);
+
+ mesq .@msg$;
+ if (.@q == 16 && .@caves < ROSSY_BOSSCAVE) {
+ next;
+ select
+ l("Thanks."),
+ l("But please, I really need your help!");
+ mes "";
+ if (@menu == 2) {
+ mesn;
+ mesq l("Well, I already told you what I knew, but repeating never hurts, I guess. So, to nullify the barrier.");
+ next;
+ clauquerPrologue();
+ }
+ }
+ close;
+
+function clauquerPrologue {
+ // LoFQuest_Inspector
+ // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL)
+ .@q=getq(LoFQuest_Inspector);
+ .@q2=getq2(LoFQuest_Inspector);
+ .@inst=getq3(LoFQuest_Inspector);
+
+ // Prologue
+ if (!(.@q2 & ROSSY_PROLOGUE)) {
+ next;
+ mesn;
+ mesq l("Don't answer— I know you are looking for someone... A little girl, is that right?");
+ next;
+ select
+ l("I must admit you're right, but how come you..."),
+ l("I'm not lost and I don't need help, bye.");
+ mes "";
+ if (@menu == 2)
+ return;
+ mesn;
+ mesq l("How do I know you're looking for her? Well, because I am a very good observer. I know you were helping her family. Besides, I saw the little girl. I also heard her. She screamed, and probably still screams like hell. Moreover, I don't think you would enter these caves just for fun!");
+ next;
+ select l("Of course not.");
+ mes "";
+ mesn;
+ mesq l("I can see that you really want to save the little girl. She is trapped in a place inside one of these caves, protected by a magic barrier created by a fey spirit. To save her, you have to annulate the energy sources of this barrier. They are located in 10 different spots, each one in a different cave.");
+ next;
+ select l("But how can I annulate this barrier?");
+ mes "";
+ }
+ // Common
+ mesn;
+ mesq l("It is simple, you just have to place a %s on the exact center of the energy source. Once you do this, its entire power will transmute into some terrible earth monsters. If you defeat them, this source of energy will be close to nothing and the barrier will be weaker.", getitemlink(PileOfAsh));
+ next;
+ mesn;
+ mesq l("If my observations are correct, the girl is trapped in a cave protected by a barrier fed by 9 different power sources. And inside this cave there is another barrier, fed by a single, but very strong, power source. The girl is inside that cave, protected by that strong barrier.");
+ next;
+ mesn;
+ mesq l("Be prepared before you enter one of these caves, because once you put the root in the power source, you won't be able to get out. Also, remember that you can't stay in these caves for a long time, because of the foul air.");
+ mesc l("If you take more than %d minutes between a boss fight and other, you'll faint and the quest will reset!!", 20), 1;
+ next;
+ // Prologue (FIXME)
+ if (!(.@q2 & ROSSY_PROLOGUE)) {
+ mesn;
+ mesq l("Now I should tell you more about how that little girl got into that cave and warn you about what you are going to face there...");
+ next;
+ select l("Please go on.");
+ mes "";
+ mesn;
+ mesq l("I advise you to be mentally prepared for this rescue operation. You'll be fighting a selection of monsters in these caves with mixed elements.");
+ next;
+ mesn;
+ mesq l("Also, the old tales of Hurnscald say that a Golem inhabits these caves and smashes anyone who enters here ill prepared; but it can be tamed and made into subservience by a sacrifice. And I saw the girl heading to said room...");
+ next;
+ mesn;
+ mesq l("However, hope is not yet lost. If you were to, say, defeat the Golem before it is fully awakened, the girl would be saved... Time, however, is not on your favor and is of essence. And I am no fighter, so I cannot help you.");
+ next;
+ }
+ mesn;
+ mesq l("Oh, and if you really plan to rescue the girl, I advise you to use potions for every single battle. I'm thinking of Concentration and Iron Potions. You might want to take some food with you too. I would personally take some water, I'm always thirsty. Don't be afraid to bring too much with you, these battles take time to end.");
+ next;
+ mesn;
+ mesq l("I think you're now ready to explore these caves and fight. Good luck rescuing the girl!");
+
+ // Renew the timer the first time you see the prologue
+ if (!.@q2) {
+ instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst);
+ addtimer2(300000, "#RossyQuest::OnTick1");
+ deltimer("#RossyQuest::OnTick2");
+ deltimer("#RossyQuest::OnTick3");
+ deltimer("#RossyQuest::OnTick4");
+ deltimer("#RossyQuest::OnTick5");
+ }
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_PROLOGUE;
+ return;
+}
+
+OnInit:
+ .distance = 4;
+ end;
+}
+018-8,92,89,0 script Summoning Altar#Rossy NPC_NO_SPRITE,{
+ .@q2=getq2(LoFQuest_Inspector);
+ // Not ready
+ if (.@q2 < ROSSY_READY) {
+ mesn;
+ mesq l("Better not touch this.");
+ close;
+ }
+ // Complete
+ if (.@q2 & ROSSY_BOSSCAVE) {
+ dispbottom l("You find someone hiding behind the altar.");
+ enablenpc instance_npcname("Rossy");
+ disablenpc instance_npcname("Summoning Altar#Rossy");
+ end;
+ }
+ // Battle
+ mesc l("This is the boss room! Be prepared for the worst!!"), 1;
+ callfunc("RossyCave", ROSSY_BOSSCAVE);
+ close;
+
+OnInit:
+ .distance = 4;
+ end;
+
+// Time to configure the map
+// Note: Should we add Bifs and Shadow Herbs? Or no need?
+OnInstanceInit:
+ .@m$=instance_mapname("018-8");
+ // Rebuild spawns
+ // WARNING: Originals were generated automatically!
+ // print('\tareamonster(.@m$, %d, %d, %d, %d, strmobinfo(1, %s), %s, %d);' % (obj.x, obj.y, obj.x+obj.w, obj.y+obj.h, obj.name.replace(' ', ''), obj.name.replace(' ', ''), obj.max_beings))
+ areamonster(.@m$, 30, 113, 37, 127, strmobinfo(1, RedMushroom), RedMushroom, 5);
+ areamonster(.@m$, 102, 116, 116, 124, strmobinfo(1, RedMushroom), RedMushroom, 5);
+ areamonster(.@m$, 79, 144, 89, 150, strmobinfo(1, RedMushroom), RedMushroom, 7);
+ areamonster(.@m$, 158, 87, 168, 99, strmobinfo(1, RedMushroom), RedMushroom, 7);
+ areamonster(.@m$, 34, 28, 37, 32, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 160, 124, 165, 127, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 155, 163, 156, 170, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 128, 146, 133, 149, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 120, 61, 125, 64, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 138, 64, 148, 71, strmobinfo(1, DarkLizard), DarkLizard, 10);
+ areamonster(.@m$, 129, 102, 140, 108, strmobinfo(1, DarkLizard), DarkLizard, 6);
+ areamonster(.@m$, 67, 114, 77, 116, strmobinfo(1, BlackScorpion), BlackScorpion, 3);
+ areamonster(.@m$, 109, 145, 113, 155, strmobinfo(1, BlackScorpion), BlackScorpion, 5);
+ areamonster(.@m$, 68, 84, 71, 91, strmobinfo(1, BlackScorpion), BlackScorpion, 4);
+ areamonster(.@m$, 113, 60, 136, 68, strmobinfo(1, RedMushroom), RedMushroom, 7);
+ areamonster(.@m$, 199, 68, 207, 77, strmobinfo(1, DarkLizard), DarkLizard, 5);
+ areamonster(.@m$, 160, 47, 177, 52, strmobinfo(1, DarkLizard), DarkLizard, 5);
+ areamonster(.@m$, 119, 200, 139, 204, strmobinfo(1, BlackScorpion), BlackScorpion, 5);
+ areamonster(.@m$, 34, 193, 45, 202, strmobinfo(1, BlackScorpion), BlackScorpion, 5);
+ areamonster(.@m$, 26, 115, 31, 132, strmobinfo(1, BlackScorpion), BlackScorpion, 5);
+ areamonster(.@m$, 82, 60, 103, 67, strmobinfo(1, RedMushroom), RedMushroom, 5);
+ areamonster(.@m$, 38, 193, 54, 197, strmobinfo(1, RedMushroom), RedMushroom, 5);
+ areamonster(.@m$, 114, 199, 126, 202, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 106, 30, 116, 37, strmobinfo(1, DarkLizard), DarkLizard, 5);
+ areamonster(.@m$, 78, 128, 89, 149, strmobinfo(1, OldSnake), OldSnake, 4);
+ areamonster(.@m$, 117, 141, 152, 152, strmobinfo(1, DarkLizard), DarkLizard, 10);
+ areamonster(.@m$, 117, 101, 135, 112, strmobinfo(1, OldSnake), OldSnake, 7);
+ /*
+ areamonster(.@m$, 101, 27, 104, 31, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 165, 28, 168, 32, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 199, 67, 202, 71, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 199, 109, 202, 113, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 197, 194, 200, 198, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 133, 199, 136, 203, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 34, 194, 37, 198, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ areamonster(.@m$, 26, 111, 29, 115, strmobinfo(1, BlackSlime), BlackSlime, 1);
+ */
+
+ // Yay yay yay
+ end;
+}
+
+/////////////////////////////////////////////////////////
+// Main script controller for Rossy Quest
+- script #RossyQuest NPC_HIDDEN,{
+ end;
+
+OnStage2:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage2")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE1;
+ goto OnBeat;
+
+OnStage4:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage4")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE2;
+ goto OnBeat;
+
+OnStage8:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage8")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE3;
+ goto OnBeat;
+
+OnStage16:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage16")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE4;
+ goto OnBeat;
+
+OnStage32:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage32")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE5;
+ goto OnBeat;
+
+OnStage64:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage64")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE6;
+ goto OnBeat;
+
+OnStage128:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage128")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE7;
+ goto OnBeat;
+
+OnStage256:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage256")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE8;
+ goto OnBeat;
+
+OnStage512:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage512")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_CAVE9;
+ goto OnBeat;
+
+OnStage1024:
+ if (!playerattached()) end; // ERROR
+ if (!@rossylock) end; // Invalid
+ if (mobcount(getmap(), "#RossyQuest::OnStage1024")) end; // Still working
+ .@q2=getq2(LoFQuest_Inspector);
+ setq2 LoFQuest_Inspector, .@q2 | ROSSY_BOSSCAVE;
+ goto OnBeat;
+
+OnBeat:
+ @rossylock = false;
+ dispbottom l("*** Cave Cleared ***");
+ delcells "Rossy"+getcharid(0)+"Wall";
+ .@inst = getq3(LoFQuest_Inspector);
+ instance_set_timeout(ROSSY_INSTIME, ROSSY_INSTIME, .@inst);
+ if (.@q2 < ROSSY_BOSSCAVE)
+ addtimer2(300000, "#RossyQuest::OnTick1");
+ else
+ deltimer("#RossyQuest::OnTick1");
+ deltimer("#RossyQuest::OnTick2");
+ deltimer("#RossyQuest::OnTick3");
+ deltimer("#RossyQuest::OnTick4");
+ deltimer("#RossyQuest::OnTick5");
+ end;
+
+/* ****************************************** */
+OnTick1:
+ dispbottom l("Time remaining: %d minutes", 15);
+ addtimer2(300000, "#RossyQuest::OnTick2");
+ end;
+
+OnTick2:
+ dispbottom l("Time remaining: %d minutes", 10);
+ addtimer2(300000, "#RossyQuest::OnTick3");
+ end;
+
+OnTick3:
+ dispbottom l("Time remaining: %d minutes", 5);
+ addtimer2(240000, "#RossyQuest::OnTick4");
+ end;
+
+OnTick4:
+ dispbottom l("Time remaining: 1 minute");
+ addtimer2(45000, "#RossyQuest::OnTick5");
+ end;
+
+OnTick5:
+ dispbottom l("Time remaining: %d seconds!", 15);
+ end;
+
+}
+
+/////////////////////////////////////////////////////////
+// RossyCave(Cave ID)
+function script RossyCave {
+ // Fight ongoing - cannot trigger
+ if (@rossylock)
+ return false;
+
+ // Check quest consistency
+ // LoFQuest_Inspector
+ // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL)
+ .@q=getq(LoFQuest_Inspector);
+ .@q2=getq2(LoFQuest_Inspector);
+ .@inst=getq3(LoFQuest_Inspector);
+
+ if (instance_id() != .@inst)
+ return false;
+ if (.@q != ROSSY_QUESTST)
+ return false;
+ if (!.@q2) {
+ dispbottom l("This looks DANGEROUS! Maybe someone around here can tell me what I'm supposed to do.");
+ return false;
+ }
+ if (.@q2 & .caveid)
+ return false;
+
+ // ---------------
+ // Main node setup
+ .@c=getarg(0);
+ .@m$=getmap();
+ .@n$="#RossyQuest::OnStage"+.@c;
+
+ // Obtain and Write Configuration
+ switch (.@c) {
+ case ROSSY_CAVE1:
+ .@boss=BlueSlimeMother;
+ .@mobc=rand2(3,5);
+ .@x1=85;.@y1=21;.@x2=108;.@y2=39;
+ .@x3=109;.@y3=33; .@x4=109; .@y4=36;
+ break;
+ case ROSSY_CAVE2:
+ .@boss=Troll;
+ .@mobc=rand2(3,5);
+ .@x1=191;.@y1=103;.@x2=205;.@y2=122;
+ .@x3=201;.@y3=123; .@x4=201; .@y4=123;
+ break;
+ case ROSSY_CAVE3:
+ .@boss=MurdererScorpion;
+ .@mobc=rand2(2,4);
+ .@x1=26;.@y1=23;.@x2=43;.@y2=36;
+ .@x3=38;.@y3=37; .@x4=38; .@y4=37;
+ break;
+ case ROSSY_CAVE4:
+ .@boss=YellowSlimeMother;
+ .@mobc=rand2(6,12);
+ .@x1=180;.@y1=176;.@x2=206;.@y2=207;
+ .@x3=179;.@y3=200; .@x4=179; .@y4=200;
+ break;
+ case ROSSY_CAVE5:
+ .@boss=FireSkull;
+ .@mobc=rand2(6,8);
+ .@x1=98;.@y1=188;.@x2=141;.@y2=207;
+ .@x3=97;.@y3=190; .@x4=97; .@y4=197;
+ break;
+ case ROSSY_CAVE6:
+ .@boss=FireFairy;
+ .@mobc=rand2(5,7);
+ .@x1=19;.@y1=98;.@x2=36;.@y2=136;
+ .@x3=37;.@y3=125; .@x4=37; .@y4=125;
+ break;
+ case ROSSY_CAVE7:
+ .@boss=DustRifle;
+ .@mobc=rand2(5,7);
+ .@x1=22;.@y1=181;.@x2=50;.@y2=205;
+ .@x3=51;.@y3=192; .@x4=51; .@y4=197;
+ break;
+ case ROSSY_CAVE8:
+ .@boss=HoodedNinja;
+ .@mobc=rand2(3,5);
+ .@x1=158;.@y1=20;.@x2=176;.@y2=35;
+ .@x3=175;.@y3=36; .@x4=177; .@y4=36;
+ break;
+ case ROSSY_CAVE9:
+ .@boss=GreenSlimeMother;
+ .@mobc=rand2(5,7);
+ .@x1=187;.@y1=58;.@x2=208;.@y2=85;
+ .@x3=186;.@y3=82; .@x4=186; .@y4=85;
+ break;
+ case ROSSY_BOSSCAVE:
+ .@boss=RedSlimeMother;
+ .@mobc=rand2(3,5);
+ .@x1=84;.@y1=85;.@x2=101;.@y2=101;
+ .@x3=92;.@y3=102; .@x4=93; .@y4=102;
+ break;
+ default:
+ consolemes(CONSOLEMES_ERROR, "INVALID ROSSY CAVE ID - "+.@c+" - SCRIPT ABORTED");
+ return false;
+ }
+
+ // This is cast from a dialog so prompt comes before any advanced calculation
+ mesc l("Drop a %s here to summon monsters.", getitemlink(PileOfAsh));
+ if (.@c == ROSSY_BOSSCAVE)
+ mesc l("This is the master's room seal, be careful!"), 1;
+ else
+ mesc l("Weaken all nine seals to be able to undo the final one.");
+ select
+ rif(countitem(PileOfAsh), l("Place pile of ashes")),
+ l("Run away in fear");
+ mes "";
+ closeclientdialog;
+ if (@menu == 2)
+ return false;
+
+ // Delete the item and lock for the quest
+ delitem PileOfAsh, 1;
+ @rossylock = true;
+
+ // Spawn underlings
+ for (.@i=0; .@i < .@mobc; .@i++) {
+ // FIXME: Penguin? Mister Prickel? Ice Goblin? Wolvern?
+ // I think all those four could be removed.
+ .@mobId=any(GreenSlime, BlueSlime, YellowSlime, LavaSlime, SeaSlime, RedMushroom, AngryYellowSlime, Snake, BlackSlime); // Mobs lv 26~40
+ .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@n$);
+ // Make it aggresive
+ .@bmod=getunitdata(.@mob, UDT_MODE);
+ setunitdata(.@mob, UDT_MODE, .@bmod|4); // 4 = MD_AGGRESSIVE
+ }
+
+ // Spawn boss
+ .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@boss), .@boss, 1, .@n$);
+
+ // Obain boss basic status...
+ .@bhp= getunitdata(.@mob, UDT_MAXHP);
+ .@bat1=getunitdata(.@mob, UDT_ATKMIN);
+ .@bat2=getunitdata(.@mob, UDT_ATKMAX);
+ .@bhit=getunitdata(.@mob, UDT_HIT);
+ .@bmod=getunitdata(.@mob, UDT_MODE);
+ .@bmod=.@bmod|4; // 4 = MD_AGGRESSIVE
+
+ // ...And Tweak Battle Status
+ setunitdata(.@mob, UDT_MAXHP, .@bhp*15/10);
+ setunitdata(.@mob, UDT_HP, .@bhp*15/10);
+ setunitdata(.@mob, UDT_ATKMIN, .@bat1*7/10);
+ setunitdata(.@mob, UDT_ATKMAX, .@bat2*7/10);
+ setunitdata(.@mob, UDT_HIT, .@bhit*2);
+ setunitdata(.@mob, UDT_MODE, .@bmod|32); // 32 = MD_BOSS
+
+ // Build the wall so you cannot leave :>
+ setcells getmap(), .@x3, .@y3, .@x4, .@y4, 3, "Rossy"+getcharid(0)+"Wall";
+ return true;
+}
+
+/////////////////////////////////////////////////////////
+// Position the triggers
+
+// Begin Cave Code
+018-8,98,27,0 script #RossyCave01 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave01";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE1;
+ end;
+}
+
+// Begin Cave Code
+018-8,199,109,0 script #RossyCave02 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave02";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE2;
+ end;
+}
+
+// Begin Cave Code
+018-8,35,26,0 script #RossyCave03 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave03";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE3;
+ end;
+}
+
+// Begin Cave Code
+018-8,198,193,0 script #RossyCave04 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave04";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE4;
+ end;
+}
+
+// Begin Cave Code
+018-8,133,200,0 script #RossyCave05 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave05";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE5;
+ end;
+}
+
+// Begin Cave Code
+018-8,27,104,0 script #RossyCave06 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave06";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE6;
+ end;
+}
+
+// Begin Cave Code
+018-8,31,192,0 script #RossyCave07 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave07";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE7;
+ end;
+}
+
+// Begin Cave Code
+018-8,165,26,0 script #RossyCave08 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave08";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE8;
+ end;
+}
+
+// Begin Cave Code
+018-8,201,69,0 script #RossyCave09 NPC_SUMMONING_CIRC,{
+ if (RossyCave(.caveid))
+ disablenpc instance_npcname(.name$);
+ close;
+
+OnInit:
+ disablenpc "#RossyCave09";
+OnInstanceInit:
+ .distance=1;
+ .caveid=ROSSY_CAVE9;
+ end;
+}
+
+// --------------------------------------------------------------------
+018-8,92,90,0 script Rossy NPC_ANGELA2,{
+ // Check quest consistency
+ // LoFQuest_Inspector
+ // (MAIN QUEST, CAVE CONTROL, INSTANCE CONTROL)
+ .@q=getq(LoFQuest_Inspector);
+ .@q2=getq2(LoFQuest_Inspector);
+ .@inst=getq3(LoFQuest_Inspector);
+
+ if (instance_id() != .@inst)
+ end;
+ if (!.@q2)
+ end;
+
+ // A bug!
+ if (.@q != ROSSY_QUESTST) {
+ disablenpc instance_npcname("Rossy", .@inst);
+ end;
+ }
+
+ // Another bug!!
+ if (!(.@q2 & ROSSY_BOSSCAVE)) {
+ disablenpc instance_npcname("Rossy", .@inst);
+ end;
+ }
+
+ // Prepare rewards
+ .@rune=Emerald;
+ .@gems=Ruby;
+ inventoryplace .@rune, 1, .@gems, 1;
+
+ // Run epilogue
+ mesn;
+ mesq l("I heard some battle noises a few minutes ago. Are you here to save me?");
+ next;
+ select
+ l("Of course I'm here to save you, Rossy sent me here!");
+ mes "";
+ mesn;
+ mesc l("Rossy starts scavenging the fallen Golem.");
+ mesq l("Mommy teached me about precious gemstones. This Golem has quite a few of them.");
+ next;
+ mesn;
+ mesq l("Here you go!");
+ getitem .@gems, 1;
+ getitem .@rune, 1;
+ getexp 1, 1;
+ setq LoFQuest_Inspector, 17, 0, .@inst;
+ next;
+ mesn;
+ mesq l("Thanks for helping me... I'll be on my way now.");
+ next;
+ select
+ l("Go safely!"),
+ l("Do you need an escort?"),
+ l("What was following you, anyway?");
+ mes "";
+ if (@menu == 2) {
+ mesn;
+ mesq l("I'll be fine, but thanks for the concern.");
+ } else if (@menu == 3) {
+ // This opens path for additional questline
+ mesn;
+ mesq l("Actually... I don't remember. I'm not sure why.");
+ next;
+ mesn;
+ mesq l("But it was big and scary! I haven't seen it since I entered this cave, though...");
+ next;
+ mesn;
+ mesq l("It probably went away after seeing your bravure, tee-hee!");
+ next;
+ mesn;
+ mesq l("I must go now. I've already spent too much time here already.");
+ }
+ disablenpc instance_npcname("Rossy", .@inst);
+ close;
+
+OnInit:
+ disablenpc "Rossy";
+ .distance=4;
+ end;
+
+OnInstanceInit:
+ disablenpc instance_npcname("Rossy");
+ .distance=4;
+ end;
+}
+
+
diff --git a/npc/026-4/ctrl.c b/npc/026-4/ctrl.c
index 2d791b441..99cc0e09e 100644
--- a/npc/026-4/ctrl.c
+++ b/npc/026-4/ctrl.c
@@ -22,16 +22,18 @@ OnInit:
.InstId = CreateMaze(IOT_NONE, MAZE_SIZE_X, "026-4");
instance_set_timeout(0, 0, .InstId);
instance_init(.InstId);
- debugmes "Impregnable Fortress B4F (%d): Init OK", .InstId;
+ debugmes "Impregnable Fortress B4F (%d): Init OK at %d", .InstId, gettimetick(0);
setmapflag("026-4", mf_zone, "SuperMMO");
goto OnMon2359;
OnMon2359:
if (!.InstId) end;
// Reload .InstId (weekly takeover)
+ debugmes "Reloading B4F... %d", gettimetick(0);
killmonsterall("026-4");
MazeMobs(145, false, 8, "026-4"); // Initiate Lv 145 mobs
MazeMobs(115, false, 21, "026-4"); // Initiate Lv 115 mobs
+ debugmes "Reloaded B4F, %d", gettimetick(0);
// Move NPCs around
goto OnClock1843;
diff --git a/npc/026-5/ctrl.c b/npc/026-5/ctrl.c
index 53445f9d8..b6af6eed5 100644
--- a/npc/026-5/ctrl.c
+++ b/npc/026-5/ctrl.c
@@ -17,8 +17,11 @@
OnMon2358:
if (!.InstId) end;
// TODO: Reload .InstId
+ // Check if this is causing time leak
+ debugmes "Reloading B5F... %d", gettimetick(0);
killmonsterall("026-5");
MazeMobs(145, false, 7, "026-5"); // Initiate Lv 145 mobs
+ debugmes "Reloaded B5F, %d", gettimetick(0);
end;
// Initialize the dungeon
diff --git a/npc/_import.txt b/npc/_import.txt
index c1af6d172..5bcbdccaf 100644
--- a/npc/_import.txt
+++ b/npc/_import.txt
@@ -220,6 +220,7 @@
@include "npc/018-6-3/_import.txt"
@include "npc/018-7-1/_import.txt"
@include "npc/018-7/_import.txt"
+@include "npc/018-8/_import.txt"
@include "npc/019-1-1/_import.txt"
@include "npc/019-1/_import.txt"
@include "npc/019-2/_import.txt"
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 399d6ed97..74d817a83 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -275,6 +275,20 @@ function script HUB_Logout {
if (PC_DIE_COUNTER <= 1 && .@dead) {
dispbottom l("Dying outside a town square will cause EXP loss.");
}
+ // Died or logged out at Ritual Cave
+ if (getq(LoFQuest_Inspector) == ROSSY_QUESTST) {
+ if (@rossylock)
+ delcells("Rossy"+getcharid(0)+"Wall");
+ @rossylock=false;
+ setq2 LoFQuest_Inspector, 0;
+ if (.@dead) {
+ deltimer("#RossyQuest::OnTick1");
+ deltimer("#RossyQuest::OnTick2");
+ deltimer("#RossyQuest::OnTick3");
+ deltimer("#RossyQuest::OnTick4");
+ deltimer("#RossyQuest::OnTick5");
+ }
+ }
// If you were travelling and died/logged out, cleaning is needed
if (@timer_navio_running) {
@timer_navio_running=0;