From 4f5d098468ad13848c2c0f4589a8478d8d3f6176 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 22 Feb 2019 18:01:31 -0300 Subject: Handle death and logout at ship travels --- npc/001-8/hub.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/npc/001-8/hub.txt b/npc/001-8/hub.txt index d581659a3..4a0cc7e19 100644 --- a/npc/001-8/hub.txt +++ b/npc/001-8/hub.txt @@ -418,6 +418,20 @@ OnPCLogoutEvent: if (PC_DIE_COUNTER <= 1 && @qhub_died) { dispbottom l("Dying outside a town square will cause EXP loss."); } + // If you were travelling and died/logged out, cleaning is needed + if (@timer_navio_running) { + @timer_navio_running=0; + // Logged out? Correct your position to inside the ship + // Of course, this is messy... But still better than Save Point + if (!@qhub_died) { + if (.@mapa$ ~= "016-*") + warp "016-1", 28, 27; + else if (.@mapa$ ~= "002-*") + warp "002-1", 55, 40; + else + warp "Save", 0, 0; + } + } // This allows code to override death penalty, just once: // @deathpenalty_override -- cgit v1.2.3-70-g09d2