diff options
Diffstat (limited to 'world/map/npc')
-rw-r--r-- | world/map/npc/001-2/heathin.txt | 2 | ||||
-rw-r--r-- | world/map/npc/002-1/luca.txt | 112 | ||||
-rw-r--r-- | world/map/npc/012-3/mana-seed.txt | 42 | ||||
-rw-r--r-- | world/map/npc/027-3/_warps.txt | 2 | ||||
-rw-r--r-- | world/map/npc/099-7/boss.txt | 2 | ||||
-rw-r--r-- | world/map/npc/annuals/halloween/config.txt | 1 | ||||
-rw-r--r-- | world/map/npc/annuals/halloween/munro.txt | 67 | ||||
-rw-r--r-- | world/map/npc/functions/clear_vars.txt | 30 | ||||
-rw-r--r-- | world/map/npc/functions/gm_island.txt | 35 | ||||
-rw-r--r-- | world/map/npc/items/manapearl_item.txt | 29 | ||||
-rw-r--r-- | world/map/npc/magic/level2-magic-knuckles.txt | 17 | ||||
-rw-r--r-- | world/map/npc/scripts.conf | 1 |
12 files changed, 263 insertions, 77 deletions
diff --git a/world/map/npc/001-2/heathin.txt b/world/map/npc/001-2/heathin.txt index 321b6e0f..53cc8b68 100644 --- a/world/map/npc/001-2/heathin.txt +++ b/world/map/npc/001-2/heathin.txt @@ -20,7 +20,7 @@ if (QL_TERRANITE_ARMOR == 2) && (BaseLevel >= 70) goto L_Hood; if (QL_TERRANITE_ARMOR == 2) && (BaseLevel >= 60) goto L_Forge_Thanks; if (QL_TERRANITE_ARMOR == 1) && (BaseLevel >= 60) goto L_Forge_Award; - if (BaseLevel >= 60) goto L_Start; + if (QL_TERRANITE_ARMOR < 1) && (BaseLevel >= 60) goto L_Start; mes "[Heathin]"; mes "\"Hello, friend. I am Heathin, a smith of exotic metals. \""; diff --git a/world/map/npc/002-1/luca.txt b/world/map/npc/002-1/luca.txt index 8db36cf9..4a05b757 100644 --- a/world/map/npc/002-1/luca.txt +++ b/world/map/npc/002-1/luca.txt @@ -4,6 +4,18 @@ { set @EXP_BRAWLING, 2000; + setarray @luca_reward_item_id, + 756, // "AssassinGloves", // player learned all six Focus Skills + 757, // "AssassinBoots", // player got 2 Focus Skills at lvl 9 + 731, // "AssassinPants", // player got 4 Focus Skills at lvl 9 + 5267; // "AssassinMask"; // player got 6 Focus Skills at lvl 9 + + setarray @luca_reward_exp, + 60000, // player learned all six Focus Skills + 70000, // player got 2 Focus Skills at lvl 9 + 80000, // player got 4 Focus Skills at lvl 9 + 90000; // player got 6 Focus Skills at lvl 9 + if (BaseLevel >= 35) goto L_teach; if (BaseLevel >= 25) goto L_teach_soon; @@ -38,6 +50,8 @@ L_teach_soon: goto L_Close; L_teach: + // Bugfix death + if (!(FLAGS & FLAG_LUCA_FIX)) goto L_Nev; if (getskilllv(SKILL_POOL)) goto L_teachmore; mes "[Luca the Hunter]"; @@ -214,6 +228,104 @@ L_teachmore: mes "[Luca the Hunter]"; mes "\"Good to see you again!\""; next; + + set @mallard, getskilllv(SKILL_MALLARDS_EYE); + set @brawling, getskilllv(SKILL_BRAWLING); + set @speed, getskilllv(SKILL_SPEED); + set @poison, getskilllv(SKILL_RESIST_POISON); + set @astralsoul, getskilllv(SKILL_ASTRAL_SOUL); + set @raging, getskilllv(SKILL_RAGING); + + set @lvl9skills, 0; + if (@mallard >= 9) + set @lvl9skills, @lvl9skills + 1; + if (@brawling >= 9) + set @lvl9skills, @lvl9skills + 1; + if (@speed >= 9) + set @lvl9skills, @lvl9skills + 1; + if (@poison >= 9) + set @lvl9skills, @lvl9skills + 1; + if (@astralsoul >= 9) + set @lvl9skills, @lvl9skills + 1; + if (@raging >= 9) + set @lvl9skills, @lvl9skills + 1; + + if ((FLAGS & FLAG_LUCA_GOT_SIX_SKILLS) && + (FLAGS & FLAG_LUCA_2SKILLS_MAXED) && + (FLAGS & FLAG_LUCA_4SKILLS_MAXED) && + (FLAGS & FLAG_LUCA_6SKILLS_MAXED)) goto L_CheckSkillsEnd; + + if (!(@mallard && @brawling && @speed && @poison && @astralsoul && @raging) || (FLAGS & FLAG_LUCA_GOT_SIX_SKILLS)) goto L_Check2Skills; + mes "[Luca the Hunter]"; + mes "I've heard you learned all six Focus Skills."; + mes "For that, the other teachers and I want to give you a reward!"; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_InvFull; + mes "Here take the [@@" + @luca_reward_item_id[0] + "|@@]."; + mes "[" + @luca_reward_exp[0] + " experience points]"; + getitem @luca_reward_item_id[0], 1; + getexp @luca_reward_exp[0], 0; + set FLAGS, FLAGS | FLAG_LUCA_GOT_SIX_SKILLS; + next; + goto L_Check2Skills; + +L_Check2Skills: + if (@lvl9skills < 2 || (FLAGS & FLAG_LUCA_2SKILLS_MAXED)) goto L_Check4Skills; + mes "[Luca the Hunter]"; + mes "I sense you have maxed out two Focus Skills!"; + mes "For that I give you a reward!"; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_InvFull; + mes "Here take the [@@" + @luca_reward_item_id[1] + "|@@]."; + mes "[" + @luca_reward_exp[1] + " experience points]"; + getitem @luca_reward_item_id[1], 1; + getexp @luca_reward_exp[1], 0; + set FLAGS, FLAGS | FLAG_LUCA_2SKILLS_MAXED; + next; + goto L_Check4Skills; + +L_Check4Skills: + if (@lvl9skills < 4 || (FLAGS & FLAG_LUCA_4SKILLS_MAXED)) goto L_Check6Skills; + mes "[Luca the Hunter]"; + mes "I sense you have maxed out four Focus Skills!"; + mes "For that I give the next reward!"; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_InvFull; + mes "Here take the [@@" + @luca_reward_item_id[2] + "|@@]."; + mes "[" + @luca_reward_exp[2] + " experience points]"; + getitem @luca_reward_item_id[2], 1; + getexp @luca_reward_exp[2], 0; + set FLAGS, FLAGS | FLAG_LUCA_4SKILLS_MAXED; + next; + goto L_Check6Skills; + +L_Check6Skills: + if (@lvl9skills < 6 || (FLAGS & FLAG_LUCA_6SKILLS_MAXED)) goto L_CheckSkillsEnd; + mes "[Luca the Hunter]"; + mes "I sense you have maxed out six Focus Skills!"; + mes "For that I give the final reward!"; + next; + getinventorylist; + if (@inventorylist_count == 100) goto L_InvFull; + mes "Here take the [@@" + @luca_reward_item_id[3] + "|@@]."; + mes "[" + @luca_reward_exp[3] + " experience points]"; + getitem @luca_reward_item_id[3], 1; + getexp @luca_reward_exp[3], 0; + set FLAGS, FLAGS | FLAG_LUCA_6SKILLS_MAXED; + next; + goto L_CheckSkillsEnd; + +L_InvFull: + mes "[Luca the Hunter]"; + mes "Looks like your bag is full!"; + mes "To get your reward you must make some room first!"; + next; + goto L_CheckSkillsEnd; + +L_CheckSkillsEnd: goto L_teachmore2; L_teachmore2: diff --git a/world/map/npc/012-3/mana-seed.txt b/world/map/npc/012-3/mana-seed.txt index c75125e4..33536c7a 100644 --- a/world/map/npc/012-3/mana-seed.txt +++ b/world/map/npc/012-3/mana-seed.txt @@ -48,6 +48,14 @@ // Set up SkillUp function set @SUP_id, SKILL_MAGIC; set @SUP_name$, "Magic"; + + set @manapearl_id, 5270; + set @manapearl_exp, 500000; + set @manapearl_lvl_for_reward, 50; + set @manapearl_mexp_for_reward, 5404; + // At 5404 #abizit returned always: + // "Magic flows naturally from you, readily and with ease. Your understanding of what you can currently control at present is flawless, far beyond your requirements to cast magic at this level."; + // So i take this as needed magic exp. if (@has_magic) goto L_magic_start; @@ -138,6 +146,40 @@ L_nomagic_destroy: // Magic main menu ------------------------------------------------------------ L_magic_start: + + if (MAGIC_FLAGS & MFLAG_GOT_MANA_PEARL) goto L_ManaPearlEnd; + + set @debug_mask, 65535; + set @debug_shift, 0; + set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift); + + if (! (@mexp >= @manapearl_mexp_for_reward && BaseLevel >= @manapearl_lvl_for_reward)) goto L_ManaPearlEnd; + getinventorylist; + if (countitem("Pearl") > 1 && @inventorylist_count == 100) goto L_ManaPearlHasNoRoom; + //if (!countitem("Pearl") >= 1) goto L_ManaPearlEnd; // without the brackets it crashes the server! + if (!(countitem("Pearl") >= 1)) goto L_ManaPearlEnd; + mes "As you approach the Mana Seed, suddenly a pearl from your bag starts to float and shine in a blue light."; + mes "It seems since Magic flows naturally from you, you and the Mana Seed are in resonance now"; + mes "and the crystalline structure of that pearl was different from other pearls which let it also resonate with that flow."; + mes "Since this resonance is established, the Mana Pearl channels some power from the Mana Seed to you."; + next; + mes "You gain the [@@" + @manapearl_id + "|@@]."; + mes "[" + @manapearl_exp + " experience points]"; + delitem "Pearl", 1; + getitem @manapearl_id, 1; + getexp @manapearl_exp, 0; + set MAGIC_FLAGS, MAGIC_FLAGS | MFLAG_GOT_MANA_PEARL; + next; + goto L_ManaPearlEnd; + +L_ManaPearlHasNoRoom: + mes "Something in your bag is moving but it seems it is stuck since your bag too stuffed."; + mes "Maybe you should make some room first."; + next; + goto L_ManaPearlEnd; + +L_ManaPearlEnd: + mes "[Mana Seed]"; mes "The Mana Seed is still in the same place as during your last visit, spreading its light throughout the cavern."; mes "What would you like to do?"; diff --git a/world/map/npc/027-3/_warps.txt b/world/map/npc/027-3/_warps.txt index d2f23685..3b589a77 100644 --- a/world/map/npc/027-3/_warps.txt +++ b/world/map/npc/027-3/_warps.txt @@ -2,4 +2,4 @@ // Crypt Basement warps 027-3,26,67|warp|2,-1,027-2,36,77 -027-3,126,98|warp|1,-1,027-4,125,18 +027-3,127,99|warp|1,-1,027-4,125,18 diff --git a/world/map/npc/099-7/boss.txt b/world/map/npc/099-7/boss.txt index 8ce2ef8d..7362690f 100644 --- a/world/map/npc/099-7/boss.txt +++ b/world/map/npc/099-7/boss.txt @@ -770,7 +770,7 @@ L_No: } 099-7,73,20,0|script|#NoobKytty01|400,0,0 { - warp "099-7", 72, 17; + warp "099-7", 74, 17; end; } 099-7,73,17,0|script|#NoobKytty02|400,0,0 diff --git a/world/map/npc/annuals/halloween/config.txt b/world/map/npc/annuals/halloween/config.txt index 6eb20caa..ffe9dfbe 100644 --- a/world/map/npc/annuals/halloween/config.txt +++ b/world/map/npc/annuals/halloween/config.txt @@ -327,7 +327,6 @@ L_Main: set $@halloween_react_veryscary$[$@n], "\"Darkest day of my life, blacker then the darkest chocolate.\""; set $@halloween_num_npcs, $@n + 1; - set $@halloween_all_npc_bits, -1 << (32 - $@halloween_num_npcs); set $@n, 0; diff --git a/world/map/npc/annuals/halloween/munro.txt b/world/map/npc/annuals/halloween/munro.txt index e664680e..cbbbf233 100644 --- a/world/map/npc/annuals/halloween/munro.txt +++ b/world/map/npc/annuals/halloween/munro.txt @@ -29,73 +29,8 @@ L_Halloween: L_Exit: close; - -// Spawn Tormenta if not alive and HW -OnClock0000: - goto L_Tormenta; -OnClock0100: - goto L_Tormenta; -OnClock0200: - goto L_Tormenta; -OnClock0300: - goto L_Tormenta; -OnClock0400: - goto L_Tormenta; -OnClock0500: - goto L_Tormenta; -OnClock0600: - goto L_Tormenta; -OnClock0700: - goto L_Tormenta; -OnClock0800: - goto L_Tormenta; -OnClock0900: - goto L_Tormenta; -OnClock1000: - goto L_Tormenta; -OnClock1100: - goto L_Tormenta; -OnClock1200: - goto L_Tormenta; -OnClock1300: - goto L_Tormenta; -OnClock1400: - goto L_Tormenta; -OnClock1500: - goto L_Tormenta; -OnClock1600: - goto L_Tormenta; -OnClock1700: - goto L_Tormenta; -OnClock1800: - goto L_Tormenta; -OnClock1900: - goto L_Tormenta; -OnClock2000: - goto L_Tormenta; -OnClock2100: - goto L_Tormenta; -OnClock2200: - goto L_Tormenta; -OnClock2300: - goto L_Tormenta; - -// Debug -OnInit: - goto L_Tormenta; - -L_Tormenta: - // This code is going to get removed so I'll reuse it this time... - if (gettime(5) != 17) - end; - - areamonster "008-1", 20, 20, 142, 100, "", 1037, 100; - areamonster "007-1", 20, 20, 124, 100, "", 1037, 80; - areamonster "011-1", 20, 20, 130, 120, "", 1037, 80; - areamonster "018-1", 20, 20, 180, 100, "", 1037, 140; - end; - } + function|script|SpawnMunro { if ($@halloween_time) diff --git a/world/map/npc/functions/clear_vars.txt b/world/map/npc/functions/clear_vars.txt index e98def7d..2abfb118 100644 --- a/world/map/npc/functions/clear_vars.txt +++ b/world/map/npc/functions/clear_vars.txt @@ -18,6 +18,7 @@ function|script|ClearVariables callsub S_Flags; callsub S_Bitmask; callsub S_BlueSage; + callsub S_Luca; callsub S_Easter; callsub S_Easter2008; @@ -236,6 +237,35 @@ S_BlueSage: set QUEST_BlueSage, QUEST_BlueSage & ~((1<<5)|(1<<6)|(1<<7)); return; +S_Luca: + if (FLAGS & FLAG_LUCA_FIX) goto S_Return; + if (FLAGS & FLAG_LUCA_6SKILLS_MAXED) goto S_Luca6; + if (FLAGS & FLAG_LUCA_4SKILLS_MAXED) goto S_Luca4; + if (FLAGS & FLAG_LUCA_2SKILLS_MAXED) goto S_Luca2; + goto S_LucaX; + +S_Luca6: + if (countitem("AssassinMask") < 1) goto S_Return; + delitem "AssassinMask", 1; + set FLAGS, FLAGS ^ FLAG_LUCA_6SKILLS_MAXED; + goto S_Luca4; + +S_Luca4: + if (countitem("AssassinPants") < 1) goto S_Return; + delitem "AssassinPants", 1; + set FLAGS, FLAGS ^ FLAG_LUCA_4SKILLS_MAXED; + goto S_Luca2; + +S_Luca2: + if (countitem("AssassinBoots") < 1) goto S_Return; + delitem "AssassinBoots", 1; + set FLAGS, FLAGS ^ FLAG_LUCA_2SKILLS_MAXED; + goto S_LucaX; + +S_LucaX: + set FLAGS, FLAGS | FLAG_LUCA_FIX; + return; + S_Flags: if (Open_Underground_Palace_Barrier) set FLAGS, FLAGS | FLAG_OPENED_UNDERGROUND; diff --git a/world/map/npc/functions/gm_island.txt b/world/map/npc/functions/gm_island.txt index 3e1127c4..e2763bbf 100644 --- a/world/map/npc/functions/gm_island.txt +++ b/world/map/npc/functions/gm_island.txt @@ -9,6 +9,41 @@ OnInit: disablenpc "Gm Event#3"; end; } +-|script|#Puppet|32767 +{ + mes "You found me! Now please send my coordinates to staff."; + close; + +OnSpawn: + if (GM < G_SYSOP) goto L_GM; + callfunc "argv_splitter"; + if (@argv$[4] == "") goto L_Failed; + set $@PMAP$, @argv$[0]; + set $@PX, @argv$[1]; + set $@PY, @argv$[2]; + set $@PNAME$, @argv$[3]; + set $@PNPC, @argv$[4]; + if (puppet($@PMAP$, $@PX, $@PY, $@PNAME$, $@PNPC) > 0) + gmlog "@puppeter " + @args$; + set $@PMAP$, ""; + set $@PX, 0; + set $@PY, 0; + set $@PNAME$, ""; + set $@PNPC, 0; + end; + +L_Failed: + message strcharinfo(0), "Syntax: @puppeter MAP X Y NAME NPCID"; + end; + +L_GM: + message strcharinfo(0), "puppeter : GM command is level "+ G_SYSOP +", but you are level " + GM; + end; + +OnInit: + registercmd chr(ATCMD_SYMBOL) + "puppeter", strnpcinfo(0)+"::OnSpawn"; + end; +} function|script|GmWarp { if ($@GM_EVENT_WARP == 1) warp "028-1", 110, 30; diff --git a/world/map/npc/items/manapearl_item.txt b/world/map/npc/items/manapearl_item.txt new file mode 100644 index 00000000..9c1f1c04 --- /dev/null +++ b/world/map/npc/items/manapearl_item.txt @@ -0,0 +1,29 @@ +// The Mana Pearl can only be used when player has a natural mana flow: +// "Magic flows naturally from you, readily and with ease. Your understanding of what you can currently control at present is flawless, far beyond your requirements to cast magic at this level."; +// Variables passed to this script: +// @slotId The slot in which the item would have been equipped in. This is passed automagically when called in an equip script. + +function|script|ManaPearlItem +{ + + set @debug_mask, 65535; + set @debug_shift, 0; + set @mexp, ((MAGIC_EXPERIENCE & @debug_mask) >> @debug_shift); + + set @manapearl_mexp_needed, 5404; + + if ( @mexp >= @manapearl_mexp_needed ) + goto L_Return; + + message strcharinfo(0), "You are not expirienced enough to keep up the mana flow that is needed to stay in resonance with the Mana Pearl."; + + // This is for debug + if (debug) + goto L_Return; + + callfunc "UnequipLater"; + goto L_Return; + +L_Return: + return; +} diff --git a/world/map/npc/magic/level2-magic-knuckles.txt b/world/map/npc/magic/level2-magic-knuckles.txt index 95ab9120..ab74d474 100644 --- a/world/map/npc/magic/level2-magic-knuckles.txt +++ b/world/map/npc/magic/level2-magic-knuckles.txt @@ -1,10 +1,11 @@ -|script|magic-knuckles|32767 { - if(call("magic_checks")) end; + if (call("magic_checks")) end; if (Sp < 20) end; if (getskilllv(SKILL_MAGIC) < .level) end; set .@level, getskilllv(.school); if (.@level < .level) end; + if (getequipid(equip_hand1) != -1 || getequipid(equip_hand2) != -1) end; if (.@level <= 3 && countitem("Beer") >= 1) delitem "Beer", 1; elif (.@level <= 3) end; set @_M_BLOCK, 1; // block casting, until the timer clears it @@ -13,16 +14,18 @@ set Sp, Sp - 20; misceffect FX_MAGIC_KNUCKLE_CAST, strcharinfo(0); setarray @upmarmuspell[0], - @spellpower, - ((@spellpower/10) + 10), // charges - (((200 - Agi) * 1300) / 200), // delay - Str; // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str + (BASE_ATK), // dmg + ((Dex/3) + 10), // charges + (sqrt(300 - (Agi * 2))+(5/2)), // delay + Agi, // dmg bonus + ((sqrt(BaseLevel + 9) + Str) * 2); // do not allow to equip light armor, cast, and then switch to heavy armor to get bonus str callfunc "magic_exp"; goto L_FreeRecast; OnAttack: + if (getequipid(equip_hand1) != -1 || getequipid(equip_hand2) != -1) goto OnDischarge; if (target(BL_ID, @target_id, 22) != 22) goto L_FreeRecast; // 0x10 | 0x02 | 0x04 - void call("melee_damage", @upmarmuspell[0], @target_id, (30 + rand((@upmarmuspell[3]*2) + 5))); + void call("elt_damage", @upmarmuspell[0], (@upmarmuspell[3] + @upmarmuspell[4]), ELT_WATER, ELT_FIRE, FX_NONE); set @upmarmuspell[1], @upmarmuspell[1] - 1; goto L_FreeRecast; @@ -39,7 +42,7 @@ OnDischarge: end; OnSetRecast: - overrideattack @upmarmuspell[2], 1, ATTACK_ICON_GENERIC, OVERRIDE_KNUCKLES, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; + overrideattack (@upmarmuspell[2] * @upmarmuspell[2]), 1, ATTACK_ICON_GENERIC, OVERRIDE_KNUCKLES, strnpcinfo(0)+"::OnAttack", @upmarmuspell[1]; // delay neeeds to be squared end; OnInit: diff --git a/world/map/npc/scripts.conf b/world/map/npc/scripts.conf index de85f8b4..114cc924 100644 --- a/world/map/npc/scripts.conf +++ b/world/map/npc/scripts.conf @@ -54,6 +54,7 @@ npc: npc/items/drugs.txt npc: npc/items/max_stat.txt npc: npc/items/nobow_item.txt npc: npc/items/love_potion.txt +npc: npc/items/manapearl_item.txt import: npc/_import.txt // magic |