summaryrefslogtreecommitdiff
path: root/npc/014-4
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
committerJesusaves <cpntb1@ymail.com>2022-10-23 21:44:22 -0300
commita7c45a192268da2601cef47a4cdba987ae2327ca (patch)
treec5fb5b97db109fe7106496dd96498c475881046b /npc/014-4
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/014-4')
-rw-r--r--npc/014-4/_import.txt8
-rw-r--r--npc/014-4/_mobs.txt8
-rw-r--r--npc/014-4/_warps.txt4
-rw-r--r--npc/014-4/kamelot.txt284
-rw-r--r--npc/014-4/mapflags.txt4
-rw-r--r--npc/014-4/slide.txt27
-rw-r--r--npc/014-4/thorn.txt141
7 files changed, 476 insertions, 0 deletions
diff --git a/npc/014-4/_import.txt b/npc/014-4/_import.txt
new file mode 100644
index 0000000..56c0bfb
--- /dev/null
+++ b/npc/014-4/_import.txt
@@ -0,0 +1,8 @@
+// Map 014-4: Thunderhill
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/014-4/_mobs.txt",
+"npc/014-4/_warps.txt",
+"npc/014-4/kamelot.txt",
+"npc/014-4/mapflags.txt",
+"npc/014-4/slide.txt",
+"npc/014-4/thorn.txt",
diff --git a/npc/014-4/_mobs.txt b/npc/014-4/_mobs.txt
new file mode 100644
index 0000000..4f3abd8
--- /dev/null
+++ b/npc/014-4/_mobs.txt
@@ -0,0 +1,8 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-4: Thunderhill mobs
+014-4,134,85,26,22 monster Centaur 1139,3,90000,80000
+014-4,61,38,43,23 monster Mana Piou 1155,7,25000,5000
+014-4,130,68,24,52 monster Forest Mushroom 1060,10,60000,45000
+014-4,70,77,53,13 monster Living Potato 1181,5,60000,45000
+014-4,20,26,4,20 monster Bluepar 1177,4,30000,30000
+014-4,83,65,44,36 monster Red Butterfly 1025,30,60000,45000
diff --git a/npc/014-4/_warps.txt b/npc/014-4/_warps.txt
new file mode 100644
index 0000000..901a638
--- /dev/null
+++ b/npc/014-4/_warps.txt
@@ -0,0 +1,4 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 014-4: Thunderhill warps
+014-4,95,32,0 warp #014-4_95_32 0,0,017-1,104,102
+014-4,159,69,0 warp #014-4_159_69 0,3,014-3,30,69
diff --git a/npc/014-4/kamelot.txt b/npc/014-4/kamelot.txt
new file mode 100644
index 0000000..04c80a2
--- /dev/null
+++ b/npc/014-4/kamelot.txt
@@ -0,0 +1,284 @@
+// TMW 2 Script
+// Author:
+// Jesusalva
+// Micksha
+// Description:
+// This NPC is a work on progress. It measures all players equal.
+// Controls the weekly guild dungeon feature.
+// Variable structure:
+
+// $@KAMELOT_ID [ guild_id ] = instance id
+// $@KAMELOT_WAVE [ guild_id ] = contains a temporary control value
+// $KAMELOT_MX [ guild_id ] = player average level - difficulty record
+// $KAMELOT_PC [ guild_id ] = total members in guild
+// $KAMELOT_QUEST [ guild_id ] = quest status (bitmask)
+ // 0 - Not started
+ // 1 - Quest Assigned by Arthur (new players cannot enter anymore)
+ // 2 - Guinevere dialog clear
+ // 4 - Weapon Room cutscene seen
+ // 8 - Magic Seal 01 Broken
+ // 16 - Magic Seal 02 Broken
+ // 32 - Door opened
+ // 64 - Boss defeated
+ // 128 - Guild Reward Claimed
+// $KAMELOT_KEYMASK [ guild_id ] = (bitmask) Keys and Lockpicks
+ // 1 - Treasure A (Boss Room key)
+ // 2 - Treasure B
+ // 4 - Treasure C
+ // 8 - Treasure D
+ // 16 - Weapon Room Key
+// $KAMELOT_PASSMASK [ guild_id ] = (bitmask) Switches in 042-10
+
+// $KAMELOT_KEY [ guild_id ] = Which bit was assigned as the key
+// $KAMELOT_PASSCODE [ guild_id ] = A bitmask of passcode to use the key
+// $KAMELOT_COOLDOWN [ guild_id ] = Last attempt (weekly attempts)
+
+// KamelotCleanup(guildid)
+function script KamelotCleanup {
+ .@g=getarg(0);
+ //$@KAMELOT_ID[.@g]=0;
+ $@KAMELOT_WAVE[.@g]=0;
+ $KAMELOT_MX[.@g]=0;
+ $KAMELOT_PC[.@g]=0;
+ $KAMELOT_KEY[.@g]=0;
+ $KAMELOT_QUEST[.@g]=0;
+ $KAMELOT_KEYMASK[.@g]=0;
+ $KAMELOT_PASSCODE[.@g]=0;
+ $KAMELOT_PASSMASK[.@g]=0;
+ // TODO: Instance Destroy? D:
+ // And it couldn't be ran from Arthur? D:
+ // Timers keep running and previous attempts leave artifacts D:
+ return;
+}
+
+014-4,67,26,0 script #KamelotEnter NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ // Not in a guild: Gate is sealed (MK might be excluded as well)
+ if (getcharid(2) < 1) {
+ dispbottom l("The gates are firmly shut. A warning is on the door, \"DO NOT ENTER. Guild Only.\"");
+ end;
+ }
+
+ // Save your GID for reference
+ .@g=getcharid(2);
+
+ // Quest already started
+ if ($KAMELOT_QUEST[.@g] & 1) {
+
+ // Aurora Event Framework Handler
+ if ($EVENT$ == "Kamelot") {
+ FYE_Kamelot();
+ }
+
+ // Quest started but Cooldown expired
+ // Needs to cleanup - wipe all variables
+ if ($KAMELOT_COOLDOWN[.@g] < gettimeparam(GETTIME_WEEKDAY)) {
+ KamelotCleanup(.@g);
+ } else {
+ dispbottom l("The gates are firmly shut by some weird magical power. %s", (TUTORIAL ? l("Perhaps we should wait a few days."):""));
+ end;
+ }
+ }
+
+ // Build instance if it doesn't exists or has been reallocated
+ if (instanceowner($@KAMELOT_ID[.@g]) != .@g) {
+ debugmes "Creating Instance for guild %d", .@g;
+ .@inst=instance_create("Kamelot@"+.@g, .@g, IOT_GUILD);
+ if (.@inst < 0)
+ Exception("Kamelot Instance Error", RB_DEFAULT|RB_ISFATAL);
+ instance_attachmap("042-0", .@inst, .@g, "042-0@"+.@g);
+ instance_attachmap("042-1", .@inst, .@g, "042-1@"+.@g);
+ instance_attachmap("042-2", .@inst, .@g, "042-2@"+.@g);
+ instance_attachmap("042-3", .@inst, .@g, "042-3@"+.@g);
+ instance_attachmap("042-4", .@inst, .@g, "042-4@"+.@g);
+ instance_attachmap("042-5", .@inst, .@g, "042-5@"+.@g);
+ instance_attachmap("042-6", .@inst, .@g, "042-6@"+.@g);
+ instance_attachmap("042-7", .@inst, .@g, "042-7@"+.@g);
+ instance_attachmap("042-8", .@inst, .@g, "042-8@"+.@g);
+ instance_attachmap("042-9", .@inst, .@g, "042-9@"+.@g);
+ instance_attachmap("042-10", .@inst, .@g, "042-10@"+.@g);
+ instance_attachmap("042-11", .@inst, .@g, "042-11@"+.@g);
+ instance_set_timeout(21600, 21600, .@inst); // Instance lasts 6 hours
+ instance_init(.@inst);
+ $@KAMELOT_ID[.@g] = .@inst;
+ }
+
+ // You can enter in every other state
+ warp "042-0@"+.@g, any(59, 60), 80;
+
+ // Renew the instance clock : 6 hours
+ instance_set_timeout(21600, 21600, $@KAMELOT_ID[.@g]);
+ end;
+
+// Debug is only allowed if server is in override mode
+OnDebug:
+ if (!$@GM_OVERRIDE) goto L_SimplifiedDebug;
+ /*
+ mes "Guild ID:";
+ input .@g;
+
+ if (.@g < 1 || .@g > 100)
+ .@g=getcharid(2);
+ */
+
+ .@g=getcharid(2);
+ if (.@g < 1) end;
+ mes "Kamelot Debug";
+ mesf "Guild: %d", .@g;
+ mes "";
+ mesf "Keys: %d", $KAMELOT_KEYMASK[.@g];
+ mesf "Quest: %d", $KAMELOT_QUEST[.@g];
+ mesf "Wave: %d", $@KAMELOT_WAVE[.@g];
+ mes "";
+ mesf "Maze Password: %d", $KAMELOT_PASSCODE[.@g];
+ mesf "Maze Status: %d", $KAMELOT_PASSMASK[.@g];
+ mes "";
+ mesf "Guild Power: %d", $KAMELOT_MX[.@g];
+ mesf "Guild Count: %d", $KAMELOT_PC[.@g];
+ select
+ l("Abort"),
+ l("Reset"),
+ l("Reset & Destroy"),
+ l("Quest - Skip Weapons Room"),
+ l("Quest - Skip Krukan fight"),
+ l("Quest - Find all Keys"),
+ l("Quest - Unlock Boss Room"),
+ l("Quest - Mark as Completed"),
+ "",
+ l("Warp - Jump to Entrance"), // 10
+ l("Warp - Jump to Weapon Room"),
+ l("Warp - Jump to Basement"),
+ l("Warp - Jump to Jail"),
+ l("Warp - Jump to Sewer Entrance"),
+ l("Warp - Jump to Cave Exit"),
+ l("Warp - Arrest me!");
+ mes "";
+ switch (@menu) {
+ // 3 inheirs 2
+ case 3:
+ instance_destroy($@KAMELOT_ID[.@g]);
+ case 2:
+ $KAMELOT_COOLDOWN[.@g] = 0;
+ KamelotCleanup(.@g);
+ break;
+ // We now order from bottom-up
+ case 8:
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|64;
+ mes "WARNING: Quest concluded";
+ case 7:
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|8;
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|16;
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|32;
+ mes "WARNING: Boss Room was unlocked";
+ case 6:
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|1;
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|2;
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|4;
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|8;
+ mes "WARNING: Kamelot Basement Chests skipped (not lootable).";
+ case 5:
+ $KAMELOT_QUEST[.@g]=$KAMELOT_QUEST[.@g]|4;
+ mes "WARNING: Krukan Fight and jail skipped.";
+ case 4:
+ $KAMELOT_KEYMASK[.@g]=$KAMELOT_KEYMASK[.@g]|16;
+ mes "WARNING: Weapons Room skipped.";
+ break;
+ // 10+ are the warp triggers
+ case 10:
+ warp "042-0@"+.@g, 60, 40; break;
+ case 11:
+ warp "042-1@"+.@g, 40, 65; break;
+ case 12:
+ warp "042-2@"+.@g, 44, 45; break;
+ case 13:
+ warp "042-3@"+.@g, 60, 130; break;
+ case 14:
+ warp "042-4@"+.@g, 60, 67; break;
+ case 15:
+ warp "042-10@"+.@g, 95, 52; break;
+ case 16:
+ .@t$="042-3@"+.@g;
+ .@n$=instance_npcname("#KSlimeSpawn", $KAMELOT_ID[.@g]);
+ setarray .@x, 33, 84, 41, 74, 36, 57, 79, 43, 24, 86, 59, 38;
+ setarray .@y, 135, 127, 119, 107, 96, 84, 63, 67, 67, 22, 49, 27;
+ specialeffect(FX_HIT, AREA, getcharid(3));
+ .@v = (rand2(12) % 12);
+ .@r=attachrid(getcharid(3));
+ if (.@r) {
+ warp .@t$, .@x[.@v], .@y[.@v];
+ if (!countitem(Lockpicks))
+ addtimer 700, .@n$+"::OnFirstSlime";
+ setpcblock(PCBLOCK_HARD, false);
+ } else {
+ unitwarp(getcharid(3), .@t$, .@x[.@v], .@y[.@v]); // And good luck D:
+ consolebug "FATAL: Could not attach: %d", getcharid(3);
+ }
+ break;
+ }
+ close;
+
+L_SimplifiedDebug:
+ mesc "THIS IS FOR JESUSALVA DEBUG ONLY - DO NOT USE NORMALLY", 1;
+ mes "Guild ID:";
+ input .@gid;
+ if (.@gid < 1 || .@gid > 100)
+ close;
+ $KAMELOT_COOLDOWN[.@gid] = 0;
+ KamelotCleanup(.@gid);
+ mesc "THE GUILD WAS WIPED FROM EXISTENCE.", 1;
+ mesc "Have a nice day! %%l", 3;
+ close;
+
+OnInit:
+ bindatcmd "kdebug", "#KamelotEnter::OnDebug", 99, 100, 1;
+ end;
+}
+
+/////////////////////////////////////////////////////////////////////////////
+// KamelotCaveSpawn(Amount, x1, y1, x2, y2, power{, map})
+function script KamelotCaveSpawn {
+ .@label$=instance_npcname(.name$)+"::OnKillMob";
+ .@gcount=getarg(0);
+ .@x1=getarg(1);
+ .@y1=getarg(2);
+ .@x2=getarg(3);
+ .@y2=getarg(4);
+ .@avg=getarg(5);
+ .@m$=instance_mapname(getarg(6, .map$));
+ //debugmes "Total %d, map %s (power %d)", .@gcount, .@m$, .@avg;
+ freeloop(true);
+ for (.@i=0; .@i < .@gcount; .@i++) {
+ .@mobId=any(CursedSoldier, CursedArcher); // 50-50 ratio
+ .@mob=areamonster(.@m$, .@x1, .@y1, .@x2, .@y2, strmobinfo(1, .@mobId), .@mobId, 1, .@label$);
+ // Reconfigure the monster
+ setunitdata(.@mob, UDT_LEVEL, .@avg+1);
+ setunitdata(.@mob, UDT_STR, 1+.@avg*6/10);
+ setunitdata(.@mob, UDT_AGI, 1+.@avg*5/10);
+ setunitdata(.@mob, UDT_VIT, 1+.@avg*5/10);
+ setunitdata(.@mob, UDT_INT, 1+.@avg*6/10);
+ setunitdata(.@mob, UDT_DEX, 1+.@avg*6/10);
+ setunitdata(.@mob, UDT_LUK, 1+.@avg*5/10);
+ setunitdata(.@mob, UDT_ADELAY, 1372);
+ setunitdata(.@mob, UDT_ATKRANGE, (.@mobId == CursedArcher ? any(6,7) : any(1,2)));
+ // Battle Status
+ setunitdata(.@mob, UDT_MAXHP, .@avg*40);
+ setunitdata(.@mob, UDT_HP, .@avg*40);
+ setunitdata(.@mob, UDT_ATKMIN, .@avg*47/10);
+ setunitdata(.@mob, UDT_ATKMAX, .@avg*67/10);
+ setunitdata(.@mob, UDT_DEF, 1+.@avg*12/10);
+ setunitdata(.@mob, UDT_MDEF, 1+.@avg*8/10);
+ setunitdata(.@mob, UDT_HIT, .@avg*65/10); // Advised: x3
+ setunitdata(.@mob, UDT_FLEE, .@avg*45/10); // Advised: x4
+ // Critical calculation
+ .@min=15;
+ .@max=max(.@min, min(40, .@avg/3));
+ setunitdata(.@mob, UDT_CRIT, rand2(.@min, .@max));
+ // Loop through
+ }
+ freeloop(false);
+ return;
+}
+
+
diff --git a/npc/014-4/mapflags.txt b/npc/014-4/mapflags.txt
new file mode 100644
index 0000000..351108a
--- /dev/null
+++ b/npc/014-4/mapflags.txt
@@ -0,0 +1,4 @@
+014-4 mapflag magic_damage_rate 120
+014-4 mapflag misc_damage_rate 120
+014-4 mapflag weapon_damage_rate 80
+
diff --git a/npc/014-4/slide.txt b/npc/014-4/slide.txt
new file mode 100644
index 0000000..28cbc67
--- /dev/null
+++ b/npc/014-4/slide.txt
@@ -0,0 +1,27 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Allows movement sliding though the bridge on 014-4
+
+014-4,58,51,0 script #014-4_58_51 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 51, 51;
+ end;
+}
+
+014-4,52,51,0 script #014-4_52_51 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 59, 51;
+ end;
+}
+
+014-4,25,47,0 script #014-4_25_47 NPC_HIDDEN,0,0,{
+ end;
+OnTouch:
+ slide 25, 49;
+ end;
+}
+
diff --git a/npc/014-4/thorn.txt b/npc/014-4/thorn.txt
new file mode 100644
index 0000000..6a06704
--- /dev/null
+++ b/npc/014-4/thorn.txt
@@ -0,0 +1,141 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Spring Quest, disabled during Easter
+// Sighly inspired with Soren and Demure relationship, I guess
+//
+// SQuest_Spring
+// 0 - Not Assigned
+// 1 -
+
+014-4,149,98,0 script Thorn NPC_THORN_NPC,{
+ if (season() != SPRING && !$@GM_OVERRIDE)
+ goto L_OutOfSeason;
+ if ($EVENT$ == "Easter")
+ goto L_QuestDisabled;
+
+ .@q=getq(SQuest_Spring);
+ mesn;
+ mesq l("Blossom, blossom, why you do this to me...");
+ if (.@q < 1)
+ goto L_SpringQuest;
+
+L_Main:
+ next;
+ .@q=getq(HurnscaldQuest_Thorn);
+ if (.@q == 0) {
+ mesn;
+ mesq l("I'm actually half-wose. This means part of me is tree.");
+ next;
+ mesn;
+ mesq l("I can walk, I'm just... Trapped here. That's why I need someone to help me to cultivate my wose part!");
+ next;
+ mesn;
+ mesq l("Could you please bring me @@ @@ and @@ @@? I'll give you a bunch of herbs if you help me!", 12, getitemlink(Root), 35, getitemlink(Acorn));
+ next;
+ mesc l("Give him the materials he asked for?");
+ if (askyesno() == ASK_YES) {
+ inventoryplace ShadowHerb, 20, ArtichokeHerb, 20;
+ if (!transcheck(Root, 12, Acorn, 35))
+ close;
+ getitem ShadowHerb, 20;
+ getitem ArtichokeHerb, 20;
+ getexp 600, 120; // Reference: Level 20
+ mesn;
+ mesq l("Thanks for helping me out. I know this is nothing, but please accept these herbs I've collected.");
+ setq HurnscaldQuest_Thorn, 1;
+ next;
+ }
+ }
+ closeclientdialog;
+ goodbye;
+ end;
+
+L_OutOfSeason:
+ mesn;
+ mesq l("Maybe on spring Blossom will look at me... For now, my wose part is withering.");
+ goto L_Main;
+
+L_QuestDisabled:
+ mesn;
+ mesq l("Happy Easter!");
+ mesc l("The @@ quest is disabled during Easter event.", getitemlink(Wreath));
+ next;
+ goto L_Main;
+
+L_SpringQuest:
+ next;
+ mesn;
+ mesq l("Hey, you! Help me!");
+ next;
+ mesn;
+ mesq l("My waifu Blossom has me trapped here, and she won't even look at me, because I'm part-Wose!");
+ next;
+ mesn;
+ mesq l("But it is spring! Perhaps, if you bring me some flowers and fruits which only grow at Spring, I could impress her!");
+ next;
+ mesn;
+ mes l("What about you bring me:");
+ mes l("@@/55 @@", countitem(Rose), getitemlink(Rose));
+ mes l("@@/55 @@", countitem(Tulip), getitemlink(Tulip));
+ mes l("@@/50 @@", countitem(Blueberries), getitemlink(Blueberries));
+ mes l("@@/10 @@", countitem(GrassSeeds), getitemlink(GrassSeeds));
+
+ mes l("@@/80 @@", countitem(MauveHerb), getitemlink(MauveHerb));
+ mes l("@@/80 @@", countitem(GambogeHerb), getitemlink(GambogeHerb));
+ mes l("@@/80 @@", countitem(CobaltHerb), getitemlink(CobaltHerb));
+ mes l("@@/80 @@", countitem(AlizarinHerb), getitemlink(AlizarinHerb));
+ next;
+ select
+ l("Not now, thanks"),
+ l("To be honest, I have that with me!");
+
+ mes "";
+ if (@menu == 1)
+ goto L_Main;
+ if (@menu == 2) {
+ if (
+ countitem(Rose) < 55 ||
+ countitem(Tulip) < 55 ||
+ countitem(Blueberries) < 50 ||
+ countitem(GrassSeeds) < 10 ||
+ countitem(MauveHerb) < 80 ||
+ countitem(GambogeHerb) < 80 ||
+ countitem(CobaltHerb) < 80 ||
+ countitem(AlizarinHerb) < 70
+ ) goto L_Lying;
+
+ inventoryplace Wreath, 1;
+ delitem Rose, 55;
+ delitem Tulip, 55;
+ delitem Blueberries, 50;
+ delitem GrassSeeds, 10;
+ delitem MauveHerb, 80;
+ delitem GambogeHerb, 80;
+ delitem CobaltHerb, 80;
+ delitem AlizarinHerb, 80;
+ getitem Wreath, 1;
+ getexp (210*BaseLevel), 120;
+ setq1 SQuest_Spring, 1;
+ mesn;
+ mesq l("Many thanks! If I let my wose side blossom, I'm sure she'll look at me!");
+ next;
+ mesn;
+ mesq l("Here, take the reward as promised!");
+ goto L_Main;
+ }
+
+ close;
+
+L_Lying:
+ mesn;
+ mesq l("Please don't lie to me...") + " </3";
+ goto L_Main;
+
+OnInit:
+ .sex=G_MALE;
+ .distance=4;
+ end;
+
+}