diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-12-25 11:59:43 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-12-25 11:59:43 -0300 |
commit | 90f8941def4b977e65bd0f441aab526333736a11 (patch) | |
tree | ec3736e49358e34f6938293d6616e80c8735702c /npc | |
parent | 71fdf4363252da10392a944f588a26222bd4e5e4 (diff) | |
download | serverdata-90f8941def4b977e65bd0f441aab526333736a11.tar.gz serverdata-90f8941def4b977e65bd0f441aab526333736a11.tar.bz2 serverdata-90f8941def4b977e65bd0f441aab526333736a11.tar.xz serverdata-90f8941def4b977e65bd0f441aab526333736a11.zip |
Add required skill: Resurrection. Continue the code for the showdown.
Diffstat (limited to 'npc')
-rw-r--r-- | npc/006-6/all.txt | 2 | ||||
-rw-r--r-- | npc/006-7/ctrl.txt | 4 | ||||
-rw-r--r-- | npc/027-4/saves.txt | 4 | ||||
-rw-r--r-- | npc/config/magic.txt | 5 | ||||
-rw-r--r-- | npc/functions/hub.txt | 5 | ||||
-rw-r--r-- | npc/magic/revive.txt | 16 |
6 files changed, 33 insertions, 3 deletions
diff --git a/npc/006-6/all.txt b/npc/006-6/all.txt index 8b69bead8..50a40781f 100644 --- a/npc/006-6/all.txt +++ b/npc/006-6/all.txt @@ -37,7 +37,7 @@ OnInit: end; OnTouch: - if (BaseLevel > 50) + if (!$@ICICLE_CHALLENGE) warp "006-7", 44, 49; else dispbottom l("Your strength is not enough to power on this portal."); diff --git a/npc/006-7/ctrl.txt b/npc/006-7/ctrl.txt index 67223e25d..1a89b35ca 100644 --- a/npc/006-7/ctrl.txt +++ b/npc/006-7/ctrl.txt @@ -26,7 +26,7 @@ OnRw: mesn; mesq l("With Magic and Blades, The Icicle shall break. Do you undertake the challenge?"); mesc l("Advised: 6+ players"), 1; - mesc l("Advised: 1+ mage, 1+ tanker"), 1; + mesc l("Advised: 1+ mage, 1+ tanker, 2+ healer"), 1; mesc l("Time Limit: 90 minutes"), 1; mesc l("Enter/Leave after start: %s", b(l("NO"))), 1; next; @@ -89,7 +89,7 @@ OnRw: OnTimer5000: if (!mobcount("006-7", "all")) maptimer2("006-7", 10, "#OutOf0067::OnRw"); - if (.ticks < gettimetick(2) || !mobcount("006-7", "all")) { + if (.ticks < gettimetick(2) || !mobcount("006-7", "all") || !getmapusers("006-7")) { killmonsterall("006-7"); enablenpc .name$; .ticks = min(.ticks, gettimetick(2) + 1800); // Min. Cooldown: 30 min diff --git a/npc/027-4/saves.txt b/npc/027-4/saves.txt index 61cb5c576..34440b52e 100644 --- a/npc/027-4/saves.txt +++ b/npc/027-4/saves.txt @@ -98,8 +98,12 @@ function advancedMagic { mes l(".:: Magnus Healing ::."); mesc l("Heals in area every friendly unit (incl. homuns and mercs). Req. Lifestone to cast."); mes ""; + mes l(".:: Resurrection ::."); + mesc l("Revives an already dead allied player. Req. Lifestone to cast."); + mes ""; menuint l("Magnus Healing"), TMW2_MAGNUSHEAL, + l("Resurrection"), TMW2_RESURRECT, l("Cancel"), 0; return; } diff --git a/npc/config/magic.txt b/npc/config/magic.txt index ff3785147..f9caa7bcc 100644 --- a/npc/config/magic.txt +++ b/npc/config/magic.txt @@ -353,6 +353,10 @@ OnInit: RegisterMagic(2, CR_TRUST, 3, SpellBookPage, 1, CLASS_SCHOLARSHIP, 30); + // Resurrection + RegisterMagic(3, TMW2_RESURRECT, 10, SpellBookPage, 1, + CLASS_SCHOLARSHIP, 125); + /* Skillchain */ // First Aid RegisterMagic(1, TMW2_FIRSTAID, 10, SpellBookPage, 1, @@ -364,6 +368,7 @@ OnInit: RegisterMagic(3, TMW2_MAGNUSHEAL, 10, SpellBookPage, 1, CLASS_SCHOLARSHIP, 125, TMW2_HEALING, false); + /* Skillchain */ // Provoke RegisterMagic(1, SM_PROVOKE, 1, SpellBookPage, 1, diff --git a/npc/functions/hub.txt b/npc/functions/hub.txt index 8441436ac..a662c894c 100644 --- a/npc/functions/hub.txt +++ b/npc/functions/hub.txt @@ -505,6 +505,11 @@ function script HUB_SkillInvoke { GetManaExp(TMW2_HEALING, 3); break; //////////////////////////////// + // XXX: Revive Class + case TMW2_RESURRECT: + SK_resurrect(@skillLv, @skillTarget); + break; + //////////////////////////////// // XXX: Fire Class // (May burn targets for damage over time) case TMW2_FIREARROW: diff --git a/npc/magic/revive.txt b/npc/magic/revive.txt index daef77d56..96620c7e4 100644 --- a/npc/magic/revive.txt +++ b/npc/magic/revive.txt @@ -7,6 +7,22 @@ // Skill to revive players // TODO: Reimburse EXP? +// revive target (level, target) +function script SK_resurrect { + .@lv=getarg(0); + .@tg=getarg(1); + .@me=getcharid(3); + attachrid(.@tg); + if (ispcdead()) { + recovery(.@tg); + percentheal 100, 0; + percentheal -(100 - 10 * .@lv), 0; + } + detachrid(); + attachrid(.@me); + return; +} + // revives getarg(0) function script SK_revive { .@target=getarg(0); |