diff options
-rw-r--r-- | npc/023-3-1/logic.txt | 85 |
1 files changed, 83 insertions, 2 deletions
diff --git a/npc/023-3-1/logic.txt b/npc/023-3-1/logic.txt index ea79c8e94..18fb50d5d 100644 --- a/npc/023-3-1/logic.txt +++ b/npc/023-3-1/logic.txt @@ -18,7 +18,7 @@ OnTouch: percentheal -100, -100; return false; } - if (.@q < 3) { + if (.@q < 3) { // TODO: mobcount()? dispbottom l("The magic power outflowing in the room prevents you from leaving."); end; } @@ -74,17 +74,98 @@ OnTouch: // Main event core 023-3-1,45,52,0 script #Core02331 NPC_HIDDEN,10,0,{ OnTouch: + .@n$=instance_npcname(.name$); .@q=getq3(FrostiaQuest_Homunculus); if (.@q == 1) { // Begin the event core setq3 FrostiaQuest_Homunculus, 2; - addtimer(1100, .name$+"::OnEvent01"); + addtimer(1100, .@n$+"::OnEvent01"); + initnpctimer; } end; OnEvent01: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + slide 45, 45; @ISBAMUTH=monster(.@m$, 45, 34, l("Isbamuth"), Isbamuth, 1); + .@g1=monster(.@m$, 42, 37, l("Assassin"), HoodedNinja, 1); + .@g2=monster(.@m$, 48, 37, l("Assassin"), HoodedNinja, 1); + .@g3=monster(.@m$, 39, 40, l("Assassin"), Assassin, 1); + .@g4=monster(.@m$, 51, 40, l("Assassin"), Assassin, 1); + + // Block everyone for cutscene (includes invencibility boost) + setpcblock(255, true); + sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, @ISBAMUTH); + sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@g1); + sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@g2); + sc_start(SC_STUN, 7500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@g3); + sc_start(SC_STUN, 4500, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK, .@g4); + + unittalk(@ISBAMUTH, l("Seems like the rat have come after the cheese.")); + addtimer(1500, .@n$+"::OnE02"); + end; + +OnE02: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + unittalk(@ISBAMUTH, l("HAHAHAHA! How foolish of you, didn't even bother trying to sneak in!")); + + addtimer(1500, .@n$+"::OnE03"); + end; + +OnE03: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + unittalk(@ISBAMUTH, l("Remember my name: I am Isbamuth, and I've took the Throne which rightfully belongs to me.")); + + addtimer(1500, .@n$+"::OnE04"); + end; + +OnE04: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + unittalk(@ISBAMUTH, l("This throne is not from the Monster King... IT BELONGS ONLY TO ME!")); + + addtimer(1500, .@n$+"::OnE05"); + end; + +OnE05: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + unittalk(@ISBAMUTH, l("Now, as you gave yourself the trouble of coming here...")); + + addtimer(1500, .@n$+"::OnE06"); + end; + +OnE06: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + setpcblock(255, false); + unittalk(@ISBAMUTH, l("LET'S DANCE!")); + + addtimer(15000, .@n$+"::OnW01"); + end; + +OnW01: + .@m$=getmap(); + .@n$=instance_npcname(.name$); + + unittalk(@ISBAMUTH, l("Be cursed, you fool!")); + sc_start(SC_CURSE, 12000, 1, 10000, SCFLAG_NOAVOID|SCFLAG_FIXEDTICK); + + addtimer(45000, .@n$+"::OnW01"); + end; +OnTimer1000: + if (getmapusers(instance_mapname("023-3-1"))) + initnpctimer; + // TODO: Cleanup end; } |