From 0e1a7f000ccdcf6f84ec66192b025f261772cdb3 Mon Sep 17 00:00:00 2001 From: gumi Date: Sun, 11 Nov 2018 17:18:14 -0500 Subject: give unique ids to magic spell effects --- client-data | 2 +- world/map/db/const.txt | 69 ++++++++++++++++++++++ world/map/npc/magic/_procedures.txt | 6 +- world/map/npc/magic/level0-wand.txt | 8 +-- world/map/npc/magic/level1-aggravate.txt | 4 +- world/map/npc/magic/level1-detect-magic.txt | 4 +- world/map/npc/magic/level1-experience.txt | 2 +- world/map/npc/magic/level1-flare-dart.txt | 9 ++- world/map/npc/magic/level1-grow-alizarin.txt | 5 +- world/map/npc/magic/level1-grow-cobalt.txt | 5 +- world/map/npc/magic/level1-grow-gamboge.txt | 5 +- world/map/npc/magic/level1-grow-mauve.txt | 5 +- world/map/npc/magic/level1-lesser-heal.txt | 4 +- world/map/npc/magic/level1-magic-blade.txt | 6 +- world/map/npc/magic/level1-make-sulphur.txt | 2 +- world/map/npc/magic/level1-summon-maggots.txt | 5 +- world/map/npc/magic/level1-transmute-wood.txt | 2 +- world/map/npc/magic/level2-arrow-hail.txt | 2 +- world/map/npc/magic/level2-barrier.txt | 6 +- world/map/npc/magic/level2-detect-players.txt | 2 +- world/map/npc/magic/level2-enchant-lifestone.txt | 4 +- world/map/npc/magic/level2-flying-backpack.txt | 6 +- world/map/npc/magic/level2-happy-curse.txt | 14 ++--- world/map/npc/magic/level2-hide.txt | 6 +- world/map/npc/magic/level2-lay-on-hands.txt | 10 ++-- world/map/npc/magic/level2-lightning-strike.txt | 4 +- world/map/npc/magic/level2-magic-knuckles.txt | 6 +- world/map/npc/magic/level2-make-arrows.txt | 4 +- world/map/npc/magic/level2-make-iron-powder.txt | 4 +- world/map/npc/magic/level2-make-shirt.txt | 4 +- world/map/npc/magic/level2-make-short-tanktop.txt | 4 +- world/map/npc/magic/level2-make-tanktop.txt | 4 +- world/map/npc/magic/level2-protect.txt | 2 +- world/map/npc/magic/level2-rain.txt | 2 +- world/map/npc/magic/level2-shear.txt | 6 +- world/map/npc/magic/level2-summon-fluffies.txt | 5 +- world/map/npc/magic/level2-summon-mouboo.txt | 5 +- world/map/npc/magic/level2-summon-pinkie.txt | 5 +- world/map/npc/magic/level2-summon-snakes.txt | 12 ++-- .../map/npc/magic/level2-summon-spiky-mushroom.txt | 5 +- .../map/npc/magic/level2-summon-wickedmushroom.txt | 11 ++-- world/map/npc/magic/level2-toxic-dart.txt | 9 ++- 42 files changed, 177 insertions(+), 108 deletions(-) diff --git a/client-data b/client-data index 6b697c44..1c8e7960 160000 --- a/client-data +++ b/client-data @@ -1 +1 @@ -Subproject commit 6b697c4419fcf94b009284b3f1cc8fa1a9a30acc +Subproject commit 1c8e7960eed2c730e6156a2394f64223b678240f diff --git a/world/map/db/const.txt b/world/map/db/const.txt index a76f16b9..335ab687 100644 --- a/world/map/db/const.txt +++ b/world/map/db/const.txt @@ -298,6 +298,7 @@ sfx_magic_astral 7 sfx_magic_dark 8 // Special effects, interactive objects and emotion effects from client-data/effects.xml. +FX_NONE -1 FX_LEVELUP 0 FX_SKILLUP 1 FX_MAGIC_GENERIC 2 @@ -346,6 +347,74 @@ FX_ELECTRICITY_BLUE 115 FX_GATE_OPENING 300 FX_CASKET_LID 301 FX_CASKET_MONSTER 302 + +FX_MAGIC_DISCHARGE 500 // 15 +FX_MAGIC_WAND_CAST 501 // 2 +//FX_MAGIC_WAND_ATK 502 // 5 +FX_MAGIC_AGGRAVATE_CAST 503 // 6 +FX_MAGIC_AGGRAVATE_HIT 504 // 10 +FX_MAGIC_DETECT_CAST 505 // 2 +FX_MAGIC_DETECT_HIT 506 // 10 +FX_MAGIC_EXP_CAST 507 // 10 +FX_MAGIC_DART_CAST 508 // 10 +//FX_MAGIC_DART_ATK 509 // 4 +FX_MAGIC_GROW_CAST 510 // 6, 21 +FX_MAGIC_GROW_SPAWN 511 // 22 +FX_MAGIC_HEAL_CAST 512 // 3 +FX_MAGIC_HEAL_HIT 513 // 3 +FX_MAGIC_BLADE_CAST 514 // 4 +//FX_MAGIC_BLADE_HIT 515 // 4 +FX_MAGIC_SULPHUR_CAST 516 // 5 +FX_MAGIC_MAGGOT_CAST 517 // 7, 21 +FX_MAGIC_MAGGOT_SPAWN 518 // 22 +FX_MAGIC_WOOD_CAST 519 // 5 +FX_MAGIC_AHAIL_CAST 520 // 4 +FX_MAGIC_BARRIER_CAST 521 // 7 +FX_MAGIC_BARRIER_HIT 522 // 10 +FX_MAGIC_BARRIER_END 523 // 10 +FX_MAGIC_WHO_CAST 524 // 2 +FX_MAGIC_STONE_CAST 525 // 2 +FX_MAGIC_FLYING_CAST 526 // 6 +FX_MAGIC_FLYING_HIT 527 // 2 +FX_MAGIC_FLYING_END 528 // 2 +FX_MAGIC_JOY_CAST 529 // 6 +FX_MAGIC_HIDE_CAST 530 // 7 +FX_MAGIC_HIDE_HIT 531 // 10 +FX_MAGIC_HIDE_END 532 // 2 +FX_MAGIC_LAY_CAST 533 // 3 +FX_MAGIC_LAY_HIT 534 // 3 +FX_MAGIC_BOLT_CAST 535 // 4 +FX_MAGIC_KNUCKLE_CAST 536 // 4 +FX_MAGIC_ARROW_CAST 537 // 5 +FX_MAGIC_IRONP_CAST 538 // 5 +FX_MAGIC_SHIRT_CAST 539 // 5 +FX_MAGIC_SHIELD_CAST 540 // 6 +FX_MAGIC_RAIN_CAST 541 // 6 +FX_MAGIC_SHEAR_CAST 542 // 6 +FX_MAGIC_FLUFFY_CAST 543 // 7, 21 +FX_MAGIC_FLUFFY_SPAWN 544 // 22 +FX_MAGIC_MOUBOO_CAST 545 // 7, 21 +FX_MAGIC_MOUBOO_SPAWN 546 // 22 +FX_MAGIC_PINKY_CAST 547 // 7, 21 +FX_MAGIC_PINKY_SPAWN 548 // 22 +FX_MAGIC_SNAKE_CAST 549 // 8, 21 +FX_MAGIC_SNAKE_SPAWN 550 // 22 +FX_MAGIC_SPIKY_CAST 551 // 7, 21 +FX_MAGIC_SPIKY_SPAWN 552 // 22 +FX_MAGIC_WICKED_CAST 553 // 8, 21 +FX_MAGIC_WICKED_SPAWN 554 // 22 +FX_MAGIC_TDART_CAST 555 // 8 + +OVERRIDE_BLADE 1700 // 30 +OVERRIDE_TDART 1701 // 31 +OVERRIDE_WAND_WAND 1703 // 33 +OVERRIDE_DART 1704 // 34 +OVERRIDE_WAND_STAFF 1705 // 35 +OVERRIDE_KNUCKLES 1706 // 34 +OVERRIDE_SHEAR 1707 // 30 + +// TODO: ATTACK_ICON_... + FX_EMOTE_DISGUST 10000 FX_EMOTE_SURPRISE 10001 FX_EMOTE_HAPPY 10002 diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index c7ae2cd7..6ba748a9 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -32,6 +32,7 @@ function|script|magic_checks set .@flags, getarg(0); set .@nonmagic, .@flags & (1<<0); + if (GM >= 50) goto L_Return; // event managers have no restrictions if(HIDDEN) goto L_Hidden; // can not cast with @hide if(@_M_BLOCK == 2) goto L_Login; // login warmup if(@_M_BLOCK) goto L_Blocked; // check if last debuff ended @@ -58,6 +59,9 @@ L_Greybar: L_Login: smsg SMSG_FAILURE, "Magic: Impossible to cast for 10s after logging in."; return 5; + +L_Return: + return 0; } function|script|elt_damage @@ -72,7 +76,7 @@ function|script|elt_damage if (!.@source) set .@source, getcharid(3); injure .@source, @target_id, (.@dmg * (100 - get(MDEF1, @target_id))) / 100; - misceffect getarg(4), @target_id; + if (getarg(4) != FX_NONE) misceffect getarg(4), @target_id; return; } diff --git a/world/map/npc/magic/level0-wand.txt b/world/map/npc/magic/level0-wand.txt index 14336b7d..5e29f2ca 100644 --- a/world/map/npc/magic/level0-wand.txt +++ b/world/map/npc/magic/level0-wand.txt @@ -9,7 +9,7 @@ // here we install set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 500, "Magic Timer::OnClear"; // set the new debuff - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_WAND_CAST, strcharinfo(0); callfunc "magic_exp"; goto L_FreeRecast; @@ -22,7 +22,7 @@ L_FreeRecast: OnDischarge: if (@wandspell[4] < 1) end; set @wandspell[4], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; @@ -34,7 +34,7 @@ OnAttack: if(target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x02 | 0x04 | 0x10 if (Sp < @wandspell[1]) goto L_LowSp; set Sp, (Sp - @wandspell[1]); - void call("elt_damage", @wandspell[2],@wandspell[2],ELT_NEUTRAL,ELT_NEUTRAL,FX_MAGIC_RED); + void call("elt_damage", @wandspell[2],@wandspell[2],ELT_NEUTRAL,ELT_NEUTRAL,FX_NONE); set @wandspell[4], @wandspell[4] - 1; goto L_FreeRecast; @@ -74,7 +74,7 @@ L_Failed: OnInit: setarray .Wands[0], 0, 758, 1171; setarray .WandsPwr[0], 0, 2, 1; - setarray .WandsAnim[0], 0, 35, 33; + setarray .WandsAnim[0], 0, OVERRIDE_WAND_STAFF, OVERRIDE_WAND_WAND; set .school, SKILL_MAGIC; set .invocation$, chr(MAGIC_SYMBOL) + "confringo"; // used in npcs that refer to this spell void call("magic_register"); diff --git a/world/map/npc/magic/level1-aggravate.txt b/world/map/npc/magic/level1-aggravate.txt index bad64e02..c550efc3 100644 --- a/world/map/npc/magic/level1-aggravate.txt +++ b/world/map/npc/magic/level1-aggravate.txt @@ -8,7 +8,7 @@ set @args$, ""; callfunc "adjust_spellpower"; // we reset @args$ because this spell should not have a target set @distance, (2 + (@spellpower / 50)); set Sp, Sp - 3; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_AGGRAVATE_CAST, strcharinfo(0); callfunc "magic_exp"; foreach 2, getmap(), (POS_X - @distance), (POS_Y - @distance), (POS_X + @distance), (POS_Y + @distance), strnpcinfo(0) + "::OnMob"; end; @@ -16,7 +16,7 @@ OnMob: if (target(BL_ID, @target_id, 0x20) != 0x20) end; // line of sight aggravate @target_id; - misceffect SFX_DEFAULT, @target_id; + misceffect FX_MAGIC_AGGRAVATE_HIT, @target_id; end; OnInit: diff --git a/world/map/npc/magic/level1-detect-magic.txt b/world/map/npc/magic/level1-detect-magic.txt index f0c01592..e70c6218 100644 --- a/world/map/npc/magic/level1-detect-magic.txt +++ b/world/map/npc/magic/level1-detect-magic.txt @@ -7,7 +7,7 @@ addtimer 6000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 3; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_DETECT_CAST, strcharinfo(0); set .@range, (@spellpower/50)+1; foreach 1, getmap(), POS_X - .@range, POS_Y - .@range, POS_X + .@range, POS_Y + .@range, strnpcinfo(0) + "::OnNearbyNpc"; @@ -17,7 +17,7 @@ OnNearbyNpc: set .@e$, strnpcinfo(2,@target_id); if(.@e$ == "#_M" || .@e$ == "#MAGIC" || get(.IS_MAGIC, @target_id)) - misceffect FX_MAGIC_DEFAULT, @target_id; + misceffect FX_MAGIC_DETECT_HIT, @target_id; end; OnInit: diff --git a/world/map/npc/magic/level1-experience.txt b/world/map/npc/magic/level1-experience.txt index 94b07ad0..c29f57b3 100644 --- a/world/map/npc/magic/level1-experience.txt +++ b/world/map/npc/magic/level1-experience.txt @@ -13,7 +13,7 @@ if (@level < .level) end; callfunc "adjust_spellpower"; set Sp, Sp - 1; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_EXP_CAST, strcharinfo(0); callfunc "magic_exp"; set @ratio, ((@last_exp*10) - rand(.MAX_MAGIC_EXP[@level]/30))/.MAX_MAGIC_EXP[@level]; diff --git a/world/map/npc/magic/level1-flare-dart.txt b/world/map/npc/magic/level1-flare-dart.txt index 6359c5a9..e85ce3e8 100644 --- a/world/map/npc/magic/level1-flare-dart.txt +++ b/world/map/npc/magic/level1-flare-dart.txt @@ -10,7 +10,7 @@ addtimer 500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 10; - misceffect FX_MAGIC_BLACK, strcharinfo(0); + misceffect FX_MAGIC_DART_CAST, strcharinfo(0); setarray @flarspell[0], sqrt(@spellpower) * 5, //dmg (BaseLevel/3) + 5, // dmg bonus @@ -21,8 +21,7 @@ OnAttack: if (target(BL_ID, @target_id, 50) != 50) goto L_FreeRecast; // 0x20 | 0x02 | 0x10 - misceffect FX_MAGIC_BLACK, strcharinfo(0); - void call("elt_damage", @flarspell[0], @flarspell[1], ELT_WATER, ELT_FIRE, FX_MAGIC_BLACK); + void call("elt_damage", @flarspell[0], @flarspell[1], ELT_WATER, ELT_FIRE, FX_NONE); set @flarspell[2], @flarspell[2] - 1; goto L_FreeRecast; @@ -34,12 +33,12 @@ L_FreeRecast: OnDischarge: if (@flarspell[2] < 1) end; set @flarspell[2], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; OnSetRecast: - overrideattack @flarspell[3], 4, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack", @flarspell[2]; + overrideattack @flarspell[3], 4, ATTACK_ICON_GENERIC, OVERRIDE_DART, strnpcinfo(0)+"::OnAttack", @flarspell[2]; end; OnInit: diff --git a/world/map/npc/magic/level1-grow-alizarin.txt b/world/map/npc/magic/level1-grow-alizarin.txt index 601f32c2..1d7bc696 100644 --- a/world/map/npc/magic/level1-grow-alizarin.txt +++ b/world/map/npc/magic/level1-grow-alizarin.txt @@ -10,15 +10,14 @@ addtimer 2000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 4; - misceffect FX_MAGIC_GREEN, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_GROW_CAST, strcharinfo(0); setarray @summon[0], 0, (getskilllv(.school)/2)+1; callfunc "magic_exp"; addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; end; OnSummon: - misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0); callsub S_SummonAll; end; diff --git a/world/map/npc/magic/level1-grow-cobalt.txt b/world/map/npc/magic/level1-grow-cobalt.txt index 78ab602a..dc84318d 100644 --- a/world/map/npc/magic/level1-grow-cobalt.txt +++ b/world/map/npc/magic/level1-grow-cobalt.txt @@ -10,15 +10,14 @@ addtimer 2000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 4; - misceffect FX_MAGIC_GREEN, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_GROW_CAST, strcharinfo(0); setarray @summon[0], 0, (getskilllv(.school)/2)+1; callfunc "magic_exp"; addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; end; OnSummon: - misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0); callsub S_SummonAll; end; diff --git a/world/map/npc/magic/level1-grow-gamboge.txt b/world/map/npc/magic/level1-grow-gamboge.txt index eda23f70..25df5b03 100644 --- a/world/map/npc/magic/level1-grow-gamboge.txt +++ b/world/map/npc/magic/level1-grow-gamboge.txt @@ -10,15 +10,14 @@ addtimer 2000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 4; - misceffect FX_MAGIC_GREEN, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_GROW_CAST, strcharinfo(0); setarray @summon[0], 0, (getskilllv(.school)/2)+1; callfunc "magic_exp"; addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; end; OnSummon: - misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0); callsub S_SummonAll; end; diff --git a/world/map/npc/magic/level1-grow-mauve.txt b/world/map/npc/magic/level1-grow-mauve.txt index 951b71f0..8c0d32ff 100644 --- a/world/map/npc/magic/level1-grow-mauve.txt +++ b/world/map/npc/magic/level1-grow-mauve.txt @@ -10,15 +10,14 @@ addtimer 2000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 4; - misceffect FX_MAGIC_GREEN, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_GROW_CAST, strcharinfo(0); setarray @summon[0], 0, (getskilllv(.school)/2)+1; callfunc "magic_exp"; addtimer 4000-(@spellpower-9), strnpcinfo(0)+"::OnSummon"; end; OnSummon: - misceffect FX_PENTAGRAM_BURST, strcharinfo(0); + misceffect FX_MAGIC_GROW_SPAWN, strcharinfo(0); callsub S_SummonAll; end; diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt index 3f312566..b2cd4741 100644 --- a/world/map/npc/magic/level1-lesser-heal.txt +++ b/world/map/npc/magic/level1-lesser-heal.txt @@ -17,13 +17,13 @@ delitem "Lifestone", 1; callfunc "adjust_spellpower"; set Sp, Sp - 6; - misceffect FX_MAGIC_WHITE, strcharinfo(0); + misceffect FX_MAGIC_HEAL_CAST, strcharinfo(0); callfunc "magic_exp"; if (@target_id != BL_ID) goto L_NotMe; goto L_Continue; L_NotMe: - misceffect FX_MAGIC_WHITE, @target_id; + misceffect FX_MAGIC_HEAL_HIT, @target_id; if (get(Hp, @target_id) < 1) end; void call("gain_heal_xp", min(200, (get(MaxHp, @target_id) - get(Hp, @target_id))), 1, 2, 2); goto L_Continue; diff --git a/world/map/npc/magic/level1-magic-blade.txt b/world/map/npc/magic/level1-magic-blade.txt index 16417d17..1c6c891f 100644 --- a/world/map/npc/magic/level1-magic-blade.txt +++ b/world/map/npc/magic/level1-magic-blade.txt @@ -12,7 +12,7 @@ addtimer 500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 9; - misceffect FX_MAGIC_BLACK, strcharinfo(0); + misceffect FX_MAGIC_BLADE_CAST, strcharinfo(0); setarray @chizaspell[0], if_then_else(.@component$ == "Knife", 40, 60), // dmg Str, // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str @@ -26,7 +26,7 @@ OnDischarge: if (@chizaspell[2] < 1) end; set @chizaspell[2], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; @@ -42,7 +42,7 @@ L_FreeRecast: end; OnSetRecast: - overrideattack @chizaspell[3], 1, ATTACK_ICON_GENERIC, 30, strnpcinfo(0)+"::OnAttack", @chizaspell[2]; + overrideattack @chizaspell[3], 1, ATTACK_ICON_GENERIC, OVERRIDE_BLADE, strnpcinfo(0)+"::OnAttack", @chizaspell[2]; end; OnInit: diff --git a/world/map/npc/magic/level1-make-sulphur.txt b/world/map/npc/magic/level1-make-sulphur.txt index 4aab7e3b..89584954 100644 --- a/world/map/npc/magic/level1-make-sulphur.txt +++ b/world/map/npc/magic/level1-make-sulphur.txt @@ -8,7 +8,7 @@ addtimer 4000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 4; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_SULPHUR_CAST, strcharinfo(0); setarray @create_params[0], (@spellpower/100)+1+(rand(max(1,(800-@spellpower)))/180), 50; setarray @create_items$[0], "SulphurPowder", "PileOfAsh"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt index 9789daed..bfbafa79 100644 --- a/world/map/npc/magic/level1-summon-maggots.txt +++ b/world/map/npc/magic/level1-summon-maggots.txt @@ -13,8 +13,7 @@ OnCast: addtimer 20000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 21; - misceffect FX_MAGIC_BLUE, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_MAGGOT_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -30,7 +29,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_MAGGOT_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); diff --git a/world/map/npc/magic/level1-transmute-wood.txt b/world/map/npc/magic/level1-transmute-wood.txt index a7c86ecc..c2763f1c 100644 --- a/world/map/npc/magic/level1-transmute-wood.txt +++ b/world/map/npc/magic/level1-transmute-wood.txt @@ -8,7 +8,7 @@ addtimer 4000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 5; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_WOOD_CAST, strcharinfo(0); if (@args$ == "boo") goto L_Mouboo; elif (@args$ == "lurk") goto L_Skytlurk; else message strcharinfo(0), "Magic : ##3##BYou do not know how to transmute wood into this kind of animal."; // FIXME: write a better sentence diff --git a/world/map/npc/magic/level2-arrow-hail.txt b/world/map/npc/magic/level2-arrow-hail.txt index ba4c0a45..b1e713d0 100644 --- a/world/map/npc/magic/level2-arrow-hail.txt +++ b/world/map/npc/magic/level2-arrow-hail.txt @@ -30,7 +30,7 @@ OnCast: 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_BLACK, strcharinfo(0); + 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 diff --git a/world/map/npc/magic/level2-barrier.txt b/world/map/npc/magic/level2-barrier.txt index 2b55992d..ed695b77 100644 --- a/world/map/npc/magic/level2-barrier.txt +++ b/world/map/npc/magic/level2-barrier.txt @@ -18,12 +18,12 @@ addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 15; - misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_MAGIC_BARRIER_CAST, strcharinfo(0); callfunc "magic_exp"; if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; if (BL_ID == @target_id) set @args$, strcharinfo(0); - if (BL_ID != @target_id) misceffect FX_MAGIC_DEFAULT, @args$; + if (BL_ID != @target_id) misceffect FX_MAGIC_BARRIER_HIT, @args$; set .@time, (@spellpower*200)+2000; set @asorm_time, .@time, @target_id; sc_start SC_MBARRIER, .@time, max(30,(@spellpower/8))+20, @target_id; @@ -36,7 +36,7 @@ OnEnd: if (gettimetick(0) - @asorm_future < 0) end; if (sc_check(SC_MBARRIER) != 1) end; message strcharinfo(0), "Barrier : Your magical barrier dissipates."; - misceffect FX_MAGIC_DEFAULT, strcharinfo(0); + misceffect FX_MAGIC_BARRIER_END, strcharinfo(0); end; OnInit: diff --git a/world/map/npc/magic/level2-detect-players.txt b/world/map/npc/magic/level2-detect-players.txt index 7335770c..20961ec6 100644 --- a/world/map/npc/magic/level2-detect-players.txt +++ b/world/map/npc/magic/level2-detect-players.txt @@ -7,7 +7,7 @@ addtimer 300, "Magic Timer::OnClear"; callfunc "adjust_spellpower"; set Sp, Sp - 7; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_WHO_CAST, strcharinfo(0); callfunc "magic_exp"; set @inwilt$, ""; set .@d, @spellpower/2; diff --git a/world/map/npc/magic/level2-enchant-lifestone.txt b/world/map/npc/magic/level2-enchant-lifestone.txt index ba8536bf..b64f9855 100644 --- a/world/map/npc/magic/level2-enchant-lifestone.txt +++ b/world/map/npc/magic/level2-enchant-lifestone.txt @@ -1,6 +1,6 @@ -|script|enchant-lifestone|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 15) end; if (getskilllv(.school) < .level) end; if (countitem("BugLeg") >= 1) delitem "BugLeg", 1; @@ -21,7 +21,7 @@ L_Proceed: addtimer 4000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 15; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_STONE_CAST, strcharinfo(0); getitem "Lifestone", 1; callfunc "magic_exp"; end; diff --git a/world/map/npc/magic/level2-flying-backpack.txt b/world/map/npc/magic/level2-flying-backpack.txt index 444fe710..84c95e70 100644 --- a/world/map/npc/magic/level2-flying-backpack.txt +++ b/world/map/npc/magic/level2-flying-backpack.txt @@ -11,14 +11,14 @@ addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 12; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_FLYING_CAST, strcharinfo(0); callfunc "magic_exp"; set @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 (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; if (get(GM, @target_id) == 1) end; - if (BL_ID != @target_id) misceffect FX_MAGIC_GENERIC, @args$; + if (BL_ID != @target_id) misceffect FX_MAGIC_FLYING_HIT, @args$; if (BL_ID == @target_id) set @args$, strcharinfo(0); set @plugh_time, (@spellpower*500)+5000, @target_id; sc_start SC_FLYING_BACKPACK, @plugh_time, 0, @target_id; @@ -31,7 +31,7 @@ OnEnd: if (gettimetick(0) - @plugh_future < 0) end; if (sc_check(SC_FLYING_BACKPACK) != 1) end; message strcharinfo(0), "Backpack : Your backpack is no longer levitating."; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_FLYING_END, strcharinfo(0); end; OnInit: diff --git a/world/map/npc/magic/level2-happy-curse.txt b/world/map/npc/magic/level2-happy-curse.txt index a82dce21..535afa11 100644 --- a/world/map/npc/magic/level2-happy-curse.txt +++ b/world/map/npc/magic/level2-happy-curse.txt @@ -7,22 +7,22 @@ if (getskilllv(SKILL_MAGIC) < .level) end; if (.@level <= 3 && countitem("GingerBreadMan") >= 1) delitem "GingerBreadMan", 1; elif (.@level <= 3) end; - set @target_id, getcharid(3, @args$); - if (@target_id < 1 || !(isloggedin(@target_id)) || get(INVISIBLE, @target_id)) - set @target_id, BL_ID; // fallback to self set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 13; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_JOY_CAST, strcharinfo(0); callfunc "magic_exp"; - if (distance(BL_ID, @target_id) >= (@spellpower/100)+1) set @target_id, BL_ID; - if (BL_ID == @target_id) set @args$, strcharinfo(0); + set @distance, (@spellpower / 100) + 1; + foreach 0, getmap(), (POS_X - @distance), (POS_Y - @distance), (POS_X + @distance), (POS_Y + @distance), strnpcinfo(0) + "::OnHit"; + end; + +OnHit: set @joyplim_count, 1, @target_id; set @joyplim_emote, if_then_else(getskilllv(SKILL_MAGIC_DARK) > 1, EMOTE_EVIL, EMOTE_HAPPY), @target_id; - set @joyplim_total, (@spellpower/10), @target_id; + set @joyplim_total, (@spellpower / 10), @target_id; emotion @joyplim_emote, strcharinfo(0, @target_id); addtimer 500, strnpcinfo(0)+"::OnEmote", @target_id; end; diff --git a/world/map/npc/magic/level2-hide.txt b/world/map/npc/magic/level2-hide.txt index 85c5c40a..b129a163 100644 --- a/world/map/npc/magic/level2-hide.txt +++ b/world/map/npc/magic/level2-hide.txt @@ -15,12 +15,12 @@ addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 11; - misceffect FX_MAGIC_BLUE, strcharinfo(0); + misceffect FX_MAGIC_HIDE_CAST, strcharinfo(0); callfunc "magic_exp"; if (distance(BL_ID, @target_id) >= (@spellpower/30)+2) set @target_id, BL_ID; if (BL_ID == @target_id) set @args$, strcharinfo(0); - if (BL_ID != @target_id) misceffect FX_MAGIC_DEFAULT, @args$; + if (BL_ID != @target_id) misceffect FX_MAGIC_HIDE_HIT, @args$; set .@time, (@spellpower*2500)+5000; set @anwiltyp_time, .@time, @target_id; sc_start SC_HIDE, .@time, 0, @target_id; @@ -34,7 +34,7 @@ OnEnd: if (gettimetick(0) - @anwiltyp_future < 0) end; if (sc_check(SC_HIDE) != 1) end; message strcharinfo(0), "Magic : You are no longer hidden."; - misceffect FX_MAGIC_GENERIC, strcharinfo(0); + misceffect FX_MAGIC_HIDE_END, strcharinfo(0); end; OnInit: diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt index 13875381..de959c96 100644 --- a/world/map/npc/magic/level2-lay-on-hands.txt +++ b/world/map/npc/magic/level2-lay-on-hands.txt @@ -20,8 +20,8 @@ L_Pay: set @_M_BLOCK, 1; // block casting, until the timer clears it addtimer 500, "Magic Timer::OnClear"; // XXX should this be 0 ? set Sp, Sp - 10; - misceffect FX_MAGIC_WHITE, strcharinfo(0); // on caster - misceffect FX_MAGIC_WHITE, @args$; // on target + misceffect FX_MAGIC_LAY_CAST, strcharinfo(0); // on caster + misceffect FX_MAGIC_LAY_HIT, @args$; // on target if (get(Hp, @target_id) < 1) end; @@ -38,7 +38,7 @@ L_Pay: set .@dark, getskilllv(SKILL_MAGIC_DARK) >= 2; // true if dark magic user set .@bad, (MaxHp/20)*(0-1); - if (.@dark) heal .@bad, 0; + if (.@dark && GM < 20) heal .@bad, 0; sc_start SC_HALT_REGENERATE, if_then_else(.@dark, 5000, 10000), 0; set .@thp, get(Hp, @target_id); @@ -50,8 +50,8 @@ L_Mouboo: set @target_id, getnpcid("Mouboo"); callfunc "adjust_spellpower"; if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower) * 12) + @spellpower) / 100) + 2) end; - misceffect FX_MAGIC_WHITE, strcharinfo(0); // on caster - misceffect FX_MAGIC_WHITE, @target_id; // on target + misceffect FX_MAGIC_LAY_CAST, strcharinfo(0); // on caster + misceffect FX_MAGIC_LAY_HIT, @target_id; // on target callfunc "QuestMoubooHeal"; end; diff --git a/world/map/npc/magic/level2-lightning-strike.txt b/world/map/npc/magic/level2-lightning-strike.txt index 7271d081..05d358e3 100644 --- a/world/map/npc/magic/level2-lightning-strike.txt +++ b/world/map/npc/magic/level2-lightning-strike.txt @@ -11,7 +11,7 @@ addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 20; - misceffect FX_MAGIC_BLACK, strcharinfo(0); + misceffect FX_MAGIC_BOLT_CAST, strcharinfo(0); setarray @ingravspell[0], @spellpower, Luk, @@ -44,7 +44,7 @@ L_FreeRecast: OnDischarge: if (@ingravspell[2] < 1) end; set @ingravspell[2], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index 1139b5b2..95ab9120 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -11,7 +11,7 @@ addtimer 500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 20; - misceffect FX_MAGIC_BLACK, strcharinfo(0); + misceffect FX_MAGIC_KNUCKLE_CAST, strcharinfo(0); setarray @upmarmuspell[0], @spellpower, ((@spellpower/10) + 10), // charges @@ -34,12 +34,12 @@ L_FreeRecast: OnDischarge: if (@upmarmuspell[1] < 1) end; set @upmarmuspell[1], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; OnSetRecast: - overrideattack @upmarmuspell[2], 1, ATTACK_ICON_GENERIC, 34, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; + overrideattack @upmarmuspell[2], 1, ATTACK_ICON_GENERIC, OVERRIDE_KNUCKLES, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; end; OnInit: diff --git a/world/map/npc/magic/level2-make-arrows.txt b/world/map/npc/magic/level2-make-arrows.txt index 5bad035b..fa0a6b31 100644 --- a/world/map/npc/magic/level2-make-arrows.txt +++ b/world/map/npc/magic/level2-make-arrows.txt @@ -1,6 +1,6 @@ -|script|make-arrows|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 8) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; @@ -10,7 +10,7 @@ addtimer 5000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 8; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_ARROW_CAST, strcharinfo(0); setarray @create_params[0], (@spellpower/40)+1+(rand(max(1,(800-@spellpower)))/80), 500; setarray @create_items$[0], "Arrow", "WarpedLog"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level2-make-iron-powder.txt b/world/map/npc/magic/level2-make-iron-powder.txt index 55bdd0b9..6f1c11b2 100644 --- a/world/map/npc/magic/level2-make-iron-powder.txt +++ b/world/map/npc/magic/level2-make-iron-powder.txt @@ -1,6 +1,6 @@ -|script|make-iron-powder|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 8) end; if (getskilllv(SKILL_MAGIC) < .level) end; if (getskilllv(.school) < .level) end; @@ -10,7 +10,7 @@ addtimer 5000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 8; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_IRONP_CAST, strcharinfo(0); setarray @create_params[0], (@spellpower/140)+1+(rand(max(1,(900-@spellpower)))/220), 700; setarray @create_items$[0], "IronPowder", "IronOre"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level2-make-shirt.txt b/world/map/npc/magic/level2-make-shirt.txt index b7a1570f..838ffadd 100644 --- a/world/map/npc/magic/level2-make-shirt.txt +++ b/world/map/npc/magic/level2-make-shirt.txt @@ -1,6 +1,6 @@ -|script|make-shirt|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 25) end; if (getskilllv(.school) < .level) end; if (countitem("CottonCloth") >= 5) delitem "CottonCloth", 5; else end; @@ -8,7 +8,7 @@ addtimer 5000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 25; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_SHIRT_CAST, strcharinfo(0); setarray @create_params[0], 1, 425; setarray @create_items$[0], "CottonShirt", "CottonCloth"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level2-make-short-tanktop.txt b/world/map/npc/magic/level2-make-short-tanktop.txt index eee48425..b722d9dd 100644 --- a/world/map/npc/magic/level2-make-short-tanktop.txt +++ b/world/map/npc/magic/level2-make-short-tanktop.txt @@ -1,6 +1,6 @@ -|script|make-short-tanktop|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 25) end; if (getskilllv(.school) < .level) end; if (countitem("CottonCloth") >= 3) delitem "CottonCloth", 3; else end; @@ -8,7 +8,7 @@ addtimer 5000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 25; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_SHIRT_CAST, strcharinfo(0); setarray @create_params[0], 1, 250; setarray @create_items$[0], "ShortTankTop", "CottonCloth"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level2-make-tanktop.txt b/world/map/npc/magic/level2-make-tanktop.txt index 678cf650..b8f40932 100644 --- a/world/map/npc/magic/level2-make-tanktop.txt +++ b/world/map/npc/magic/level2-make-tanktop.txt @@ -1,6 +1,6 @@ -|script|make-tanktop|32767 { - if(call("magic_checks")) end; + if(call("magic_checks")) end; if (Sp < 25) end; if (getskilllv(.school) < .level) end; if (countitem("CottonCloth") >= 4) delitem "CottonCloth", 4; else end; @@ -8,7 +8,7 @@ addtimer 5000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 25; - misceffect FX_MAGIC_RED, strcharinfo(0); + misceffect FX_MAGIC_SHIRT_CAST, strcharinfo(0); setarray @create_params[0], 1, 350; setarray @create_items$[0], "TankTop", "CottonCloth"; callfunc "magic_create_item"; diff --git a/world/map/npc/magic/level2-protect.txt b/world/map/npc/magic/level2-protect.txt index 1a7718e5..4e3b9f88 100644 --- a/world/map/npc/magic/level2-protect.txt +++ b/world/map/npc/magic/level2-protect.txt @@ -20,7 +20,7 @@ addtimer 1500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 14; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_SHIELD_CAST, strcharinfo(0); callfunc "magic_exp"; if (BL_ID == @target_id) set @args$, strcharinfo(0); diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index 111f5188..df8ef1c9 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -27,7 +27,7 @@ OnCast: set @new_npc_name$, "#" + strnpcinfo(0) + "#" + getcharid(3); // make a unique puppet name for every player callfunc "magic_exp"; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_RAIN_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 .caster, getcharid(3), @spell_npc; // tell the puppet who controls it diff --git a/world/map/npc/magic/level2-shear.txt b/world/map/npc/magic/level2-shear.txt index 46993ca0..325e0863 100644 --- a/world/map/npc/magic/level2-shear.txt +++ b/world/map/npc/magic/level2-shear.txt @@ -8,7 +8,7 @@ addtimer 1000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 23; - misceffect FX_MAGIC_GREEN, strcharinfo(0); + misceffect FX_MAGIC_SHEAR_CAST, strcharinfo(0); setarray @chipchipspell[0], @spellpower, (((200 - Agi) * 2000) / 200); //delay @@ -50,12 +50,12 @@ L_FreeRecast: OnDischarge: if (@chipchipspell[2] < 1) end; set @chipchipspell[2], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; OnSetRecast: - overrideattack @chipchipspell[1], 1, ATTACK_ICON_SHEARING, 30, strnpcinfo(0)+"::OnAttack", @chipchipspell[2]; + overrideattack @chipchipspell[1], 1, ATTACK_ICON_SHEARING, OVERRIDE_SHEAR, strnpcinfo(0)+"::OnAttack", @chipchipspell[2]; end; OnInit: diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt index d334105e..06ad8ae2 100644 --- a/world/map/npc/magic/level2-summon-fluffies.txt +++ b/world/map/npc/magic/level2-summon-fluffies.txt @@ -14,8 +14,7 @@ OnCast: addtimer 20000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 39; - misceffect FX_MAGIC_BLUE, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_FLUFFY_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -31,7 +30,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_FLUFFY_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt index 6453002c..32adf500 100644 --- a/world/map/npc/magic/level2-summon-mouboo.txt +++ b/world/map/npc/magic/level2-summon-mouboo.txt @@ -14,8 +14,7 @@ OnCast: addtimer 20000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 35; - misceffect FX_MAGIC_BLUE, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_MOUBOO_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -31,7 +30,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_MOUBOO_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt index d3cafb65..e6fa2a11 100644 --- a/world/map/npc/magic/level2-summon-pinkie.txt +++ b/world/map/npc/magic/level2-summon-pinkie.txt @@ -14,8 +14,7 @@ OnCast: addtimer 20000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 35; - misceffect FX_MAGIC_BLUE, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_PINKY_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -31,7 +30,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_PINKY_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt index 952f9446..8756355a 100644 --- a/world/map/npc/magic/level2-summon-snakes.txt +++ b/world/map/npc/magic/level2-summon-snakes.txt @@ -15,8 +15,7 @@ OnCast: addtimer 15000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 40; - misceffect FX_MAGIC_DARKRED, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_SNAKE_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -32,7 +31,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_SNAKE_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); @@ -44,7 +43,12 @@ OnDestroy: destroy; S_SummonAll: - summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1010, 2, .lifetime; + set .@sn, rand(0, 3); + + if (.@sn == 0) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1021, 2, .lifetime; + elif (.@sn == 1) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1010, 2, .lifetime; + elif (.@sn == 2) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1026, 2, .lifetime; + elif (.@sn == 3) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1034, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; destroy; diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt index de4d7399..84d4eb82 100644 --- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt +++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt @@ -14,8 +14,7 @@ OnCast: addtimer 20000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 33; - misceffect FX_MAGIC_BLUE, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_SPIKY_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -31,7 +30,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_SPIKY_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt index 104176c6..42060eb1 100644 --- a/world/map/npc/magic/level2-summon-wickedmushroom.txt +++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt @@ -15,8 +15,7 @@ OnCast: addtimer 15000, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 35; - misceffect FX_MAGIC_DARKRED, strcharinfo(0); - misceffect FX_PENTAGRAM_BUILDUP, strcharinfo(0); + misceffect FX_MAGIC_WICKED_CAST, strcharinfo(0); callfunc "magic_exp"; set .@puppet$, "#"+strnpcinfo(0)+"#"+BL_ID; set .@puppet, puppet(getmap(), POS_X, POS_Y, .@puppet$, 127); @@ -32,7 +31,7 @@ OnSummon: if (!(isloggedin(.master))) destroy; if(get(Hp, .master) < 1) destroy; // destroy if master is missing if(getmap(.master) != strnpcinfo(3)) destroy; // destroy if master left the map - specialeffect FX_PENTAGRAM_BURST; + specialeffect FX_MAGIC_WICKED_SPAWN; set .@i, 0; set .@x, getnpcx(); set .@y, getnpcy(); @@ -44,7 +43,11 @@ OnDestroy: destroy; S_SummonAll: - summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1106, 2, .lifetime; + set .@rnd, rand(0, 9); + + if (.@rnd < 6) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1106, 2, .lifetime; + elif (.@rnd < 9) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1130, 2, .lifetime; + elif (.@rnd == 9) summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1013, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; destroy; diff --git a/world/map/npc/magic/level2-toxic-dart.txt b/world/map/npc/magic/level2-toxic-dart.txt index 176e97fe..5f611262 100644 --- a/world/map/npc/magic/level2-toxic-dart.txt +++ b/world/map/npc/magic/level2-toxic-dart.txt @@ -11,7 +11,7 @@ addtimer 500, "Magic Timer::OnClear"; // set the new debuff callfunc "adjust_spellpower"; set Sp, Sp - 15; - misceffect FX_MAGIC_DARKRED, strcharinfo(0); + misceffect FX_MAGIC_TDART_CAST, strcharinfo(0); setarray @phlexspell[0], (sqrt(@spellpower) * 5), // elt damage ((BaseLevel/3) + 5), // elt damage bonus @@ -25,8 +25,7 @@ OnAttack: if (target(BL_ID, @target_id, 50) != 50) goto L_FreeRecast; // 0x20 | 0x02 | 0x10 - misceffect FX_MAGIC_DARKRED, strcharinfo(0); - void call("elt_damage", @phlexspell[0], @phlexspell[1], ELT_NEUTRAL, ELT_POISON, FX_FIRE_BURST); + void call("elt_damage", @phlexspell[0], @phlexspell[1], ELT_NEUTRAL, ELT_POISON, FX_NONE); if(@target_id != BL_ID && isloggedin(@target_id)) // this is a dirty trick to check if the target is a player sc_start sc_poison, @phlexspell[4], @phlexspell[5], @target_id; set @phlexspell[3], @phlexspell[3] - 1; @@ -40,12 +39,12 @@ L_FreeRecast: OnDischarge: if (@phlexspell[3] < 1) end; set @phlexspell[3], 0; - misceffect FX_FIRE_BURST, strcharinfo(0); + misceffect FX_MAGIC_DISCHARGE, strcharinfo(0); overrideattack; end; OnSetRecast: - overrideattack @phlexspell[2], 4, ATTACK_ICON_GENERIC, 31, strnpcinfo(0)+"::OnAttack", @phlexspell[3]; + overrideattack @phlexspell[2], 4, ATTACK_ICON_GENERIC, OVERRIDE_TDART, strnpcinfo(0)+"::OnAttack", @phlexspell[3]; end; OnInit: -- cgit v1.2.3-70-g09d2