diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-07-03 12:32:41 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-07-03 12:32:41 -0300 |
commit | 5142e7ea77b43de41db8d3df66dc44b61f26038e (patch) | |
tree | c170c56e7f7d87a73b9c5fbc8602298f9a209e77 | |
parent | 2380857159abdb802790360dc9b673e7504ae71b (diff) | |
download | serverdata-5142e7ea77b43de41db8d3df66dc44b61f26038e.tar.gz serverdata-5142e7ea77b43de41db8d3df66dc44b61f26038e.tar.bz2 serverdata-5142e7ea77b43de41db8d3df66dc44b61f26038e.tar.xz serverdata-5142e7ea77b43de41db8d3df66dc44b61f26038e.zip |
Error threading involving party leader, redo some logic
-rw-r--r-- | maps/re/008-1.mcache | bin | 910 -> 913 bytes | |||
-rw-r--r-- | npc/008-0/_import.txt | 1 | ||||
-rw-r--r-- | npc/008-0/mapflags.txt | 2 | ||||
-rw-r--r-- | npc/008-0/master.txt | 23 | ||||
-rw-r--r-- | npc/008-1/master.txt | 50 |
5 files changed, 48 insertions, 28 deletions
diff --git a/maps/re/008-1.mcache b/maps/re/008-1.mcache Binary files differindex 029af0c09..c3e87da6a 100644 --- a/maps/re/008-1.mcache +++ b/maps/re/008-1.mcache 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; diff --git a/npc/008-1/master.txt b/npc/008-1/master.txt index 9d4e61efd..a3394581f 100644 --- a/npc/008-1/master.txt +++ b/npc/008-1/master.txt @@ -4,9 +4,33 @@ // Description: // This NPC is a work on progress. It measures all players equal. +008-1,48,117,0 script #FPDM1 NPC_HIDDEN,0,0,{ + end; +OnTouch: + // IMPORTANT: Prevent party master from returning here + getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1))); + if (.@m$ ~= "008-*" && + .@m$ != "008-0" && + .@m$ != "008-1" && + BaseLevel > 20 && + mobcount("008-1", "First Dungeon Master::OnBossDeath") == 0 && + @pmloop) { + dispbottom l("Go and follow @@, your party leader!", getpartyleader(getcharid(1))); + warp "008-1", 176, 20; // 008-2 + } else if (BaseLevel > 20) { + dispbottom l("If I bring @@, my party leader, and the boss is defeated, I can go you in.", getpartyleader(getcharid(1))); + } else { + mesc l("I cannot pass, because I am only level @@.", BaseLevel); + mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!"); + // I thought it would be better this way. There was at least three different ways to prevent that. + } + end; +} + 008-1,48,117,0 script First Dungeon Master NPC_BRGUARD_SWORD,{ - mesn; + // Double-check, you should have been flung out long ago. if (getcharid(1) <= 0) { + mesn; mesq l("Leaving your party? LAME."); warp "SavePoint",0,0; } @@ -15,6 +39,7 @@ end; } + mesn; mesq l("Compliments reaching this far, @@ from the @@ party!", strcharinfo(0), getpartyname(getcharid(1))); next; @@ -69,27 +94,10 @@ -// Only the party leader can start this. But you can rejoin, as long map leader is on 008-2+ +// Only the party leader can start this. L_NotYou: - getmapxy(.@m$, .@x, .@y, 0, getpartyleader(getcharid(1))); - if (.@m$ ~= "008-*" && - .@m$ != "008-0" && - .@m$ != "008-1" && - BaseLevel > 20 && - mobcount("008-1", "First Dungeon Master::OnBossDeath") == 0 && - @pmloop) { - mesn; - mesq l("Go and follow @@, your party leader!", getpartyleader(getcharid(1))); - warp "008-1", 176, 20; // 008-2 - } else if (BaseLevel > 20) { - mesn; - mesq l("If you bring me @@, your party leader, and the boss is defeated, I can let you in.", getpartyleader(getcharid(1))); - } else { - mesn; - mesq l("I cannot let you pass, because you are only level @@.", BaseLevel); - mesc l("Newbies can only get past their limits once, with their party leader level help! If they die, they can't rejoin!"); - // I thought it would be better this way. There was at least three different ways to prevent that. - } + mesn; + dispbottom l("Go and fetch @@, the party leader!", getpartyleader(getcharid(1))); close; // Minimum 3 players |