diff options
Diffstat (limited to 'npc/magic')
-rw-r--r-- | npc/magic/mpregen.txt | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/npc/magic/mpregen.txt b/npc/magic/mpregen.txt index e58af3c87..dc8ad2bd3 100644 --- a/npc/magic/mpregen.txt +++ b/npc/magic/mpregen.txt @@ -20,6 +20,23 @@ function script SK_mpregen { return; } +function script SK_transfermp { + .@mp = Sp; + .@me = getcharid(3); + .@tg = getarg(0, @skillTarget); + detachrid(); + attachrid(.@tg); + .@mo = MaxSp - Sp; + // Heal will be the smallest from: + // Current MP or Missing Mp + .@vl = min(.@mo, .@mp); + Sp += .@vl; + detachrid(); + attachrid(.@me); + Sp -= .@vl; + return; +} + /* - script sk#mpgen 32767,{ end; |