From b88d4038a05766bc6627f23f863db81078adf7c4 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Mon, 20 May 2019 15:26:50 -0300 Subject: Make @toevent less aggressive/picky with harmed players --- npc/commands/event.txt | 19 +++++++++++++++---- 1 file 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."); -- cgit v1.2.3-60-g2f50