From a3dbadcf2135c9bead3ada6aa2b9c3d5487658ea Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 6 Jun 2019 17:21:25 -0300 Subject: Use clientcommand(); to aid in Sagratha Campaign, bugfixes --- npc/014-5-1/sagratha.txt | 3 --- npc/015-8-1/campaign.txt | 26 ++++++++++++++++++++++---- npc/015-8-1/puzzle.txt | 2 +- 3 files changed, 23 insertions(+), 8 deletions(-) (limited to 'npc') diff --git a/npc/014-5-1/sagratha.txt b/npc/014-5-1/sagratha.txt index 8875d34df..7c565dfa9 100644 --- a/npc/014-5-1/sagratha.txt +++ b/npc/014-5-1/sagratha.txt @@ -352,7 +352,6 @@ function teachMagic { skill TMW2_PLANTKINGDOM, 1, 0; setq General_Sagratha, 5; break; - } case 6: if (MAGIC_LVL < 4) goto L_Magicless; @@ -371,7 +370,6 @@ function teachMagic { skill TMW2_FAIRYKINGDOM, 1, 0; setq General_Sagratha, 7; break; - } case 8: if (MAGIC_LVL < 5) goto L_Magicless; @@ -390,7 +388,6 @@ function teachMagic { skill TMW2_FROZENHEART, 1, 0; setq General_Sagratha, 9; break; - } case 10: if (MAGIC_LVL < 6) goto L_Magicless; diff --git a/npc/015-8-1/campaign.txt b/npc/015-8-1/campaign.txt index a6bc5854e..ae1ca0eaa 100644 --- a/npc/015-8-1/campaign.txt +++ b/npc/015-8-1/campaign.txt @@ -15,6 +15,7 @@ OnBegin: .@m$=getmap(); .@n$=instance_npcname(.name$); + 'MAPID=getmap(); // 255 = PCBLOCK_ATTACK|PCBLOCK_SKILL|PCBLOCK_USEITEM|PCBLOCK_COMMANDS|PCBLOCK_SITSTAND|PCBLOCK_IMMUNE|PCBLOCK_CHAT|PCBLOCK_MOVE setpcblock(255, true); @@ -22,11 +23,18 @@ OnBegin: // Setup boss units .SAGRATHA=monster(.@m$, 52, 40, "Sagratha", Sagratha, 1, .@n$+"::OnSagrathaDie", Size_Medium, 2); - .BOSS=monster(.@m$, 52, 40, l("Masked Assassin"), HoodedAssassin, 1, .@n$+"::OnSagrathaWin"); + .BOSS=monster(.@m$, 47, 40, l("Masked Assassin"), HoodedAssassin, 1, .@n$+"::OnSagrathaWin"); unitstop(.SAGRATHA); unitstop(.BOSS); + // Prevent players from engaging Sagratha and allies + clientcommand "/addignoreattack Sagratha"; + clientcommand "/addignoreattack "+l(strmobinfo(1, Mouboo)); + clientcommand "/addignoreattack "+l(strmobinfo(1, ForestMushroom)); + clientcommand "/addignoreattack "+strmobinfo(1, Mouboo); + clientcommand "/addignoreattack "+strmobinfo(1, ForestMushroom); + unittalk(.SAGRATHA, l("What are you doing here, @@!", get_race())); addtimer(1000, .@n$+"::OnS02"); @@ -63,11 +71,11 @@ OnS04: .@n$=instance_npcname(.name$); // Assassin's Army - areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, HoodedNinja), HoodedNinja, 4, .@n$+"::OnError"; - areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Assassin), Assassin, 7, .@n$+"::OnError"; + areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, HoodedNinja), HoodedNinja, 2, .@n$+"::OnError"; + areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Assassin), Assassin, 4, .@n$+"::OnError"; // Sagratha's Army - areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Mouboo), Mouboo, 2, .@n$+"::OnError", Size_Medium, 2; + areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, Mouboo), Mouboo, 5, .@n$+"::OnError", Size_Medium, 2; areamonster .@m$, 44, 40, 55, 50, strmobinfo(1, ForestMushroom), ForestMushroom, 2, .@n$+"::OnError", Size_Medium, 2; // Heal them because you should not be fighting (yet). @@ -132,6 +140,11 @@ OnW03: // Assassin, HoodedNinja, HoodedAssassin (boss) // Mouboo, ForestMushroom, Fluffy, Sagratha (boss) OnSagrathaDie: + .@n$=instance_npcname(.name$); + maptimer('MAPID, 70, .@n$+"::OnSagrathaReallyDie"); + end; + +OnSagrathaReallyDie: .@m$=getmap(); .@n$=instance_npcname(.name$); @@ -147,6 +160,11 @@ OnSagrathaDie: end; OnSagrathaWin: + .@n$=instance_npcname(.name$); + maptimer('MAPID, 70, .@n$+"::OnSagrathaReallyWin"); + end; + +OnSagrathaReallyWin: .@m$=getmap(); .@n$=instance_npcname(.name$); diff --git a/npc/015-8-1/puzzle.txt b/npc/015-8-1/puzzle.txt index 7d556ccd6..f472cdf0c 100644 --- a/npc/015-8-1/puzzle.txt +++ b/npc/015-8-1/puzzle.txt @@ -41,7 +41,7 @@ OnTouch: OnTimer10000: stopnpctimer; setnpctimer 0; - setnpcdisplay .name$, NPC_TRAP; + setnpcdisplay instance_npcname(.name$), NPC_TRAP; end; -- cgit v1.2.3-60-g2f50