From cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Sun, 2 Jan 2022 09:25:30 -0300 Subject: Add a new skill: Transfer MP --- npc/magic/mpregen.txt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'npc/magic') 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; -- cgit v1.2.3-70-g09d2