summaryrefslogtreecommitdiff
path: root/world/map/npc
diff options
context:
space:
mode:
authorHoraK-FDF <HoraK-FDF@web.de>2021-04-18 23:57:26 +0200
committerGitHub <noreply@github.com>2021-04-18 21:57:26 +0000
commita7d55a2c2f46d40128dfb8beaaa3216b57f9b2e2 (patch)
tree783abf0861fa45c8a176e478dd1b8e6a277adbf1 /world/map/npc
parent72b919758f400ea6fb5d62a7073a379cd4730cfe (diff)
downloadserverdata-a7d55a2c2f46d40128dfb8beaaa3216b57f9b2e2.tar.gz
serverdata-a7d55a2c2f46d40128dfb8beaaa3216b57f9b2e2.tar.bz2
serverdata-a7d55a2c2f46d40128dfb8beaaa3216b57f9b2e2.tar.xz
serverdata-a7d55a2c2f46d40128dfb8beaaa3216b57f9b2e2.zip
Luca and Mana Seed Rewards (#581)
Even particularly (Jesusalva) being against it and not going to keep it for Evolved... Accept the PR; Kalabar however will take over assassin quest in Evolved and the Mana thingy will need a redo as well.
Diffstat (limited to 'world/map/npc')
-rw-r--r--world/map/npc/002-1/luca.txt108
-rw-r--r--world/map/npc/012-3/mana-seed.txt42
2 files changed, 150 insertions, 0 deletions
diff --git a/world/map/npc/002-1/luca.txt b/world/map/npc/002-1/luca.txt
index 8db36cf9..405df455 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;
@@ -214,6 +226,102 @@ 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 + FLAG_LUCA_2SKILLS_MAXED + FLAG_LUCA_4SKILLS_MAXED + FLAG_LUCA_6SKILLS_MAXED)) == (FLAG_LUCA_GOT_SIX_SKILLS + FLAG_LUCA_2SKILLS_MAXED + FLAG_LUCA_4SKILLS_MAXED + 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?";