summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2024-06-30 12:14:22 -0300
committerJesusaves <cpntb1@ymail.com>2024-06-30 12:14:22 -0300
commit3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051 (patch)
treeab4ba69d59c4a69ca86f218279e74049e1b69a3d
parent3d8d11f13eeaf96d916a916faae4442516a49916 (diff)
downloadserverdata-3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051.tar.gz
serverdata-3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051.tar.bz2
serverdata-3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051.tar.xz
serverdata-3c50d926f6cd12b1a4f4fc29c2eee1bbe5e9d051.zip
Some cleanup from the recent exploit fix.
-rw-r--r--npc/magic/mpregen.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/npc/magic/mpregen.txt b/npc/magic/mpregen.txt
index 7bbd4e471..95d035028 100644
--- a/npc/magic/mpregen.txt
+++ b/npc/magic/mpregen.txt
@@ -25,11 +25,17 @@ function script SK_transfermp {
.@mp = Sp;
.@me = getcharid(3);
.@tg = getarg(0, @skillTarget);
+ if (getunittype(.@tg) != BL_PC) {
+ dispbottom l("This skill can only be used on other players.");
+ return;
+ }
+ // Switch the player
detachrid();
attachrid(.@tg);
+ // Safeguard (redundant, hopefully)
if (!playerattached()) {
attachrid(.@me);
- dispbottom l("Specified target does not exist. An error happened.");
+ consolewarn("Specified target %d for SK_transfermp does not exist. An error happened.", .@tg);
return;
}
.@mo = MaxSp - Sp;