summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgumi <git@gumi.ca>2018-11-10 15:04:21 -0500
committergumi <git@gumi.ca>2018-11-10 15:08:25 -0500
commitfd06a7799004350139d16b7b21424acf10af457e (patch)
treecc4a7de7978d89dc8ca4014224d10247eb2fac79
parent95585577d382352251bebca35629eebf2a1fe253 (diff)
downloadserverdata-fd06a7799004350139d16b7b21424acf10af457e.tar.gz
serverdata-fd06a7799004350139d16b7b21424acf10af457e.tar.bz2
serverdata-fd06a7799004350139d16b7b21424acf10af457e.tar.xz
serverdata-fd06a7799004350139d16b7b21424acf10af457e.zip
fix the mouboo heal exploit
-rw-r--r--world/map/npc/magic/level1-lesser-heal.txt8
-rw-r--r--world/map/npc/magic/level2-lay-on-hands.txt9
2 files changed, 11 insertions, 6 deletions
diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt
index b94d4142..bc031cb1 100644
--- a/world/map/npc/magic/level1-lesser-heal.txt
+++ b/world/map/npc/magic/level1-lesser-heal.txt
@@ -6,7 +6,7 @@
set @target_id, getcharid(3, @args$);
if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1)
set @target_id, BL_ID; // fallback to self
- if (@args$ == "Mouboo" || @args$ == "mouboo") set @target_id, getnpcid("Mouboo");
+ if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo;
set .@range, (((MATK1 + getskilllv(SKILL_MAGIC) + getskilllv(.school) + 10) / 100) + 2);
if (distance(BL_ID, @target_id) >= .@range) end;
if (PVP_CHANNEL != get(PVP_CHANNEL, @target_id) && get(PVP_CHANNEL, @target_id) != 0) end;
@@ -18,7 +18,6 @@
set Sp, Sp - 6;
misceffect FX_MAGIC_WHITE, strcharinfo(0);
callfunc "magic_exp";
- if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo;
if (@target_id != BL_ID) goto L_NotMe;
goto L_Continue;
@@ -39,7 +38,10 @@ OnSlowHeal:
end;
L_Mouboo:
- mes "Mouboo : ##3##BYour spell seems to have no effect on the mouboo.";
+ set @target_id, getnpcid("Mouboo");
+ set .@range, (((MATK1 + getskilllv(SKILL_MAGIC) + getskilllv(.school) + 10) / 100) + 2);
+ if (distance(BL_ID, @target_id) >= .@range) end;
+ mes "Magic : ##3##BThis spell has no effect on animals.";
close;
OnInit:
diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt
index 8bb0782b..69a7d725 100644
--- a/world/map/npc/magic/level2-lay-on-hands.txt
+++ b/world/map/npc/magic/level2-lay-on-hands.txt
@@ -46,10 +46,13 @@ L_Pay:
end;
L_Mouboo:
- set @spell, 1;
+ set @target_id, getnpcid("Mouboo");
+ callfunc "adjust_spellpower";
+ if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower) * 12) + @spellpower) / 100) + 2) end;
+ misceffect FX_MAGIC_WHITE, strcharinfo(0); // on caster
+ misceffect FX_MAGIC_WHITE, @target_id; // on target
callfunc "QuestMoubooHeal";
- set @needed, 1000;
- goto L_Pay;
+ end;
OnInit:
set .school, SKILL_MAGIC_LIFE;