From 6ccf5d9edd19f502a58f2b22b9d244052510130a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 3 Jun 2019 08:45:49 -0300 Subject: You can now answer the riddle (blackbox added) --- maps/re/015-8.mcache | Bin 1224 -> 1226 bytes npc/015-8/_import.txt | 1 + npc/015-8/sealedshrine.txt | 64 ++++++++++++++++++++++++++++++++++++++++++--- 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/maps/re/015-8.mcache b/maps/re/015-8.mcache index eb778d7c1..89f59cbf8 100644 Binary files a/maps/re/015-8.mcache and b/maps/re/015-8.mcache differ diff --git a/npc/015-8/_import.txt b/npc/015-8/_import.txt index 0258f7cbf..27ea8907a 100644 --- a/npc/015-8/_import.txt +++ b/npc/015-8/_import.txt @@ -1,5 +1,6 @@ // Map 015-8: Ancient Hideout // This file is generated automatically. All manually added changes will be removed when running the Converter. +"npc/015-8/015-8_blackbox.txt", "npc/015-8/_mobs.txt", "npc/015-8/config.txt", "npc/015-8/puzzle.txt", 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; -- cgit v1.2.3-60-g2f50