summaryrefslogtreecommitdiff
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
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.
-rw-r--r--world/map/db/const-quest.txt76
-rw-r--r--world/map/npc/002-1/luca.txt108
-rw-r--r--world/map/npc/012-3/mana-seed.txt42
3 files changed, 191 insertions, 35 deletions
diff --git a/world/map/db/const-quest.txt b/world/map/db/const-quest.txt
index 7f88c005..16f93480 100644
--- a/world/map/db/const-quest.txt
+++ b/world/map/db/const-quest.txt
@@ -90,47 +90,53 @@ DIVORCE_FEE_PER_LEVEL 500
WEDDING_MIN_LEVEL 32
// Flags for the magic quests.
-MFLAG_DRANK_POTION 1 // Character drank at least one magic potion as prerequisite for the Mana Seed quest.
-MFLAG_KNOWS_MANASEED 2 // Character has found the Mana Seed.
-MFLAG_TOUCHED_MANASEED 4 // Character has touched the Mana Seed.
-MFLAG_MANASEED_MAXEDOUT 8 // Character has touched the Mana Seed while maxed out on magic.
+MFLAG_DRANK_POTION 1 // Character drank at least one magic potion as prerequisite for the Mana Seed quest.
+MFLAG_KNOWS_MANASEED 2 // Character has found the Mana Seed.
+MFLAG_TOUCHED_MANASEED 4 // Character has touched the Mana Seed.
+MFLAG_MANASEED_MAXEDOUT 8 // Character has touched the Mana Seed while maxed out on magic.
-MFLAG_KNOWS_AULDSBEL 16 // Character has met Auldsbel.
-MFLAG_KNOWS_WYARA 32 // Character has met Wyara.
-MFLAG_KNOWS_SAGATHA 64 // Character has met Sagatha.
-MFLAG_KNOWS_MANAPOTION 128 // Has heard about the Mana Potion.
+MFLAG_KNOWS_AULDSBEL 16 // Character has met Auldsbel.
+MFLAG_KNOWS_WYARA 32 // Character has met Wyara.
+MFLAG_KNOWS_SAGATHA 64 // Character has met Sagatha.
+MFLAG_KNOWS_MANAPOTION 128 // Has heard about the Mana Potion.
-MFLAG_MANASEED_RUMOUR 256 // Has heard rumour about Mana Seed.
-MFLAG_KNOWS_CUTTREE 512 // Knows about the 'cut the tree' quest.
-MFLAG_DID_CUTTREE 1024 // Did cut off a branch from the druid tree.
-MFLAG_KNOWS_DRUIDTREE 2048 // Knows about the druid tree quest.
+MFLAG_MANASEED_RUMOUR 256 // Has heard rumour about Mana Seed.
+MFLAG_KNOWS_CUTTREE 512 // Knows about the 'cut the tree' quest.
+MFLAG_DID_CUTTREE 1024 // Did cut off a branch from the druid tree.
+MFLAG_KNOWS_DRUIDTREE 2048 // Knows about the druid tree quest.
-MFLAG_KNOWS_IMP 4096 // Knows about the imprisoned forest spirit.
-MFLAG_KNOWS_OLD_WIZARD 8192 // Knows Bjorn's old wizard.
-MFLAG_MADE_CONC_POTION 16384 // Made a concentration potion with T15 and/or T16.
-MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement.
+MFLAG_KNOWS_IMP 4096 // Knows about the imprisoned forest spirit.
+MFLAG_KNOWS_OLD_WIZARD 8192 // Knows Bjorn's old wizard.
+MFLAG_MADE_CONC_POTION 16384 // Made a concentration potion with T15 and/or T16.
+MFLAG_ELANORE_OMAR 32768 // Told Omar about Elanore's involvement.
-MFLAG_KNOWS_UNFOCUS_RECIPE 65536 // Has been told about unfocus by Luca.
+MFLAG_KNOWS_UNFOCUS_RECIPE 65536 // Has been told about unfocus by Luca.
+
+MFLAG_GOT_MANA_PEARL 131072 // Had enough magic exp to get the Mana Pearl.
// Flags set in the FLAGS variable:
-FLAG_HAS_BOWLER_BURNSDAY 1 // every year's poem at burns day, shannon gives you a bowler hat
-FLAG_OPENED_UNDERGROUND 2 // this flag is a replacement for variable Open_Underground_Palace_Barrier, which was used only as bool
-FLAG_GOT_NAEM_GLOVES 4 // this replaces Naem_Quest_Done, which was used as a bool variable
-FLAG_GOT_GRADUATIONCAP 8 // this is a bit which was to be found in Tut_var second bit
-FLAG_TOWEL_HELPED 16 // gave the towel npc the stuff he wants
-FLAG_TOWEL_COMPLETED 32 // got the towel from the towel npc
-FLAG_ANDRA_HELPED 64 // Knows Andra and agreed to help her
-FLAG_ROSSI_COMPLETED 128 // Completed the Rossi Quest
-FLAG_TUTORIAL_DONE 256 // player completed tutorial (or entered the tutorial area from outside after it was added)
-FLAG_SNOWMAN 512 // player gave candy to the snowman
-FLAG_SANTAS_HELPER 1024 // player gave presents to Santa's helper
-FLAG_HURNSMINE_CHEST 2048 // player opened the chest with the short sword in Hurnscald mines
-FLAG_GOT_BEANIEHAT 4096 // player got Beanie Copter Hat from Milly
-FLAG_DECLINED_BEANIEHAT 8192 // player declined Beanie Copter Hat from Milly
-FLAG_KESHLAM_FLAWEDLENS 16384 // player got the Flawed Lens from Keshlam's Chest
-FLAG_KESHLAM_RAREDROP 32768 // player got the super rare from Keshlam's Chest
-FLAG_BEHEADER_MASK 65536 // traded with The Beheader
-FLAG_GOT_BEHEADER_SWORD 131072 // Obtained the Beheader Sword
+FLAG_HAS_BOWLER_BURNSDAY 1 // every year's poem at burns day, shannon gives you a bowler hat
+FLAG_OPENED_UNDERGROUND 2 // this flag is a replacement for variable Open_Underground_Palace_Barrier, which was used only as bool
+FLAG_GOT_NAEM_GLOVES 4 // this replaces Naem_Quest_Done, which was used as a bool variable
+FLAG_GOT_GRADUATIONCAP 8 // this is a bit which was to be found in Tut_var second bit
+FLAG_TOWEL_HELPED 16 // gave the towel npc the stuff he wants
+FLAG_TOWEL_COMPLETED 32 // got the towel from the towel npc
+FLAG_ANDRA_HELPED 64 // Knows Andra and agreed to help her
+FLAG_ROSSI_COMPLETED 128 // Completed the Rossi Quest
+FLAG_TUTORIAL_DONE 256 // player completed tutorial (or entered the tutorial area from outside after it was added)
+FLAG_SNOWMAN 512 // player gave candy to the snowman
+FLAG_SANTAS_HELPER 1024 // player gave presents to Santa's helper
+FLAG_HURNSMINE_CHEST 2048 // player opened the chest with the short sword in Hurnscald mines
+FLAG_GOT_BEANIEHAT 4096 // player got Beanie Copter Hat from Milly
+FLAG_DECLINED_BEANIEHAT 8192 // player declined Beanie Copter Hat from Milly
+FLAG_KESHLAM_FLAWEDLENS 16384 // player got the Flawed Lens from Keshlam's Chest
+FLAG_KESHLAM_RAREDROP 32768 // player got the super rare from Keshlam's Chest
+FLAG_BEHEADER_MASK 65536 // traded with The Beheader
+FLAG_GOT_BEHEADER_SWORD 131072 // Obtained the Beheader Sword
+FLAG_LUCA_GOT_SIX_SKILLS 262144 // player learned all six Focus Skills
+FLAG_LUCA_2SKILLS_MAXED 524288 // player got 2 Focus Skills at lvl 9
+FLAG_LUCA_4SKILLS_MAXED 1048576 // player got 4 Focus Skills at lvl 9
+FLAG_LUCA_6SKILLS_MAXED 2097152 // player got 6 Focus Skills at lvl 9
// Flags for the battle caves.
BATTLE_CAVE1 1
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?";