summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/commands/event.txt24
1 files changed, 22 insertions, 2 deletions
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;
}