summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/016-6/main.txt30
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;
}