summaryrefslogtreecommitdiff
path: root/npc/015-8/sealedshrine.txt
diff options
context:
space:
mode:
Diffstat (limited to 'npc/015-8/sealedshrine.txt')
-rw-r--r--npc/015-8/sealedshrine.txt64
1 files changed, 60 insertions, 4 deletions
diff --git a/npc/015-8/sealedshrine.txt b/npc/015-8/sealedshrine.txt
index 68d46dff0..c356d1408 100644
--- a/npc/015-8/sealedshrine.txt
+++ b/npc/015-8/sealedshrine.txt
@@ -521,23 +521,79 @@ OnTouch:
+// Shrine Statue Control
+// SaggyShrineStatue( .name$ )
+function script SaggyShrineStatue {
+ .@n$=getarg(0);
+
+ // Initial check
+ if (!MAGIC_LVL || .@q < 4) {
+ setq HurnscaldQuest_Sagratha, 0, 0, 0;
+ sc_end SC_CASH_PLUSEXP;
+ sc_end SC_OVERLAPEXPUP;
+ sc_start SC_OVERLAPEXPUP, 300000, -20;
+ warp "Save", 0, 0;
+ closeclientdialog;
+ end;
+ return false;
+ }
+
+ mesn l("Guardian Statue");
+ .@q=getq(HurnscaldQuest_Sagratha);
+ if (.@q != 4) {
+ mesq l("...");
+ next;
+ mesc l("The statue doesn't replies.");
+ close;
+ }
+ mesq l("Decipher me... Or I will devour you...");
+ next;
+ mesc l("Take the riddle?"), 1;
+ mesc l("Time limit for answer: 2 minutes");
+ next;
+ if (askyesno() == ASK_YES) {
+ // You have unlimited time if you don't close the dialog
+ addtimer(120000, .@n$+"::OnScheduledDeath");
+ if (0158_Riddle_BlackBox()) {
+ deltimer(.@n$+"::OnScheduledDeath");
+ setq1 HurnscaldQuest_Sagratha, 5;
+ mesn;
+ mesq l("You shall pass. Beyond this gate, she waits for you.");
+ next;
+ mesn;
+ mesq l("Your worth shall be tested, and from inside, you shall not leave.");
+ } else {
+ doevent(.@n$+"::OnScheduledDeath");
+ closeclientdialog;
+ }
+ }
+ return;
+}
// The Sealed Shrine Itself and the guardians
015-8,96,22,0 script #SaggyShrineRight NPC_FAKIR,{
- mesn l("Guardian Statue");
- mesq l("Answer Me... Or I will devour you...");
+ SaggyShrineStatue(.name$);
close;
+OnScheduledDeath:
+ npctalk3 l("Be devoured!");
+ percentheal -100, -100;
+ end;
+
OnInit:
.distance=5;
end;
}
015-8,93,22,0 script #SaggyShrineLeft NPC_FAKIR,{
- mesn l("Guardian Statue");
- mesq l("Answer Me... Or I will devour you...");
+ SaggyShrineStatue(.name$);
close;
+OnScheduledDeath:
+ npctalk3 l("Be devoured!");
+ percentheal -100, -100;
+ end;
+
OnInit:
.distance=5;
end;