From 0d9b6d4ba3cb077f4f0683d95c3fbaa3fcd83bdd Mon Sep 17 00:00:00 2001 From: ElTata <eltata@firemail.cc> Date: Wed, 26 Aug 2020 13:41:38 +0200 Subject: [PATCH] improv: new point notice moved after level notice --- Irpg/Main.pm | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Irpg/Main.pm b/Irpg/Main.pm index e4bdb1b..2ecc059 100644 --- a/Irpg/Main.pm +++ b/Irpg/Main.pm @@ -323,13 +323,6 @@ sub rpcheck { # check levels, update database $rps->{$k}{idled} += ($curtime - $$lasttime_ref); if ($rps->{$k}{next} < 1) { $rps->{$k}{level}++; - if (!($rps->{$k}{level} % 5)){ - $rps->{$k}{points}++; - Irpg::Irc::notice( - "Your hard training paid off, and you have ". - "one more point to invest.", - $rps->{$k}{nick}); - } if ($rps->{$k}{level} > 60) { $rps->{$k}{next} = int(($opts->{rpbase} * ($opts->{rpstep}**60)) + @@ -346,6 +339,12 @@ sub rpcheck { # check levels, update database Irpg::Irc::notice("You have attained level $rps->{$k}{level}! ". "Next level in ".duration($rps->{$k}{next}).".", $rps->{$k}{nick}); + if (!($rps->{$k}{level} % 5)){ + $rps->{$k}{points}++; + Irpg::Irc::notice( + "Your hard training paid off, and you have ". + "one more point to invest.", + $rps->{$k}{nick}); } find_item($k); challenge_opp($k); -- GitLab