diff options
author | Jesusaves <cpntb1@ymail.com> | 2022-01-02 09:25:30 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2022-01-02 09:25:30 -0300 |
commit | cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea (patch) | |
tree | d62422c3f248bbad311aca8d33f068f93f2624d8 /npc/magic | |
parent | 8433d2049acdb8b3e7a649d22e9247d7021ba111 (diff) | |
download | serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.gz serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.bz2 serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.tar.xz serverdata-cd2fa3a4842c4f0fbd6f970485fdbfc5850fb3ea.zip |
Add a new skill: Transfer MP
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; |