summaryrefslogtreecommitdiff
path: root/npc/014-2-2
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 /npc/014-2-2
parent0e0e24f5222e3a536bf33f960e7a3a99f4b00eb6 (diff)
downloadserverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.gz
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.bz2
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.tar.xz
serverdata-5e0ff0cc3c030251ffbddb8ce648058006b16f4c.zip
More useless code
Diffstat (limited to 'npc/014-2-2')
-rw-r--r--npc/014-2-2/valia.txt119
1 files changed, 115 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;