diff options
-rw-r--r-- | npc/001-7/homunculus.txt | 13 | ||||
-rw-r--r-- | npc/023-3-1/logic.txt | 32 |
2 files changed, 42 insertions, 3 deletions
diff --git a/npc/001-7/homunculus.txt b/npc/001-7/homunculus.txt index e83171f73..0feaffd3d 100644 --- a/npc/001-7/homunculus.txt +++ b/npc/001-7/homunculus.txt @@ -60,7 +60,18 @@ OnTouch: close; } closeclientdialog; - .@mapn$="023-3-1"; + // We can create instance without recording the ID etc. + // Map name limit: 4 chars (hmc1) - as of homunculus + .@mapn$="hmc1@"+getcharid(0); + .@map2$="hmc2@"+getcharid(0); + .@inst = instance_create("Homunculus "+getcharid(0), getcharid(3), IOT_CHAR); + if (.@inst >= 0) { + instance_attachmap("023-3-1", .@inst, false, .@mapn$); + instance_attachmap("023-3-2", .@inst, false, .@map2$); + // Instance lasts one hour + instance_set_timeout(3600, 3600, .@inst); + instance_init(.@inst); + } setq1 FrostiaQuest_Homunculus, 2; warp .@mapn$, any(45,46), 79; end; diff --git a/npc/023-3-1/logic.txt b/npc/023-3-1/logic.txt index 540c19c91..850e0f6dc 100644 --- a/npc/023-3-1/logic.txt +++ b/npc/023-3-1/logic.txt @@ -11,7 +11,7 @@ OnTouch: .@n=getq(General_Narrator); - .@q=getq2(FrostiaQuest_Homunculus); + .@q=getq(FrostiaQuest_Homunculus); // Cheater Detected if (.@n < 15) { warp "Save", 0, 0; @@ -32,7 +32,7 @@ OnTouch: end; OnTouch: .@n=getq(General_Narrator); - .@q=getq2(FrostiaQuest_Homunculus); + .@q=getq3(FrostiaQuest_Homunculus); // Cheater Detected if (.@n < 15) { warp "Save", 0, 0; @@ -47,4 +47,32 @@ OnTouch: warp .@mapn$, 59, 45; end; } +// To the traps! + +023-3-1,45,63,0 script #Ambush02331 NPC_HIDDEN,10,0,{ +OnTouch: + .@q=getq3(FrostiaQuest_Homunculus); + if (!.@q) { + .@m$=getmap(); + .@mobID1=monster(.@m$, 43, 55, l("Assassin"), HoodedNinja, 1); + .@mobID2=monster(.@m$, 48, 55, l("Assassin"), HoodedNinja, 1); + monster(.@m$, 43, 60, l("Assassin"), Assassin, 1); + monster(.@m$, 43, 65, l("Assassin"), Assassin, 1); + monster(.@m$, 48, 60, l("Assassin"), Assassin, 1); + monster(.@m$, 48, 65, l("Assassin"), Assassin, 1); + + if (any(true,false)) + unitalk(.@mobID1, l("Kill 'em!")); + else + unitalk(.@mobID2, l("Kill 'em!")); + + setq3 FrostiaQuest_Homunculus, 1; + } + end; +} + +// Main event core + + + |