diff options
28 files changed, 168 insertions, 85 deletions
diff --git a/client-data b/client-data -Subproject 02cd0f48e227a966763ed33cbda2c40b7e917e1 +Subproject 7d2a50f773d529e8824dfd7e79890d39772f3d7 diff --git a/world/map/data/006-3.wlk b/world/map/data/006-3.wlk Binary files differindex da68fedc..eaed62c1 100644 --- a/world/map/data/006-3.wlk +++ b/world/map/data/006-3.wlk diff --git a/world/map/data/026-2.wlk b/world/map/data/026-2.wlk Binary files differindex 98c59d03..90c7a9d0 100644 --- a/world/map/data/026-2.wlk +++ b/world/map/data/026-2.wlk diff --git a/world/map/db/item_db_head.txt b/world/map/db/item_db_head.txt index 1f819e67..fbdb0683 100644 --- a/world/map/db/item_db_head.txt +++ b/world/map/db/item_db_head.txt @@ -169,6 +169,7 @@ 2267, OrangeBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} 2268, PurpleBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} 2269, DarkGreenBeret, 5, 1000, 500, 20, 0, 3, 0, 0, 0, 2, 256, 0, 0, 0, {}, {bonus bAgi, 2;} +2270, BlinkingEvil, 5, 10000, 5000, 50, 0, 13, 0, 10, 0, 2, 256, 0, 0, 0, {}, {bonus bMdef, 5;} //ID, Name___________________, Type, Price, Sell, Weight, ATK, DEF, Range, Mbonus, Slot, Gender, Loc, wLV, eLV, View, {UseScript}, {EquipScript} 4020, CandleHelmet, 5, 20000, 2000, 450, 0, 16, 0, -25, 0, 2, 256, 0, 0, 0, {}, {bonus bInt, 1;bonus bAgi, -1;} 4027, YetiMask, 5, 6000, 3000, 10, 0, 4, 0, -10, 0, 2, 256, 0, 0, 0, {}, {} diff --git a/world/map/news.d/61-v2016.10.10.txt b/world/map/news.d/61-v2016.10.10.txt new file mode 100644 index 00000000..aeed8f35 --- /dev/null +++ b/world/map/news.d/61-v2016.10.10.txt @@ -0,0 +1,22 @@ +{title:Halloween} +{date:2016-10-10} + +Release Notes v2016.10.10 +Fixed +{ul} +{li}Cindy should allow proper min level{/li} +{li}Magic experience bug fixed{/li} +{/ul} + +Added +{ul} +{li}Halloween quest for 2016 added. +Halloween is here once again. An old friend has returned to us from his travels all over Gasaron. +The ancient skeleton Gak can be found in the woodlands of Argaes looking to feast on as much candy as he possibly +can before Halloween night. You will be able to collect candy that was stolen and scattered all over the world. +All kinds of creatures have been greedily hoarding this candy. It's your mission to claim it back and make sure Gak is satisfied. +In exchange, you will be rewarded on and after October 31st with some wonderful items that Gak has collected over +the past few years.{/li} +{/ul} + +{author:TMW Development Team} diff --git a/world/map/news.d/62-v2016.11.26.txt b/world/map/news.d/62-v2016.11.26.txt new file mode 100644 index 00000000..996d6812 --- /dev/null +++ b/world/map/news.d/62-v2016.11.26.txt @@ -0,0 +1,23 @@ +{title:Stability} +{date:2016-11-26} + +Release Notes v2016.11.26 + +This release only removes the halloween 2016 quest +and reverts the monster drops back to normal. + +Removed +{ul} +{li}Halloween 2016 quest{/li} +{li}Halloween 2016 drops, old drops reverted{/li} +{/ul} + +Notice: + This release marks the end of active development +on The Mana World Legacy (this server). From now +on, all development efforts will be directed +towards Evol Online. Game-breaking bugs will +still be patched but no new content will be made +for this server. + +{author:TMW/Evol Development Team} diff --git a/world/map/npc/001-2/_nodes.txt b/world/map/npc/001-2/_nodes.txt index d8d6ebf2..5a5cdeac 100644 --- a/world/map/npc/001-2/_nodes.txt +++ b/world/map/npc/001-2/_nodes.txt @@ -6,8 +6,8 @@ end; OnInit: setarray .m$, "_N-Alchemy", "001-2", "001-2", "001-2", "001-2"; - setarray .x1, "_N-Alchemy", 98, 98, 92, 92; - setarray .y1, "_N-Alchemy", 89, 76, 89, 76; + setarray .x1, "_N-Alchemy", 98, 92, 98, 92; + setarray .y1, "_N-Alchemy", 76, 76, 89, 89; setarray .x2, "_N-Alchemy", 0, 0, 0, 0; setarray .y2, "_N-Alchemy", 0, 0, 0, 0; setarray .id, "_N-Alchemy", 0, 0, 0, 0; diff --git a/world/map/npc/010-2/loratay.txt b/world/map/npc/010-2/loratay.txt index 6843bfcc..4e4232d7 100644 --- a/world/map/npc/010-2/loratay.txt +++ b/world/map/npc/010-2/loratay.txt @@ -242,7 +242,7 @@ L_regular_intro: mes "\"Ah, you again. Is there anything in particular you need?\""; next; if (@wg_state == 12) - goto L_main_menu2; + goto L_main_menu_proposal; goto L_main_menu; L_give_water: @@ -269,7 +269,7 @@ L_give_water: next; if (@wg_state == 12) - goto L_main_menu2; + goto L_main_menu_proposal; goto L_main_menu; L_main_menu: @@ -292,26 +292,11 @@ L_Fur: next; goto L_main_menu; -L_main_menu2: +L_main_menu_proposal: menu - "Can you trim something for me?", L_trim, - "Can you lengthen something for me?", L_lengthen, - "Can you make me a shirt?", L_shirt, - "Can you make me a tank top?", L_tanktop, - "Can you make me a cape?", L_cape, - "Can you make fur boots for me?", L_Fur1, - "Can you make winter gloves me?", L_Fur1, - "Can you sew a robe for me?", L_robe, - "Can you make a desert hat for me?", L_desert_hat, "Actually...I have a proposal for you...", L_agostine_proposal, "Goodbye for now.", L_end; -L_Fur1: - mes "[Lora Tay the Seamstress]"; - mes "\"From what? Fluffy fur? I won't work with such lowly materials.\""; - next; - goto L_main_menu2; - L_agostine_proposal: mes "[Lora Tay the Seamstress]"; mes "\"What kind of proposal are you asking of me?\""; @@ -319,7 +304,7 @@ L_agostine_proposal: menu "I have talked to Agostine and he needs your help.", L_Next1, - "I forgot...", L_main_menu2; + "I forgot...", L_end; L_Next1: mes "[Lora Tay the Seamstress]"; diff --git a/world/map/npc/013-2/wizard.txt b/world/map/npc/013-2/wizard.txt index 32a2a623..edd7a768 100644 --- a/world/map/npc/013-2/wizard.txt +++ b/world/map/npc/013-2/wizard.txt @@ -61,7 +61,7 @@ L_NewStudent: next; // check if the player has the knowledge of any skill - if (getskilllv(SKILL_POOL) && (getskilllv(SKILL_MAGIC_ASTRAL) < 1)) + if (getskilllv(SKILL_POOL) && (getskilllv(SKILL_MAGIC_ASTRAL) < 1) || (getskilllv(SKILL_ASTRAL_SOUL) == 0)) menu "That would be very kind of you!", L_TeachSpell, "Actually I am looking for someone teaching me some more magic skills.", L_AstralSoul, diff --git a/world/map/npc/014-1/wedding-officiator.txt b/world/map/npc/014-1/wedding-officiator.txt index dfdab00b..bc759cdf 100644 --- a/world/map/npc/014-1/wedding-officiator.txt +++ b/world/map/npc/014-1/wedding-officiator.txt @@ -135,7 +135,7 @@ L_too_poor: L_main_married: mes "[Wedding Officiator]"; - mes "\"I hope that you and "+ strcharinfo(0, get(BL_ID, PARTNER)) +" are doing well?\""; + mes "\"I hope that you and your partner are doing well?\""; next; menu "We are very happy, thanks for asking!", L_farewell, diff --git a/world/map/npc/031-1/angelaOutside.txt b/world/map/npc/031-1/angelaOutside.txt index 322cbfb0..2ffd0804 100644 --- a/world/map/npc/031-1/angelaOutside.txt +++ b/world/map/npc/031-1/angelaOutside.txt @@ -36,8 +36,6 @@ OnInit: 031-1,79,24,0|script|Angela|195,15,15 { - set @minlevel, 70; - if (QL_CINDY == 3) goto L_Please_Visit_Again; if (QL_CINDY > 1 && QL_CINDY < 5) goto L_Please_Visit; if (QL_CINDY == 1) goto L_Please_Help; @@ -47,7 +45,7 @@ OnInit: next; mes "\"It's terrible, oh my dear child!\""; next; - if (countitem("ConcentrationPotion") > 0 && BaseLevel >= @minlevel && QL_CINDY == 6) + if (countitem("ConcentrationPotion") > 0 && BaseLevel >= .minlevel && QL_CINDY == 6) goto L_Menu_Potion; menu @@ -55,7 +53,7 @@ OnInit: "Leave", L_Close; OnTouch: - if(BaseLevel >= @minlevel && !QL_CINDY) + if(BaseLevel >= .minlevel && QL_CINDY < 1) set QL_CINDY, 5; end; @@ -80,7 +78,7 @@ L_Whining: mes "She is crying and sobbing."; next; mes "It seems she is too upset to tell you anything helpful. If she would just calm down and concentrate a bit..."; - if(BaseLevel >= @minlevel) goto L_GetQuest; + if(BaseLevel >= .minlevel) goto L_GetQuest; goto L_Close; L_GetQuest: @@ -139,6 +137,9 @@ L_Please_Visit_Again: goto L_Close; L_Close: - set @minlevel, 0; close; + +OnInit: + set .minlevel, 70; + end; } diff --git a/world/map/npc/031-4/cindyCave.txt b/world/map/npc/031-4/cindyCave.txt index c97b166d..1655205f 100644 --- a/world/map/npc/031-4/cindyCave.txt +++ b/world/map/npc/031-4/cindyCave.txt @@ -86,7 +86,7 @@ L_Reward: L_Wizard_Hat: // get a wizard hat in one of the ten colors - no white - setarray @wizardhats, 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209; + setarray @wizardhats[0], 2200, 2201, 2202, 2203, 2204, 2205, 2206, 2207, 2208, 2209; getitem @wizardhats[@reward], 1; set QL_CINDY, 3; goto L_Visit; @@ -215,7 +215,7 @@ L_End: end; OnInit: - setarray $@FIGHT_YETI_MESSAGES$, + setarray $@FIGHT_YETI_MESSAGES$[0], "", // unused // " : " is magic so that it says "global announcement from" "Cindy : Yetis!", diff --git a/world/map/npc/055-1/_nodes.txt b/world/map/npc/055-1/_nodes.txt index 68612765..e6da33ea 100644 --- a/world/map/npc/055-1/_nodes.txt +++ b/world/map/npc/055-1/_nodes.txt @@ -6,10 +6,10 @@ end; OnInit: setarray .m$, "_N-Pumpkin", "055-1", "055-1", "055-1"; - setarray .x1, "_N-Pumpkin", 41, 129, 133; - setarray .y1, "_N-Pumpkin", 22, 23, 27; - setarray .x2, "_N-Pumpkin", 47, 135, 139; - setarray .y2, "_N-Pumpkin", 30, 26, 33; + setarray .x1, "_N-Pumpkin", 129, 133, 41; + setarray .y1, "_N-Pumpkin", 23, 27, 22; + setarray .x2, "_N-Pumpkin", 135, 139, 47; + setarray .y2, "_N-Pumpkin", 26, 33, 30; setarray .id, "_N-Pumpkin", 0, 0, 0; donpcevent "_N-Pumpkin::OnMaybeStart"; destroy; diff --git a/world/map/npc/commands/hug.txt b/world/map/npc/commands/hug.txt index 323e0563..f97c81e4 100644 --- a/world/map/npc/commands/hug.txt +++ b/world/map/npc/commands/hug.txt @@ -13,7 +13,8 @@ if (@target_id != BL_ID) misceffect FX_HUG, @target_id; if (@target_id != .tree_id) end; - callfunc "QuestTreeTouch"; + set @flag, 2; + callfunc "QuestTreeTrigger"; close; OnInit: diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index aa3f700a..e0cab888 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -31,6 +31,7 @@ function|script|ClearVariables callsub S_Halloween2009; callsub S_Halloween2010; callsub S_Halloween2011; + callsub S_Halloween2016; callsub S_Xmas2006; callsub S_Xmas2007; callsub S_Xmas2008; @@ -160,6 +161,20 @@ S_Halloween2010: set hween10_paid, 0; return; +S_Halloween2016: + set HWEEN16, 0; + if(!hween16) goto S_Return; + set hween16, 0; + set hween16_collect_canpump, 0; + set hween16_credits, 0; + set hween16_collect, 0; + set hween16_collect_mmallow, 0; + set hween16_collect_jelskul, 0; + set hween16_bonecount, 0; + set hween16_collect_tondel, 0; + set hween16_paid, 0; + return; + S_Xmas2010: if(!Xmas2010) goto S_Return; set Count_Yellow, 0; @@ -442,6 +457,13 @@ L_EventClear: // Clear global variable used in Christmas event 2010 set $Golbenez_Inn_Cost, 0; +// Clear global variables used in the Halloween event 2016 + set $hween16, 0; + set $hween16_tondel, 0; + set $hween16_mmallow, 0; + set $hween16_jelskul, 0; + set $hween16_canpump, 0; + // Variable was used in Voltain's script, was renamed and turned into a temporary variable set $state, 0; return; diff --git a/world/map/npc/magic/_procedures.txt b/world/map/npc/magic/_procedures.txt index 5d7e5c8a..c7ae2cd7 100644 --- a/world/map/npc/magic/_procedures.txt +++ b/world/map/npc/magic/_procedures.txt @@ -15,6 +15,9 @@ function|script|magic_register OnLogin: set @_M_BLOCK, 2; + //if (MAGIC_EXPERIENCE < 0) + // set MAGIC_EXPERIENCE, 0; // bug fix + // ^ XXX: check if negative MAGIC_EXPERIENCE is desirable addtimer 10000, "Magic Timer::OnClear"; end; @@ -118,10 +121,20 @@ L_Perfect: return; } +function|script|bit +{ + //0 name + //1 mask + //2 shift + //3 value + + return ((getarg(0) & ~(getarg(1) << getarg(2))) | ((getarg(3) & getarg(1)) << getarg(2))); +} + function|script|magic_exp { - set @last_index, (MAGIC_EXPERIENCE & BYTE_2_MASK) >> BYTE_2_SHIFT; - set @last_exp, (MAGIC_EXPERIENCE & (BYTE_0_MASK | BYTE_1_MASK)) >> BYTE_0_SHIFT; + set @last_index, (MAGIC_EXPERIENCE >> 16) & 0xFF; + set @last_exp, MAGIC_EXPERIENCE & 0xFFFF; //debugmes "old spell index: " + @last_index; //debugmes "new spell index: " + .index; @@ -136,12 +149,11 @@ L_Gain: // remove this line then players can cast a spell with // no cost, then a spell with a reagents, then another // spell with no costs and still get the exp - set @new_exp, @last_exp + .exp_gain; - if(@new_exp > (BYTE_0_MASK | BYTE_1_MASK)) set @new_exp, (BYTE_0_MASK | BYTE_1_MASK); + set @new_exp, min(0xFFFF, @last_exp + .exp_gain); //debugmes "old magic exp: "+ @last_exp; //debugmes "new magic exp: "+ @new_exp; - set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE &~ (BYTE_0_MASK | BYTE_1_MASK)) | (@new_exp << BYTE_0_SHIFT); - set MAGIC_EXPERIENCE, (MAGIC_EXPERIENCE &~ BYTE_2_MASK) | (.index << BYTE_2_SHIFT); + set MAGIC_EXPERIENCE, call("bit", MAGIC_EXPERIENCE, 0xFFFF, 0, @new_exp); + set MAGIC_EXPERIENCE, call("bit", MAGIC_EXPERIENCE, 0xFF, 16, .index); goto L_Return; L_Return: @@ -168,25 +180,29 @@ L_Return: function|script|gain_heal_xp { - set @last_heal_xp, ((SCRIPT_XP & SCRIPT_HEALSPELL_MASK) >> SCRIPT_HEALSPELL_SHIFT); - if ((@target_id != BL_ID) && ((.@heal_value / .heal_xp_value_divisor) > (((10 + @last_heal_xp) + rand(@last_heal_xp + 1)) + rand(@last_heal_xp + 1)))) - goto L_Block; - goto L_Return; + set .@value, getarg(0); + set .@gain, getarg(1); + set .@value_divisor, getarg(2); + set .@base_xp_factor, getarg(3); -L_Block: - set @heal_xp, (@last_heal_xp + @mexp); - if (@heal_xp > SCRIPT_HEALSPELL_MASK) - set @heal_xp, SCRIPT_HEALSPELL_MASK; - set SCRIPT_XP, (SCRIPT_XP & ~(SCRIPT_HEALSPELL_MASK) | (@heal_xp << SCRIPT_HEALSPELL_SHIFT)); - goto L_Gain_Xp; - -L_Gain_Xp: - set @heal_exp, .@heal_value; - if (.@heal_value > get(HEALXP, @target_id)) - set @heal_exp, get(HEALXP, @target_id); - getexp (.base_exp_factor * @heal_exp), 0; - goto L_Return; + set .@last_heal_xp, ((MAGIC_EXPERIENCE >> 24) & 0xFF); + + if ((.@value / .@value_divisor) <= (10 + .@last_heal_xp + rand(.@last_heal_xp + 1) + rand(.@last_heal_xp + 1))) + goto L_Return; + + set .@heal_xp, min(0xFF, .@last_heal_xp + .@gain); // XXX: maybe switch to 7F + + getexp (.@base_xp_factor * .@heal_xp), 0; + + // FIXME: extract_heal_xp + + //debugmes "old heal exp: "+ .@last_heal_xp; + + set MAGIC_EXPERIENCE, call("bit", MAGIC_EXPERIENCE, 0xFF, 24, .@heal_xp); + + //debugmes "new heal exp: "+ ((MAGIC_EXPERIENCE >> 24) & 0xFF); + return 1; L_Return: - return; + return 0; } diff --git a/world/map/npc/magic/level1-experience.txt b/world/map/npc/magic/level1-experience.txt index 36ad8179..94b07ad0 100644 --- a/world/map/npc/magic/level1-experience.txt +++ b/world/map/npc/magic/level1-experience.txt @@ -1,5 +1,10 @@ -|script|spell-experience|32767 { + //debugmes MAGIC_EXPERIENCE; + //debugmes (MAGIC_EXPERIENCE >> 0) & 0xFFFF; // magic exp + //debugmes (MAGIC_EXPERIENCE >> 16) & 0xFF; // last spell index + //debugmes (MAGIC_EXPERIENCE >> 24) & 0xFF; // heal exp + if(call("magic_checks")) end; if (Sp < 1) end; set @_M_BLOCK, 1; // block casting, until the timer clears it diff --git a/world/map/npc/magic/level1-lesser-heal.txt b/world/map/npc/magic/level1-lesser-heal.txt index d195956f..37d081dc 100644 --- a/world/map/npc/magic/level1-lesser-heal.txt +++ b/world/map/npc/magic/level1-lesser-heal.txt @@ -17,18 +17,14 @@ callfunc "adjust_spellpower"; set Sp, Sp - 6; misceffect FX_MAGIC_WHITE, strcharinfo(0); - set .@heal_value, get(HEALXP, @target_id); - set @mexp, .exp_gain; callfunc "magic_exp"; - if (.@heal_value > 200) - set .@heal_value, 200; 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; - callfunc "gain_heal_xp"; + void call("gain_heal_xp", min(200, (get(MaxHp, @target_id) - get(Hp, @target_id))), 1, 2, 2); goto L_Continue; L_Continue: @@ -51,6 +47,5 @@ OnInit: void call("magic_register"); set .level, 1; set .exp_gain, 1; - set .heal_xp_value_divisor, 2; end; } diff --git a/world/map/npc/magic/level1-summon-maggots.txt b/world/map/npc/magic/level1-summon-maggots.txt index 49022635..28e99a87 100644 --- a/world/map/npc/magic/level1-summon-maggots.txt +++ b/world/map/npc/magic/level1-summon-maggots.txt @@ -27,6 +27,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -42,7 +44,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1002, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-arrow-hail.txt b/world/map/npc/magic/level2-arrow-hail.txt index 35cd584e..6e317232 100644 --- a/world/map/npc/magic/level2-arrow-hail.txt +++ b/world/map/npc/magic/level2-arrow-hail.txt @@ -66,7 +66,7 @@ OnNearbyNpc: end; OnLaunch: - if(get(BL_ID, .caster) != .caster) destroy; // destroy if caster is missing + 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; @@ -93,7 +93,7 @@ OnTimer30000: destroy; OnHit: - if(get(BL_ID, .caster) != .caster) destroy; // destroy if caster is missing + 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; diff --git a/world/map/npc/magic/level2-lay-on-hands.txt b/world/map/npc/magic/level2-lay-on-hands.txt index 0affb210..1f9d7389 100644 --- a/world/map/npc/magic/level2-lay-on-hands.txt +++ b/world/map/npc/magic/level2-lay-on-hands.txt @@ -12,7 +12,7 @@ if (distance(BL_ID, @target_id) >= (((sqrt(@spellpower)*12)+@spellpower)/100)+2) end; if (sc_check(SC_HALT_REGENERATE,@target_id)) end; if (getequipid(equip_head, @args$) == 888) end; // magic gm top hat - set .@needed, get(MaxHp, @target_id) - get(Hp, @target_id); + set @needed, get(MaxHp, @target_id) - get(Hp, @target_id); goto L_Pay; L_Pay: @@ -23,14 +23,14 @@ L_Pay: misceffect FX_MAGIC_WHITE, @args$; // on target set .@fraction, max(80, 200 - (Vit + (@spellpower/10))); // pay at least 40% - set .@payment, (.@needed * .@fraction) / 200; + set .@payment, (@needed * .@fraction) / 200; set .@available, Hp - (MaxHp / 20); - set .@heal_value, if_then_else(.@payment < .@available, .@needed+1-1, (.@available * 200) / .@fraction); // FIXME / XXX why the f do I need to do +1-1 ? + set @heal_value, if_then_else(.@payment < .@available, @needed+1-1, (.@available * 200) / .@fraction); // FIXME / XXX why the f do I need to do +1-1 ? if (.@payment > .@available) set .@payment, .@available; set @mexp, min(.exp_gain, .@payment/100); - callfunc "gain_heal_xp"; + void call("gain_heal_xp", @heal_value, 1, 1, 3); callfunc "magic_exp"; set .@dark, getskilllv(SKILL_MAGIC_DARK) >= 2; // true if dark magic user @@ -40,13 +40,13 @@ L_Pay: set .@thp, get(Hp, @target_id); if (.@thp < 1) end; - set Hp, .@thp + .@heal_value, @target_id; + set Hp, .@thp + @heal_value, @target_id; end; L_Mouboo: set @spell, 1; callfunc "QuestMoubooHeal"; - set .@needed, 1000; + set @needed, 1000; goto L_Pay; OnInit: @@ -55,7 +55,5 @@ OnInit: void call("magic_register"); set .level, 2; set .exp_gain, 1; // this is MAX possible exp - set .heal_xp_value_divisor, 1; - set .base_exp_factor, 3; end; } diff --git a/world/map/npc/magic/level2-rain.txt b/world/map/npc/magic/level2-rain.txt index 9e62782d..c088acf4 100644 --- a/world/map/npc/magic/level2-rain.txt +++ b/world/map/npc/magic/level2-rain.txt @@ -64,7 +64,7 @@ L_Tree: close; OnLaunch: - if(get(BL_ID, .caster) != .caster) destroy; // destroy if caster is missing + if(get(Hp, .caster) < 1) destroy; // destroy if caster is missing if(getmap(.caster) != strnpcinfo(3)) destroy; // destroy if caster left the map set .count, .count + 1; if(.count > .max) destroy; @@ -82,7 +82,7 @@ S_Launch: return; OnHit: - if(get(BL_ID, .caster) != .caster) destroy; // destroy if caster is missing + 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 diff --git a/world/map/npc/magic/level2-summon-fluffies.txt b/world/map/npc/magic/level2-summon-fluffies.txt index 2ca630ed..f4d60475 100644 --- a/world/map/npc/magic/level2-summon-fluffies.txt +++ b/world/map/npc/magic/level2-summon-fluffies.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1020, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-mouboo.txt b/world/map/npc/magic/level2-summon-mouboo.txt index f6a68fcf..b098a3dd 100644 --- a/world/map/npc/magic/level2-summon-mouboo.txt +++ b/world/map/npc/magic/level2-summon-mouboo.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1028, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-pinkie.txt b/world/map/npc/magic/level2-summon-pinkie.txt index 785c8364..059d16f6 100644 --- a/world/map/npc/magic/level2-summon-pinkie.txt +++ b/world/map/npc/magic/level2-summon-pinkie.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1018, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-snakes.txt b/world/map/npc/magic/level2-summon-snakes.txt index 2c46f28b..a9d0dbfe 100644 --- a/world/map/npc/magic/level2-summon-snakes.txt +++ b/world/map/npc/magic/level2-summon-snakes.txt @@ -29,6 +29,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -44,7 +46,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1010, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_DARK; diff --git a/world/map/npc/magic/level2-summon-spiky-mushroom.txt b/world/map/npc/magic/level2-summon-spiky-mushroom.txt index 5659fc32..188e9b9f 100644 --- a/world/map/npc/magic/level2-summon-spiky-mushroom.txt +++ b/world/map/npc/magic/level2-summon-spiky-mushroom.txt @@ -28,6 +28,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -43,7 +45,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1019, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_ASTRAL; diff --git a/world/map/npc/magic/level2-summon-wickedmushroom.txt b/world/map/npc/magic/level2-summon-wickedmushroom.txt index 02442c6b..3b8b9cfc 100644 --- a/world/map/npc/magic/level2-summon-wickedmushroom.txt +++ b/world/map/npc/magic/level2-summon-wickedmushroom.txt @@ -29,6 +29,8 @@ OnCast: end; OnSummon: + 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; set .@i, 0; set .@x, getnpcx(); @@ -44,7 +46,7 @@ S_SummonAll: summon .@map$, rand(.@x-2,.@x+2), rand(.@y-2,.@y+2), .master, 1106, 2, .lifetime; set .@i, .@i + 1; if (.@i < .count) goto S_SummonAll; - return; + destroy; OnInit: set .school, SKILL_MAGIC_DARK; |