summaryrefslogtreecommitdiff
path: root/npc/functions
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2021-01-16 15:36:21 -0300
committerJesusaves <cpntb1@ymail.com>2021-01-16 15:36:21 -0300
commit3fbbd431de30e0c685f24f78d356bc4da4b86920 (patch)
tree2ebc7da1cc0f814d13b15bbe573fa821c110599e /npc/functions
parent03fe725bc069af8a1139a845f99c793d77f8f5d6 (diff)
downloadserverdata-3fbbd431de30e0c685f24f78d356bc4da4b86920.tar.gz
serverdata-3fbbd431de30e0c685f24f78d356bc4da4b86920.tar.bz2
serverdata-3fbbd431de30e0c685f24f78d356bc4da4b86920.tar.xz
serverdata-3fbbd431de30e0c685f24f78d356bc4da4b86920.zip
Fix exploit at magic system, ignoring skills if you are AFK o.o
Diffstat (limited to 'npc/functions')
-rw-r--r--npc/functions/hub.txt3
1 files changed, 3 insertions, 0 deletions
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;