diff options
author | Jesusaves <cpntb1@ymail.com> | 2018-06-12 21:48:29 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2018-06-12 21:48:29 -0300 |
commit | e26986ef0356e4f152197dca3d54991afbd18bad (patch) | |
tree | 97424953fe0f8a58eb49feb752388388cea755b6 | |
parent | 7a5cc9c1e36c99ebd2c07f14145a5fc792b27eda (diff) | |
download | serverdata-e26986ef0356e4f152197dca3d54991afbd18bad.tar.gz serverdata-e26986ef0356e4f152197dca3d54991afbd18bad.tar.bz2 serverdata-e26986ef0356e4f152197dca3d54991afbd18bad.tar.xz serverdata-e26986ef0356e4f152197dca3d54991afbd18bad.zip |
Ship CleanUp must be done AFTER you've disembarked.
-rw-r--r-- | npc/016-6/main.txt | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/npc/016-6/main.txt b/npc/016-6/main.txt index fc28ed91d..522acb671 100644 --- a/npc/016-6/main.txt +++ b/npc/016-6/main.txt @@ -6,18 +6,6 @@ end; OnEvent: - // Clean up pirate ship, if needed. - if (mobcount("016-7", "#MarineShipAttack::OnPirateDie") && !getmapusers("016-7")) { - killmonster("016-7", "All"); - } - if (mobcount("016-7", "#MarineShipAttack::OnVictory") && !getmapusers("016-7")) { - killmonster("016-7", "All"); - } - if (mobcount("016-7", "#MarineShipAttack::OnVictory") > 1) { - killmonster("016-7", "#MarineShipAttack::OnVictory"); - monster "016-7", 38, 27, "Pirate Captain", OceanPirate, "#MarineShipAttack::OnVictory"; - } - // Handle travel if (@timer_navio_running == 0) end; if (PC_DEST$ == "Hurns") goto L_Hurns; @@ -31,7 +19,7 @@ L_Hurns: @timer_navio_running = 0; warp "012-1", 141, 65; message strcharinfo(0), l("@@ disembarks at Hurnscald.", strcharinfo(0)); - end; + goto L_CleanUp; L_Tulim: PC_DEST$ = ""; @@ -39,7 +27,7 @@ L_Tulim: @timer_navio_running = 0; warp "003-1", 119, 25; message strcharinfo(0), l("@@ disembarks at Tulimshar.", strcharinfo(0)); - end; + goto L_CleanUp; L_Error: debugmes "ERROR: PLAYER INVALID PC_DEST ON #MarineShip: " + PC_DEST$; @@ -47,6 +35,20 @@ L_Error: @timer_navio_running = 0; warp "000-1", 22, 22; dispbottom l("An error on your travel happened. Please report."); + goto L_CleanUp; + +L_CleanUp: + // Clean up pirate ship, if needed. + if (mobcount("016-7", "#MarineShipAttack::OnPirateDie") && !getmapusers("016-7")) { + killmonster("016-7", "All"); + } + if (mobcount("016-7", "#MarineShipAttack::OnVictory") && !getmapusers("016-7")) { + killmonster("016-7", "All"); + } + if (mobcount("016-7", "#MarineShipAttack::OnVictory") > 1) { + killmonster("016-7", "#MarineShipAttack::OnVictory"); + monster "016-7", 38, 27, "Pirate Captain", OceanPirate, "#MarineShipAttack::OnVictory"; + } end; } |