summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2022-04-28 12:47:57 -0300
committerJesusaves <cpntb1@ymail.com>2022-04-28 12:47:57 -0300
commit5e0ff0cc3c030251ffbddb8ce648058006b16f4c (patch)
tree5ca5b16be2da3fdcccbf7f5cc20c7d317f89c2fb
parent0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6 (diff)
downloadserverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.gz
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.bz2
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.xz
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.zip
More useless code
-rw-r--r--npc/014-2-2/valia.txt119
-rw-r--r--npc/034-1/_import.txt1
-rw-r--r--npc/034-1/gemini.txt17
-rw-r--r--npc/functions/mobpoint.txt1
4 files changed, 134 insertions, 4 deletions
diff --git a/npc/014-2-2/valia.txt b/npc/014-2-2/valia.txt
index e0968bc9b..1f42e6635 100644
--- a/npc/014-2-2/valia.txt
+++ b/npc/014-2-2/valia.txt
@@ -4,9 +4,15 @@
// Description:
// Gemini Sisters Quest - Valia Gemini
+034-1 mapflag zone MMO
+034-2 mapflag zone MMO
+034-3 mapflag zone MMO
+034-4 mapflag zone MMO
+
+// Check if you can do this action or not (hero)
function script GeminiCheck {
.@st = getarg(0, 0);
- if (getq(General_Narrator) < 16 || getq(HurnscaldQuest_Gemini) < .@st) {
+ if (getq(General_Narrator) < 16 || @mystatus < .@st) {
warp "Save", 0, 0;
dispbottom l("You don't feel so well... And then, you're dead.");
die();
@@ -14,6 +20,34 @@ function script GeminiCheck {
}
}
+// You killed a mob
+function script GeminiKill {
+ if (!compare(getmap(), "val")) end;
+ switch ('STATUS) {
+ case 1: // Quest initiated
+ break;
+ case 2: // Looking for a runestone
+ if (killedrid == GreenSlime) {
+ if (!rand2(40)) {
+ getexp 8132, 657;
+ dispbottom l("You found the Runestone! You gave it to the party leader.");
+ 'STATUS = 3;
+ }
+ }
+ break;
+ case 3: // Has runestone
+ break;
+ }
+ return;
+}
+
+// Janitor
+function script GeminiFail {
+ .@id=getarg(0, 0);
+ return;
+}
+
+
// Valia Gemini
014-2-2,36,22,0 script Valia NPC_RED_WIZARD_F,{
GeminiCheck();
@@ -67,12 +101,41 @@ function script GeminiCheck {
}
// Alright.
mesq l("Good. I hope you have stocked everything. The time limit is 4 hours.");
+
+ // Only first attempt is free - all others are charged
+ if (getq(HurnscaldQuest_Gemini)) {
+ next;
+ mesn;
+ mesq l("Actually, I need help with reagents this time. Bring me a %s and a %s and I'll gladly warp you... again.", getitemlink(GemPowder), getitemlink(EverburnPowder));
+ if (!countitem(GemPowder) || !countitem(EverburnPowder)) close;
+ next;
+ }
mesc l("Are you and your party ready?"), 1;
if (askyesno() != ASK_YES)
close;
+ // Not eligible for free lunch
+ if (getq(HurnscaldQuest_Gemini)) {
+ delitem GemPowder, 1;
+ delitem EverburnPowder, 1;
+ }
+
+ // Handle first attempt
mesn;
- mesq l("Good. Here, take this key and hide it.");
+ mesq l("Good. Here, take this key and hide it. I will quickly brief you:");
+ mes "";
+ mesc l(".:: GEMINI ASSASSINS QUEST ::."), 3;
+ mesc ("Recommended Level: %d+", 85);
+ mes "";
+ mes l("- The goal is to rescue Luvia from Isabamuth. She has been ##Bbrainwashed##b.");
+ mes l("- Luvia is a powerful mage and Isbamuth is watching, so teleporting directly would be risky.");
+ mes l("- Instead, the party will be teleported ##Bto a forest.##b");
+ mes l("- Find a path to the island where she is hiding herself!");
+ if (!getq(HurnscaldQuest_Gemini))
+ mesc l("- If you fail, you'll need to pay me ingredients to try again!"), 1;
+ mes "";
+ mesc l("Good luck!");
+
compareandsetq HurnscaldQuest_Gemini, 0, 1;
// Create instance
@@ -99,10 +162,58 @@ function script GeminiCheck {
instance_init(.@inst);
// Warp everyone and add timers
- //partytimer("008-0", 1000, "Party Master::OnStart", getcharid(1));
+ partytimer("014-2-2", 1000, "Valia::OnCoreInit", getcharid(1));
warpparty("val1@"+.@p, 24, 24, getcharid(1), "014-2-2", true);
-
close;
+
+// Macros
+OnCoreInit:
+ @mystatus = 0;
+ if (!'STATUS)
+ 'STATUS = 1;
+OnCore:
+ .@p = getcharid(1);
+ // Always true on first interaction
+ // This handles new stages for person
+ if (@mystatus != 'STATUS) {
+ switch ('STATUS) {
+ case 1: // Quest initiated
+ @mystatus = 1;
+ // Spawn monsters
+ areamonster("val1@"+.@p, 20, 20, 60, 60, strmobinfo(1, GreenSlime), GreenSlime, (BaseLevel/15), "Valia::OnGSlime");
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, LogHead), LogHead, (BaseLevel/15), "Valia::OnLHead");
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, ForestMushroom), ForestMushroom, (BaseLevel/12), "Valia::OnFShroom");
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, RedMushroom), RedMushroom, 1+(BaseLevel/30), "Valia::OnRShroom");
+ break;
+ case 2: // Looking for a runestone
+ break;
+ case 3: // Has runestone
+ break;
+ }
+ }
+ addtimer(5000, "Valia::OnCoreInit");
+ end;
+
+OnGSlime:
+ fix_mobkill(GreenSlime);
+ areamonster("val1@"+.@p, 20, 20, 60, 60, strmobinfo(1, GreenSlime), GreenSlime, 1, "Valia::OnGSlime");
+ end;
+
+OnLHead:
+ fix_mobkill(LogHead);
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, LogHead), LogHead, 1, "Valia::OnLHead");
+ end;
+
+OnFShroom:
+ fix_mobkill(ForestMushroom);
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, ForestMushroom), ForestMushroom, 1, "Valia::OnFShroom");
+ end;
+
+OnRShroom:
+ fix_mobkill(RedMushroom);
+ areamonster("val1@"+.@p, 20, 20, 70, 60, strmobinfo(1, RedMushroom), RedMushroom, 1, "Valia::OnRShroom");
+ end;
+
OnInit:
.distance=4;
end;
diff --git a/npc/034-1/_import.txt b/npc/034-1/_import.txt
index d7b8ea9ef..3aa2c2923 100644
--- a/npc/034-1/_import.txt
+++ b/npc/034-1/_import.txt
@@ -1,3 +1,4 @@
// Map 034-1: Outskirts
// This file is generated automatically. All manually added changes will be removed when running the Converter.
"npc/034-1/_mobs.txt",
+"npc/034-1/gemini.txt",
diff --git a/npc/034-1/gemini.txt b/npc/034-1/gemini.txt
new file mode 100644
index 000000000..b45f4282a
--- /dev/null
+++ b/npc/034-1/gemini.txt
@@ -0,0 +1,17 @@
+// TMW2 scripts.
+// Authors:
+// Jesusalva
+// Description:
+// Gemini Sisters Quest - Forest & Desert Stage
+
+034-1,67,48,0 script Strange Stone NPC_MANA_STONE,{
+ if (instance_id() < 0) end;
+ GeminiCheck(1);
+ mesc l("Weird.");
+ close;
+
+OnInit:
+ .distance = 2;
+ end;
+}
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
index 53ec1a91c..e09121fc3 100644
--- a/npc/functions/mobpoint.txt
+++ b/npc/functions/mobpoint.txt
@@ -81,6 +81,7 @@ OnNPCKillEvent:
callfunc "FSFDay";
callfunc "CraftmasterDay";
callfunc "CadisQuestCheck";
+ callfunc "GeminiKill";
// Unset killedrid. This affects multiple calls of this function
// But it is in overall more reliable imao