summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2019-05-20 15:26:50 -0300
committerJesusaves <cpntb1@ymail.com>2019-05-20 15:26:50 -0300
commitb88d4038a05766bc6627f23f863db81078adf7c4 (patch)
tree8ea9071fd655f179a203ca1278b8d0cf46f2352c /npc
parentd890751e6fad356e92c01839aa638378e0c48967 (diff)
downloadserverdata-b88d4038a05766bc6627f23f863db81078adf7c4.tar.gz
serverdata-b88d4038a05766bc6627f23f863db81078adf7c4.tar.bz2
serverdata-b88d4038a05766bc6627f23f863db81078adf7c4.tar.xz
serverdata-b88d4038a05766bc6627f23f863db81078adf7c4.zip
Make @toevent less aggressive/picky with harmed players
Diffstat (limited to 'npc')
-rw-r--r--npc/commands/event.txt19
1 files changed, 15 insertions, 4 deletions
diff --git a/npc/commands/event.txt b/npc/commands/event.txt
index b3b556b82..c9996c67a 100644
--- a/npc/commands/event.txt
+++ b/npc/commands/event.txt
@@ -237,6 +237,17 @@ OnCall:
end;
OnCall:
+ if (!@toeventchk) {
+ @toeventval1=readparam(Hp);
+ @toeventval2=readparam(Sp);
+ @toeventchk=1;
+ specialeffect 310;
+ addtimer 4000, "@toevent::OnEffect";
+ }
+ end;
+
+OnEffect:
+ @toeventchk=0;
// Calculate
if (!$@GM_EVENT && !$@MK_SCENE && $EVENT$ == "") {
dispbottom l("The mana bridge is closed at the moment.");
@@ -244,11 +255,11 @@ OnCall:
} else if (BaseLevel < 10) {
dispbottom l("You are not strong enough to survive this trip.");
end;
- } else if (readparam(Sp) != readparam(MaxSp)) {
- dispbottom l("You need all your mana to do this trip.");
+ } else if (readparam(Sp) < @toeventval2) {
+ dispbottom l("You must not be using mana to do this trip.");
end;
- } else if (readparam(Hp) != readparam(MaxHp)) {
- dispbottom l("You cannot be hurt to do this trip.");
+ } else if (readparam(Hp) < @toeventval1) {
+ dispbottom l("You cannot be fighting to do this trip.");
end;
} else if (getmapname() ~= "001-*") {
dispbottom l("You are already at the Mana Plane of Existence.");