From 3fbbd431de30e0c685f24f78d356bc4da4b86920 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sat, 16 Jan 2021 15:36:21 -0300 Subject: Fix exploit at magic system, ignoring skills if you are AFK o.o --- npc/functions/hub.txt | 3 +++ 1 file changed, 3 insertions(+) (limited to 'npc/functions') diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index f108995ae..8b2241148 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -241,6 +241,9 @@ function script HUB_SkillInvoke { // If you can't do this: You can't do this if (getskilllv(@skillId) < @skillLv) Exception("System ERROR, HSI."+@skillId+" INVALID CAST (got "+@skillLv+" expected "+getskilllv(@skillId)+", sub-LC."+(getcharid(3)-2000000)+")", RB_DEBUGMES|RB_ISFATAL); + // You are AFK for over 3 minutes, that's crazy, disregard + if (checkidle() > 180) + return; // Record to database skillInvoke[@skillId] = skillInvoke[@skillId] + 1; -- cgit v1.2.3-60-g2f50