summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--npc/functions/hub.txt18
-rw-r--r--npc/magic/revive.txt28
-rw-r--r--npc/magic/study.txt1
-rw-r--r--npc/scripts.conf1
4 files changed, 40 insertions, 8 deletions
diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt
index 85c8f8c6a..841b2c6f5 100644
--- a/npc/functions/hub.txt
+++ b/npc/functions/hub.txt
@@ -322,11 +322,6 @@ function script HUB_SkillInvoke {
areasc(8, 15000, SC_FREEZE, BL_PC | BL_MOB | BL_MER | BL_HOM, "filter_hostile");
// Maybe filter_notme() would work better, indeed
break;
- case TMW2_JUDGMENT:
- .@dmg=AdjustSpellpower(300);
- areaharm(@skillTarget, 8, .@dmg, HARM_MAGI, Ele_Holy);
- areasc2(getmap(), @skillTargetX, @skillTargetY, 2, 10000, SC_BLOODING, BL_MOB|BL_PC);
- break;
/*
// TODO: Ultimate Skills (T5/0)
@@ -352,10 +347,17 @@ function script HUB_SkillInvoke {
areaharm(@skillTarget, 4, -AdjustSpellpower(.@PW), HARM_MISC, "filter_friendly");
break;
- // FIXME: Windwalker (deprecate?), Last Standing Man (2 MSP?)
- // TODO: Ressurection skill
+ // FIXME: Windwalker (1MSP?), Last Standing Man (2 MSP?)
+
+ // Ressurection skills
+ case TMW2_REVIVE:
+ SK_revive(@skillTarget);
+ break;
+ case TMW2_RESSURECT:
+ SK_ressurect(@skillLv);
+ break;
- // XXX: Fire Class (TODO: DMG over time?)
+ // XXX: Fire Class (TODO: DMG over time? SC_BLOODING?)
case TMW2_FIREARROW:
.@PW=140+(10*@skillLv);
harm(@skillTarget, AdjustSpellpower(.@PW), HARM_MAGI, Ele_Fire);
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",
diff --git a/npc/scripts.conf b/npc/scripts.conf
index 493e9c31a..36d8f1dc1 100644
--- a/npc/scripts.conf
+++ b/npc/scripts.conf
@@ -126,6 +126,7 @@
"npc/magic/transmigration.txt",
"npc/magic/parum.txt",
"npc/magic/plantkingdom.txt",
+"npc/magic/revive.txt",
"npc/magic/study.txt",
// These are to be proccessed later