diff options
Diffstat (limited to 'npc/magic')
-rw-r--r-- | npc/magic/revive.txt | 28 | ||||
-rw-r--r-- | npc/magic/study.txt | 1 |
2 files changed, 29 insertions, 0 deletions
diff --git a/npc/magic/revive.txt b/npc/magic/revive.txt new file mode 100644 index 000000000..a3f2b4617 --- /dev/null +++ b/npc/magic/revive.txt @@ -0,0 +1,28 @@ +// TMW2 script +// Author: Jesusalva <admin@tmw2.org> +// +// Magic Script: TMW2_REVIVE +// Magic Script: TMW2_RESSURECT +// +// Skill to revive players +// TODO: Reimburse EXP? + +// revives getarg(0) +function script SK_revive { + .@target=getarg(0); + if (getunittype(.@target) != UNITTYPE_PC) { + dispbottom l("This skill can only be used on players!"); + return; + } + recovery(.@target); + return; +} + +// revive in getarg(0) range from caster +function script SK_ressurect { + .@r=getarg(0); + getmapxy(.@m$, .@x, .@y, 0); + recovery(.@m$, .@x-.@r, .@y-.@r, .@x+.@r, .@y+.@r); + return; +} + diff --git a/npc/magic/study.txt b/npc/magic/study.txt index 547e8aa63..6f039ce9d 100644 --- a/npc/magic/study.txt +++ b/npc/magic/study.txt @@ -10,6 +10,7 @@ function script SK_study { .@mobGD=getarg(0); if (getunittype(.@mobGD) != UNITTYPE_MOB) { dispbottom l("This skill can only be used on monsters!"); + return; } .@mobID=getunitdata(.@mobGD, UDT_CLASS); dispbottom l("%s - %d/%d HP, %d/%d MP", |