summaryrefslogtreecommitdiff
path: root/npc/023-3
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/023-3
downloadserverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.gz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.bz2
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.tar.xz
serverdata-a7c45a192268da2601cef47a4cdba987ae2327ca.zip
Initial commit (Moubootaur Legends fork)
Diffstat (limited to 'npc/023-3')
-rw-r--r--npc/023-3/_import.txt4
-rw-r--r--npc/023-3/_mobs.txt23
-rw-r--r--npc/023-3/logic.txt366
3 files changed, 393 insertions, 0 deletions
diff --git a/npc/023-3/_import.txt b/npc/023-3/_import.txt
new file mode 100644
index 0000000..ab1f0b7
--- /dev/null
+++ b/npc/023-3/_import.txt
@@ -0,0 +1,4 @@
+// Map 023-3: Ice Caves
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+"npc/023-3/_mobs.txt",
+"npc/023-3/logic.txt",
diff --git a/npc/023-3/_mobs.txt b/npc/023-3/_mobs.txt
new file mode 100644
index 0000000..42f1032
--- /dev/null
+++ b/npc/023-3/_mobs.txt
@@ -0,0 +1,23 @@
+// This file is generated automatically. All manually added changes will be removed when running the Converter.
+// Map 023-3: Ice Caves mobs
+023-3,63,215,3,2 monster Pollet 1219,2,30000,30000
+023-3,41,214,16,4 monster Cyan Butterfly 1172,2,30000,30000
+023-3,39,217,16,4 monster Iced Fluffy 1041,2,30000,30000
+023-3,90,214,5,5 monster Wolvern 1037,1,30000,30000
+023-3,63,188,12,7 monster Pollet 1219,2,30000,30000
+023-3,120,54,80,16 monster Assassin 1062,6,30000,30000
+023-3,181,42,13,12 monster Bluepar 1177,2,30000,30000
+023-3,49,55,13,12 monster Bluepar 1177,2,30000,30000
+023-3,137,170,42,37 monster Blue Slime 1087,11,30000,30000
+023-3,163,96,36,33 monster Moggun 1070,6,30000,30000
+023-3,68,180,29,23 monster Santa Slime 1096,4,30000,30000
+023-3,67,90,21,21 monster Slime Blast 1090,3,30000,30000
+023-3,72,113,25,37 monster White Slime 1094,4,30000,30000
+023-3,51,134,17,25 monster Azul Slime 1095,3,30000,30000
+023-3,123,68,22,21 monster Rudolph Slime 1086,2,30000,30000
+023-3,122,201,31,13 monster Rudolph Slime 1086,2,30000,30000
+023-3,129,170,31,5 monster Archant 1026,3,30000,30000
+023-3,93,181,22,68 monster Water Fairy 1184,2,30000,30000
+023-3,93,57,22,66 monster Nature Fairy 1186,2,30000,30000
+023-3,117,127,91,101 monster Ice Maggot 1012,32,30000,30000
+023-3,105,157,91,86 monster Cave Bat 1039,22,30000,30000
diff --git a/npc/023-3/logic.txt b/npc/023-3/logic.txt
new file mode 100644
index 0000000..0b72251
--- /dev/null
+++ b/npc/023-3/logic.txt
@@ -0,0 +1,366 @@
+// TMW2 scripts.
+// Author:
+// Jesusalva
+// Description:
+// 023-3 Abandoned Ice Caves Configuration File. Variables: $@LOGIC_0233BOSS
+
+023-3 mapflag zone MMO
+
+023-3,63,220,0 script #Exit0233 NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ .@q=getq(General_Narrator);
+ .@q2=getq2(General_Narrator);
+ // Cheater Detected
+ if (.@q < 15) {
+ warp "Save", 0, 0;
+ die();
+ end;
+ }
+
+ mesc l("Return to Frostia's Castle?");
+ if (askyesno() == ASK_YES) {
+ .@mapn$="024-16";
+ warp .@mapn$, 30, 26;
+ }
+ closeclientdialog;
+ close;
+}
+
+023-3,48,22,0 script #Finish0233 NPC_HIDDEN,0,0,{
+ end;
+
+OnTouch:
+ .@q=getq(General_Narrator);
+ .@q2=getq2(General_Narrator);
+ // Cheater Detected
+ if (.@q < 15) {
+ warp "Save", 0, 0;
+ die();
+ end;
+ }
+ // Not allowed to proceed
+ if (.@q > 15) {
+ dispbottom l("Hmm, no, I shouldn't go back there...");
+ end;
+ }
+
+ .@mapn$="001-7";
+ warp .@mapn$, 91, 90;
+ end;
+}
+
+// A simple random treasure chest - to be sure players were introduced to this
+// awesome system. Same rules as any treasure box still applies.
+023-3,94,212,0 script #chest_02330 NPC_CHEST,{
+
+ TreasureBox();
+ specialeffect(.dir == 0 ? 24 : 25, AREA, getnpcid()); // closed ? opening : closing
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+}
+
+
+// Miniboss fight must be enabled on right npc. No passing before that.
+023-3,120,103,0 script #MiniBossTrap0233 NPC_HIDDEN,0,2,{
+ end;
+
+OnTouch:
+ .@q=getq(FrostiaQuest_Homunculus);
+ if (!.@q) {
+ dispbottom l("A powerful magic barrier repels you!");
+ getmapxy(.@m$, .@x, .@y, 0);
+ slide .@x-2, .@y;
+ sit();
+ }
+ end;
+}
+
+
+// The scout which went ahead of you (+ miniboss mechanics)
+023-3,86,88,0 script Elite Scout#MB0233 NPC_DARKSABER,{
+ if ($@LOGIC_0233BOSS) {
+ npctalkonce l("FIGHT!");
+ end;
+ }
+ if (getq(FrostiaQuest_Homunculus) >= 1 && !is_sponsor()) {
+ npctalkonce l("I'm not going any closer to that cursed place!");
+ end;
+ }
+ if (getq(FrostiaQuest_Homunculus) >= 1) {
+ npctalk3 l("Everything in order.");
+ end;
+ }
+ mesn;
+ mesq l("Congratulations in making this far, @@.", strcharinfo(0));
+ next;
+ select
+ l("Thanks, and bye."),
+ l("What should I do now?");
+ if (@menu == 1)
+ close;
+ mes "";
+ mesn;
+ mesq l("So, there is a magical barrier to the right, which is in place exactly to protect us.");
+ next;
+ mesn;
+ mesq l("Past this checkpoint, is the village where the Monster King was born.");
+ next;
+ mesn;
+ mesq l("If you want to pass through it, you'll need to defeat the Guardian which made the seal. You can bring friends for healing and support.");
+ next;
+ mesn;
+ mesq l("Once the fight begins, the barrier at your left will lock. It won't open until the fight is over.");
+ next;
+ mesn;
+ mesq l("Are you ready?");
+ mesc l("WARNING: DO NOT PROCEED UNLESS YOU'RE READY."), 1;
+ if (askyesno() == ASK_YES && !$@LOGIC_0233BOSS) {
+ $@LOGIC_0233BOSS=getcharid(3); // It could be 1.
+ $@LOGIC_0233BOXX=monster("023-3", any(85,94,103,113), any(91,96,102,111), "Guardian", Yeti, 1, .name$+"::OnYetiDefeat");
+ initnpctimer;
+ }
+ closeclientdialog;
+ end;
+// Check if fight is still going on
+OnTimer10000:
+ if (!attachrid($@LOGIC_0233BOSS)) {
+ killmonster("023-3", .name$+"::OnYetiDefeat");
+ $@LOGIC_0233BOSS=0;
+ end;
+ }
+ // You gave up, finish it now and not later
+ if (getmap() != "023-3") {
+ killmonster("023-3", .name$+"::OnYetiDefeat");
+ $@LOGIC_0233BOSS=0;
+ end;
+ }
+ // What if the Yeti left the chamber? O.o
+ // It's not like there was mob collision to prevent this from happening
+ // If that's the case, bring the Yeti to player position and order attack :>
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@LOGIC_0233BOXX);
+ getmapxy(.@mx$, .@xx, .@yx, 0);
+ if (!(is_between(79, 120, .@x) && is_between(75, 125, .@y))) {
+ unitwarp($@LOGIC_0233BOXX, .@mx$, .@xx, .@yx);
+ unitattack($@LOGIC_0233BOXX, $@LOGIC_0233BOSS);
+ unittalk($@LOGIC_0233BOXX, "I did not forgot you, @@! %%e", strcharinfo(0));
+ end;
+ }
+ initnpctimer;
+ end;
+// Yeti Defeated
+OnYetiDefeat:
+ stopnpctimer;
+ .@rid=$@LOGIC_0233BOSS;
+ $@LOGIC_0233BOSS=0;
+ // In past, only MVP would count. Now, the requester count.
+ if (playerattached())
+ detachrid();
+ // Player decided to leave the game, annuled
+ if (!attachrid(.@rid))
+ end;
+ // Player decided to leave for a walk, annuled
+ if (!isin("023-3", 79, 75, 120, 125))
+ end;
+
+ // We don't need compareandsetq because it's now the requester
+ message(.@rid, l("You've slayed the Yeti."));
+ npctalk l("Good luck in your journey, @@.", rid2name(.@rid));
+ setq FrostiaQuest_Homunculus, 1;
+ specialeffect(FX_FANFARE, AREA, getcharid(3));
+
+ end;
+OnInit:
+ .distance = 5;
+ end;
+}
+
+
+// Cannot flee from Miniboss Fight
+023-3,80,84,0 script #MiniBossTrapB0233 NPC_HIDDEN,5,0,{
+ end;
+
+OnTouch:
+ .@q=getq(FrostiaQuest_Homunculus);
+ .@q2=getq(FrostiaQuest_Homunculus);
+ if (.@q)
+ end;
+ if ($@LOGIC_0233BOSS) {
+ dispbottom l("A powerful magic barrier repels you!");
+ slide 81, 86;
+ sit();
+ }
+ end;
+}
+
+// A not-so-simple treasure chest from Sagratha's Dungeon
+023-3,0,0,0 script #0233ChestCtrl NPC_HIDDEN,{
+ end;
+
+OnDelay:
+ initnpctimer;
+ end;
+
+OnTimer180000:
+ stopnpctimer;
+OnInit:
+ setarray .@x, 189, 191, 193, 186;
+ setarray .@y, 44, 42, 43, 45;
+ .@r=rand2(getarraysize(.@x));
+ monster "023-3", .@x[.@r], .@y[.@r], "Treasure Chest", any(BronzeChest,BronzeMimic,SilverChest,SilverMimic,GoldenChest,GoldenMimic), 1, "#0233ChestCtrl::OnDelay";
+ end;
+}
+
+// Aethyr Gateway
+023-3,26,219,0 script #AethyrGate NPC_HIDDEN,{
+ end;
+
+OnInit:
+ // In theory, pattern ID must be between 1~9
+ // To set $@p1$~$@p9$ with the PERL expression
+ // But as we're only using $@p0$ (full string)
+ // the value itself is meaningless
+ .pid=getnpcid();
+ debugmes "Aethyr: Pattern %d", .pid;
+ //I'm not going to learn PERL just for that
+ defpattern(.pid, "^(.*)$", "OnTalkNearby");
+ activatepset(.pid);
+ end;
+
+OnTalkNearby:
+ // not very obvious stuff by gumi, $@p0$ contains the whole string
+ // so we must cut it. Could use $@p1$ if perl was proper but... meh.
+ .@no_nick$ = strip(substr($@p0$, getstrlen(strcharinfo(PC_NAME)) + 3, getstrlen($@p0$) - 1));
+ .@message$ = strtoupper(.@no_nick$);
+
+ //0234_Password_BlackBox(.@message$);
+ callfunc "0234_Password_BlackBox", .@message$;
+ end;
+}
+
+
+// TODO: Spike traps and etc. at the corritor
+// TODO: Rolling Stone Trap
+
+// Delete rolling stones as they hit this wall
+/*023-3,47,40,0 script #0233DelStone NPC_HIDDEN,1,0,{
+OnTouch:
+ end;
+
+OnTouchNPC:
+ //die();
+ //unitkill(0);
+ unitwarp(0, "023-3", 42, 26);
+ end;
+}
+
+// TODO: Rolling Stone core
+023-3,0,0,0 script #0233RollStone NPC_HIDDEN,{
+ end;
+OnInit:
+ $@0233_STONEA=monster("023-3", 47, 23, "Rolling Stone", RollingStone, 1);
+ $@0233_STONEB=monster("023-3", 48, 25, "Rolling Stone", RollingStone, 1);
+ $@0233_STONEC=monster("023-3", 47, 30, "Rolling Stone", RollingStone, 1);
+ $@0233_STONED=monster("023-3", 48, 37, "Rolling Stone", RollingStone, 1);
+ initnpctimer;
+ end;
+
+OnTimer250:
+ unitwalk($@0233_STONEA, 47, 40);
+ unitwalk($@0233_STONEC, 47, 40);
+ unitwalk($@0233_STONEB, 48, 40);
+ unitwalk($@0233_STONED, 48, 40);
+
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@0233_STONEA);
+ if (.@y >= 40)
+ unitwarp($@0233_STONEA, "023-3", 47, 23);
+
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@0233_STONEB);
+ if (.@y >= 40)
+ unitwarp($@0233_STONEB, "023-3", 48, 23);
+
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@0233_STONEC);
+ if (.@y >= 40)
+ unitwarp($@0233_STONEC, "023-3", 47, 23);
+
+ getmapxy(.@m$, .@x, .@y, UNITTYPE_MOB, $@0233_STONED);
+ if (.@y >= 40)
+ unitwarp($@0233_STONED, "023-3", 48, 23);
+
+ initnpctimer;
+ end;
+}
+*/
+
+// TODO: NPC walking cannot trigger OnTouch events >.>
+023-3,47,23,0 script #0233RollStoneA NPC_ROLLINGSTONE,0,0,{
+ end;
+
+OnInit:
+ npcspeed(240);
+ initnpctimer;
+ npcwalkto(47, 41);
+ end;
+
+OnTimer120:
+ if (.y >= 40) {
+ movenpc(.name$, 47, 23);
+ npcwalkto(47, 41);
+ }
+ if (getareausers("023-3", 0)) {
+ areatimer2("023-3", .x, .y, .x, .y, 10, .name$+"::OnTouchie");
+ }
+ initnpctimer;
+ end;
+
+OnTouchie:
+ if (isin(.map$, .x, .y, 0)) {
+ percentheal -40, -40;
+ warp .map$, 49, 41;
+ }
+ end;
+
+OnTouchNPC:
+ sc_start SC_COMA, 60000, 0;
+ end;
+}
+
+023-3,48,26,0 script #0233RollStoneB NPC_ROLLINGSTONE,0,0,{
+ end;
+
+OnInit:
+ npcspeed(240);
+ initnpctimer;
+ npcwalkto(49, 41);
+ end;
+
+OnTimer120:
+ if (.y >= 40) {
+ movenpc(.name$, 48, 23);
+ npcwalkto(48, 41);
+ }
+ if (getareausers("023-3", 0)) {
+ areatimer2("023-3", .x, .y, .x, .y, 10, .name$+"::OnTouchie");
+ }
+ initnpctimer;
+ end;
+
+OnTouchie:
+ if (isin(.map$, .x, .y, 0)) {
+ percentheal -40, -40;
+ warp .map$, 49, 41;
+ }
+ end;
+
+OnTouchNPC:
+ sc_start SC_COMA, 60000, 0;
+ end;
+}
+
+023-3,47,30,0 duplicate(#0233RollStoneA) #0233RollStoneC NPC_ROLLINGSTONE,0,0
+023-3,48,37,0 duplicate(#0233RollStoneB) #0233RollStoneD NPC_ROLLINGSTONE,0,0
+