From b84466f049d78258258a12e5b7dc213be4d2844a Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Thu, 15 Oct 2020 13:03:19 -0300 Subject: Anti-exploit patch for the previous commit --- npc/003-3/malindou.txt | 1 + npc/functions/hub.txt | 6 ++++++ 2 files changed, 7 insertions(+) (limited to 'npc') diff --git a/npc/003-3/malindou.txt b/npc/003-3/malindou.txt index cc9f2a88e..751a89505 100644 --- a/npc/003-3/malindou.txt +++ b/npc/003-3/malindou.txt @@ -660,6 +660,7 @@ OnSkillInvoke: if (!playerattached()) end; HUB_SkillInvoke(); + @skillId=0; end; // Level up events diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 95eb02fe0..2cf46f67c 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -230,6 +230,12 @@ function script HUB_Logout { // HUB_SkillInvoke ( ) function script HUB_SkillInvoke { + // Something is... wrong + if (!@skillId) { + Exception("ILLEGAL SKILL PASSED TO HUB. It has been compromised, Jim.", RB_DEBUGMES|RB_IRCBROADCAST) + return; + } + // TODO: Detect what was script-cast and what was player-case. Then, readd RB_IRCBROADCAST // If you can't do this: You can't do this if (getskilllv(@skillId) < @skillLv) -- cgit v1.2.3-60-g2f50