From a5e5532c844b6ebbcffa7a5191d2641882ee170f Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 9 May 2019 15:11:44 -0300 Subject: Sagratha's House - Initial version - debug version --- npc/014-5/sagratha.txt | 56 +++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 3 deletions(-) (limited to 'npc/014-5') diff --git a/npc/014-5/sagratha.txt b/npc/014-5/sagratha.txt index be4704116..2d06e47d1 100644 --- a/npc/014-5/sagratha.txt +++ b/npc/014-5/sagratha.txt @@ -5,7 +5,6 @@ // Sagratha's House Door 014-5,122,137,0 script Sagratha Door NPC_HIDDEN,0,0,{ - .@q=getq(HurnscaldQuest_Sagratha); end; L_Magicless: @@ -84,14 +83,65 @@ L_Lockpick: close; L_Open: + mesn; + mesc l("The door is locked!"); + select + l("Knock on the door?"), + l("Attempt to lockpick?"), + l("Leave it alone?"); + mes ""; + if (@menu == 3) + close; + mesc l("*CREAK*"); + mesc l("The pressure you did made the door burst open. It is unusually quiet inside..."); + next; + enable_items(); + //mesc l("WARNING: Save your game now."), 3; + mesc l("WARNING: Set your equipment now."), 3; + next; + disable_items(); + /* + if (has_instance("014-5-1") == "") { + .@inst = instance_create("Sagratha House", getcharid(3), IOT_CHAR); + instance_attachmap("014-5-1", .@inst); + // 20 minutes (1200s) inside, or 5 minutes (300s) outside + instance_set_timeout(1200, 30, .@inst); + instance_init(.@inst); + } warp "014-5-1", 33, 44; - dispbottom l("For some reason, the door was not locked today..."); + //addmapmask instance_mapname("014-5-1"), 1; + changemusic "014-5-1", "eric_matyas_ghouls.ogg"; + */ + .@q2=getq2(HurnscaldQuest_Sagratha); + // Map name limit: 4 chars (sgt1) + .@mapn$="sgt1@"+getcharid(0); + if (isinstance(.@q2) && .@q2 != 0) { + warp .@mapn$, 33, 44; + } else { + .@inst = instance_create("Sagratha House "+getcharid(0), getcharid(3), IOT_CHAR); + instance_attachmap("014-5-1", .@inst, false, .@mapn$); + // 20 minutes (1200s) inside, or 5 minutes (300s) outside + instance_set_timeout(1200, 30, .@inst); + instance_init(.@inst); + setq2 HurnscaldQuest_Sagratha, .@inst; + warp .@mapn$, 33, 44; + } + changemusic .@mapn$, "eric_matyas_ghouls.ogg"; + closeclientdialog; close; +L_Welcome: + warp "014-5-1", 33, 44; + end; + OnTouch: + .@q=getq(HurnscaldQuest_Sagratha); if (!MAGIC_LVL) goto L_Magicless; + if (.@q == 1) goto L_Open; + if (getq(HurnscaldQuest_InjuriedMouboo) == 3) goto L_Welcome; + + // No special condition goto L_Lockpick; - if (getq(HurnscaldQuest_InjuriedMouboo) == 3) goto L_Open; end; } -- cgit v1.2.3-70-g09d2