diff options
author | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:34:27 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2021-07-07 20:34:27 -0300 |
commit | 9877fd4ad81120af8e63e96d5d429092014dc017 (patch) | |
tree | ec045a0535109a2e0d82e0e8155eb01ed9776452 /world/map/npc/magic/level2-arrow-hail.txt | |
parent | aedbeb335a5ec5f55d22eace389076a18241ac9a (diff) | |
download | serverdata-9877fd4ad81120af8e63e96d5d429092014dc017.tar.gz serverdata-9877fd4ad81120af8e63e96d5d429092014dc017.tar.bz2 serverdata-9877fd4ad81120af8e63e96d5d429092014dc017.tar.xz serverdata-9877fd4ad81120af8e63e96d5d429092014dc017.zip |
Remove all Legacy files
Diffstat (limited to 'world/map/npc/magic/level2-arrow-hail.txt')
-rw-r--r-- | world/map/npc/magic/level2-arrow-hail.txt | 118 |
1 files changed, 0 insertions, 118 deletions
diff --git a/world/map/npc/magic/level2-arrow-hail.txt b/world/map/npc/magic/level2-arrow-hail.txt deleted file mode 100644 index 24866b1c..00000000 --- a/world/map/npc/magic/level2-arrow-hail.txt +++ /dev/null @@ -1,118 +0,0 @@ --|script|arrow-hail|32767 -{ - // we can not start here because for the puppets this is OnClick - end; - -OnCast: - if(call("magic_checks")) end; - if (getskilllv(.school) < .level) end; - if (getskilllv(SKILL_MAGIC) < .level) end; - if (Sp < 25) end; - explode .@map_ext[0], getmap(), "-"; - if (.@map_ext[1] != 1 && getmap() != "099-5") end; // XXX this is fugly, in the future let's use MF_OUTSIDE to detect if a map is "outside" or "inside" - if (getmapflag(getmap(), MF_TOWN)) end; - if (countitem("Arrow") >= 20 && countitem("SulphurPowder") >= 1) delitem "Arrow", 20; - elif (countitem("IronArrow") >= 20 && countitem("SulphurPowder") >= 1) delitem "IronArrow", 20; - else end; - delitem "SulphurPowder", 1; - set Sp, Sp - 25; - set @_M_BLOCK, 1; // block casting, until the timer clears it - addtimer 5000, "Magic Timer::OnClear"; // set the new debuff - - setarray @away[0], POS_X, POS_Y, getdir(), (.range + 1), 0; - callsub S_AwayFrom; - - set @nearby, 0; - foreach 1, getmap(), @away[0] - 14, @away[1] - 14, @away[0] + 14, @away[1] + 14, - strnpcinfo(0) + "::OnNearbyNpc"; - if (@nearby) goto L_Absorb; - - callfunc "adjust_spellpower"; - set @new_npc_name$, "#" + strnpcinfo(0) + "#" + getcharid(3); // make a unique puppet name for every player - callfunc "magic_exp"; - misceffect FX_MAGIC_AHAIL_CAST, strcharinfo(0); - set @spell_npc, puppet(getmap(), POS_X, POS_Y, @new_npc_name$, 127); // clone npc => get puppet id - if (@spell_npc < 1) end; - set .max_hit, (@spellpower / 8), @spell_npc; // set .max_hit in the puppet - set .caster, getcharid(3), @spell_npc; // tell the puppet who controls it - set .damage, 125, @spell_npc; - set .damage_bonus, (@spellpower / 5), @spell_npc; - set .area_x, @away[0], @spell_npc; set .area_y, @away[1], @spell_npc; - donpcevent @new_npc_name$+"::OnLaunch"; // start the puppet timer and strike - initnpctimer @new_npc_name$; // start the destroy timer - end; - -S_AwayFrom: - if(@away[2] == 6 && !(iscollision(getmap(), (@away[0] + 1), @away[1]))) // right - set @away[0], @away[0] + 1; - if(@away[2] == 4 && !(iscollision(getmap(), @away[0], (@away[1] - 1)))) // up - set @away[1], @away[1] - 1; - if(@away[2] == 2 && !(iscollision(getmap(), (@away[0] - 1), @away[1]))) // left - set @away[0], @away[0] - 1; - if(@away[2] == 0 && !(iscollision(getmap(), @away[0], (@away[1] + 1)))) // down - set @away[1], @away[1] + 1; - set @away[4], @away[4] + 1; - if(@away[4] < @away[3]) goto S_AwayFrom; - return; - -L_Absorb: - message strcharinfo(0), "##3Arrow Hail : ##BA nearby arrow hail absorbs your magic!"; - end; - -OnNearbyNpc: - explode .@nearby$[0], strnpcinfo(0,@target_id), "#"; - if(.@nearby$[0] == "arrow-hail" || .@nearby$[1] == "arrow-hail") - set @nearby, @nearby + 1; - end; - -OnLaunch: - if (!(isloggedin(.caster))) destroy; - if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing - if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map - set .hit, .hit + 1; - if(.hit > .max_hit) destroy; - set .launch, 0; - callsub S_Launch; - addnpctimer 250 + rand(50) + rand(50), strnpcinfo(0)+"::OnLaunch"; // loop until max - end; - -S_Launch: - npcareawarp .area_x - 6, .area_y - 6, .area_x + 6, .area_y + 6, 0, strnpcinfo(0); - misceffect FX_ARROW_HAIL; - set .done, 0; - foreach 2, strnpcinfo(3), getnpcx(), getnpcy(), getnpcx(), getnpcy(), strnpcinfo(0) + "::OnHit", .caster; - if (get(PVP_CHANNEL, .caster) || getmapflag(getmap(.caster), MF_PVP)) - foreach 0, strnpcinfo(3), getnpcx(), getnpcy(), getnpcx(), getnpcy(), strnpcinfo(0) + "::OnHit", .caster; - if(!.done && get(POS_X, .caster) == getnpcx() && get(POS_Y, .caster) == getnpcy()) - set Hp, get(Hp, .caster) - (.damage + rand(.damage_bonus) + rand(.damage_bonus)), .caster; // injure caster - set .launch, .launch + 1; - if(.launch < 3) goto S_Launch; - return; - -OnTimer30000: - debugmes "frillyar timeout! [this shouldn't happen]"; - destroy; - -OnHit: - if (!(isloggedin(.caster))) destroy; - if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing - if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map - - if(target(.caster, @target_id, 16) != 16 && .caster != @target_id) end; - if((get(BL_TYPE, @target_id) & 1) == 0) end; // either mob or pc - set .@damage, .damage + rand(.damage_bonus) + rand(.damage_bonus); - if(.caster != @target_id) - set .@damage, (.@damage * (100 - get(MDEF1, @target_id))) / 100; - injure .caster, @target_id, .@damage; - set .done, 1; - end; - -OnInit: - set .school, SKILL_MAGIC_WAR; - set .range, 7; - set .invocation$, chr(MAGIC_SYMBOL) + "frillyar"; // used in npcs that refer to this spell - void call("magic_register", "OnCast"); - set .level, 2; - set .exp_gain, 2; - end; -} |