From 5142e7ea77b43de41db8d3df66dc44b61f26038e Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 3 Jul 2018 12:32:41 -0300 Subject: Error threading involving party leader, redo some logic --- npc/008-0/_import.txt | 1 + npc/008-0/mapflags.txt | 2 ++ npc/008-0/master.txt | 23 ++++++++++++++++------- 3 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 npc/008-0/mapflags.txt (limited to 'npc/008-0') diff --git a/npc/008-0/_import.txt b/npc/008-0/_import.txt index b4c32c2d9..1ff3fcc44 100644 --- a/npc/008-0/_import.txt +++ b/npc/008-0/_import.txt @@ -2,4 +2,5 @@ // This file is generated automatically. All manually added changes will be removed when running the Converter. "npc/008-0/_mobs.txt", "npc/008-0/_warps.txt", +"npc/008-0/mapflags.txt", "npc/008-0/master.txt", diff --git a/npc/008-0/mapflags.txt b/npc/008-0/mapflags.txt new file mode 100644 index 000000000..fb8f6a7b9 --- /dev/null +++ b/npc/008-0/mapflags.txt @@ -0,0 +1,2 @@ +008-0 mapflag zone MMO +008-1 mapflag zone MMO diff --git a/npc/008-0/master.txt b/npc/008-0/master.txt index 2cf7129f7..7a7f3ed8c 100644 --- a/npc/008-0/master.txt +++ b/npc/008-0/master.txt @@ -24,7 +24,7 @@ mesn; mesq l("You also can't stay there forever! You will have about 20 minutes to entirely clear it out and defeat the last boss."); if (!party_expon(getcharid(1))) - mesc l("Note: your party is not sharing experience, and will suffer a time penalty. Your time will be halved."); + mesc l("Note: Your party is currently not sharing experience, and will suffer a time penalty. Your time will be halved."), 6; next; // Get info about your party, and backup it getpartymember(getcharid(1)); @@ -117,26 +117,35 @@ OnStart: @pmloop=0; OnLoop: @pmloop+=1; + .@lost=""; // Anti-Crazyfefeâ„¢ Alpha System if (getcharid(1) <= 0) { // Left the party! - @pmloop=0; - warp "008-0", 47, 64; - dispbottom l("You are not a member of a party anymore."); + .@lost=l("You are not a member of a party anymore."); } if (!party_expon(getcharid(1))) { // Party exp sharing disabled means time penalty. @pmloop+=1; } + // Check if party master still alive and in caves. + if (getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1))) <= 0) + .@lost=l("Party leader is gone."); + else if (!(.@m$ ~= "008-*")) + .@lost=l("Party leader is not on dungeons."); + // Add new cycle or finish. - if (@pmloop < 1200) { + if (@pmloop < 1200 && .@lost == "") addtimer(1000, "Party Master::OnLoop"); - } else { + else + .@lost=l("You ran out of time..."); + + // See if it is time to finish + if (.@lost != "") { @pmloop=0; warp "008-0", 47, 64; - dispbottom l("You ran out of time..."); + dispbottom str(.@lost); } end; -- cgit v1.2.3-70-g09d2