From cf18ce071c79ae37e14ea38943e0b1d88da70a7b Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 9 Apr 2021 13:33:57 -0300 Subject: Override --- npc/magic/level1-lesser-heal.txt | 50 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 npc/magic/level1-lesser-heal.txt (limited to 'npc/magic/level1-lesser-heal.txt') diff --git a/npc/magic/level1-lesser-heal.txt b/npc/magic/level1-lesser-heal.txt new file mode 100755 index 00000000..27311157 --- /dev/null +++ b/npc/magic/level1-lesser-heal.txt @@ -0,0 +1,50 @@ +- script lesser-heal NPC32767,{ + if(call("magic_checks")) end; + if (Sp < 6) end; + if (getskilllv(SKILL_MAGIC) < .level) end; + @target_id = getcharid(3, @args$); + if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id) == 1) + set @target_id, BL_ID; // fallback to self + if (@args$ == "Mouboo" || @args$ == "mouboo") set @target_id, getnpcid("Mouboo"); + .@range = (((MATK1 + getskilllv(SKILL_MAGIC) + getskilllv(.school) + 10) / 100) + 2); + if (distance(BL_ID, @target_id) >= .@range) end; + if (PVP_CHANNEL != get(PVP_CHANNEL, @target_id) && get(PVP_CHANNEL, @target_id) != 0) end; + if (countitem("Lifestone") < 1) end; + set @_M_BLOCK, 1; // block casting, until the timer clears it + addtimer 500, "Magic Timer::OnClear"; // set the new debuff + delitem "Lifestone", 1; + callfunc "adjust_spellpower"; + Sp = Sp - 6; + misceffect FX_MAGIC_WHITE, strcharinfo(0); + callfunc "magic_exp"; + if (@args$ == "Mouboo" || @args$ == "mouboo") goto L_Mouboo; + if (@target_id != BL_ID) goto L_NotMe; + goto L_Continue; + +L_NotMe: + misceffect FX_MAGIC_WHITE, @target_id; + void call("gain_heal_xp", min(200, (get(MaxHp, @target_id) - get(Hp, @target_id))), 1, 2, 2); + goto L_Continue; + +L_Continue: + if (getskilllv(SKILL_MAGIC_DARK) >= 1) sc_start SC_HALT_REGENERATE, 2000, 0; + if (get(Hp, @target_id) < 1) end; + addtimer 0, strnpcinfo(0) + "::OnSlowHeal", @target_id; + end; + +OnSlowHeal: + heal 200, 0, 1; + end; + +L_Mouboo: + mes "Mouboo : ##3##BYour spell seems to have no effect on the mouboo."; + close; + +OnInit: + .school = SKILL_MAGIC_LIFE; + set .invocation$, chr(MAGIC_SYMBOL) + "lum"; // used in npcs that refer to this spell + void call("magic_register"); + .level = 1; + .exp_gain = 1; + end; +} -- cgit v1.2.3-60-g2f50