From d428bb5d828ee92aa10928ebebc12d1240778ab7 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Wed, 30 May 2018 19:02:16 -0300 Subject: Prepare @toevent, untested and with crazy code, DO NOT USE. --- npc/commands/event.txt | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'npc/commands') diff --git a/npc/commands/event.txt b/npc/commands/event.txt index c3bde37ff..d3d74a611 100644 --- a/npc/commands/event.txt +++ b/npc/commands/event.txt @@ -87,8 +87,7 @@ function script GlobalEventMenu { end; OnCall: - if (!is_gm()) - { + if (!is_gm()) { end; } @@ -96,6 +95,27 @@ OnCall: closedialog; end; +- script @toevent 32767,{ + end; + +OnCall: + if (!$@GM_EVENT) + dispbottom l("The mana bridge is closed at the moment."); + else if (BaseLevel < 10) + dispbottom l("You are not strong enough to survive this trip."); + else if (readparam(Sp) != readparam(MaxSp)) + dispbottom l("You need all your mana to do this trip."); + else if (readparam(Hp) != readparam(MaxHp)) + dispbottom l("You cannot be hurt to do this trip."); + else if (getmapname() ~= "/001-*/g") + dispbottom l("You are already at the Mana Plane of Existence."); + else if (getmapname() == "boss" || getmapname() == "sec_pri") + dispbottom l("The Mana Plane is currently out of reach."); + else + warp "001-1", 235, 26; + end; + OnInit: bindatcmd "event", "@event::OnCall", 99, 99, 0; + bindatcmd "toevent", "@toevent::OnCall", 1, 99, 0; } -- cgit v1.2.3-60-g2f50