From 50d9786d4394f4856fb4fb53959669e2c1e5cf70 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 21 Sep 2018 12:13:15 -0300 Subject: Optimize a tiny bit Captain script --- npc/016-1/captain.txt | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/npc/016-1/captain.txt b/npc/016-1/captain.txt index f27208b45..a53243d7e 100644 --- a/npc/016-1/captain.txt +++ b/npc/016-1/captain.txt @@ -58,16 +58,7 @@ L_THurns: next; mesq l("I was planning to go there soon, anyway. All aboard!"); close2; - addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent"; - @timer_navio_running = 1; - warp "016-6", 40, 32; - - // 10% base chance of Pirate Attack! - // Each level INCREASES this in 0.1%. - // So for a level 40 player, chances are 14%. - if (rand(1, 10000) < 1000+(BaseLevel*10)) - addtimer rand(3000,6000), "#MarineShipAttack::OnEvent"; - end; + goto L_DoWarp; @@ -117,6 +108,14 @@ L_TTulim: next; mesq l("I was planning to go there soon, anyway. All aboard!"); close2; + goto L_DoWarp; + +L_TooWeak: + mesn; + mesq l("The sea route I take is very dangerous, and full of pirates. You're too weak to travel with me."); + close; + +L_DoWarp: addtimer nard_time(PC_DEST$), "#MarineShip::OnEvent"; @timer_navio_running = 1; warp "016-6", 40, 32; @@ -128,10 +127,6 @@ L_TTulim: addtimer rand(3000,6000), "#MarineShipAttack::OnEvent"; end; -L_TooWeak: - mesn; - mesq l("The sea route I take is very dangerous, and full of pirates. You're too weak to travel with me."); - close; L_Close: close; -- cgit v1.2.3-60-g2f50