Initial commit

This commit is contained in:
Ubuntu
2026-06-19 00:00:16 -04:00
commit 73701ff86e
7100 changed files with 1952988 additions and 0 deletions
+65
View File
@@ -0,0 +1,65 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class ALittleSomething : BaseQuest
{
public ALittleSomething()
: base()
{
this.AddObjective(new ObtainObjective(typeof(BrilliantAmber), "Brilliant Amber", 1, 0x3199));
this.AddReward(new BaseReward(typeof(MeagerImbuingBag), 1, "Meager Imbuing Bag"));
}
public override object Title
{
get
{
return "A Little Something";
}
}
public override object Description
{
get
{
return 1113773;
}
}
public override object Refuse
{
get
{
return 1113774;
}
}
public override object Uncomplete
{
get
{
return 1113775;
}
}
public override object Complete
{
get
{
return 1113776;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+104
View File
@@ -0,0 +1,104 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class ATangledWeb : BaseQuest
{
public ATangledWeb()
: base()
{
this.AddObjective(new BloodCreaturesObjective(typeof(IBloodCreature), "blood creatures", 12));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/*A Tangled Web*/
public override object Title
{
get
{
return 1095032;
}
}
/*Kill Bloodworms and Blood Elementals to fill Jaacar's barrel.
Return to Jaacar with the filled barrel for your reward
Will friend help Jaacar with small errand for big friend?
Jaacar need big barrel full of blood. Can friend do that?
Best place to get blood is blood elementals and bloodworms nearby.
If you do, Jaacar give to you special present! More special than favorite recipe!*/
public override object Description
{
get
{
return 1095034;
}
}
/*Filling barrel not gross! Filling barrel helps friend! You think and then come back and help. Yes, friend is big help!*/
public override object Refuse
{
get
{
return 1095035;
}
}
/*Jaacar need barrel filled all the way to the top! Good friend, go fill the barrel for Jaacar.*/
public override object Uncomplete
{
get
{
return 1095036;
}
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1095038, null, 0x23); // Jaacar's barrel is completely full. Return to Jaacar for your reward.
this.Owner.PlaySound(this.CompleteSound);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
private class BloodCreaturesObjective : SlayObjective
{
public BloodCreaturesObjective(Type creature, string name, int amount)
: base(creature, name, amount)
{
}
public override void OnKill(Mobile killed)
{
base.OnKill(killed);
if (!this.Completed)
this.Quest.Owner.SendLocalizedMessage(1095037); // Blood from the creature goes into Jaacar’s barrel.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
}
+178
View File
@@ -0,0 +1,178 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class AemaethOneQuest : BaseQuest
{
public AemaethOneQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(BasinOfCrystalClearWater), "basin of crystal clear water", 1, typeof(Szandor), "Szandor"));
this.AddReward(new BaseReward(1075323)); // Aurelia's gratitude.
}
public override QuestChain ChainID
{
get
{
return QuestChain.Aemaeth;
}
}
public override Type NextQuest
{
get
{
return typeof(AemaethTwoQuest);
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* Aemaeth */
public override object Title
{
get
{
return 1075321;
}
}
/* My father died in an accident some months ago. My mother refused to accept his death. We had a little money set by,
and she took it to a necromancer, who promised to restore my father to life. Well, he revived my father, all right, the
cheat! Now my father is a walking corpse, a travesty . . . a monster. My mother is beside herself -- she won't eat, she
can't sleep. I prayed at the shrine of Spirituality for guidance, and I must have fallen asleep. When I awoke, there was
this basin of clear water. I cannot leave my mother, for I fear what she might do to herself. Could you take this to the
graveyard, and give it to what is left of my father? */
public override object Description
{
get
{
return 1075322;
}
}
/* Oh! Alright then. I hope someone comes along soon who can help me, or I don’t know what will become of us. */
public override object Refuse
{
get
{
return 1075324;
}
}
/* My father - or what remains of him - can be found in the graveyard northwest of the city. */
public override object Uncomplete
{
get
{
return 1075325;
}
}
/* What is this you give me? A basin of water? */
public override object Complete
{
get
{
return 1075326;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class AemaethTwoQuest : BaseQuest
{
public AemaethTwoQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(BasinOfCrystalClearWater), "basin of crystal clear water", 1, typeof(Aurelia), "Aurelia"));
this.AddReward(new BaseReward(typeof(MirrorOfPurification), 1075329)); // Mirror of Purification
}
public override QuestChain ChainID
{
get
{
return QuestChain.Aemaeth;
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* Aemaeth */
public override object Title
{
get
{
return 1075327;
}
}
/* You tell me it is time to leave this flesh. I did not understand until now. I thought: I can see my wife and my daughter,
I can speak. Is this not life? But now, as I regard my reflection, I see what I have become. This only a mockery of life.
Thank you for having the courage to show me the truth. For the love I bear my wife and daughter, I know now that I must pass
beyond the veil. Will you return this basin to Aurelia? She will know by this that I am at rest. */
public override object Description
{
get
{
return 1075328;
}
}
/* You won’t take this back to my daughter? Please, I cannot leave until she knows I am at peace. */
public override object Refuse
{
get
{
return 1075330;
}
}
/* My daughter will be at my home, on the east side of the city. */
public override object Uncomplete
{
get
{
return 1075331;
}
}
/* Thank goodness! Now we can honor my father for the great man he was while he lived, rather than the horror he became. */
public override object Complete
{
get
{
return 1075332;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+179
View File
@@ -0,0 +1,179 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Ambitious
{
public class AmbitiousQueenQuest : QuestSystem
{
private static readonly Type[] m_TypeReferenceTable = new Type[]
{
typeof(Ambitious.DontOfferConversation),
typeof(Ambitious.AcceptConversation),
typeof(Ambitious.DuringKillQueensConversation),
typeof(Ambitious.GatherFungiConversation),
typeof(Ambitious.DuringFungiGatheringConversation),
typeof(Ambitious.EndConversation),
typeof(Ambitious.FullBackpackConversation),
typeof(Ambitious.End2Conversation),
typeof(Ambitious.KillQueensObjective),
typeof(Ambitious.ReturnAfterKillsObjective),
typeof(Ambitious.GatherFungiObjective),
typeof(Ambitious.GetRewardObjective)
};
private bool m_RedSolen;
public AmbitiousQueenQuest(PlayerMobile from, bool redSolen)
: base(from)
{
this.m_RedSolen = redSolen;
}
// Serialization
public AmbitiousQueenQuest()
{
}
public override Type[] TypeReferenceTable
{
get
{
return m_TypeReferenceTable;
}
}
public override object Name
{
get
{
// Ambitious Solen Queen Quest
return 1054146;
}
}
public override object OfferMessage
{
get
{
/* <I>The Solen queen considers you eagerly for a moment then says,</I><BR><BR>
*
* Yes. Yes, I think you could be of use. Normally, of course, I would handle
* these things on my own, but these are busy times. Much to do, much to do.
* And besides, if I am to one day become the Matriarch, then it will be good to
* have experience trusting others to carry out various tasks for me. Yes.<BR><BR>
*
* That is my plan, you see - I will become the next Matriarch. Our current
* Matriarch is fine and all, but she won't be around forever. And when she steps
* down, I intend to be the next in line. Ruling others is my destiny, you see.<BR><BR>
*
* What I ask of you is quite simple. First, I need you to remove some of the
* - well - competition, I suppose. Though I dare say most are hardly competent to
* live up to such a title. I'm referring to the other queens of this colony,
* of course. My dear sisters, so to speak. If you could remove 5 of them, I would
* be most pleased. *sighs* By remove, I mean kill them. Don't make that face
* at me - this is how things work in a proper society, and ours has been more proper
* than most since the dawn of time. It's them or me, and whenever I give it
* any thought, I'm quite sure I'd prefer it to be them.<BR><BR>
*
* I also need you to gather some zoogi fungus for me - 50 should do the trick.<BR><BR>
*
* Will you accept my offer?
*/
return 1054060;
}
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.Zero;
}
}
public override bool IsTutorial
{
get
{
return false;
}
}
public override int Picture
{
get
{
return 0x15C9;
}
}
public bool RedSolen
{
get
{
return this.m_RedSolen;
}
}
public static void GiveRewardTo(PlayerMobile player, ref bool bagOfSending, ref bool powderOfTranslocation, ref bool gold)
{
if (bagOfSending)
{
Item reward = new BagOfSending();
if (player.PlaceInBackpack(reward))
{
player.SendLocalizedMessage(1054074, "", 0x59); // You have been given a bag of sending.
bagOfSending = false;
}
else
{
reward.Delete();
}
}
if (powderOfTranslocation)
{
Item reward = new PowderOfTranslocation(Utility.RandomMinMax(10, 12));
if (player.PlaceInBackpack(reward))
{
player.SendLocalizedMessage(1054075, "", 0x59); // You have been given some powder of translocation.
powderOfTranslocation = false;
}
else
{
reward.Delete();
}
}
if (gold)
{
Item reward = new Gold(Utility.RandomMinMax(250, 350));
if (player.PlaceInBackpack(reward))
{
player.SendLocalizedMessage(1054076, "", 0x59); // You have been given some gold.
gold = false;
}
else
{
reward.Delete();
}
}
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_RedSolen = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_RedSolen);
}
public override void Accept()
{
base.Accept();
this.AddConversation(new AcceptConversation());
}
}
}
+287
View File
@@ -0,0 +1,287 @@
using System;
namespace Server.Engines.Quests.Ambitious
{
public class DontOfferConversation : QuestConversation
{
public DontOfferConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen considers you for a moment then says,</I><BR><BR>
*
* Hmmm... I could perhaps benefit from your assistance, but you seem to be
* busy with another task at the moment. Return to me when you complete whatever
* it is that you're working on and maybe I can still put you to good use.
*/
return 1054059;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen smiles as you decide to help her.</I><BR><BR>
*
* Excellent. We'll worry about the zoogi fungus later - start by eliminating
* 5 queens from my colony.<BR><BR>That part's important, by the way; they must
* be queens from my colony. Killing queens from the other solen colony does
* little to help me become Matriarch of this colony and will not count
* toward your task.<BR><BR>
*
* Oh, and none of those nasty infiltrator queens either. They perform a necessary
* duty, I suppose, spying on the other colony. I fail to see why that couldn't be
* left totally to the warriors, though. Nevertheless, they do not count as well.<BR><BR>
*
* Very well. Carry on. I'll be waiting for your return.
*/
return 1054061;
}
}
public override void OnRead()
{
this.System.AddObjective(new KillQueensObjective());
}
}
public class DuringKillQueensConversation : QuestConversation
{
public DuringKillQueensConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen looks up as you approach.</I><BR><BR>
*
* You're back, but you have not yet eliminated 5 queens from my colony.
* Return when you have completed this task.<BR><BR>
*
* Remember, by the way, that queens from the other solen colony and
* infiltrator queens do not count toward your task.<BR><BR>
*
* Very well. Carry on. I'll be waiting for your return.
*/
return 1054066;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class GatherFungiConversation : QuestConversation
{
public GatherFungiConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen looks pleased to see you.</I><BR><BR>
*
* Splendid! You've done quite well in reducing my competition to become
* the next Matriarch. Now I must ask that you gather some zoogi fungus for me.
* I must practice processing it into powder of translocation.<BR><BR>
*
* I believe the amount we agreed upon earlier was 50. Please return when
* you have that amount and then give them to me.<BR><BR>
*
* Farewell for now.
*/
return 1054068;
}
}
public override void OnRead()
{
this.System.AddObjective(new GatherFungiObjective());
}
}
public class DuringFungiGatheringConversation : QuestConversation
{
public DuringFungiGatheringConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen looks up as you approach.</I><BR><BR>
*
* Do you have the zoogi fungus?<BR><BR>
*
* If so, give them to me. Otherwise, go gather some and then return to me.
*/
return 1054070;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class EndConversation : QuestConversation
{
public EndConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen smiles as she takes the zoogi fungus from you.</I><BR><BR>
*
* Wonderful! I greatly appreciate your help with these tasks. My plans are beginning
* to take shape ensuring that I will be the next Matriarch. But there is still
* much to be done until then.<BR><BR>
*
* You've done what I've asked of you and for that I thank you. Please accept this
* bag of sending and some powder of translocation as a reward. Oh, and I suppose
* I should give you some gold as well. Yes, yes. Of course.
*/
return 1054073;
}
}
public override void OnRead()
{
bool bagOfSending = true;
bool powderOfTranslocation = true;
bool gold = true;
AmbitiousQueenQuest.GiveRewardTo(this.System.From, ref bagOfSending, ref powderOfTranslocation, ref gold);
if (!bagOfSending && !powderOfTranslocation && !gold)
{
this.System.Complete();
}
else
{
this.System.AddConversation(new FullBackpackConversation(true, bagOfSending, powderOfTranslocation, gold));
}
}
}
public class FullBackpackConversation : QuestConversation
{
private readonly bool m_Logged;
private bool m_BagOfSending;
private bool m_PowderOfTranslocation;
private bool m_Gold;
public FullBackpackConversation(bool logged, bool bagOfSending, bool powderOfTranslocation, bool gold)
{
this.m_Logged = logged;
this.m_BagOfSending = bagOfSending;
this.m_PowderOfTranslocation = powderOfTranslocation;
this.m_Gold = gold;
}
public FullBackpackConversation()
{
this.m_Logged = true;
}
public override object Message
{
get
{
/* <I>The Solen queen looks at you with a smile.</I><BR><BR>
*
* While I'd like to finish conducting our business, it seems that you're a
* bit overloaded with equipment at the moment.<BR><BR>
*
* Perhaps you should free some room in your backpack before we proceed.
*/
return 1054077;
}
}
public override bool Logged
{
get
{
return this.m_Logged;
}
}
public override void OnRead()
{
if (this.m_Logged)
this.System.AddObjective(new GetRewardObjective(this.m_BagOfSending, this.m_PowderOfTranslocation, this.m_Gold));
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_BagOfSending = reader.ReadBool();
this.m_PowderOfTranslocation = reader.ReadBool();
this.m_Gold = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_BagOfSending);
writer.Write((bool)this.m_PowderOfTranslocation);
writer.Write((bool)this.m_Gold);
}
}
public class End2Conversation : QuestConversation
{
public End2Conversation()
{
}
public override object Message
{
get
{
/* <I>The Solen queen looks up as you approach.</I><BR><BR>
*
* Ah good, you've returned. I will conclude our business by giving you any
* remaining rewards I owe you for aiding me.
*/
return 1054078;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
}
+203
View File
@@ -0,0 +1,203 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Ambitious
{
public class KillQueensObjective : QuestObjective
{
public KillQueensObjective()
{
}
public override object Message
{
get
{
// Kill 5 red/black solen queens.
return ((AmbitiousQueenQuest)this.System).RedSolen ? 1054062 : 1054063;
}
}
public override int MaxProgress
{
get
{
return 5;
}
}
public override void RenderProgress(BaseQuestGump gump)
{
if (!this.Completed)
{
// Red/Black Solen Queens killed:
gump.AddHtmlLocalized(70, 260, 270, 100, ((AmbitiousQueenQuest)this.System).RedSolen ? 1054064 : 1054065, BaseQuestGump.Blue, false, false);
gump.AddLabel(70, 280, 0x64, this.CurProgress.ToString());
gump.AddLabel(100, 280, 0x64, "/");
gump.AddLabel(130, 280, 0x64, this.MaxProgress.ToString());
}
else
{
base.RenderProgress(gump);
}
}
public override bool IgnoreYoungProtection(Mobile from)
{
if (this.Completed)
return false;
bool redSolen = ((AmbitiousQueenQuest)this.System).RedSolen;
if (redSolen)
return from is RedSolenQueen;
else
return from is BlackSolenQueen;
}
public override void OnKill(BaseCreature creature, Container corpse)
{
bool redSolen = ((AmbitiousQueenQuest)this.System).RedSolen;
if (redSolen)
{
if (creature is RedSolenQueen)
this.CurProgress++;
}
else
{
if (creature is BlackSolenQueen)
this.CurProgress++;
}
}
public override void OnComplete()
{
this.System.AddObjective(new ReturnAfterKillsObjective());
}
}
public class ReturnAfterKillsObjective : QuestObjective
{
public ReturnAfterKillsObjective()
{
}
public override object Message
{
get
{
/* You've completed your task of slaying solen queens. Return to
* the ambitious queen who asked for your help.
*/
return 1054067;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GatherFungiConversation());
}
}
public class GatherFungiObjective : QuestObjective
{
public GatherFungiObjective()
{
}
public override object Message
{
get
{
/* Gather zoogi fungus until you have 50 of them, then give them
* to the ambitious queen you are helping.
*/
return 1054069;
}
}
public override void OnComplete()
{
this.System.AddConversation(new EndConversation());
}
}
public class GetRewardObjective : QuestObjective
{
private bool m_BagOfSending;
private bool m_PowderOfTranslocation;
private bool m_Gold;
public GetRewardObjective(bool bagOfSending, bool powderOfTranslocation, bool gold)
{
this.m_BagOfSending = bagOfSending;
this.m_PowderOfTranslocation = powderOfTranslocation;
this.m_Gold = gold;
}
public GetRewardObjective()
{
}
public override object Message
{
get
{
// Return to the ambitious solen queen for your reward.
return 1054148;
}
}
public bool BagOfSending
{
get
{
return this.m_BagOfSending;
}
set
{
this.m_BagOfSending = value;
}
}
public bool PowderOfTranslocation
{
get
{
return this.m_PowderOfTranslocation;
}
set
{
this.m_PowderOfTranslocation = value;
}
}
public bool Gold
{
get
{
return this.m_Gold;
}
set
{
this.m_Gold = value;
}
}
public override void OnComplete()
{
this.System.AddConversation(new End2Conversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_BagOfSending = reader.ReadBool();
this.m_PowderOfTranslocation = reader.ReadBool();
this.m_Gold = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_BagOfSending);
writer.Write((bool)this.m_PowderOfTranslocation);
writer.Write((bool)this.m_Gold);
}
}
}
+87
View File
@@ -0,0 +1,87 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class BadCompany : BaseQuest
{
public BadCompany()
: base()
{
this.AddObjective(new SlayObjective(typeof(GreenGoblin), "GreenGoblin", 10));
this.AddReward(new BaseReward(typeof(JaacarBox), "Bowl of Rotworm Stew Recipe"));
}
public override Type NextQuest
{
get
{
return typeof(ATangledWeb);
}
}
/*Bad Company*/
public override object Title
{
get
{
return 1095022;
}
}
/*Travel to the Green Goblin area and kill Green Goblins until they fear you.
Return to Jaacar for your reward.Jaacar make friends with your kind.
Not want violence... not eat each other! Jaacar eat rotworms... Rotworm stew good!
Make Jaacar smart!<br><br>We can be friends, yes? Outside kind and inside kind be friends? This is good, yes?
Jaacar knows who hates your kind; Gray Goblins not hate you. We want to be friends! Jaacar want to warn you!
Yes, friends give good warnings!<br><br>Green Goblins bad, very bad. Green Goblins building up piles of weapons!
When green goblins get enough weapons, they make war with the outside kind... Your kind! They come in the night and stab my new friend with own sword!
They will! I swear!<br><br>Gray Goblins know this, that is why we fight them! We protect our friend! You, our friend! Will you help stop Green Goblins?
If you help, Jaacar give some of smart knowledge! Help each other, yes?*/
public override object Description
{
get
{
return 1095024;
}
}
/*Oh poor friend. Not believe Jaacar. You will see. Maybe too late, but you will see.*/
public override object Refuse
{
get
{
return 1095025;
}
}
/*Friend make Green Goblins dead yet? Make them go squish? If no green squish, they kill you when you sleep! They will!*/
public override object Uncomplete
{
get
{
return 1095026;
}
}
/*Oh, have mercy on us! Have you come to kill every one of us? Take what you will and go!
Your kind is more terrible than the master! Woe are we, the green goblins, we serve the master's plan and yet he... *gasp**/
public override object Complete
{
get
{
return 1095030;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+187
View File
@@ -0,0 +1,187 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells.SkillMasteries;
using System.Collections.Generic;
namespace Server.Engines.Quests
{
public class WieldingTheSonicBladeQuest : BaseQuest
{
public WieldingTheSonicBladeQuest() : base()
{
AddObjective(new DiscordObjective());
AddReward(new BaseReward(1115699)); // Recognition for mastery of song wielding.
AddReward(new BaseReward(typeof(BookOfMasteries), 1028794));
}
public override object Title { get { return 1115696; } } //Wielding the Sonic Blade
public override object Description { get { return 1115697; } } /*This quest is the single quest required for a player to unlock the discordance mastery
* abilities for bards. This quest can be completed multiple times to reinstate the discordance
* mastery. To prove yourself worthy, you must first be a master of discordance and musicianship.
* You must be willing to distort your notes to bring pain to even the most indifferent ears.*/
public override object Refuse { get { return 1115700; } } //You must strive to spread discord.
public override object Uncomplete { get { return 1115700; } } //You must strive to spread discord.
public override object Complete { get { return 1115701; } } /* You have proven yourself worthy of wielding your music as a weapon. Rend the ears of your
* foes with your wails of discord. Let your song be feared as much as any sword.*/
public override bool CanOffer()
{
if (Owner == null)
return false;
if (Owner.Skills[SkillName.Musicianship].Base < 90 || Owner.Skills[SkillName.Discordance].Base < 90)
{
Owner.SendLocalizedMessage(1115703); // Your skills in this focus area are less than the required master level. (90 minimum)
return false;
}
foreach (BaseQuest q in Owner.Quests)
{
if (q is TheBeaconOfHarmonyQuest || q is IndoctrinationOfABattleRouserQuest)
{
Owner.SendLocalizedMessage(1115702); //You must quit your other mastery quests before engaging on a new one.
return false;
}
}
return true;
}
public override void GiveRewards()
{
base.GiveRewards();
MasteryInfo.LearnMastery(Owner, SkillName.Discordance, 3);
SkillMasterySpell.SetActiveMastery(Owner, SkillName.Discordance);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class DiscordObjective : SimpleObjective
{
private static readonly Type m_Type = typeof(Goat);
private List<string> m_Descr = new List<string>();
public override List<string> Descriptions { get { return m_Descr; } }
public DiscordObjective()
: base(5, -1)
{
m_Descr.Add("Discord five goats.");
}
public override bool Update(object obj)
{
if (obj is Mobile && ((Mobile)obj).GetType() == m_Type)
{
CurProgress++;
if (Completed)
Quest.OnCompleted();
else
{
Quest.Owner.SendLocalizedMessage(1115749, true, (this.MaxProgress - this.CurProgress).ToString()); // Creatures remaining to be discorded:
Quest.Owner.PlaySound(Quest.UpdateSound);
}
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SirBerran : MondainQuester
{
[Constructable]
public SirBerran()
{
Name = "Sir Berran";
Title = "the Song Weilder";
}
public SirBerran(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(WieldingTheSonicBladeQuest),
};
}
}
public override void InitBody()
{
InitStats(125, 100, 25);
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
if (IsInvulnerable && !Core.AOS)
NameHue = 0x35;
Female = false;
Body = 0x190;
SetWearable(new ChainChest(), 0x2BF);
SetWearable(new Shoes());
SetWearable(new ShortPants());
SetWearable(new Halberd());
SetWearable(new BodySash(0x355));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+189
View File
@@ -0,0 +1,189 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells.SkillMasteries;
using System.Collections.Generic;
namespace Server.Engines.Quests
{
public class TheBeaconOfHarmonyQuest : BaseQuest
{
public TheBeaconOfHarmonyQuest() : base()
{
AddObjective(new PeacemakingObjective());
AddReward(new BaseReward(1115679)); // Recognition for mastery of spirit soothing.
AddReward(new BaseReward(typeof(BookOfMasteries), 1028794));
}
public override object Title { get { return 1115677; } } //The Beacon of Harmony
public override object Description { get { return 1115676; } } /* This quest is the single quest required for a player to unlock the peacemaking
* mastery abilities for bards. This quest can be completed multiple times to reinstate
* the peacemaking mastery. To prove yourself worthy, you must first be a master of
* peacemaking and musicianship. You must be able to calm even the most vicious beast
* into tranquility.*/
public override object Refuse { get { return 1115680; } } //To deliver peace you must persevere.
public override object Uncomplete { get { return 1115680; } } //To deliver peace you must persevere.
public override object Complete { get { return 1115681; } } /* You have proven yourself a beacon of peace and a bringer of harmony. Only
* a warrior may choose the peaceful solution, all others are condemned to it.
* May your message of peace flow into the world and shelter you from harm.*/
public override bool CanOffer()
{
if (Owner == null)
return false;
if (Owner.Skills[SkillName.Musicianship].Base < 90 || Owner.Skills[SkillName.Peacemaking].Base < 90)
{
Owner.SendLocalizedMessage(1115703); // Your skills in this focus area are less than the required master level. (90 minimum)
return false;
}
foreach (BaseQuest q in Owner.Quests)
{
if (q is IndoctrinationOfABattleRouserQuest || q is WieldingTheSonicBladeQuest)
{
Owner.SendLocalizedMessage(1115702); //You must quit your other mastery quests before engaging on a new one.
return false;
}
}
return true;
}
public override void GiveRewards()
{
base.GiveRewards();
MasteryInfo.LearnMastery(Owner, SkillName.Peacemaking, 3);
SkillMasterySpell.SetActiveMastery(Owner, SkillName.Peacemaking);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class PeacemakingObjective : SimpleObjective
{
private static readonly Type m_Type = typeof(Mongbat);
private List<string> m_Descr = new List<string>();
public override List<string> Descriptions { get { return m_Descr; } }
public PeacemakingObjective()
: base(5, -1)
{
m_Descr.Add("Calm five mongbats.");
}
public override bool Update(object obj)
{
if (obj is Mobile && ((Mobile)obj).GetType() == m_Type)
{
CurProgress++;
if (Completed)
Quest.OnCompleted();
else
{
Quest.Owner.SendLocalizedMessage(1115747, true, (MaxProgress - CurProgress).ToString()); // Creatures remaining to be calmed: ~1_val~.
Quest.Owner.PlaySound(Quest.UpdateSound);
}
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SirFelean : MondainQuester
{
[Constructable]
public SirFelean()
{
Name = "Sir Felean";
Title = "the Spirit Soother";
}
public SirFelean(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TheBeaconOfHarmonyQuest),
};
}
}
public override void InitBody()
{
InitStats(125, 100, 25);
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
if (IsInvulnerable && !Core.AOS)
NameHue = 0x35;
Female = false;
Body = 0x190;
SetWearable(new ChainChest(), 0x35);
SetWearable(new Shoes(GetShoeHue()));
SetWearable(new LongPants());
SetWearable(new Halberd());
SetWearable(new BodySash(0x498));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+187
View File
@@ -0,0 +1,187 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Spells.SkillMasteries;
using System.Collections.Generic;
namespace Server.Engines.Quests
{
public class IndoctrinationOfABattleRouserQuest : BaseQuest
{
public IndoctrinationOfABattleRouserQuest() : base()
{
AddObjective(new ProvocationObjective());
AddReward(new BaseReward(1115659)); // Recognition for mastery of battle rousing.
AddReward(new BaseReward(typeof(BookOfMasteries), 1028794));
}
public override object Title { get { return 1115657; } } //Indoctrination of a Battle Rouser
public override object Description { get { return 1115656; } } /*This quest is the single quest required for a player to unlock the provocation
* mastery abilities for bards. This quest can be completed multiple times to reinstate
* the provocation mastery. To prove yourself worthy, you must be able to incite even
* the most peaceful to frenzied battle lust.*/
public override object Refuse { get { return 1115660; } } //To inspire you must persevere.
public override object Uncomplete { get { return 1115660; } } //To inspire you must persevere.
public override object Complete { get { return 1115661; } } /* You have proven yourself worthy of driving armies. Go forth, and have the blessing
* and curse of the War Heralds always in your heart and mind. May peace always dwell
* before you, may destruction mark your wake, and may fury be your constant companion.
* Sow the seeds of battle and glory in the music of war.*/
public override bool CanOffer()
{
if (Owner == null)
return false;
if (Owner.Skills[SkillName.Musicianship].Base < 90 || Owner.Skills[SkillName.Provocation].Base < 90)
{
Owner.SendLocalizedMessage(1115703); // Your skills in this focus area are less than the required master level. (90 minimum)
return false;
}
foreach (BaseQuest q in Owner.Quests)
{
if (q is TheBeaconOfHarmonyQuest || q is WieldingTheSonicBladeQuest)
{
Owner.SendLocalizedMessage(1115702); //You must quit your other mastery quests before engaging on a new one.
return false;
}
}
return true;
}
public override void GiveRewards()
{
base.GiveRewards();
MasteryInfo.LearnMastery(Owner, SkillName.Provocation, 3);
SkillMasterySpell.SetActiveMastery(Owner, SkillName.Provocation);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class ProvocationObjective : SimpleObjective
{
private List<string> m_Descr = new List<string>();
public override List<string> Descriptions { get { return m_Descr; } }
public ProvocationObjective()
: base(5, -1)
{
m_Descr.Add("Incite rabbits into battle with 5 wandering healers.");
}
public override bool Update(object obj)
{
if (obj is Mobile && (((Mobile)obj).GetType() == typeof(WanderingHealer) || ((Mobile)obj).GetType() == typeof(EvilWanderingHealer)))
{
CurProgress++;
if (Completed)
Quest.OnCompleted();
else
{
Quest.Owner.SendLocalizedMessage(1115748, true, (this.MaxProgress - this.CurProgress).ToString()); // Conflicts remaining to be incited:
Quest.Owner.PlaySound(Quest.UpdateSound);
}
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SirHareus : MondainQuester
{
[Constructable]
public SirHareus()
{
Name = "Sir Hareus";
Title = "the Battle Rouser";
}
public SirHareus(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(IndoctrinationOfABattleRouserQuest),
};
}
}
public override void InitBody()
{
InitStats(125, 100, 25);
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
if (IsInvulnerable && !Core.AOS)
NameHue = 0x35;
Female = false;
Body = 0x190;
SetWearable(new ChainChest(), 0x30A);
SetWearable(new Shoes(GetShoeHue()));
SetWearable(new LongPants(GetRandomHue()));
SetWearable(new Halberd());
SetWearable(new BodySash(0x355));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+644
View File
@@ -0,0 +1,644 @@
using System;
using System.Collections.Generic;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class BaseQuest
{
public virtual bool AllObjectives
{
get
{
return true;
}
}
public virtual bool DoneOnce
{
get
{
return false;
}
}
public virtual TimeSpan RestartDelay
{
get
{
return TimeSpan.Zero;
}
}
public virtual bool ForceRemember
{
get
{
return false;
}
}
public virtual int AcceptSound
{
get
{
return 0x5B4;
}
}
public virtual int ResignSound
{
get
{
return 0x5B3;
}
}
public virtual int CompleteSound
{
get
{
return 0x5B5;
}
}
public virtual int UpdateSound
{
get
{
return 0x5B6;
}
}
public virtual int CompleteMessage
{
get
{
return 1072273; // You've completed a quest! Don't forget to collect your reward.
}
}
#region Quest Chain
public virtual QuestChain ChainID
{
get
{
return QuestChain.None;
}
}
public virtual Type NextQuest
{
get
{
return null;
}
}
#endregion
public virtual object Title
{
get
{
return null;
}
}
public virtual object Description
{
get
{
return null;
}
}
public virtual object Refuse
{
get
{
return null;
}
}
public virtual object Uncomplete
{
get
{
return null;
}
}
public virtual object Complete
{
get
{
return null;
}
}
public virtual object FailedMsg { get { return null; } }
public virtual bool ShowDescription { get { return true; } }
public virtual bool ShowRewards { get { return true; } }
public virtual bool CanRefuseReward { get { return false; } }
private List<BaseObjective> m_Objectives;
private List<BaseReward> m_Rewards;
private PlayerMobile m_Owner;
private object m_Quester;
private Type m_QuesterType;
private Timer m_Timer;
public List<BaseObjective> Objectives
{
get
{
return m_Objectives;
}
}
public List<BaseReward> Rewards
{
get
{
return m_Rewards;
}
}
public PlayerMobile Owner
{
get
{
return m_Owner;
}
set
{
m_Owner = value;
}
}
public object Quester
{
get
{
return m_Quester;
}
set
{
m_Quester = value;
if (m_Quester != null)
m_QuesterType = m_Quester.GetType();
}
}
public Type QuesterType
{
get
{
return m_QuesterType;
}
set
{
m_QuesterType = value;
}
}
public BaseQuestItem StartingItem
{
get
{
return m_Quester is BaseQuestItem ? (BaseQuestItem)m_Quester : null;
}
}
public MondainQuester StartingMobile
{
get
{
return m_Quester is MondainQuester ? (MondainQuester)m_Quester : null;
}
}
public bool Completed
{
get
{
for (int i = 0; i < m_Objectives.Count; i++)
{
if (m_Objectives[i].Completed)
{
if (!AllObjectives)
return true;
}
else
{
if (AllObjectives)
return false;
}
}
return AllObjectives;
}
}
public bool Failed
{
get
{
for (int i = 0; i < m_Objectives.Count; i++)
{
if (m_Objectives[i].Failed)
{
if (AllObjectives)
return true;
}
else
{
if (!AllObjectives)
return false;
}
}
return !AllObjectives;
}
}
public BaseQuest()
{
m_Objectives = new List<BaseObjective>();
m_Rewards = new List<BaseReward>();
}
public void StartTimer()
{
if (m_Timer != null)
return;
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), new TimerCallback(Slice));
}
public void StopTimer()
{
if (m_Timer != null)
m_Timer.Stop();
m_Timer = null;
}
public virtual void Slice()
{
for (int i = 0; i < m_Objectives.Count; i ++)
{
BaseObjective obj = m_Objectives[i];
obj.UpdateTime();
}
}
public virtual void OnObjectiveUpdate(Item item)
{
}
public virtual bool CanOffer()
{
return true;
}
public virtual void UpdateChain()
{
if (ChainID != QuestChain.None && StartingMobile != null)
{
if (m_Owner.Chains.ContainsKey(ChainID))
{
BaseChain chain = m_Owner.Chains[ChainID];
chain.CurrentQuest = GetType();
chain.Quester = StartingMobile.GetType();
}
else
{
m_Owner.Chains.Add(ChainID, new BaseChain(GetType(), StartingMobile.GetType()));
}
}
}
public virtual void OnAccept()
{
m_Owner.PlaySound(AcceptSound);
m_Owner.SendLocalizedMessage(1049019); // You have accepted the Quest.
m_Owner.Quests.Add(this);
// give items if any
for (int i = 0; i < m_Objectives.Count; i ++)
{
BaseObjective objective = m_Objectives[i];
objective.OnAccept();
}
if (m_Quester is BaseEscort)
{
BaseEscort escort = (BaseEscort)m_Quester;
if (escort.SetControlMaster(m_Owner))
{
escort.Quest = this;
escort.LastSeenEscorter = DateTime.UtcNow;
escort.StartFollow();
escort.AddHash(Owner);
Region region = escort.GetDestination();
if (region != null)
escort.Say(1042806, region.Name); // Lead on! Payment will be made when we arrive at ~1_DESTINATION~!
else
escort.Say(1042806, "destination"); // Lead on! Payment will be made when we arrive at ~1_DESTINATION~!
m_Owner.LastEscortTime = DateTime.UtcNow;
}
}
// tick tack
StartTimer();
}
public virtual void OnRefuse()
{
if (!QuestHelper.FirstChainQuest(this, Quester))
UpdateChain();
}
public virtual void OnResign(bool resignChain)
{
m_Owner.PlaySound(ResignSound);
// update chain
if (!resignChain && !QuestHelper.FirstChainQuest(this, Quester))
UpdateChain();
// delete items that were given on quest start
for (int i = 0; i < m_Objectives.Count; i ++)
{
if (m_Objectives[i] is ObtainObjective)
{
ObtainObjective obtain = (ObtainObjective)m_Objectives[i];
QuestHelper.RemoveStatus(m_Owner, obtain.Obtain);
}
else if (m_Objectives[i] is DeliverObjective)
{
DeliverObjective deliver = (DeliverObjective)m_Objectives[i];
QuestHelper.DeleteItems(m_Owner, deliver.Delivery, deliver.MaxProgress, true);
}
}
// delete escorter
if (m_Quester is BaseEscort)
{
BaseEscort escort = (BaseEscort)m_Quester;
escort.Say(1005653); // Hmmm. I seem to have lost my master.
escort.PlaySound(0x5B3);
escort.BeginDelete(m_Owner);
}
RemoveQuest(resignChain);
}
public virtual void InProgress()
{
}
public virtual void OnCompleted()
{
m_Owner.SendLocalizedMessage(CompleteMessage, null, 0x23); // You've completed a quest! Don't forget to collect your reward.
m_Owner.PlaySound(CompleteSound);
}
public virtual void GiveRewards()
{
// give rewards
for (int i = 0; i < m_Rewards.Count; i ++)
{
Type type = m_Rewards[i].Type;
m_Rewards[i].GiveReward();
if (type == null)
continue;
Item reward;
try
{
reward = Activator.CreateInstance(type) as Item;
}
catch
{
reward = null;
}
if (reward != null)
{
if (reward.Stackable)
{
reward.Amount = m_Rewards[i].Amount;
m_Rewards[i].Amount = 1;
}
for (int j = 0; j < m_Rewards[i].Amount; j ++)
{
if (!m_Owner.PlaceInBackpack(reward))
{
reward.MoveToWorld(m_Owner.Location, m_Owner.Map);
}
if (m_Rewards[i].Name is int)
m_Owner.SendLocalizedMessage(1074360, "#" + (int)m_Rewards[i].Name); // You receive a reward: ~1_REWARD~
else if (m_Rewards[i].Name is string)
m_Owner.SendLocalizedMessage(1074360, (string)m_Rewards[i].Name); // You receive a reward: ~1_REWARD~
// already marked, we need to see if this gives progress to another quest.
if (reward.QuestItem)
{
QuestHelper.CheckRewardItem(Owner, reward);
}
}
}
}
// remove quest
if (NextQuest == null)
RemoveQuest(true);
else
RemoveQuest();
// offer next quest if present
if (NextQuest != null)
{
BaseQuest quest = QuestHelper.RandomQuest(m_Owner, new Type[] { NextQuest }, StartingMobile);
if (quest != null && quest.ChainID == ChainID)
m_Owner.SendGump(new MondainQuestGump(quest));
}
if (this is ITierQuest)
{
TierQuestInfo.CompleteQuest(Owner, (ITierQuest)this);
}
EventSink.InvokeQuestComplete(new QuestCompleteEventArgs(Owner, GetType()));
}
public virtual void RefuseRewards()
{
// remove quest
if (NextQuest == null)
RemoveQuest(true);
else
RemoveQuest();
// offer next quest if present
if (NextQuest != null)
{
BaseQuest quest = QuestHelper.RandomQuest(m_Owner, new Type[] { NextQuest }, StartingMobile);
if (quest != null && quest.ChainID == ChainID)
m_Owner.SendGump(new MondainQuestGump(quest));
}
}
public virtual void AddObjective(BaseObjective objective)
{
if (m_Objectives == null)
m_Objectives = new List<BaseObjective>();
if (objective != null)
{
objective.Quest = this;
m_Objectives.Add(objective);
}
}
public virtual void AddReward(BaseReward reward)
{
if (m_Rewards == null)
m_Rewards = new List<BaseReward>();
if (reward != null)
{
reward.Quest = this;
m_Rewards.Add(reward);
}
}
public virtual void RemoveQuest()
{
RemoveQuest(false);
}
public virtual void RemoveQuest(bool removeChain)
{
StopTimer();
if (removeChain)
m_Owner.Chains.Remove(ChainID);
if (Completed && (RestartDelay > TimeSpan.Zero || ForceRemember || DoneOnce) && NextQuest == null && Owner.AccessLevel == AccessLevel.Player)
{
Type type = GetType();
if (ChainID != QuestChain.None)
type = QuestHelper.FindFirstChainQuest(this);
QuestHelper.Delay(Owner, type, RestartDelay);
}
QuestHelper.RemoveAcceleratedSkillgain(Owner);
if (m_Owner.Quests.Contains(this))
{
m_Owner.Quests.Remove(this);
}
}
public virtual bool RenderDescription(MondainQuestGump g, bool offer)
{
return false;
}
public virtual bool RenderObjective(MondainQuestGump g, bool offer)
{
return false;
}
public virtual void Serialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)1); // version
writer.Write(m_QuesterType == null ? null : m_QuesterType.Name);
if (m_Quester == null)
writer.Write((int)0x0);
else if (m_Quester is Mobile)
{
writer.Write((int)0x1);
writer.Write((Mobile)m_Quester);
}
else if (m_Quester is Item)
{
writer.Write((int)0x2);
writer.Write((Item)m_Quester);
}
for (int i = 0; i < m_Objectives.Count; i ++)
{
BaseObjective objective = m_Objectives[i];
objective.Serialize(writer);
}
}
public virtual void Deserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
if (version > 0)
{
string questerType = reader.ReadString();
if(questerType != null)
m_QuesterType = ScriptCompiler.FindTypeByName(questerType);
}
switch ( reader.ReadInt() )
{
case 0x0:
m_Quester = null;
break;
case 0x1:
m_Quester = reader.ReadMobile() as MondainQuester;
break;
case 0x2:
m_Quester = reader.ReadItem() as BaseQuestItem;
break;
}
if (m_Quester is BaseEscort)
{
BaseEscort escort = (BaseEscort)m_Quester;
escort.Quest = this;
}
else if (m_Quester is BaseQuestItem)
{
BaseQuestItem item = (BaseQuestItem)m_Quester;
item.Quest = this;
}
if (version == 0 && m_Quester != null)
{
m_QuesterType = m_Quester.GetType();
}
for (int i = 0; i < m_Objectives.Count; i ++)
{
BaseObjective objective = m_Objectives[i];
objective.Deserialize(reader);
}
}
}
}
+124
View File
@@ -0,0 +1,124 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class LostAndFoundQuest : BaseQuest
{
public LostAndFoundQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(BatteredBucket) , "battered bucket", 1, typeof(Dallid), "Dallid (Sanctuary)", 600));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Lost and Found */
public override object Title
{
get
{
return 1072370;
}
}
/* The battered, old bucket is inscribed with barely legible writing that indicates it
belongs to someone named "Dallid". Maybe they'd pay for its return? */
public override object Description
{
get
{
return 1072589;
}
}
/* You're right, who cares if Dallid might pay for his battered old bucket back.
This way you can carry it around with you! */
public override object Refuse
{
get
{
return 1072590;
}
}
/* Whoever this "Dallid" might be, he's probably looking for his bucket. */
public override object Uncomplete
{
get
{
return 1072591;
}
}
/* Is that my bucket? I had to ditch my favorite bucket when a group of ratmen jumped me! */
public override object Complete
{
get
{
return 1074580;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BatteredBucket : BaseQuestItem
{
[Constructable]
public BatteredBucket()
: base(0x2004)
{
}
public BatteredBucket(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(LostAndFoundQuest)
};
}
}
public override int LabelNumber
{
get
{
return 1073129;
}
}// A battered bucket
public override int Lifespan
{
get
{
return 600;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+539
View File
@@ -0,0 +1,539 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class MistakenIdentityQuest : BaseQuest
{
public MistakenIdentityQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(TuitionReimbursementForm), "tuition reimbursement form", 1, typeof(Gorrow), "Gorrow (Luna)"));
this.AddReward(new BaseReward(1074634)); // Tuition Reimbursement
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(YouScratchMyBackQuest);
}
}
/* Mistaken Identity */
public override object Title
{
get
{
return 1074573;
}
}
/* What do you want? Wonderful, another whining request for a refund on tuition. You know, experiences
like that are invaluable ... and infrequent. Having the opportunity to test yourself under such realistic
situations isn't something the college offers all students. Fine. Fine. You'll need to submit a refund
request form in triplicate before I can return your 1,000,000 gold tuition. You'll need to get some
signatures and a few other odds and ends. */
public override object Description
{
get
{
return 1074574;
}
}
/* If you're not willing to follow the proper process then go away. */
public override object Refuse
{
get
{
return 1074606;
}
}
/* You're not getting a refund without the proper forms and signatures. */
public override object Uncomplete
{
get
{
return 1074605;
}
}
/* Oh blast! Not another of those forms. I'm so sick of this endless paperwork. */
public override object Complete
{
get
{
return 1074607;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class YouScratchMyBackQuest : BaseQuest
{
public YouScratchMyBackQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(UnicornRibs), "unicorn ribs", 1));
this.AddObjective(new ObtainObjective(typeof(KirinBrains), "ki-rin brains", 2));
this.AddObjective(new ObtainObjective(typeof(PixieLeg), "pixie legs", 5));
this.AddReward(new BaseReward(1074634)); // Tuition Reimbursement
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(FoolingAernyaQuest);
}
}
/* You Scratch My Back */
public override object Title
{
get
{
return 1074608;
}
}
/* Heh. Heheheh. Good one. You're not a Bedlam student and you're definitely not eligible for a tuition refund.
Heheheh. That old witch Aernya doesn't see as well as she used to you know. Otherwise, she would have ... hmmm,
wait a minute. I sense a certain 'opportunity' here. I'll sign your forms in return for a little help with a
project of my own. What do you say? */
public override object Description
{
get
{
return 1074609;
}
}
/* Hehehe. Your choice. */
public override object Refuse
{
get
{
return 1074615;
}
}
/* I'm something of a gourmet, you see. It's tough getting some of the ingredients, though. Bring me back some
pixie legs, unicorn ribs and ki-rin brains and I'll sign your form. */
public override object Uncomplete
{
get
{
return 1074616;
}
}
/* Oh excellent, you're back. I'll get the oven going. That thing about pixie legs, you see, is that they burn
and dry out if you're not really careful. Taste just like chicken too! */
public override object Complete
{
get
{
return 1074617;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class FoolingAernyaQuest : BaseQuest
{
public FoolingAernyaQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(SignedTuitionReimbursementForm), "signed tuition reimbursement form", 1, typeof(Aernya), "Aernya (Umbra)"));
this.AddReward(new BaseReward(1074634)); // Tuition Reimbursement
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(NotQuiteThatEasyQuest);
}
}
/* Fooling Aernya */
public override object Title
{
get
{
return 1074618;
}
}
/* Now that I've signed your papers you'd better get back to that witch Aernya. Mmmm mmm smell those ribs! */
public override object Description
{
get
{
return 1074619;
}
}
/* Giving up on your scheme eh? Suit yourself. */
public override object Refuse
{
get
{
return 1074620;
}
}
/* You better hurry back to Mistress Aernya with that signed form. The college only has so much money and with
enough claims you may find yourself unable to get your tuition refunded. *wink* */
public override object Uncomplete
{
get
{
return 1074621;
}
}
/* What? Hrmph. Gorrow signed your form did he? Let me see that. *squint* */
public override object Complete
{
get
{
return 1074622;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class NotQuiteThatEasyQuest : BaseQuest
{
public NotQuiteThatEasyQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(SignedTuitionReimbursementForm), "signed tuition reimbursement form", 1, typeof(Gnosos), "Master Gnosos (Bedlam)"));
this.AddReward(new BaseReward(1074634)); // Tuition Reimbursement
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(ConvinceMeQuest);
}
}
/* Not Quite That Easy */
public override object Title
{
get
{
return 1074623;
}
}
/* I wouldn't be too smug just yet, whiner. You still need Master Gnosos' signature before I can cut your refund.
Last I heard, he's coordinating the recovery of the portions of the college that are currently overrun. *nasty
smile* Off with you. */
public override object Description
{
get
{
return 1074624;
}
}
/* Coward. */
public override object Refuse
{
get
{
return 1074626;
}
}
/* What are you waiting for? The iron maiden is still the portal to Bedlam. */
public override object Uncomplete
{
get
{
return 1074627;
}
}
/* Made it through did you? Did you happen to see Red Death out there? Big horse, skeletal ... burning eyes? No?
What's this? Forms? FORMS? I'm up to my eyebrows in ravenous out-of-control undead and you want a signature? */
public override object Complete
{
get
{
return 1074628;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void OnAccept()
{
base.OnAccept();
this.Owner.Bedlam = true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class ConvinceMeQuest : BaseQuest
{
public ConvinceMeQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(RedDeath), "red death", 1, "Bedlam"));
this.AddObjective(new SlayObjective(typeof(GoreFiend), "gore fiends", 10, "Bedlam"));
this.AddObjective(new SlayObjective(typeof(RottingCorpse), "rotting corpses", 8, "Bedlam"));
this.AddReward(new BaseReward(1074634)); // Tuition Reimbursement
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(TuitionReimbursementQuest);
}
}
/* Convince Me */
public override object Title
{
get
{
return 1074629;
}
}
/* I'm not signing any forms until the situation here is under control. So, you can either help out or you
can forget getting your tuition refund. Which will it be? Help control the shambling dead? */
public override object Description
{
get
{
return 1074630;
}
}
/* No signature for you. */
public override object Refuse
{
get
{
return 1074631;
}
}
/* No signature for you until you kill off some of the shambling dead out there and destroy that blasted horse. */
public override object Uncomplete
{
get
{
return 1074632;
}
}
/* Pulled it off huh? Well then you've earned this signature! */
public override object Complete
{
get
{
return 1074633;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TuitionReimbursementQuest : BaseQuest
{
public TuitionReimbursementQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(CompletedTuitionReimbursementForm), "completed tuition reimbursement form", 1, typeof(Aernya), "Aernya (Umbra)"));
this.AddReward(new BaseReward(typeof(RewardBox), 1072584));
}
public override QuestChain ChainID
{
get
{
return QuestChain.TuitionReimbursement;
}
}
public override Type NextQuest
{
get
{
return typeof(TheGoldenHornQuest);
}
}
/* Tuition Reimbursement */
public override object Title
{
get
{
return 1074634;
}
}
/* Well, there you are. I've added my signature to that of Gorrow, so you should be set to return to Mistress
Aernya and get your tuition refunded. */
public override object Description
{
get
{
return 1074635;
}
}
/* Great! If you're going to stick around here, I know we have more tasks for you to perform. */
public override object Refuse
{
get
{
return 1074636;
}
}
/* Just head out the main gates there and you'll find yourself embracing the iron maiden in the Bloodletter's Guild. */
public override object Uncomplete
{
get
{
return 1074637;
}
}
/* *disinterested stare* What? Oh, you've gotten your form filled in. How nice. *glare* And I'd hoped you'd
drop this charade before I was forced to rub your nose in it. *nasty smile* You're not even a student and as
such, you're not eligible for a refund -- you've never paid tuition. For your services, Master Gnosos has
recommended you receive pay. So here. Now go away. */
public override object Complete
{
get
{
return 1074638;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Bedlam;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+532
View File
@@ -0,0 +1,532 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class VilePoisonQuest : BaseQuest
{
public VilePoisonQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(TaintedTreeSample), "tainted tree sample", 1, typeof(Ioseph), "Ioseph (Jhelom)"));
this.AddReward(new BaseReward(1074962)); // A step closer to entering Blighted Grove.
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
public override Type NextQuest
{
get
{
return typeof(RockAndHardPlaceQuest);
}
}
/* Vile Poison */
public override object Title
{
get
{
return 1074950;
}
}
/* Heya! I'm sure glad to see you. Listen I'm in a bit of a bind here. I'm supposed to be gathering
poisoned water at the base of that corrupted tree there, but I can't get in under the roots to get a
good sample. The branches and brush are so tainted that they can't be cut, burned or even magically
passed. It's put my work at a real standstill. If you help me out, I'll help you get in there too.
Whadda ya say? */
public override object Description
{
get
{
return 1074956;
}
}
/* Okay. If you change your mind, I'll probably still be stuck here trying to get in. */
public override object Refuse
{
get
{
return 1074964;
}
}
/* My friend, Iosep, is a weaponsmith in Jhelom. If anyone can help us, he can! */
public override object Uncomplete
{
get
{
return 1074968;
}
}
/* Greetings. What have you there? Ah, a sample from a poisonous tree, you say? My friend Jamal
sent you? Well, let me see that then, and we'll get to work. */
public override object Complete
{
get
{
return 1074991;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class RockAndHardPlaceQuest : BaseQuest
{
public RockAndHardPlaceQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Granite), "rocks", 4, 0x1779));
this.AddObjective(new ObtainObjective(typeof(BlueDiamond), "blue diamonds", 2, 0x3198));
this.AddReward(new BaseReward(1074962)); // A step closer to entering Blighted Grove.
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
public override Type NextQuest
{
get
{
return typeof(SympatheticMagicQuest);
}
}
/* A Rock and a Hard Place */
public override object Title
{
get
{
return 1074951;
}
}
/* Hmm, I've never even heard of something that can damage diamond like that. I guess we'll have to go with plan
B. Let's try something similar. Sometimes there's a natural immunity to be found when you use a substance that's
like the one you're trying to cut. A sort of "sympathetic" thing. Y'know? */
public override object Description
{
get
{
return 1074958;
}
}
/* Sure, no problem. I thought you were interested in figuring this out. */
public override object Refuse
{
get
{
return 1074965;
}
}
/* If you're a miner, you should have no trouble getting that stuff. If not, you can probably buy some
samples from a miner? */
public override object Uncomplete
{
get
{
return 1074969;
}
}
/* Have you got the granite and diamonds? Great, let me see them and we'll see what effect this venom has upon them. */
public override object Complete
{
get
{
return 1074992;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SympatheticMagicQuest : BaseQuest
{
public SympatheticMagicQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(BarkFragment), "bark", 10, 0x318F));
this.AddReward(new BaseReward(1074962)); // A step closer to entering Blighted Grove.
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
public override Type NextQuest
{
get
{
return typeof(AlreadyDeadQuest);
}
}
/* Sympathetic Magic */
public override object Title
{
get
{
return 1074952;
}
}
/* This is some nasty stuff, that's for certain. I don't even want to think about what sort of blight
caused this venomous reaction from that old tree. Let's get to work … we'll need to try something really
hard but still workable as our base material. Nothing's harder than stone and diamond. Let's try them first. */
public override object Description
{
get
{
return 1074957;
}
}
/* Sure, no problem. I thought you were interested in figuring this out. */
public override object Refuse
{
get
{
return 1074965;
}
}
/* I think a lumberjack can help supply bark. */
public override object Uncomplete
{
get
{
return 1074970;
}
}
/* You're back with the bark already? Terrific! I bet this will do the trick. */
public override object Complete
{
get
{
return 1074993;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class AlreadyDeadQuest : BaseQuest
{
public AlreadyDeadQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Bone), "workable samples", 10));
this.AddReward(new BaseReward(1074962)); // A step closer to entering Blighted Grove.
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
public override Type NextQuest
{
get
{
return typeof(EurekaQuest);
}
}
/* Already Dead */
public override object Title
{
get
{
return 1074953;
}
}
/* Amazing! The bark was reduced to ash in seconds. Whatever this taint is, it plays havok with living things.
And of course, it took the edge off both diamonds and granite even faster. What we need is something workable but
dead; something that can hold an edge without melting. See what you can come up with, please. */
public override object Description
{
get
{
return 1074959;
}
}
/* Sure, no problem. I thought you were interested in figuring this out. */
public override object Refuse
{
get
{
return 1074965;
}
}
/* I'm thinking we need something fairly brittle or it won't hold an edge. And, it can't be alive, of course. */
public override object Uncomplete
{
get
{
return 1074971;
}
}
/* Great thought! Bone might just do the trick. */
public override object Complete
{
get
{
return 1074994;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class EurekaQuest : BaseQuest
{
public EurekaQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(SealedNotesForJamal), "sealed notes for jamal", 1, typeof(Jamal), "Jamal (near Blighted Grove)"));
this.AddReward(new BaseReward(1074962)); // A step closer to entering Blighted Grove.
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
public override Type NextQuest
{
get
{
return typeof(SubContractingQuest);
}
}
/* Eureka! */
public override object Title
{
get
{
return 1074954;
}
}
/* We're in business! I've put together the instructions for chopping sort of sword, in the style
of one of those new-fangled elven machetes. Take those back to Jamal for me, if you would. */
public override object Description
{
get
{
return 1074960;
}
}
/* Well, okay. I guess I thought you'd want to see this through. */
public override object Refuse
{
get
{
return 1074966;
}
}
/* I'm sure Jamal is eager to get this information. He's probably still hanging around near that
big old blighted tree. */
public override object Uncomplete
{
get
{
return 1074972;
}
}
/* Heya! You're back. Was Iosep able to help? Let me see what he's sent. */
public override object Complete
{
get
{
return 1074995;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void OnCompleted()
{
if (this.Owner.Skills.Blacksmith.Value >= 45.0)
{
this.Owner.AcquireRecipe((int)Server.Engines.Craft.SmithRecipes.BoneMachete);
this.Owner.SendLocalizedMessage(1075006); // You have learned how to smith a bone handled machete!
}
else
this.Owner.SendLocalizedMessage(1075005); // You observe carefully but you can't grasp the complexities of smithing a bone handled machete.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SubContractingQuest : BaseQuest
{
public SubContractingQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SamplesOfCorruptedWater), "samples of corrupted water", 3));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override QuestChain ChainID
{
get
{
return QuestChain.BlightedGrove;
}
}
/* Sub Contracting */
public override object Title
{
get
{
return 1074955;
}
}
/* Wonderful! Now we can both get in there! Let me show you these instructions for making this machete.
If you're not skilled in smithing, I'm not sure how much sense it will make though. Listen, if you're
heading in there anyway … maybe you'd do me one more favor? I'm ah ... buried in work out here ... so if
you'd go in and get me a few water samples, I'd be obliged. */
public override object Description
{
get
{
return 1074961;
}
}
/* Oh. Right, I guess you're really ... ah ... busy too. */
public override object Refuse
{
get
{
return 1074967;
}
}
/* Once you're inside, look for places where the water has twisted and warped the natural creatures. */
public override object Uncomplete
{
get
{
return 1074973;
}
}
/* I hear sloshing ... that must mean you've got my water samples. Whew, I'm so glad you braved the
dangers in there ... I mean, I would have but I'm so busy out here. Here's your reward! */
public override object Complete
{
get
{
return 1074996;
}
}
public override bool CanOffer()
{
return MondainsLegacy.BlightedGrove;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+490
View File
@@ -0,0 +1,490 @@
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
using Server.Commands;
using System.Linq;
namespace Server.Engines.Quests
{
public class TheQuestionsQuest : BaseQuest
{
public TheQuestionsQuest() : base()
{
AddObjective(new QuestionAndAnswerObjective(4, m_EntryTable));
}
public override bool ShowDescription { get { return false; } }
public override QuestChain ChainID { get { return QuestChain.CloakOfHumility; } }
public override Type NextQuest { get { return typeof(CommunityServiceMuseumQuest); } }
public override object Title { get { return 1075850; } } // Know Thy Humility
/*Greetings my friend! My name is Gareth, and I represent a group of citizens who wish to rejuvenate interest in our
* kingdom's noble heritage. 'Tis our belief that one of Britannia's greatest triumphs was the institution of the Virtues,
* neglected though they be now. To that end I have a set of tasks prepared for one who would follow a truly Humble path.
* Art thou interested in joining our effort?*/
public override object Description { get { return 1075675; } }
//I wish that thou wouldest reconsider.
public override object Refuse { get { return 1075677; } }
//Wonderful! First, let us see if thou art reading from the same roll of parchment as we are. *smiles*
public override object Uncomplete { get { return 1075676; } }
/*Very good! I can see that ye hath more than just a passing interest in our work. There are many trials before thee, but
* I have every hope that ye shall have the diligence and fortitude to carry on to the very end. Before we begin, please
* prepare thyself by thinking about the virtue of Humility. Ponder not only its symbols, but also its meanings. Once ye
* believe that thou art ready, speak with me again.*/
public override object Complete { get { return 1075714; } }
/*Ah... no, that is not quite right. Truly, Humility is something that takes time and experience to understand. I wish to
* challenge thee to seek out more knowledge concerning this virtue, and tomorrow let us speak again about what thou hast
* learned.<br>*/
public override object FailedMsg { get { return 1075713; } }
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 200, 40, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
int offset = 172;
string str;
foreach (QuestionAndAnswerObjective obj in Objectives.OfType<QuestionAndAnswerObjective>())
{
if (offer)
str = String.Format("Answer {0} questions correctly.", obj.MaxProgress);
else
str = String.Format("Answer {0}/{1} questions answered correctly.", obj.CurProgress, obj.MaxProgress);
g.AddHtmlObject(98, offset, 312, 16, str, BaseQuestGump.LightGreen, false, false);
offset += 16;
}
return true;
}
public override void OnAccept()
{
base.OnAccept();
Owner.SendGump(new QAndAGump(Owner, this));
}
public override void OnResign(bool chain)
{
base.OnResign(chain);
m_CooldownTable[Owner] = DateTime.UtcNow + TimeSpan.FromHours(24);
}
public override bool CanOffer()
{
DefragCooldown();
if (!m_CooldownTable.ContainsKey(Owner) || Owner.AccessLevel > AccessLevel.Player)
return base.CanOffer();
return false;
}
private static void DefragCooldown()
{
List<Mobile> toRemove = new List<Mobile>();
foreach (KeyValuePair<Mobile, DateTime> kvp in m_CooldownTable)
{
if (kvp.Value < DateTime.UtcNow)
toRemove.Add(kvp.Key);
}
foreach (Mobile m in toRemove)
{
if (m_CooldownTable.ContainsKey(m))
m_CooldownTable.Remove(m);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public static void Configure()
{
m_EntryTable[0] = new QuestionAndAnswerEntry(1075708, new object[] { 1075709 }, new object[] { 1075710, 1075711, 1075712 }); //<center>Finish this truism: Humility shows us...</center>
m_EntryTable[1] = new QuestionAndAnswerEntry(1075678, new object[] { 1075679 }, new object[] { 1075680, 1075681, 1075682 }); //<center>What is the symbol of Humility?</center>
m_EntryTable[2] = new QuestionAndAnswerEntry(1075683, new object[] { 1075685 }, new object[] { 1075684, 1075686, 1075687 }); //<center>What opposes Humility?</center>
m_EntryTable[3] = new QuestionAndAnswerEntry(1075688, new object[] { 1075691 }, new object[] { 1075689, 1075690, 1075692 }); //<center>What is the color of Humility?</center>
m_EntryTable[4] = new QuestionAndAnswerEntry(1075693, new object[] { 1075697 }, new object[] { 1075694, 1075695, 1075696 }); //<center>How doth one find Humility?</center>
m_EntryTable[5] = new QuestionAndAnswerEntry(1075698, new object[] { 1075700 }, new object[] { 1075699, 1075601, 1075602 }); //<center>Which city embodies the need for Humility?</center>
m_EntryTable[6] = new QuestionAndAnswerEntry(1075703, new object[] { 1075705 }, new object[] { 1075704, 1075706, 1075707 }); //<center>By name, which den of evil challenges one’s humility?</center>
}
private static QuestionAndAnswerEntry[] m_EntryTable = new QuestionAndAnswerEntry[7];
public static QuestionAndAnswerEntry[] EntryTable { get { return m_EntryTable; } }
private static Dictionary<Mobile, DateTime> m_CooldownTable = new Dictionary<Mobile, DateTime>();
public static Dictionary<Mobile, DateTime> CooldownTable { get { return m_CooldownTable; } }
}
public class CommunityServiceMuseumQuest : BaseQuest
{
public CommunityServiceMuseumQuest() : base()
{
AddObjective(new CollectionsObtainObjective(typeof(ShepherdsCrookOfHumility), "Shepherd's Crook of Humility", 1));
}
public override QuestChain ChainID { get { return QuestChain.CloakOfHumility; } }
public override Type NextQuest { get { return typeof(CommunityServiceZooQuest); } }
//Community Service - Museum
public override object Title { get { return 1075716; } }
/*'Tis time to help out the community of Britannia. Visit the Vesper Museum and donate to their collection, and eventually thou will
* be able to receive a replica of the Shepherd's Crook of Humility. Once ye have it, return to me. Art thou willing to do this?*/
public override object Description { get { return 1075717; } }
//I wish that thou wouldest reconsider.
public override object Refuse { get { return 1075719; } }
//Hello my friend. The museum sitteth in southern Vesper. If ye go downstairs, ye will discover a small donation chest.
//That is the place where ye should leave thy donation.
public override object Uncomplete { get { return 1075720; } }
/*Terrific! The Museum is a worthy cause. Many will benefit from the inspiration and learning that thine donation hath supported.*/
public override object Complete { get { return 1075721; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class CommunityServiceZooQuest : BaseQuest
{
public CommunityServiceZooQuest()
: base()
{
AddObjective(new CollectionsObtainObjective(typeof(ForTheLifeOfBritanniaSash), "Life of Britannia Sash", 1));
}
public override QuestChain ChainID { get { return QuestChain.CloakOfHumility; } }
public override Type NextQuest { get { return typeof(CommunityServiceLibraryQuest); } }
//Community Service – Zoo
public override object Title { get { return 1075722; } }
/*Now, go on and donate to the Moonglow Zoo. Givest thou enough to receive a 'For the Life of Britannia' sash. Once ye have it,
* return it to me. Wilt thou continue?*/
public override object Description { get { return 1075723; } }
//I wish that thou wouldest reconsider.
public override object Refuse { get { return 1075725; } }
//Hello again. The zoo lies a short ways south of Moonglow. Close to the entrance thou wilt discover a small donation chest.
//That is where thou shouldest leave thy donation.
public override object Uncomplete { get { return 1075726; } }
/*Wonderful! The Zoo is a very special place from which people young and old canst benefit. Thanks to thee, it can continue to thrive.*/
public override object Complete { get { return 1075727; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class CommunityServiceLibraryQuest : BaseQuest
{
public CommunityServiceLibraryQuest()
: base()
{
AddObjective(new CollectionsObtainObjective(typeof(SpecialPrintingOfVirtue), "Special Painint of 'Virtue' Book", 1));
}
public override QuestChain ChainID { get { return QuestChain.CloakOfHumility; } }
public override Type NextQuest { get { return typeof(WhosMostHumbleQuest); } }
//Community Service – Library
public override object Title { get { return 1075728; } }
/*I have one more charity for thee, my diligent friend. Go forth and donate to the Britain Library and do that which is necessary to receive
* a special printing of ‘Virtue’, by Lord British. Once in hand, bring the book back with ye. Art thou ready?*/
public override object Description { get { return 1075729; } }
//I wish that thou wouldest reconsider.
public override object Refuse { get { return 1075731; } }
//Art thou having trouble? The Library lieth north of Castle British's gates. I believe the representatives in charge of the
//donations are easy enough to find. They await thy visit, amongst the many tomes of knowledge.
public override object Uncomplete { get { return 1075732; } }
/*Very good! The library is of great import to the people of Britannia. Thou hath done a worthy deed and this is thy last
* required donation. I encourage thee to continue contributing to thine community, beyond the obligations of this endeavor.*/
public override object Complete { get { return 1075733; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class WhosMostHumbleQuest : BaseQuest
{
private List<Item> m_QuestItems = new List<Item>();
private List<Mobile> m_GivenTo = new List<Mobile>();
private Dictionary<int, HumilityQuestMobileInfo> m_Infos = new Dictionary<int, HumilityQuestMobileInfo>();
public Dictionary<int, HumilityQuestMobileInfo> Infos { get { return m_Infos; } }
public override bool CanRefuseReward { get { return true; } }
public WhosMostHumbleQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(IronChain), "Iron Chain", 1));
AddReward(new BaseReward(typeof(GoldShield), "A Gold Shield"));
}
public override QuestChain ChainID { get { return QuestChain.CloakOfHumility; } }
//Who's Most Humble
public override object Title { get { return 1075734; } }
/*Thou art challenged to find seven citizens spread out among the towns of Britannia: Skara Brae, Minoc, Britain, and
* one of the towns upon an isle at sea. Each citizen wilt reveal some thought concerning Humility. But who doth best
* exemplify the virtue? Here, thou needeth wear this plain grey cloak, for they wilt know ye by it. Wilt thou continue?*/
public override object Description { get { return 1075735; } }
//'Tis a difficult quest, but well worth it. Wilt thou reconsider?
public override object Refuse { get { return 1075737; } }
/*There art no less than seven 'humble citizens' spread across the Britannia proper. I know that they can be found in the
* towns of Minoc, Skara Brae and Britain. Another may be upon an island at sea, the name of which escapes me at the moment.
* Thou needeth visit all seven to solve the puzzle. Be diligent, for they have a tendency to wander about.<BR><BR><br>Dost
* thou wear the plain grey cloak?*/
public override object Uncomplete { get { return 1075738; } }
/*Noble friend, thou hast performed tremendously! On behalf of the Rise of Britannia I wish to reward thee with this golden
* shield, a symbol of accomplishment and pride for the many things that thou hast done for our people.<BR><BR><br>Dost thou accept?*/
public override object Complete { get { return 1075782; } }
public override void OnAccept()
{
base.OnAccept();
Owner.SendGump(new QuestInfoGump(1075736)); // Excellent. When thou hast satisfied the needs of the most humble, thou wilt be given an item meant for me. Take this <B>brass ring</B> to start ye on the way.
Item cloak = new GreyCloak();
Item ring = new BrassRing();
m_QuestItems.Add(cloak);
m_QuestItems.Add(ring);
Owner.Backpack.DropItem(cloak);
Owner.Backpack.DropItem(ring);
List<Type> itemTypes = new List<Type>(HumilityQuestMobileInfo.ItemTypes);
List<Type> mobTypes = new List<Type>(HumilityQuestMobileInfo.MobileTypes);
for (int i = 0; i < 25; i++)
{
int ran = Utility.RandomMinMax(1, itemTypes.Count - 2);
Type t = itemTypes[ran];
itemTypes.Remove(t);
itemTypes.Insert(Utility.RandomMinMax(1, itemTypes.Count - 2), t);
}
for (int i = 0; i < 25; i++)
{
int ran = Utility.RandomMinMax(0, mobTypes.Count - 2);
if (ran > 0)
{
Type t = mobTypes[ran];
mobTypes.Remove(t);
mobTypes.Insert(Utility.RandomMinMax(1, mobTypes.Count - 2), t);
}
}
for (int i = 0; i < mobTypes.Count; i++)
{
int mobIndex = HumilityQuestMobileInfo.GetNPCIndex(mobTypes[i]);
int need = i;
int give = need + 1;
Type needs = itemTypes[need];
Type gives = itemTypes[give];
m_Infos[mobIndex] = new HumilityQuestMobileInfo(needs, gives, HumilityQuestMobileInfo.GetLoc(needs), HumilityQuestMobileInfo.GetLoc(gives));
}
}
public override void OnResign(bool chain)
{
foreach (Item item in m_QuestItems)
{
if (item != null && !item.Deleted)
item.Delete();
}
base.OnResign(chain);
}
public override void GiveRewards()
{
foreach (Item item in m_QuestItems)
{
if(item != null && !item.Deleted)
item.Delete();
}
Owner.SendGump(new QuestInfoGump(1075783));
base.GiveRewards();
}
public override void RefuseRewards()
{
foreach (Item item in m_QuestItems)
{
if (item is GreyCloak)
((GreyCloak)item).Owner = Owner;
else if (item != null && !item.Deleted)
item.Delete();
}
Owner.SendGump(new QuestInfoGump(1075784));
base.RefuseRewards();
}
public void AddQuestItem(Item item, Mobile from)
{
if (!m_QuestItems.Contains(item))
m_QuestItems.Add(item);
OnGivenTo(from);
}
public void RemoveQuestItem(Item item)
{
if (m_QuestItems.Contains(item))
m_QuestItems.Remove(item);
}
public void OnGivenTo(Mobile m)
{
m_GivenTo.Add(m);
}
public bool HasGivenTo(Mobile m)
{
return m_GivenTo.Contains(m);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(m_QuestItems.Count);
foreach (Item item in m_QuestItems)
writer.Write(item);
writer.Write(m_Infos.Count);
foreach(KeyValuePair<int, HumilityQuestMobileInfo> kvp in m_Infos)
{
writer.Write(kvp.Key);
kvp.Value.Serialize(writer);
}
writer.Write(m_GivenTo.Count);
foreach (Mobile m in m_GivenTo)
writer.Write(m);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
int count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
Item item = reader.ReadItem();
if (item != null && !item.Deleted)
m_QuestItems.Add(item);
}
count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
int mobIndex = reader.ReadInt();
m_Infos[mobIndex] = new HumilityQuestMobileInfo(reader);
}
count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
Mobile m = reader.ReadMobile();
if (m != null)
m_GivenTo.Add(m);
}
}
}
}
+69
View File
@@ -0,0 +1,69 @@
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class CollectionsObtainObjective : ObtainObjective
{
private bool m_HasObtained;
public bool HasObtained
{
get { return m_HasObtained; }
set { m_HasObtained = true; }
}
public CollectionsObtainObjective(Type obtain, string name, int amount) : base(obtain, name, amount)
{
m_HasObtained = false;
}
public override bool Update(object o)
{
if (this.Quest == null || this.Quest.Owner == null)
return false;
if (m_HasObtained)
return base.Update(o);
return false;
}
public static void CheckReward(PlayerMobile pm, Item item)
{
if (pm.Quests != null)
{
foreach (BaseQuest q in pm.Quests)
{
foreach (BaseObjective obj in q.Objectives)
{
if (obj is CollectionsObtainObjective && ((CollectionsObtainObjective)obj).Obtain == item.GetType())
{
((CollectionsObtainObjective)obj).HasObtained = true;
pm.SendSound(q.UpdateSound);
return;
}
}
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(m_HasObtained);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_HasObtained = reader.ReadBool();
}
}
}
+51
View File
@@ -0,0 +1,51 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
using Server.Network;
namespace Server.Engines.Quests
{
public class HumilityItemQuestGump : Gump
{
private HumilityQuestMobile m_Mobile;
private WhosMostHumbleQuest m_Quest;
private int m_NPCIndex;
public HumilityItemQuestGump(HumilityQuestMobile mobile, WhosMostHumbleQuest quest, int index) : base(50, 50)
{
m_Mobile = mobile;
m_Quest = quest;
m_NPCIndex = index;
AddBackground(0, 0, 350, 250, 2600);
AddHtml(100, 25, 175, 16, String.Format("{0} {1}", mobile.Name, mobile.Title), false, false);
AddHtmlLocalized(40, 60, 270, 140, mobile.Greeting + 1, 1, false, true);
}
public override void OnResponse(NetState state, RelayInfo info)
{
if (m_NPCIndex < 0 || m_NPCIndex >= m_Quest.Infos.Count)
return;
Mobile from = state.Mobile;
int cliloc;
string args;
if (0.5 > Utility.RandomDouble() || m_NPCIndex == 6)
{
cliloc = m_Mobile.Greeting + 2;
args = String.Format("#{0}", m_Quest.Infos[m_NPCIndex].NeedsLoc);
}
else
{
cliloc = m_Mobile.Greeting + 3;
args = String.Format("#{0}", m_Quest.Infos[m_NPCIndex].GivesLoc);
}
m_Mobile.SayTo(from, cliloc, args);
}
}
}
+50
View File
@@ -0,0 +1,50 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
using Server.Network;
namespace Server.Engines.Quests
{
public class QuestInfoGump : BaseQuestGump
{
private int m_Cliloc;
public QuestInfoGump(int cliloc) : base(0, 0)
{
m_Cliloc = cliloc;
AddPage(0);
AddImageTiled(50, 20, 400, 400, 0x1404);
AddImageTiled(50, 29, 30, 390, 0x28DC);
AddImageTiled(34, 140, 17, 279, 0x242F);
AddImage(48, 135, 0x28AB);
AddImage(-16, 285, 0x28A2);
AddImage(0, 10, 0x28B5);
AddImage(25, 0, 0x28B4);
AddImageTiled(83, 15, 350, 15, 0x280A);
AddImage(34, 419, 0x2842);
AddImage(442, 419, 0x2840);
AddImageTiled(51, 419, 392, 17, 0x2775);
AddImageTiled(415, 29, 44, 390, 0xA2D);
AddImageTiled(415, 29, 30, 390, 0x28DC);
AddImage(370, 50, 0x589);
AddImage(379, 60, 0x15A9);
AddImage(425, 0, 0x28C9);
AddImage(90, 33, 0x232D);
AddImageTiled(130, 65, 175, 1, 0x238D);
AddHtmlObject(160, 108, 330, 16, 1075781, DarkGreen, false, false); // Test of Humility
AddHtmlObject(98, 156, 312, 180, cliloc, LightGreen, false, true);
AddButton(313, 395, 0x2EEC, 0x2EEE, 0, GumpButtonType.Reply, 0);
}
public override void OnResponse(Server.Network.NetState state, RelayInfo info)
{
if (m_Cliloc == 1075783)
state.Mobile.SendLocalizedMessage(1075787); // I feel that thou hast yet more to learn about Humility... Please ponder these things further, and visit me again on the 'morrow.
}
}
}
@@ -0,0 +1,37 @@
using System;
using Server.Engines.Quests;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Items
{
public class ForTheLifeOfBritanniaSash : BodySash
{
public override int LabelNumber { get { return 1075792; } } // For the Life of Britannia Sash
[Constructable]
public ForTheLifeOfBritanniaSash()
{
}
public ForTheLifeOfBritanniaSash(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+37
View File
@@ -0,0 +1,37 @@
using System;
using Server.Engines.Quests;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Items
{
public class GoldShield : OrderShield
{
[Constructable]
public GoldShield()
{
Name = "a gold shield";
Hue = 0x501;
}
public GoldShield(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,134 @@
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class HumilityShrinePersistence : Item
{
public static void Initialize()
{
if (Core.ML)
{
if (m_TramInstance == null)
{
m_TramInstance = new HumilityShrinePersistence();
m_TramInstance.MoveToWorld(new Point3D(4270, 3698, 0), Map.Trammel);
SetupMobiles();
}
if (m_FelInstance == null)
{
m_FelInstance = new HumilityShrinePersistence();
m_FelInstance.MoveToWorld(new Point3D(4270, 3698, 0), Map.Felucca);
}
}
}
private static HumilityShrinePersistence m_TramInstance;
private static HumilityShrinePersistence m_FelInstance;
[Constructable]
public HumilityShrinePersistence() : base(219)
{
Movable = false;
}
private Rectangle2D m_Rec = new Rectangle2D(4273, 3696, 2, 2);
public override bool HandlesOnMovement { get { return true; } }
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (m is PlayerMobile && m_Rec.Contains(m) && m.Backpack != null)
{
Item item = m.Backpack.FindItemByType(typeof(GreyCloak));
if (item == null)
item = m.FindItemOnLayer(Layer.Cloak);
if (item != null && item is GreyCloak && ((GreyCloak)item).Owner == m)
{
m.SendLocalizedMessage(1075897); // As you near the shrine a strange energy envelops you. Suddenly, your cloak is transformed into the Cloak of Humility!
m.Backpack.DropItem(new HumilityCloak());
item.Delete();
}
}
}
public HumilityShrinePersistence(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Map == Map.Trammel)
m_TramInstance = this;
else
m_FelInstance = this;
}
public static void SetupMobiles()
{
BaseCreature next = new Gareth();
next.MoveToWorld(new Point3D(2023, 2841, 20), Map.Trammel);
next.Home = next.Location;
next.RangeHome = 5;
next = new Gareth();
next.MoveToWorld(new Point3D(2023, 2841, 20), Map.Felucca);
next.Home = next.Location;
next.RangeHome = 5;
next = new Dierdre();
next.MoveToWorld(new Point3D(1442, 1600, 20), Map.Felucca);
next.Home = next.Location;
next.RangeHome = 40;
next = new Jason();
next.MoveToWorld(new Point3D(610, 2197, 0), Siege.SiegeShard ? Map.Felucca : Map.Trammel);
next.Home = next.Location;
next.RangeHome = 40;
next = new Kevin();
next.MoveToWorld(new Point3D(2464, 439, 15), Siege.SiegeShard ? Map.Felucca : Map.Trammel);
next.Home = next.Location;
next.RangeHome = 40;
next = new Maribel();
next.MoveToWorld(new Point3D(1443, 1701, 0), Siege.SiegeShard ? Map.Felucca : Map.Trammel);
next.Home = next.Location;
next.RangeHome = 40;
next = new Nelson();
next.MoveToWorld(new Point3D(3441, 2623, 36), Siege.SiegeShard ? Map.Felucca : Map.Trammel);
next.Home = next.Location;
next.RangeHome = 40;
next = new Sean();
next.MoveToWorld(new Point3D(2442, 471, 15), Map.Felucca);
next.Home = next.Location;
next.RangeHome = 40;
next = new Walton();
next.MoveToWorld(new Point3D(610, 2197, 0), Map.Felucca);
next.Home = next.Location;
next.RangeHome = 40;
}
}
}
+272
View File
@@ -0,0 +1,272 @@
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class IronChain : Item
{
public override int LabelNumber { get { return 1075788; } } // Iron Chain
[Constructable]
public IronChain() : base(0x1A07)
{
}
public IronChain(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class GreyCloak : Cloak
{
public override int LabelNumber { get { return 1075789; } } // A Plain Grey Cloak
[Constructable]
public GreyCloak()
{
}
public GreyCloak(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if(version == 0)
reader.ReadMobile();
}
}
public class SeasonedSkillet : Item
{
public override int LabelNumber { get { return 1075774; } } // Seasoned Skillet
[Constructable]
public SeasonedSkillet() : base(0x097F)
{
}
public SeasonedSkillet(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class VillageCauldron : Item
{
public override int LabelNumber { get { return 1075775; } } // Village Cauldron
[Constructable]
public VillageCauldron()
: base(Utility.RandomMinMax(0x0974, 0x0975))
{
}
public VillageCauldron(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class ShortStool : Stool
{
public override int LabelNumber { get { return 1075776; } } // Short Stool
[Constructable]
public ShortStool()
{
}
public ShortStool(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class FriendshipMug : CeramicMug
{
public override int LabelNumber { get { return 1075777; } } // Friendship Mug
[Constructable]
public FriendshipMug()
{
}
public FriendshipMug(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BrassRing : GoldRing
{
public override int LabelNumber { get { return 1075778; } } // Brass Ring
[Constructable]
public BrassRing()
{
}
public BrassRing(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class WornHammer : Item
{
public override int LabelNumber { get { return 1075779; } } // Worn Hammer
[Constructable]
public WornHammer() : base(0x102A)
{
}
public WornHammer(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class PairOfWorkGloves : LeatherGloves
{
public override int LabelNumber { get { return 1075780; } } // Pair of Work Gloves
[Constructable]
public PairOfWorkGloves()
{
}
public PairOfWorkGloves(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,37 @@
using System;
using Server.Engines.Quests;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Items
{
public class ShepherdsCrookOfHumility : ShepherdsCrook
{
public override int LabelNumber { get { return 1075856; } } // Shepherd's Crook of Humility (Replica)
[Constructable]
public ShepherdsCrookOfHumility()
{
}
public ShepherdsCrookOfHumility(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,37 @@
using System;
using Server.Engines.Quests;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Items
{
public class SpecialPrintingOfVirtue : Item
{
public override int LabelNumber { get { return 1075793; } } // Special Printing of 'Virtue' by Lord British
[Constructable]
public SpecialPrintingOfVirtue() : base(4082)
{
}
public SpecialPrintingOfVirtue(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+57
View File
@@ -0,0 +1,57 @@
using System;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Dierdre : HumilityQuestMobile
{
public override int Greeting { get { return 1075744; } }
[Constructable]
public Dierdre()
: base("Dierdre", "the Beggar")
{
}
public Dierdre(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Human;
this.Body = 0x191;
this.Hue = Race.RandomSkinHue();
this.HairItemID = Race.RandomHair(true);
this.HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Sandals());
this.AddItem(new FancyShirt());
this.AddItem(new PlainDress());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+89
View File
@@ -0,0 +1,89 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class Gareth : MondainQuester
{
[Constructable]
public Gareth()
: base("Gareth", "the Emissary of the RBC")
{
m_NextTalk = DateTime.UtcNow;
}
public Gareth(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get { return new Type[] { typeof(TheQuestionsQuest) }; }
}
public override void OnOfferFailed()
{
Say(1075787); // I feel that thou hast yet more to learn about Humility... Please ponder these things further, and visit me again on the 'morrow.
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
Body = 0x190;
Hue = 0x83EA;
HairItemID = 0x2049;
}
public override void InitOutfit()
{
AddItem(new Backpack());
AddItem(new Boots());
AddItem(new BodySash());
AddItem(new FancyShirt(6));
AddItem(new LongPants());
}
private DateTime m_NextTalk;
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (m_NextTalk < DateTime.UtcNow && m is PlayerMobile && m.Backpack != null && m.InRange(Location, 8))
{
PlayerMobile pm = (PlayerMobile)m;
WhosMostHumbleQuest quest = QuestHelper.GetQuest(pm, typeof(WhosMostHumbleQuest)) as WhosMostHumbleQuest;
if (quest != null)
{
Item chain = pm.Backpack.FindItemByType(typeof(IronChain));
if (chain != null && chain.QuestItem)
{
SayTo(m, 1075773);
m_NextTalk = DateTime.UtcNow + TimeSpan.FromSeconds(10);
}
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_NextTalk = DateTime.UtcNow;
}
}
}
@@ -0,0 +1,256 @@
using System;
using Server.Items;
using System.Collections.Generic;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class HumilityQuestMobile : BaseVendor
{
public virtual int Greeting { get { return 0; } }
public override bool IsActiveVendor { get { return false; } }
public override bool IsInvulnerable { get { return true; } }
public override bool CanTeach { get { return false; } }
public override bool PlayerRangeSensitive { get { return false; } }
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public override void InitSBInfo()
{
}
public HumilityQuestMobile(string name) : base(null)
{
Name = name;
m_NextGreet = DateTime.UtcNow;
}
public HumilityQuestMobile(string name, string title) : base(title)
{
Name = name;
m_NextGreet = DateTime.UtcNow;
}
public static List<HumilityQuestMobile> Instance { get { return m_Instances; } }
private static List<HumilityQuestMobile> m_Instances = new List<HumilityQuestMobile>();
public HumilityQuestMobile(Serial serial) : base(serial)
{
}
private DateTime m_NextGreet;
public override void OnMovement(Mobile m, Point3D oldLocation)
{
PlayerMobile pm = m as PlayerMobile;
if (pm == null || !pm.InRange(this.Location, 3))
return;
WhosMostHumbleQuest quest = QuestHelper.GetQuest(pm, typeof(WhosMostHumbleQuest)) as WhosMostHumbleQuest;
if (quest != null)
{
if (m_NextGreet < DateTime.UtcNow && pm is PlayerMobile)
{
Item item = pm.FindItemOnLayer(Layer.Cloak);
if (item is GreyCloak && ((GreyCloak)item).Owner == null && Greeting > 0)
{
SayTo(pm, Greeting);
m_NextGreet = DateTime.UtcNow + TimeSpan.FromSeconds(5);
}
}
}
}
public override void OnDoubleClick(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (pm == null || !InRange(from.Location, 3))
return;
WhosMostHumbleQuest quest = QuestHelper.GetQuest(pm, typeof(WhosMostHumbleQuest)) as WhosMostHumbleQuest;
if (quest != null && pm.Backpack != null && !quest.HasGivenTo(this))
{
Item item = from.FindItemOnLayer(Layer.Cloak);
if (item is GreyCloak && ((GreyCloak)item).Owner == null)
{
int idx = HumilityQuestMobileInfo.GetNPCIndex(this.GetType());
if (idx > -1 && quest.Infos.ContainsKey(idx) && idx < quest.Infos.Count)
{
Type needs = quest.Infos[idx].Needs;
Item need = from.Backpack.FindItemByType(needs);
// Found needed item
if (need != null)
{
need.Delete();
quest.RemoveQuestItem(need);
Item nextItem = Loot.Construct(quest.Infos[idx].Gives);
if (nextItem != null)
{
from.Backpack.DropItem(nextItem);
quest.AddQuestItem(nextItem, this);
if (this is Sean)
SayTo(from, Greeting + 3, String.Format("#{0}", quest.Infos[idx].NeedsLoc));
else
SayTo(from, Greeting + 4, String.Format("#{0}\t#{1}", quest.Infos[idx].NeedsLoc, quest.Infos[idx].GivesLoc));
}
}
else //Didn't find needed item
{
from.SendGump(new HumilityItemQuestGump(this, quest, idx));
}
}
else
Console.WriteLine("Error finding index for {0}", this);
}
else
base.OnDoubleClick(from);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_NextGreet = DateTime.UtcNow;
}
}
public class HumilityQuestMobileInfo
{
// Greeting(say), Greeting2(gump), Desire(say), Gift(say), OnExchange(say)
private Type m_Needs;
private Type m_Gives;
private int m_NeedsLoc;
private int m_GivesLoc;
public Type Needs { get { return m_Needs; } }
public Type Gives { get { return m_Gives; } }
public int NeedsLoc { get { return m_NeedsLoc; } }
public int GivesLoc { get { return m_GivesLoc; } }
public HumilityQuestMobileInfo(Type needs, Type gives, int needsLoc, int givesLoc)
{
m_Needs = needs;
m_Gives = gives;
m_NeedsLoc = needsLoc;
m_GivesLoc = givesLoc;
}
public HumilityQuestMobileInfo(GenericReader reader)
{
int version = reader.ReadInt();
int needs = reader.ReadInt();
int gives = reader.ReadInt();
m_Needs = m_ItemTypes[needs];
if (gives == -1)
m_Gives = typeof(IronChain);
else
m_Gives = m_ItemTypes[gives];
m_NeedsLoc = reader.ReadInt();
m_GivesLoc = reader.ReadInt();
}
public void Serialize(GenericWriter writer)
{
writer.Write((int)0);
int needs = Array.IndexOf(m_ItemTypes, m_Needs);
writer.Write(needs);
int gives = Array.IndexOf(m_ItemTypes, m_Gives);
writer.Write(gives);
writer.Write(m_NeedsLoc);
writer.Write(m_GivesLoc);
}
public static int GetNPCIndex(Type type)
{
for (int i = 0; i < m_MobileTypes.Length; i++)
{
if (m_MobileTypes[i] == type)
return i;
}
return -1;
}
public static int GetLoc(Type type)
{
for (int i = 0; i < m_ItemTypes.Length; i++)
{
if (type == m_ItemTypes[i])
return m_ItemLocs[i];
}
return -1;
}
public static Type[] ItemTypes { get { return m_ItemTypes; } }
private static Type[] m_ItemTypes = new Type[]
{
typeof(BrassRing),
typeof(SeasonedSkillet),
typeof(VillageCauldron),
typeof(ShortStool),
typeof(FriendshipMug),
typeof(WornHammer),
typeof(PairOfWorkGloves),
typeof(IronChain)
};
public static int[] ItemLocs { get { return m_ItemLocs; } }
private static int[] m_ItemLocs = new int[]
{
1075778,
1075774,
1075775,
1075776,
1075777,
1075779,
1075780,
1075788
};
public static Type[] MobileTypes { get { return m_MobileTypes; } }
private static Type[] m_MobileTypes = new Type[]
{
typeof(Maribel),
typeof(Dierdre),
typeof(Kevin),
typeof(Jason),
typeof(Walton),
typeof(Nelson),
typeof(Sean)
};
}
}
+74
View File
@@ -0,0 +1,74 @@
using System;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Jason : HumilityQuestMobile
{
public override int Greeting { get { return 1075764; } }
public override bool IsActiveVendor { get { return true; } }
public override bool CanTeach { get { return true; } }
public override bool CheckTeach(SkillName skill, Mobile from)
{
return (skill == SkillName.Forensics)
|| (skill == SkillName.Healing)
|| (skill == SkillName.SpiritSpeak)
|| (skill == SkillName.Swords);
}
public override void InitSBInfo()
{
SBInfos.Add(new SBHealer());
}
[Constructable]
public Jason()
: base("Jason", "the Healer")
{
SetSkill(SkillName.Forensics, 80.0, 100.0);
SetSkill(SkillName.SpiritSpeak, 80.0, 100.0);
SetSkill(SkillName.Swords, 80.0, 100.0);
}
public Jason(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Body = 0x190;
this.Hue = Race.RandomSkinHue();
this.HairItemID = Race.RandomHair(false);
this.HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new Server.Items.Backpack());
this.AddItem(new Server.Items.Robe(Utility.RandomYellowHue()));
this.AddItem(new Server.Items.Sandals());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+66
View File
@@ -0,0 +1,66 @@
using System;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Kevin : HumilityQuestMobile
{
public override int Greeting { get { return 1075759; } }
public override bool IsActiveVendor { get { return true; } }
public override bool CanTeach { get { return true; } }
[Constructable]
public Kevin()
: base("Kevin", "the butcher")
{
SetSkill(SkillName.Anatomy, 45.0, 68.0);
}
public override void InitSBInfo()
{
SBInfos.Add(new SBButcher());
}
public Kevin(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Body = 0x190;
this.Hue = Race.RandomSkinHue();
this.HairItemID = Race.RandomHair(false);
this.HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem(new Server.Items.HalfApron());
AddItem(new Server.Items.Cleaver());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+61
View File
@@ -0,0 +1,61 @@
using System;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Maribel : HumilityQuestMobile
{
public override int Greeting { get { return 1075754; } }
public override bool IsActiveVendor { get { return true; } }
[Constructable]
public Maribel()
: base("Maribel", "the Waitress")
{
}
public override void InitSBInfo()
{
SBInfos.Add(new SBWaiter());
}
public Maribel(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Human;
this.Body = 0x191;
this.Hue = 0x83EA;
this.HairItemID = 0x2049;
}
public override void InitOutfit()
{
this.AddItem(new Server.Items.Backpack());
this.AddItem(new Server.Items.Sandals());
this.AddItem(new Server.Items.FancyDress(2205));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+57
View File
@@ -0,0 +1,57 @@
using System;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Nelson : HumilityQuestMobile
{
public override int Greeting { get { return 1075749; } }
[Constructable]
public Nelson()
: base("Nelson", "the Shepherd")
{
}
public Nelson(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Body = 0x190;
this.Hue = Race.RandomSkinHue();
this.HairItemID = Race.RandomHair(false);
this.HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem(new Server.Items.Robe(Utility.RandomGreenHue()));
AddItem(new Server.Items.ShepherdsCrook());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+72
View File
@@ -0,0 +1,72 @@
using System;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Sean : HumilityQuestMobile
{
public override int Greeting { get { return 1075769; } }
public override bool IsActiveVendor { get { return true; } }
public override bool CanTeach { get { return true; } }
[Constructable]
public Sean()
: base("Sean", "the Blacksmith")
{
SetSkill(SkillName.ArmsLore, 36.0, 68.0);
SetSkill(SkillName.Blacksmith, 65.0, 88.0);
SetSkill(SkillName.Fencing, 60.0, 83.0);
SetSkill(SkillName.Macing, 61.0, 93.0);
SetSkill(SkillName.Swords, 60.0, 83.0);
SetSkill(SkillName.Tactics, 60.0, 83.0);
SetSkill(SkillName.Parry, 61.0, 93.0);
}
public override void InitSBInfo()
{
SBInfos.Add(new SBBlacksmith());
}
public Sean(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
Body = 0x190;
Hue = Race.RandomSkinHue();
HairItemID = Race.RandomHair(false);
HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
base.InitOutfit();
SetWearable(new SmithHammer());
SetWearable(new FullApron());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+58
View File
@@ -0,0 +1,58 @@
using System;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Walton : HumilityQuestMobile
{
public override int Greeting { get { return 1075739; } }
[Constructable]
public Walton()
: base("Walton", "the Horse Trainer")
{
}
public Walton(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Body = 0x190;
this.Hue = Race.RandomSkinHue();
this.HairItemID = Race.RandomHair(false);
this.HairHue = Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new FancyShirt());
this.AddItem(new Doublet(1109));
this.AddItem(new LongPants(Utility.RandomBlueHue()));
this.AddItem(new Boots());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+138
View File
@@ -0,0 +1,138 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Collector
{
public class CollectorQuest : QuestSystem
{
private static readonly Type[] m_TypeReferenceTable = new Type[]
{
typeof(Collector.DontOfferConversation),
typeof(Collector.DeclineConversation),
typeof(Collector.AcceptConversation),
typeof(Collector.ElwoodDuringFishConversation),
typeof(Collector.ReturnPearlsConversation),
typeof(Collector.AlbertaPaintingConversation),
typeof(Collector.AlbertaStoolConversation),
typeof(Collector.AlbertaEndPaintingConversation),
typeof(Collector.AlbertaAfterPaintingConversation),
typeof(Collector.ElwoodDuringPainting1Conversation),
typeof(Collector.ElwoodDuringPainting2Conversation),
typeof(Collector.ReturnPaintingConversation),
typeof(Collector.GabrielAutographConversation),
typeof(Collector.GabrielNoSheetMusicConversation),
typeof(Collector.NoSheetMusicConversation),
typeof(Collector.GetSheetMusicConversation),
typeof(Collector.GabrielSheetMusicConversation),
typeof(Collector.GabrielIgnoreConversation),
typeof(Collector.ElwoodDuringAutograph1Conversation),
typeof(Collector.ElwoodDuringAutograph2Conversation),
typeof(Collector.ElwoodDuringAutograph3Conversation),
typeof(Collector.ReturnAutographConversation),
typeof(Collector.TomasToysConversation),
typeof(Collector.TomasDuringCollectingConversation),
typeof(Collector.ReturnImagesConversation),
typeof(Collector.ElwoodDuringToys1Conversation),
typeof(Collector.ElwoodDuringToys2Conversation),
typeof(Collector.ElwoodDuringToys3Conversation),
typeof(Collector.FullEndConversation),
typeof(Collector.FishPearlsObjective),
typeof(Collector.ReturnPearlsObjective),
typeof(Collector.FindAlbertaObjective),
typeof(Collector.SitOnTheStoolObjective),
typeof(Collector.ReturnPaintingObjective),
typeof(Collector.FindGabrielObjective),
typeof(Collector.FindSheetMusicObjective),
typeof(Collector.ReturnSheetMusicObjective),
typeof(Collector.ReturnAutographObjective),
typeof(Collector.FindTomasObjective),
typeof(Collector.CaptureImagesObjective),
typeof(Collector.ReturnImagesObjective),
typeof(Collector.ReturnToysObjective),
typeof(Collector.MakeRoomObjective)
};
public CollectorQuest(PlayerMobile from)
: base(from)
{
}
// Serialization
public CollectorQuest()
{
}
public override Type[] TypeReferenceTable
{
get
{
return m_TypeReferenceTable;
}
}
public override object Name
{
get
{
return 1020549; // Fishing for Rainbow Pearls
}
}
public override object OfferMessage
{
get
{
/* <I>Elwood greets you warmly, like an old friend he's not
* quite sure he ever had.</I><BR><BR>
*
* Hello. Yes. Sit down. Please. Good. Okay, stand. Up to you.<BR><BR>
*
* So, what brings you to these parts... hey, wait. Just had a thought.
* Would you like to do me a favor? Yes, really. You know, for old
* times sake. The good ole days. You were always one of my best
* suppliers. Or maybe you weren't, who knows any more. Anyway,
* could use some help supplementing my stock. You know me. Always
* looking for something new to add to the collection. Or sometimes
* not so new - just more of the same. But don't have to tell you that.
* You know, don't you. Yes. Just like old times. That's what it'll be.
* You and me - together again. Ah, it's been too long.<BR><BR>
*
* So what do you think? The fee will be the same as always. I'm a fair
* man. You know that. So what do you say?
*/
return 1055081;
}
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.Zero;
}
}
public override bool IsTutorial
{
get
{
return false;
}
}
public override int Picture
{
get
{
return 0x15A9;
}
}
public override void Accept()
{
base.Accept();
this.AddConversation(new AcceptConversation());
}
public override void Decline()
{
base.Decline();
this.AddConversation(new DeclineConversation());
}
}
}
+949
View File
@@ -0,0 +1,949 @@
using System;
namespace Server.Engines.Quests.Collector
{
public class DontOfferConversation : QuestConversation
{
public DontOfferConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood looks up from his ale as you greet him.</I><BR><BR>
*
* What's that? Who me? No, no. You must be looking for someone else.
*/
return 1055080;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class DeclineConversation : QuestConversation
{
public DeclineConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood looks a bit flustered and nearly knocks over his
* bottle of ale.</I><BR><BR>
*
* Well, I see. It's like that, is it? Yes. Well then. Okay.
* You've changed. Yes. Yes, you have. Something's changed. I know
* I haven't. Not me. Not good ole Elwood.<BR><BR>
*
* <I>Elwood trails off, though you can still hear him muttering softly.</I>
*/
return 1055082;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood slaps his knee and grins at you.</I><BR><BR>
*
* Yes. Yes. That's the spirit. I knew it. Knew it when I
* first saw you. You remind me so much of your dear departed
* father. Or someone. Not sure. Maybe no one. But that's okay.
* Ah, good times.<BR><BR>
*
* Anyway, so as you know, I'm a collector. Got all kinds of
* interesting things laying around back at my warehouse.
* You know. You've seen it. Haven't you? Yes? No? Nevermind.
* Not important.<BR><BR>
*
* Right. So, always trying to add new things to my collection.
* Or sometimes just get more of something. Can't have too many.
* Right? Yeah? Sure.<BR><BR>
*
* Let's see. Where to start. Oh, I know. Pearls. Yes. But not
* just any pearls. Rainbow pearls. Yes. From the lake here in
* Haven. Seems all that magic Uzeraan was throwing around when
* he transformed the island had an interesting effect on some
* of the shellfish down there. Exactly, rainbow pearls. Useless
* for magic, but an item worth collecting. Trust me on this.
* Trust me.<BR><BR>
*
* Need you to go fish some up for me. Down at the lake. Lake Haven.
* Off ya go. Happy fishing!<BR><BR>
*
* <I>Elwood turns back to his ale and now seems oblivious to you.</I>
*/
return 1055083;
}
}
public override void OnRead()
{
this.System.AddObjective(new FishPearlsObjective());
}
}
public class ElwoodDuringFishConversation : QuestConversation
{
public ElwoodDuringFishConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood looks up as you tap him on the shoulder.</I><BR><BR>
*
* Good. Good. You're back. Wait. You don't have the rainbow pearls I
* need. Taking a break? Yeah. Sure. There's no hurry. Let me know when
* you've got all those pearls, though. I'll be here.
*/
return 1055089;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ReturnPearlsConversation : QuestConversation
{
public ReturnPearlsConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood jumps slightly when you call his name.</I><BR><BR>
*
* What. I'm awake. Oh, It's you. Hey, look at those pearls.
* Beautiful. Wow. Where'd you get those... oh right. I sent you to get
* them. From the lake. Lake Haven. Great job. Gotta love rainbow
* pearls. Oooh, Colors.<BR><BR>
*
* Okay, let's see. Next. Need a painting. Go to the Colored Canvas and
* speak to Alberta. Alberta Giacco. Best painter I've ever met. Ask
* her to do a painting of you. Yes. Of you. A portrait. Never know if
* you might up and become famous one day. Need to have a painting of you
* in my collection. From now. Before all the fame. Go. Alberta awaits.
* She's in Vesper.<BR><BR>
*
* <I>Elwood starts playing with the pearls you brought him and seems
* to have forgotten you're there.</I>
*/
return 1055090;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindAlbertaObjective());
}
}
public class AlbertaPaintingConversation : QuestConversation
{
public AlbertaPaintingConversation()
{
}
public override object Message
{
get
{
/* <I>Alberta looks up from the painting she is working on and
* faces you.</I><BR><BR>
*
* Excuse me. I don't mean to be rude, but I'm in the middle
* of something, and can't... oh wait, I see. You must be the one
* Elwood sent over.<BR><BR>
*
* Very well. If you'll have a seat on the stool over there, we'll
* get started. This will just take a few seconds. I paint quite
* quickly, you see. I'll start once you are seated.<BR><BR>
*
* <I>Alberta exchanges the painting she was working on for a blank canvas.</I>
*/
return 1055092;
}
}
public override void OnRead()
{
this.System.AddObjective(new SitOnTheStoolObjective());
}
}
public class AlbertaStoolConversation : QuestConversation
{
public AlbertaStoolConversation()
{
}
public override object Message
{
get
{
/* <I>Alberta looks at you sympathetically.</I><BR><BR>
*
* Don't worry, this will only take a few seconds. I realize
* that stool can be uncomfortable, and I apologize for that.
* Perhaps I should replace it with a more comfortable chair.
* But then again, it's that very discomfort that helps produce
* such wonderful facial expressions for my paintings. Ah well.
*/
return 1055096;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class AlbertaEndPaintingConversation : QuestConversation
{
public AlbertaEndPaintingConversation()
{
}
public override object Message
{
get
{
/* <I>Alberta stands back from the canvas and surveys her
* work.</I><BR><BR>
*
* Not too bad. Quite good even, if I do say so myself. As always,
* of course.<BR><BR>
*
* Oh, you're still here. Please let Elwood know that the painting
* has been completed. I'll have it sent to him once it dries.<BR><BR>
*
* <I>Alberta removes the portrait from her easel and sets
* it aside to dry.</I>
*/
return 1055098;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnPaintingObjective());
}
}
public class AlbertaAfterPaintingConversation : QuestConversation
{
public AlbertaAfterPaintingConversation()
{
}
public override object Message
{
get
{
/* <I>Alberta stops cleaning her brushes and looks your way.</I><BR><BR>
*
* Don't worry, I'll send the painting to Elwood once it's dry. Please
* let him know that the painting has been finished.
*/
return 1055102;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringPainting1Conversation : QuestConversation
{
public ElwoodDuringPainting1Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood yawns and stretches, then focuses his gaze
* on you.</I><BR><BR>
*
* Hello. Do I know you? Hold on a second. Yes. Yes, I do.
* You were going to bring me some rainbow pearls. Wait. No.
* You already did that. I remember now. Right. So go get that
* portrait painted. Alberta is in Vesper. Go to her. Alberta
* Giacco. Come back when she's done.
*/
return 1055094;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringPainting2Conversation : QuestConversation
{
public ElwoodDuringPainting2Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood drums his fingers on the counter then looks
* up at you expectantly.</I><BR><BR>
*
* Ah, finally. I'm famished. This so-called tavern doesn't
* even serve pizza, so one must have it delivered. It's an
* outrage. Er... wait. Where's my pizza? Yes, my pizza.
* What kind of delivery is this? Didn't even bring my pizza.
* This will severely impact your tip, I'm afraid.<BR><BR>
*
* Hold on a moment. You were helping me with something else,
* weren't you? Ah. Yes. I've got it now. You were to have a
* portrait done. Well. Good. Yes. But let's not dawdle.
* Off you go. If you happen to see anyone with my pizza,
* please insist they hurry.<BR><BR>
*/
return 1055097;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ReturnPaintingConversation : QuestConversation
{
public ReturnPaintingConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood notices you immediately and waves you over.</I><BR><BR>
*
* You're back. Good. That's good. Hmm. You don't seem to have that
* painting yet. Don't tell me Alberta refused. That's no good. I made
* her what she is! She was living in the gutter when I found her. The
* gutter. And she has the... what's that? Oh, she finished the portrait.
* Right. Good. Can always count on Alberta. Always. Best painter in
* the land.<BR><BR>
*
* Just have a couple... er... wait... make that... two more task for you.
* Then our business will be concluded. For now. Old chums like us will
* always work together again. Yes. We go so far back. Right. I think.<BR><BR>
*
* Anyway. There's a musician. A minstrel. His name's Gabriel Piete. Quite
* the good singer. One of my favorites. Absolute favorite. What I'd like
* is his autograph. Simple. Just his autograph. You're likely to find him
* at the Conservatory of Music in Britain. He's often there. Often. Between
* performances. Hurry now. There ya go.<BR><BR>
*
* <I>Elwood falls silent though his lips are still moving. It looks like
* he's quietly repeating the word, "autograph."</I>
*/
return 1055100;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindGabrielObjective());
}
}
public class GabrielAutographConversation : QuestConversation
{
public GabrielAutographConversation()
{
}
public override object Message
{
get
{
/* <I>Gabriel sighs loudly as you address him and stops whatever
* it was that he was doing.</I><BR><BR>
*
* WHAT?!? Can you not see that I'm working here? Ugh, sometimes
* I wish they'd just lock the outer doors to anyone who doesn't
* belong here. So go ahead and fawn. Get it over with, and then
* leave. Sooner you're out of here, the sooner I'm back to work.<BR><BR>
*
* I see. So you want an autograph. Fine. If it'll get rid of you,
* I'll give you my autograph. But I'll only sign some sheet music
* for one of my songs. Until then, please let me get back to work.<BR><BR>
*
* You can probably find some of my sheet music at one of the theaters
* in the land. When I perform there, they often sell it as a souvenir.
* Speak to the impresario... the theater manager. My last three
* performances were in Nujel'm, Jhelom, and here in Britian.
*/
return 1055103;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindSheetMusicObjective(true));
}
}
public class GabrielNoSheetMusicConversation : QuestConversation
{
public GabrielNoSheetMusicConversation()
{
}
public override object Message
{
get
{
/* <I>Gabriel does not look happy to see you.</I><BR><BR>
*
* Do you have any sheet music? No. Please return when you do,
* but until then please leave me to my work.
*/
return 1055111;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class NoSheetMusicConversation : QuestConversation
{
public NoSheetMusicConversation()
{
}
public override object Message
{
get
{
/* Sheet music for a Gabriel Piete song? No, I'm sorry, but we've run out.
* We might get some more after he performs here again, but right now
* we don't have any. My apologies.
*/
return 1055106;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class GetSheetMusicConversation : QuestConversation
{
public GetSheetMusicConversation()
{
}
public override object Message
{
get
{
// The theater impresario hands you some sheet of music for one of Gabriel Piete's songs.
return 1055109;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnSheetMusicObjective());
}
}
public class GabrielSheetMusicConversation : QuestConversation
{
public GabrielSheetMusicConversation()
{
}
public override object Message
{
get
{
/* <I>Gabriel looks up impatiently as you approach.</I><BR><BR>
*
* Good. We can finally be done with one another. Here, let me
* sign that and have this business completed.<BR><BR>
*
* <I>Gabriel takes the sheet music, autographs it, and then hands it back to you.</I>
*/
return 1055113;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnAutographObjective());
}
}
public class GabrielIgnoreConversation : QuestConversation
{
public GabrielIgnoreConversation()
{
}
public override object Message
{
get
{
// <I>Gabriel ignores you.</I>
return 1055118;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringAutograph1Conversation : QuestConversation
{
public ElwoodDuringAutograph1Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood jumps and almost falls from his stool when you
* tap his shoulder.</I><BR><BR>
*
* Oh my. Don't do that. Scared me half to death. Sneaking up on
* people like that. I don't even know you. Yes, I do. I do know you.
* Ordered a pizza from you and never received it. I'm rather miffed
* about that.<BR><BR>
*
* No. No. Wait. Of course. Not the pizza. You're here with the
* moonfire brew I wanted. Magical moonfire brew. Not sure what it is.
* Just want some.<BR><BR>
*
* What's that? Oh. The autograph. Gabriel Piete. Yes. Of course.
* Do you have it? No. Well. Hmm. Don't sneak up on people like that. Not polite.
*/
return 1055105;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringAutograph2Conversation : QuestConversation
{
public ElwoodDuringAutograph2Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood seems to be studying the bottom of his bottle of ale
* as you approach.</I><BR><BR>
*
* What's this? Strange. Quite strange. I could have sworn I was
* drinking wine.<BR><BR>
*
* Oh, hello. Yes. Good to see you. Any luck with that autograph?
* Bet you thought I'd forgotten. No. Not me. Mind like a steel trap.
* Can't get it open no matter how hard you try. Or something. No luck
* yet? Ah well. keep trying. I have faith in you. Whoever you are.
*/
return 1055112;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringAutograph3Conversation : QuestConversation
{
public ElwoodDuringAutograph3Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood scratches his ear then notices you.</I><BR><BR>
*
* Good day. What brings you to the Albatross? Me? An autograph?
* You want my autograph? Well, I suppose. What's that? Oh. Yes.
* Gabriel Piete. Yes. Get his autograph and return to me. Good day.
*/
return 1055115;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ReturnAutographConversation : QuestConversation
{
public ReturnAutographConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood looks up eagerly as you tell him about the autographed
* sheet music.</I><BR><BR>
*
* Quite good work. Not an easy one to deal with, that one. Gabriel Piete.
* Yes. Well done. Nice autograph.<BR><BR>
*
* One last task. I would like a set of toy monster figurines made by the
* famous toymaker, Tomas O'Neerlan. You'll find him in Trinsic. He's often
* at the Tinker's Guild. Try looking there.<BR><BR>
*
* You're doing quite well. Quite well indeed. Knew you would. Just like old
* times. Yes. Quite good.
*/
return 1055116;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindTomasObjective());
}
}
public class TomasToysConversation : QuestConversation
{
public TomasToysConversation()
{
}
public override object Message
{
get
{
/* <I>Tomas smiles freely as you speak to him.</I><BR><BR>
*
* Ah, to be sure I can make you some toy monster figurines.
* That's my work, making toys. Worry not, we'll put together
* a good set of monsters for you and your figurines.<BR><BR>
*
* But I'll be needing something from you before I can begin.
* Here, take these enchanted paints. Using them, you can capture
* a set of images of the creatures you wish me to make into toys.
* It'll only work on the group of creatures I select for your
* set of figurines. Oh, and I'll be needing those enchanted paints
* back when all is said and done.<BR><BR>
*/
return 1055119;
}
}
public override void OnRead()
{
this.System.AddObjective(new CaptureImagesObjective(true));
}
}
public class TomasDuringCollectingConversation : QuestConversation
{
public TomasDuringCollectingConversation()
{
}
public override object Message
{
get
{
/* <I>Tomas greets you warmly as you approach.</I><BR><BR>
*
* 'Tis good to see you. I see that you have not yet collected
* all of the images we need. 'Tis fine, but I'll be needing
* those before I can make the toy figurines. Return when you have
* the complete set of images.<BR><BR>
*/
return 1055129;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ReturnImagesConversation : QuestConversation
{
public ReturnImagesConversation()
{
}
public override object Message
{
get
{
/* <I>Tomas grins as you walk toward him.</I><BR><BR>
*
* I see that you have collected all of the images we need.
* 'Tis good. I'll begin straight away on the toy figurines.
* I'll have them delivered to you when ready. Where shall I send
* them? To Elwood in Haven? Yes, I know him. We've done business
* in the past. Odd fellow.<BR><BR>Tomas smiles as you return his
* enchanted paints back to him.<BR><BR>
*/
return 1055131;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnToysObjective());
}
}
public class ElwoodDuringToys1Conversation : QuestConversation
{
public ElwoodDuringToys1Conversation()
{
}
public override object Message
{
get
{
/* <I>You watch as Elwood spins around blissfully on his stool.</I><BR><BR>
*
* Oh. Forgive me. Didn't see you there. Whoo. Dizzy. Can't see straight.
* Have you gotten those figurines yet? No. Ah. Not to worry. Keep at it.
* No doubt you'll come through with those.<BR><BR>
*
* Excuse me a moment. I think I need to sit down. Wait. I am sitting down.
* Good then. Yes. Sitting down.<BR><BR><I>Elwood reaches out and takes hold
* of the counter as if to steady himself.</I>
*/
return 1055123;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringToys2Conversation : QuestConversation
{
public ElwoodDuringToys2Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood suddenly stops and beckons you over to him.</I><BR><BR>
*
* Over here. Come here. Don't be alarmed, but I think one of the
* tavernkeepers used to be a wandering healer. Said something about
* the good ole days when people would just walk up and hand gold to
* them. Piles of gold. Out of the blue. Can you imagine? Got so much
* gold, this ex-healer decided to buy a tavern and settle down. Kind
* of sad really. Can't even cure my hangover now. Nice tavern though.<BR><BR>
*
* Right. Anyway. Let me know when those toy figurines are ready.
* I'll be here. As always.
*/
return 1055130;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ElwoodDuringToys3Conversation : QuestConversation
{
public ElwoodDuringToys3Conversation()
{
}
public override object Message
{
get
{
/* <I>Elwood is singing as you greet him.</I><BR><BR>
*
* Come. Join in. It's a Gabriel Piete song. I have the sheet music
* for it. It's even autographed by Gabriel Piete himself. Yes.
* One of his songs. Brilliant.<BR><BR>
*
* So let me see the toys. Figurines. Let's see them. Oh. You don't
* have them yet. I see. Well. Okay. That's too bad.
*/
return 1055133;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class EndConversation : QuestConversation
{
public EndConversation()
{
}
public override object Message
{
get
{
/* <I>Elwood takes a sip of his ale as you address him.</I><BR><BR>
*
* Ah. That's the stuff. Ale. Nothing better. What's that? Toy figurines
* will be delivered. Right. Yes. Perhaps better than Ale. Tough one.<BR><BR>
*
* Very good work. Quite. Think we're all done now. You completed everything
* I asked. Would work with you again. Yes. We should.<BR><BR>
*
* Ah. Yes. your payment. The usual. I think you'll be pleased.<BR><BR>
*
* <I>With that Elwood rummages around in his backpack. He eventually
* pulls out a small bag and hands it to you.</I>
*/
return 1055134;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
public class FullEndConversation : QuestConversation
{
private readonly bool m_Logged;
public FullEndConversation(bool logged)
{
this.m_Logged = logged;
}
public FullEndConversation()
{
this.m_Logged = true;
}
public override object Message
{
get
{
/* <I>Elwood stares at you as you approach.</I><BR><BR>
*
* I know you. Oh yes. You've been running some errands for me.
* We are about done. Noticed that your backpack is a bit full.
* Might want to make some room. Won't be able to hold your payment.
* Come back when you have more room, and we'll conclude our business.
*/
return 1055135;
}
}
public override bool Logged
{
get
{
return this.m_Logged;
}
}
public override void OnRead()
{
if (this.m_Logged)
this.System.AddObjective(new MakeRoomObjective());
}
}
}
+530
View File
@@ -0,0 +1,530 @@
using System;
using Server.Mobiles;
namespace Server.Engines.Quests.Collector
{
public enum Theater
{
Britain,
Nujelm,
Jhelom
}
public enum CaptureResponse
{
Valid,
AlreadyDone,
Invalid
}
public class FishPearlsObjective : QuestObjective
{
public FishPearlsObjective()
{
}
public override object Message
{
get
{
// Fish up shellfish from Lake Haven and collect rainbow pearls.
return 1055084;
}
}
public override int MaxProgress
{
get
{
return 6;
}
}
public override void RenderProgress(BaseQuestGump gump)
{
if (!this.Completed)
{
// Rainbow pearls collected:
gump.AddHtmlObject(70, 260, 270, 100, 1055085, BaseQuestGump.Blue, false, false);
gump.AddLabel(70, 280, 0x64, this.CurProgress.ToString());
gump.AddLabel(100, 280, 0x64, "/");
gump.AddLabel(130, 280, 0x64, this.MaxProgress.ToString());
}
else
{
base.RenderProgress(gump);
}
}
public override void OnComplete()
{
this.System.AddObjective(new ReturnPearlsObjective());
}
}
public class ReturnPearlsObjective : QuestObjective
{
public ReturnPearlsObjective()
{
}
public override object Message
{
get
{
/* You've collected enough rainbow pearls. Speak to
* Elwood to give them to him and get your next task.
*/
return 1055088;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnPearlsConversation());
}
}
public class FindAlbertaObjective : QuestObjective
{
public FindAlbertaObjective()
{
}
public override object Message
{
get
{
// Go to Vesper and speak to Alberta Giacco at the Colored Canvas.
return 1055091;
}
}
public override void OnComplete()
{
this.System.AddConversation(new AlbertaPaintingConversation());
}
}
public class SitOnTheStoolObjective : QuestObjective
{
private static readonly Point3D m_StoolLocation = new Point3D(2899, 706, 0);
private static readonly Map m_StoolMap = Map.Trammel;
private DateTime m_Begin;
public SitOnTheStoolObjective()
{
this.m_Begin = DateTime.MaxValue;
}
public override object Message
{
get
{
/* Sit on the stool in front of Alberta's easel so that she can
* paint your portrait. You'll need to sit there for about 30 seconds.
*/
return 1055093;
}
}
public override void CheckProgress()
{
PlayerMobile pm = this.System.From;
if (pm.Map == m_StoolMap && pm.Location == m_StoolLocation)
{
if (this.m_Begin == DateTime.MaxValue)
{
this.m_Begin = DateTime.UtcNow;
}
else if (DateTime.UtcNow - this.m_Begin > TimeSpan.FromSeconds(30.0))
{
this.Complete();
}
}
else if (this.m_Begin != DateTime.MaxValue)
{
this.m_Begin = DateTime.MaxValue;
pm.SendLocalizedMessage(1055095, "", 0x26); // You must remain seated on the stool until the portrait is complete. Alberta will now have to start again with a fresh canvas.
}
}
public override void OnComplete()
{
this.System.AddConversation(new AlbertaEndPaintingConversation());
}
}
public class ReturnPaintingObjective : QuestObjective
{
public ReturnPaintingObjective()
{
}
public override object Message
{
get
{
// Return to Elwood and let him know that the painting is complete.
return 1055099;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnPaintingConversation());
}
}
public class FindGabrielObjective : QuestObjective
{
public FindGabrielObjective()
{
}
public override object Message
{
get
{
/* Go to Britain and obtain the autograph of renowned
* minstrel, Gabriel Piete. He is often found at the Conservatory of Music.
*/
return 1055101;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GabrielAutographConversation());
}
}
public class FindSheetMusicObjective : QuestObjective
{
private Theater m_Theater;
public FindSheetMusicObjective(bool init)
{
if (init)
this.InitTheater();
}
public FindSheetMusicObjective()
{
}
public override object Message
{
get
{
/* Find some sheet music for one of Gabriel's songs.
* Try speaking to an impresario from one of the theaters in the land.
*/
return 1055104;
}
}
public void InitTheater()
{
switch ( Utility.Random(3) )
{
case 1:
this.m_Theater = Theater.Britain;
break;
case 2:
this.m_Theater = Theater.Nujelm;
break;
default:
this.m_Theater = Theater.Jhelom;
break;
}
}
public bool IsInRightTheater()
{
PlayerMobile player = this.System.From;
Region region = Region.Find(player.Location, player.Map);
if (region == null)
return false;
switch ( this.m_Theater )
{
case Theater.Britain:
return region.IsPartOf("Britain");
case Theater.Nujelm:
return region.IsPartOf("Nujel'm");
case Theater.Jhelom:
return region.IsPartOf("Jhelom");
default:
return false;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GetSheetMusicConversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Theater = (Theater)reader.ReadEncodedInt();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.WriteEncodedInt((int)this.m_Theater);
}
}
public class ReturnSheetMusicObjective : QuestObjective
{
public ReturnSheetMusicObjective()
{
}
public override object Message
{
get
{
// Speak to Gabriel to have him autograph the sheet music.
return 1055110;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GabrielSheetMusicConversation());
}
}
public class ReturnAutographObjective : QuestObjective
{
public ReturnAutographObjective()
{
}
public override object Message
{
get
{
// Speak to Elwood to give him the autographed sheet music.
return 1055114;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnAutographConversation());
}
}
public class FindTomasObjective : QuestObjective
{
public FindTomasObjective()
{
}
public override object Message
{
get
{
// Go to Trinsic and speak to Tomas O'Neerlan, the famous toymaker.
return 1055117;
}
}
public override void OnComplete()
{
this.System.AddConversation(new TomasToysConversation());
}
}
public class CaptureImagesObjective : QuestObjective
{
private ImageType[] m_Images;
private bool[] m_Done;
public CaptureImagesObjective(bool init)
{
if (init)
{
this.m_Images = ImageTypeInfo.RandomList(4);
this.m_Done = new bool[4];
}
}
public CaptureImagesObjective()
{
}
public override object Message
{
get
{
// Use the enchanted paints to capture the image of all of the creatures listed below.
return 1055120;
}
}
public override bool Completed
{
get
{
for (int i = 0; i < this.m_Done.Length; i++)
{
if (!this.m_Done[i])
return false;
}
return true;
}
}
public override bool IgnoreYoungProtection(Mobile from)
{
if (this.Completed)
return false;
Type fromType = from.GetType();
for (int i = 0; i < this.m_Images.Length; i++)
{
ImageTypeInfo info = ImageTypeInfo.Get(this.m_Images[i]);
if (info.Type == fromType)
return true;
}
return false;
}
public CaptureResponse CaptureImage(Type type, out ImageType image)
{
for (int i = 0; i < this.m_Images.Length; i++)
{
ImageTypeInfo info = ImageTypeInfo.Get(this.m_Images[i]);
if (info.Type == type)
{
image = this.m_Images[i];
if (this.m_Done[i])
{
return CaptureResponse.AlreadyDone;
}
else
{
this.m_Done[i] = true;
this.CheckCompletionStatus();
return CaptureResponse.Valid;
}
}
}
image = (ImageType)0;
return CaptureResponse.Invalid;
}
public override void RenderProgress(BaseQuestGump gump)
{
if (!this.Completed)
{
for (int i = 0; i < this.m_Images.Length; i++)
{
ImageTypeInfo info = ImageTypeInfo.Get(this.m_Images[i]);
gump.AddHtmlObject(70, 260 + 20 * i, 200, 100, info.Name, BaseQuestGump.Blue, false, false);
gump.AddLabel(200, 260 + 20 * i, 0x64, " : ");
gump.AddHtmlObject(220, 260 + 20 * i, 100, 100, this.m_Done[i] ? 1055121 : 1055122, BaseQuestGump.Blue, false, false);
}
}
else
{
base.RenderProgress(gump);
}
}
public override void OnComplete()
{
this.System.AddObjective(new ReturnImagesObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
int count = reader.ReadEncodedInt();
this.m_Images = new ImageType[count];
this.m_Done = new bool[count];
for (int i = 0; i < count; i++)
{
this.m_Images[i] = (ImageType)reader.ReadEncodedInt();
this.m_Done[i] = reader.ReadBool();
}
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.WriteEncodedInt((int)this.m_Images.Length);
for (int i = 0; i < this.m_Images.Length; i++)
{
writer.WriteEncodedInt((int)this.m_Images[i]);
writer.Write((bool)this.m_Done[i]);
}
}
}
public class ReturnImagesObjective : QuestObjective
{
public ReturnImagesObjective()
{
}
public override object Message
{
get
{
/* You now have all of the creature images you need.
* Return to Tomas O'Neerlan so that he can make the toy figurines.
*/
return 1055128;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnImagesConversation());
}
}
public class ReturnToysObjective : QuestObjective
{
public ReturnToysObjective()
{
}
public override object Message
{
get
{
// Return to Elwood with news that the toy figurines will be delivered when ready.
return 1055132;
}
}
}
public class MakeRoomObjective : QuestObjective
{
public MakeRoomObjective()
{
}
public override object Message
{
get
{
// Return to Elwood for your reward when you have some room in your backpack.
return 1055136;
}
}
}
}
+619
View File
@@ -0,0 +1,619 @@
using System;
using Server.Items;
namespace Server.Engines.Quests.Necro
{
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I><U>Important Quest Information</U></I><BR><BR>
*
* During your quest, any important information that a
* <a href = "?ForceTopic31">NPC</a> gives you, will appear in a
* window such as this one. You can review the information at
* any time during your quest.<BR><BR><U>Getting Help</U><BR><BR>
*
* Some of the text you will come across during your quest, will
* be underlined <a href = "?ForceTopic73">links to the codex of
* wisdom</a>, or online help system. You can click on the text
* to get detailed information on the underlined subject. You
* may also access the Codex Of Wisdom by pressing "F1" or by
* clicking on the "?" on the toolbar at the top of your screen.<BR><BR>
*
* <U>Context Menus</U><BR><BR>Context menus can be called up by
* single left-clicking (or Shift + single left-click, if you
* changed it) on most objects or NPCs in the world. Nearly
* everything, including your own avatar will have context menus
* available. Bringing up your avatar's context menu will give
* you options to cancel your quest and review various quest
* information.<BR><BR>
*/
return 1049092;
}
}
public override void OnRead()
{
Container bag = Mardoth.GetNewContainer();
bag.DropItem(new DarkTidesHorn());
this.System.From.AddToBackpack(bag);
this.System.AddConversation(new ReanimateMaabusConversation());
}
}
public class ReanimateMaabusConversation : QuestConversation
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1026153, 6178), // teleporter
new QuestItemInfo(1049117, 4036), // Horn of Retreat
new QuestItemInfo(1048032, 3702)// a bag
};
public ReanimateMaabusConversation()
{
}
public override object Message
{
get
{
/* Excellent choice, young apprentice of evil!<BR><BR>
*
* I will not waste our time with pleasantries. There is much work
* to be done – especially in light of the recent Paladin ambushes
* that we have suffered. The necromantic brotherhood is working
* towards the summoning of the elder daemon Kronus, who will rise
* from the Well of Tears to help us finally crush the Paladin forces
* that have plagued our lands for so long now.<BR><BR>
*
* To summon Kronus, we must energize the Well of Tears with a series
* of dark rituals. Unfortunately the rituals needed to sufficiently
* energize the Well of Tears have been lost to us. Your task will be
* to recover one of the ritual scrolls needed for the summoning.<BR><BR>
*
* You will need to find the corpse of the Arch Necromancer Maabus, which
* has been laid to rest in the tomb of elders. We believe his spirit may
* have memory of where we may find the scrolls needed for the summoning.
* You will need to awaken him from the slumber of death, using your
* Animate Dead spell, of course.<BR><BR>
*
* To reach the tomb, step onto the magical teleporter just to the
* <a href = "?ForceTopic13">West</a> of where I am standing.<BR><BR>
*
* Once you have been teleported, follow the path, which will lead you to
* the tomb of Maabus.<BR><BR>One more thing before you go:<BR><BR>
*
* Should you get into trouble out there or should you lose your way, do
* not worry. I have also given you a magical horn - a <I>Horn of Retreat</I>.
* Play the horn at any time to open a magical gateway that leads back to this
* tower.<BR><BR>
*
* Should your horn run out of <a href = "?ForceTopic83">charges</a>, simply
* hand me the horn to have it recharged.<BR><BR>
*
* Good luck friend.
*/
return 1060099;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindMaabusTombObjective());
}
}
public class MaabasConversation : QuestConversation
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1026153, 6178)// teleporter
};
public MaabasConversation()
{
}
public override object Message
{
get
{
/* <I>Maabus emits an ear-crawling screech as his body reanimates.
* He turns and angrily screams at you</I>:<BR><BR>
*
* YOU INFIDEL! HOW DARE YOU AWAKEN MAABUS!?!<BR><BR>
*
* <I>Maabus continues to scream at you angrily for some time.
* As he settles down, you explain to him the purpose of your visit.
* Once you explain that you are on a quest to summon the elder daemon
* Kronus, Maabus begins to cooperate, and begins to speak in a more
* reasonable tone</I>:<BR><BR>
*
* Well, why didn’t you say so? If you’re going to raise Kronus from
* the Well of Tears, you must first complete a long series of dark
* rituals. I once owned one of the scrolls needed for the summoning,
* but alas it was lost to me when I lost my life to a cowardly Paladin
* ambush near the Paladin city of Light. They would have probably
* hidden the scroll in their precious crystal cave near the city.<BR><BR>
*
* There is a teleporter in the corner of this tomb. It will transport
* you near the crystal cave at which I believe one of the calling scrolls
* is hidden. Good luck.<BR><BR>
*
* <I>Maabus' body slumps back into the coffinas your magic expires</I>.
*/
return 1060103;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindCrystalCaveObjective());
}
}
public class HorusConversation : QuestConversation
{
public HorusConversation()
{
}
public override object Message
{
get
{
/* <I>An old man, dressed in slightly tattered armor, whom you recognize
* to be a Paladin stands before the Crystal Cave staring blankly into
* the space in front of him. As he begins to speak to you, you realize
* this man is blind. You attempt to persuade the blind man that you are
* a Paladin seeking to inspect the scroll of calling...</I><BR><BR>
*
* Greetings traveler!<BR><BR>
*
* You seek entrance to the Crystal Cave, home of the Calling Scroll? Hmm.
* You reak of death and decay, brother. You reak of death like a Necromancer,
* but yet you claim to be a Paladin in hopes that I will grant thee passage
* into the cave?<BR><BR>
*
* Please don’t think ill of me for this, but I’m just a blind, old man looking
* to keep the brotherhood of Paladins safe from the clutches of the elder daemon
* Kronus. The Necromancers have been after this particular scroll for quite some
* time, so we must take all the security precautions we can.<BR><BR>
*
* Before I can let you pass into the Crystal Cave, you must speak to me the secret
* word that is kept in the Scroll of Abraxus in the Vault of Secrets at the Paladin
* city of Light. It’s the only way that I can be sure you are who you claim to be,
* since Necromancers cannot enter the Vault due to powerful protective magic that
* the brotherhood has blessed the vault with.
*/
return 1060105;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindMardothAboutVaultObjective());
}
}
public class MardothVaultConversation : QuestConversation
{
public MardothVaultConversation()
{
}
public override object Message
{
get
{
/* <I>Mardoth looks at you expectantly until you tell him that you failed
* to retrieve the scroll...</I><BR><BR>
*
* You failed? Very unfortunate... So now you must find your way into
* the paladin’s Vault of Secrets, eh? Well, you won't be able to get in
* – there is a powerful magic aura that protects the Vault from all
* Necromancers. We simply cannot enter. However, that's not to say you
* familiar spirit can't.<BR><BR>
*
* <I>Mardoth grins with obvious satisfaction
* as he explains the details of the <a href="?ForceTopic127">Summon
* Familiar</a> spell to you...</I>, which will allow you to summon a
* scavenging Horde Minion to steal the scroll.<BR><BR>
*
* Very well. You are prepared to go. Take the teleporter just to the
* <a href = "?ForceTopic13">West</a> of where I am standing to transport
* to the Paladin city of Light. Once you have arrived in the city, follow
* the road of glowing runes to the Vault of Secrets. You know what to do.
*/
return 1060107;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindCityOfLightObjective());
}
}
public class VaultOfSecretsConversation : QuestConversation
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1023643, 8787)// spellbook
};
public VaultOfSecretsConversation()
{
}
public override object Message
{
get
{
/* You have arrived in the Vault of Secrets. You can feel the
* protective magic in this place restricting you, making you
* feel nearly claustrophobic.<BR><BR>
*
* Just ahead of you and out of your reach, you see a collection
* of scrolls and books, one of them being entitled
* 'Scroll of Abraxus' . You can only assume that this scroll
* holds the current password required to enter the Crystal Cave.<BR><BR>
*
* This would be a good opportunity to <a href="?ForceTopic127">summon
* your familiar</a>. Since your familiar is not a Necromancer, it
* will not be affected by the anti-magic aura that surrounds the Vault.<BR><BR>
*
* Summon your familiar with the <a href="?ForceTopic127">Summon Familiar</a> spell.
*/
return 1060110;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void OnRead()
{
this.System.AddObjective(new FetchAbraxusScrollObjective());
}
}
public class ReadAbraxusScrollConversation : QuestConversation
{
public ReadAbraxusScrollConversation()
{
}
public override object Message
{
get
{
/* You have obtained the Scroll of Abraxus, which contains the secret
* password needed to gain passage into the Crystal Cave where the
* Scroll of Calling is kept. Read the scroll (double click) and
* figure out the password.<BR><BR>
*
* Once you have the password, return to the Crystal Cave and speak
* the password to the guard.<BR><BR>
*
* If you do not know the way to the Crystal Cave from the Paladin City,
* you can use the magic teleporter located just outside of the vault.
*/
return 1060114;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReadAbraxusScrollObjective());
}
}
public class SecondHorusConversation : QuestConversation
{
public SecondHorusConversation()
{
}
public override object Message
{
get
{
/* Very well Paladin, you have proven to me your identity.
* I grant thee passage.<BR><BR>
*
* Be careful, however – I’ve heard that the cave has been
* infested with a vermin of some sort. Our High Lord
* Melkeer was supposed to send some troops to clear the
* vermin out of the cave, but that was last week already.
* I fear that he forgot.<BR><BR>
*
* If you can find it in your goodness to dispose of at
* least 5 of those vermin in there, I shall reward your
* efforts. If however you are too busy, and I would
* understand if you were, don’t bother with the vermin.<BR><BR>
*
* You may now pass through the energy barrier to enter the
* Crystal Cave. Take care honorable Paladin soul.
* Walk in the light my friend.
*/
return 1060118;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindCallingScrollObjective());
}
}
public class HealConversation : QuestConversation
{
public HealConversation()
{
}
public override object Message
{
get
{
/* You've just slain a creature. Now is a good time to learn how
* to heal yourself as a Necromancer.<BR><BR>
*
* As a follower of the dark path, you are able to recover lost
* hitpoints by communing with the spirit world via the skill
* <a href="?ForceTopic133">Spirit Speak</a>. Learn more about it now,
* <a href="?ForceTopic73">in the codex of Wisdom</a>.
*/
return 1061610;
}
}
}
public class HorusRewardConversation : QuestConversation
{
public HorusRewardConversation()
{
}
public override object Message
{
get
{
/* I thank you for going out of your way to clean out some
* of the vermin in that cave – here is your reward: a bag
* containing 500 gold coins plus a strange and magical artifact
* that should come in handy in your travels.<BR><BR>
*
* Take care young Paladin!
*/
return 1060717;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class LostCallingScrollConversation : QuestConversation
{
private bool m_FromMardoth;
public LostCallingScrollConversation(bool fromMardoth)
{
this.m_FromMardoth = fromMardoth;
}
// Serialization
public LostCallingScrollConversation()
{
}
public override object Message
{
get
{
if (this.m_FromMardoth)
{
/* You return without the scroll of Calling? I'm afraid that
* won't do. You must return to the Crystal Cave and fetch
* another scroll. Use the teleporter to the West of me to
* get there. Return here when you have the scroll. Do not
* fail me this time, young apprentice of evil.
*/
return 1062058;
}
else // from well of tears
{
/* You have arrived at the well, but no longer have the scroll
* of calling. Use Mardoth's teleporter to return to the
* Crystal Cave and fetch another scroll from the box.
*/
return 1060129;
}
}
}
public override bool Logged
{
get
{
return false;
}
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_FromMardoth = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_FromMardoth);
}
}
public class MardothKronusConversation : QuestConversation
{
public MardothKronusConversation()
{
}
public override object Message
{
get
{
/* You have returned with the scroll! I knew I could count on you.
* You can now perform the rite of calling at the Well of Tears.
* This ritual will help charge the Well to prepare for the coming
* of Kronus. You are prepared to do your part young Necromancer!<BR><BR>
*
* Just outside of this tower, you will find a path lined with red
* lanterns. Follow this path to get to the Well of Tears. Once
* you have arrived at the Well, use the scroll to perform the
* ritual of calling. Performing the rite will empower the well
* and bring us that much closer to the arrival of Kronus.<BR><BR>
*
* Once you have completed the ritual, return here for your
* promised reward.
*/
return 1060121;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindWellOfTearsObjective());
}
}
public class MardothEndConversation : QuestConversation
{
public MardothEndConversation()
{
}
public override object Message
{
get
{
/* You have done as I asked... I knew I could count on you from
* the moment you walked in here!<BR><BR>
*
* The forces of evil are strong within you. You will become
* a great Necromancer in this life - perhaps even the greatest.<BR><BR>
*
* My work for you is done here. I release you from my service
* to go into the world and fight for our cause...<BR><BR>
*
* Oh...I almost forgot - your reward. Here is a magical
* weapon and 2000 gold for you, in the form of a check. Don't
* spend it all in one place though, eh?<BR><BR>
*
* Actually, before you can spend any of it at all, you will
* have to <a href="?ForceTopic86">cash the check</a> at the
* nearest bank. Shopkeepers never accept checks for payment,
* they require cash.<BR><BR>
*
* In your pack, you will find an enchanted sextant. Use this
* sextant to guide you to the nearest bank.<BR><BR>
*
* Farewell, and stay true to the ways of the shadow...
*/
return 1060133;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindBankObjective());
}
}
public class BankerConversation : QuestConversation
{
public BankerConversation()
{
}
public override object Message
{
get
{
/* <I>The banker smiles at you and greets you in a loud and robust voice...</I><BR><BR>
*
* Well hello there adventurer! I see you've learned how to cash checks. Wonderful!
* Let me tell you a bit about the banks in this world...<BR><BR>
*
* Anything that you place into any bank box, can be retrieved from any other
* bank box in the land. For instance, if you place an item into a bank box in
* Britain, it can be retrieved from your bank box in Moonglow or any other city.<BR><BR>
*
* Bank boxes are very secure. So secure, in fact, that no one can ever get into
* your bank box except for yourself. Security is hard to come by these days,
* but you can trust in the banking system of Britannia! We shall not let you down!<BR><BR>
*
* I hope to be seeing much more of you as your riches grow! May your bank box overflow
* with the spoils of your adventures.<BR><BR>Farewell adventurer, you are now free to
* explore the world on your own.
*/
return 1060137;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
public class RadarConversation : QuestConversation
{
public RadarConversation()
{
}
public override object Message
{
get
{
/* If you are leaving the tower, you should learn about the Radar Map.<BR><BR>
*
* The Radar Map (or Overhead View) can be opened by pressing 'ALT-R'
* on your keyboard. It shows your immediate surroundings from a bird's
* eye view.<BR><BR>Pressing ALT-R twice, will enlarge the Radar Map a
* little. Use the Radar Map often as you travel throughout the world
* to familiarize yourself with your surroundings.
*/
return 1061692;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
}
+171
View File
@@ -0,0 +1,171 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class DarkTidesQuest : QuestSystem
{
private static readonly Type[] m_TypeReferenceTable = new Type[]
{
typeof(Necro.AcceptConversation),
typeof(Necro.AnimateMaabusCorpseObjective),
typeof(Necro.BankerConversation),
typeof(Necro.CashBankCheckObjective),
typeof(Necro.FetchAbraxusScrollObjective),
typeof(Necro.FindBankObjective),
typeof(Necro.FindCallingScrollObjective),
typeof(Necro.FindCityOfLightObjective),
typeof(Necro.FindCrystalCaveObjective),
typeof(Necro.FindMaabusCorpseObjective),
typeof(Necro.FindMaabusTombObjective),
typeof(Necro.FindMardothAboutKronusObjective),
typeof(Necro.FindMardothAboutVaultObjective),
typeof(Necro.FindMardothEndObjective),
typeof(Necro.FindVaultOfSecretsObjective),
typeof(Necro.FindWellOfTearsObjective),
typeof(Necro.HorusConversation),
typeof(Necro.LostCallingScrollConversation),
typeof(Necro.MaabasConversation),
typeof(Necro.MardothEndConversation),
typeof(Necro.MardothKronusConversation),
typeof(Necro.MardothVaultConversation),
typeof(Necro.RadarConversation),
typeof(Necro.ReadAbraxusScrollConversation),
typeof(Necro.ReadAbraxusScrollObjective),
typeof(Necro.ReanimateMaabusConversation),
typeof(Necro.RetrieveAbraxusScrollObjective),
typeof(Necro.ReturnToCrystalCaveObjective),
typeof(Necro.SecondHorusConversation),
typeof(Necro.SpeakCavePasswordObjective),
typeof(Necro.UseCallingScrollObjective),
typeof(Necro.VaultOfSecretsConversation),
typeof(Necro.FindHorusAboutRewardObjective),
typeof(Necro.HealConversation),
typeof(Necro.HorusRewardConversation)
};
public DarkTidesQuest(PlayerMobile from)
: base(from)
{
}
// Serialization
public DarkTidesQuest()
{
}
public override Type[] TypeReferenceTable
{
get
{
return m_TypeReferenceTable;
}
}
public override object Name
{
get
{
// Dark Tides
return 1060095;
}
}
public override object OfferMessage
{
get
{
/* <I>An old man who looks to be 200 years old from the looks
* of his translucently pale and heavily wrinkled skin, turns
* to you and gives you a half-cocked grin that makes you
* feel somewhat uneasy.<BR><BR>
*
* After a short pause, he begins to speak to you...</I><BR><BR>
*
* Hmm. What's this? Another budding Necromancer to join the
* ranks of Evil? Here... let me take a look at you... Ah
* yes... Very Good! I sense the forces of evil are strong
* within you, child – but you need training so that you can
* learn to focus your skills against those aligned against
* our cause. You are destined to become a legendary
* Necromancer - with the proper training, that only I can
* give you.<BR><BR>
*
* <I>Mardoth pauses just long enough to give you a wide,
* skin-crawling grin.</I><BR><BR>
*
* Let me introduce myself. I am Mardoth, the guildmaster of
* the Necromantic Brotherhood. I have taken it upon myself
* to train anyone willing to learn the dark arts of Necromancy.
* The path of destruction, decay and obliteration is not an
* easy one. Only the most evil and the most dedicated can
* hope to master the sinister art of death.<BR><BR>
*
* I can lend you training and help supply you with equipment –
* in exchange for a few services rendered by you, of course.
* Nothing major, just a little death and destruction here and
* there - the tasks should be easy as a tasty meat pie for one
* as treacherous and evil as yourself.<BR><BR>
*
* What do you say? Do we have a deal?
*/
return 1060094;
}
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.MaxValue;
}
}
public override bool IsTutorial
{
get
{
return true;
}
}
public override int Picture
{
get
{
return 0x15B5;
}
}
public static bool HasLostCallingScroll(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (pm == null)
return false;
QuestSystem qs = pm.Quest;
if (qs is DarkTidesQuest)
{
if (qs.IsObjectiveInProgress(typeof(FindMardothAboutKronusObjective)) || qs.IsObjectiveInProgress(typeof(FindWellOfTearsObjective)) || qs.IsObjectiveInProgress(typeof(UseCallingScrollObjective)))
{
Container pack = from.Backpack;
return (pack == null || pack.FindItemByType(typeof(KronusScroll)) == null);
}
}
return false;
}
public override void Accept()
{
base.Accept();
this.AddConversation(new AcceptConversation());
}
public override bool IgnoreYoungProtection(Mobile from)
{
if (from is SummonedPaladin)
return true;
return base.IgnoreYoungProtection(from);
}
}
}
+638
View File
@@ -0,0 +1,638 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Necro
{
public class AnimateMaabusCorpseObjective : QuestObjective
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1023643, 8787)// spellbook
};
public AnimateMaabusCorpseObjective()
{
}
public override object Message
{
get
{
/* Re-animate the corpse of Maabus using your <a href="?ForceTopic112">Animate Dead</a>
* spell and question him about the Kronus rituals.
*/
return 1060102;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void OnComplete()
{
this.System.AddConversation(new MaabasConversation());
}
}
public class FindCrystalCaveObjective : QuestObjective
{
public FindCrystalCaveObjective()
{
}
public override object Message
{
get
{
/* Take the teleporter in the corner of Maabus' tomb to
* the crystal cave where the calling scroll is kept.
*/
return 1060104;
}
}
public override void OnComplete()
{
this.System.AddConversation(new HorusConversation());
}
}
public class FindMardothAboutVaultObjective : QuestObjective
{
public FindMardothAboutVaultObjective()
{
}
public override object Message
{
get
{
/* Infiltrate the city of the Paladins and figure out a way into
* the Vault. See Mardoth for help with this objective.
*/
return 1060106;
}
}
public override void OnComplete()
{
this.System.AddConversation(new MardothVaultConversation());
}
}
public class FindMaabusTombObjective : QuestObjective
{
public FindMaabusTombObjective()
{
}
public override object Message
{
get
{
/* Step onto the teleporter near Mardoth and follow the path
* of glowing runes to the tomb of Maabus.
*/
return 1060124;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(2024, 1240, -90), 3))
this.Complete();
}
public override void OnComplete()
{
this.System.AddObjective(new FindMaabusCorpseObjective());
}
}
public class FindMaabusCorpseObjective : QuestObjective
{
public FindMaabusCorpseObjective()
{
}
public override object Message
{
get
{
/* This is the tomb of Maabus. Enter within and find
* the corpse of the ancient necromancer.
*/
return 1061142;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(2024, 1223, -90), 3))
this.Complete();
}
public override void OnComplete()
{
this.System.AddObjective(new AnimateMaabusCorpseObjective());
}
}
public class FindCityOfLightObjective : QuestObjective
{
public FindCityOfLightObjective()
{
}
public override object Message
{
get
{
/* Use the teleporter near Mardoth to be transported
* to the Paladin City of Light.
*/
return 1060108;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(1076, 519, -90), 5))
this.Complete();
}
public override void OnComplete()
{
this.System.AddObjective(new FindVaultOfSecretsObjective());
}
}
public class FindVaultOfSecretsObjective : QuestObjective
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1023676, 3679)// glowing rune
};
public FindVaultOfSecretsObjective()
{
}
public override object Message
{
get
{
/* Follow the road paved with glowing runes to
* find the Vault of Secrets. Be careful not
* to give yourself away as a Necromancer while
* in the city.
*/
return 1060109;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(1072, 455, -90), 1))
this.Complete();
}
public override void OnComplete()
{
this.System.AddConversation(new VaultOfSecretsConversation());
}
}
public class FetchAbraxusScrollObjective : QuestObjective
{
public FetchAbraxusScrollObjective()
{
}
public override object Message
{
get
{
// <a href="?ForceTopic127">Summon your Horde Minion familiar</a> to fetch the scroll for you.
return 1060196;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(1076, 450, -84), 5))
{
HordeMinionFamiliar hmf = Spells.Necromancy.SummonFamiliarSpell.Table[this.System.From] as HordeMinionFamiliar;
if (hmf != null && hmf.InRange(this.System.From, 5) && !hmf.QuestOverride)
{
this.System.From.SendLocalizedMessage(1060113); // You instinctively will your familiar to fetch the scroll for you.
//hmf.TargetLocation = new Point2D(1076, 450);
if (hmf.AIObject != null)
{
hmf.CurrentSpeed = .2;
hmf.QuestOverride = true;
hmf.AIObject.MoveTo(new Point3D(1076, 450, -89), false, 0);
}
}
}
}
public override void OnComplete()
{
this.System.AddObjective(new RetrieveAbraxusScrollObjective());
}
}
public class RetrieveAbraxusScrollObjective : QuestObjective
{
public RetrieveAbraxusScrollObjective()
{
}
public override object Message
{
get
{
/* Double click your Horde Minion to open his pack and retrieve
* the Scroll of Abraxus that he looted for you.
*/
return 1060199;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReadAbraxusScrollConversation());
}
}
public class ReadAbraxusScrollObjective : QuestObjective
{
public ReadAbraxusScrollObjective()
{
}
public override object Message
{
get
{
/* Find the Crystal Cave password by reading (double click)
* the golden scroll entitled "Scroll of Abraxus" that you
* got from your familiar..
*/
return 1060125;
}
}
public override void OnComplete()
{
this.System.AddObjective(new ReturnToCrystalCaveObjective());
}
}
public class ReturnToCrystalCaveObjective : QuestObjective
{
private static readonly QuestItemInfo[] m_Info = new QuestItemInfo[]
{
new QuestItemInfo(1026153, 6178)// teleporter
};
public ReturnToCrystalCaveObjective()
{
}
public override object Message
{
get
{
/* Now that you have the password, return to the Crystal Cave
* to speak with the guard there. Use the teleporter outside
* of the vault to get there if necessary.
*/
return 1060115;
}
}
public override QuestItemInfo[] Info
{
get
{
return m_Info;
}
}
public override void OnComplete()
{
this.System.AddObjective(new SpeakCavePasswordObjective());
}
}
public class SpeakCavePasswordObjective : QuestObjective
{
public SpeakCavePasswordObjective()
{
}
public override object Message
{
get
{
/* Speak the secret word that you read in the scroll
* stolen from the Vault to Horus the guard, using
* his <a href="?ForceTopic90">context menu</a>.
*/
return 1060117;
}
}
public override void OnComplete()
{
this.System.AddConversation(new SecondHorusConversation());
}
}
public class FindCallingScrollObjective : QuestObjective
{
private int m_SkitteringHoppersKilled;
private bool m_HealConversationShown;
private bool m_SkitteringHoppersDisposed;
public FindCallingScrollObjective()
{
}
public override object Message
{
get
{
/* Enter the Crystal Cave and find the Scroll of Calling.
* The barrier will now allow you to pass.
*/
return 1060119;
}
}
public override bool IgnoreYoungProtection(Mobile from)
{
return !this.m_SkitteringHoppersDisposed && from is SkitteringHopper;
}
public override bool GetKillEvent(BaseCreature creature, Container corpse)
{
return !this.m_SkitteringHoppersDisposed;
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is SkitteringHopper)
{
if (!this.m_HealConversationShown)
{
this.m_HealConversationShown = true;
this.System.AddConversation(new HealConversation());
}
if (++this.m_SkitteringHoppersKilled >= 5)
{
this.m_SkitteringHoppersDisposed = true;
this.System.AddObjective(new FindHorusAboutRewardObjective());
}
}
}
public override void OnComplete()
{
this.System.AddObjective(new FindMardothAboutKronusObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_SkitteringHoppersKilled = reader.ReadEncodedInt();
this.m_HealConversationShown = reader.ReadBool();
this.m_SkitteringHoppersDisposed = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.WriteEncodedInt((int)this.m_SkitteringHoppersKilled);
writer.Write((bool)this.m_HealConversationShown);
writer.Write((bool)this.m_SkitteringHoppersDisposed);
}
}
public class FindHorusAboutRewardObjective : QuestObjective
{
public FindHorusAboutRewardObjective()
{
}
public override object Message
{
get
{
/* You have disposed of the creatures as Horus has asked.
* See him on your way out of the Crystal Cave to claim your reward.
*/
return 1060126;
}
}
public override void OnComplete()
{
this.System.AddConversation(new HorusRewardConversation());
}
}
public class FindMardothAboutKronusObjective : QuestObjective
{
public FindMardothAboutKronusObjective()
{
}
public override object Message
{
get
{
/* You have obtained the scroll of calling. See Mardoth
* for further instructions.
*/
return 1060127;
}
}
public override void OnComplete()
{
this.System.AddConversation(new MardothKronusConversation());
}
}
public class FindWellOfTearsObjective : QuestObjective
{
private static readonly Rectangle2D m_WellOfTearsArea = new Rectangle2D(2080, 1346, 10, 10);
private bool m_Inside;
public FindWellOfTearsObjective()
{
}
public override object Message
{
get
{
/* Follow the red lanterns to the Well of Tears where
* you will perform the calling of Kronus.
*/
return 1060128;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && m_WellOfTearsArea.Contains(this.System.From.Location))
{
if (DarkTidesQuest.HasLostCallingScroll(this.System.From))
{
if (!this.m_Inside)
this.System.AddConversation(new LostCallingScrollConversation(false));
}
else
{
this.Complete();
}
this.m_Inside = true;
}
else
{
this.m_Inside = false;
}
}
public override void OnComplete()
{
this.System.AddObjective(new UseCallingScrollObjective());
}
}
public class UseCallingScrollObjective : QuestObjective
{
public UseCallingScrollObjective()
{
}
public override object Message
{
get
{
/* Use the Scroll of Calling (double click) near the
* Well of Tears to charge the waters for the arrival
* of Kronus.
*/
return 1060130;
}
}
}
public class FindMardothEndObjective : QuestObjective
{
private bool m_Victory;
public FindMardothEndObjective(bool victory)
{
this.m_Victory = victory;
}
// Serialization
public FindMardothEndObjective()
{
}
public override object Message
{
get
{
if (this.m_Victory)
{
/* Victory! You have done as Mardoth has asked of you.
* Take as much of your foe's loot as you can carry
* and return to Mardoth for your reward.
*/
return 1060131;
}
else
{
/* Although you were slain by the cowardly paladin,
* you managed to complete the rite of calling as
* instructed. Return to Mardoth.
*/
return 1060132;
}
}
}
public override void OnComplete()
{
this.System.AddConversation(new MardothEndConversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Victory = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_Victory);
}
}
public class FindBankObjective : QuestObjective
{
public FindBankObjective()
{
}
public override object Message
{
get
{
/* Use the enchanted sextant in your pack to locate
* the nearest bank. Go there and speak with the
* Banker.
*/
return 1060134;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(2048, 1345, -84), 5))
this.Complete();
}
public override void OnComplete()
{
this.System.AddObjective(new CashBankCheckObjective());
}
}
public class CashBankCheckObjective : QuestObjective
{
public CashBankCheckObjective()
{
}
public override object Message
{
get
{
/* You have arrived at the Bank. <a href="?ForceTopic38">Open your bank box</a>
* and then <a href="?ForceTopic86">cash the check</a> that Mardoth gave you.
*/
return 1060644;
}
}
public override void OnComplete()
{
this.System.AddConversation(new BankerConversation());
}
}
}
+436
View File
@@ -0,0 +1,436 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class DisciplineQuest : BaseQuest
{
public DisciplineQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Rat), "rats", 50, "Sanctuary"));
this.AddReward(new BaseReward(1074872)); // The opportunity to learn the ways of the Arcanist.
}
public override QuestChain ChainID
{
get
{
return QuestChain.SpellweavingS;
}
}
public override Type NextQuest
{
get
{
return typeof(NeedsOfTheManySanctuaryQuest);
}
}
/* Discipline */
public override object Title
{
get
{
return 1072752;
}
}
/* Learning to weave spells and control the forces of nature requires sacrifice, discipline, focus, and an unwavering dedication
to Sosaria herself. We do not teach the unworthy. They do not comprehend the lessons nor the dedication required. If you would
walk the path of the Arcanist, then you must do as I require without hesitation or question. Your first task is to rid our home
of rats ... 50 of them in the next hour. */
public override object Description
{
get
{
return 1072761;
}
}
/* *nods* Not everyone has the temperment to undertake the way of the Arcanist. */
public override object Refuse
{
get
{
return 1072767;
}
}
/* You waste my time. The task is simple. Kill 50 rats in an hour. */
public override object Uncomplete
{
get
{
return 1072773;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Spellweaving;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class NeedsOfTheManySanctuaryQuest : BaseQuest
{
public NeedsOfTheManySanctuaryQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Cotton), "bale of cotton", 10, 0xDF9));
this.AddReward(new BaseReward(1074872)); // The opportunity to learn the ways of the Arcanist.
}
public override QuestChain ChainID
{
get
{
return QuestChain.SpellweavingS;
}
}
public override Type NextQuest
{
get
{
return typeof(MakingContributionSanctuaryQuest);
}
}
/* Needs of the Many - Sanctuary */
public override object Title
{
get
{
return 1072754;
}
}
/* The way of the Arcanist involves cooperation with others and a strong committment to the community of your
people. We have run low on the cotton we use to pack wounds and our people have need. Bring 10 bales of
cotton to me. */
public override object Description
{
get
{
return 1072763;
}
}
/* You endanger your progress along the path with your unwillingness. */
public override object Refuse
{
get
{
return 1072768;
}
}
/* I care not where you acquire the cotton, merely that you provide it. */
public override object Uncomplete
{
get
{
return 1072775;
}
}
/* Well, where are the cotton bales? */
public override object Complete
{
get
{
return 1074110;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Spellweaving;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class MakingContributionSanctuaryQuest : BaseQuest
{
public MakingContributionSanctuaryQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Board), "boards", 250, 0x1BD7));
this.AddReward(new BaseReward(1074872)); // The opportunity to learn the ways of the Arcanist.
}
public override QuestChain ChainID
{
get
{
return QuestChain.SpellweavingS;
}
}
public override Type NextQuest
{
get
{
return typeof(SuppliesForSanctuaryQuest);
}
}
/* Making a Contribution - Sanctuary */
public override object Title
{
get
{
return 1072755;
}
}
/* We must look to the defense of our people! Bring boards for new arrows. */
public override object Description
{
get
{
return 1072764;
}
}
/* The people have need of these items. You are proving yourself inadequate
to the demands of a member of this community. */
public override object Refuse
{
get
{
return 1072769;
}
}
/* The requirements are simple -- 250 boards. */
public override object Uncomplete
{
get
{
return 1072776;
}
}
/* Well, where are the boards? */
public override object Complete
{
get
{
return 1074152;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Spellweaving;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SuppliesForSanctuaryQuest : BaseQuest
{
public SuppliesForSanctuaryQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SackFlour), "sack of flour", 1, 0x1039));
this.AddObjective(new ObtainObjective(typeof(JarHoney), "jar of honey", 10, 0x9EC));
this.AddObjective(new ObtainObjective(typeof(FishSteak), "fish steak", 20, 0x97B));
this.AddReward(new BaseReward(1074872)); // The opportunity to learn the ways of the Arcanist.
}
public override QuestChain ChainID
{
get
{
return QuestChain.SpellweavingS;
}
}
public override Type NextQuest
{
get
{
return typeof(TheHumanBlightQuest);
}
}
/* Supplies for Sanctuary */
public override object Title
{
get
{
return 1072756;
}
}
/* With health and defense assured, we need look to the need of the community
for food and drink. We will feast on fish steaks, sweets, and wine. You
will supply the ingredients, the cooks will prepare the meal. As a Arcanist
relies upon others to build focus and lend their power to her workings, the
community needs the effort of all to survive. */
public override object Description
{
get
{
return 1072765;
}
}
/* Do not falter now. You have begun to show promise. */
public override object Refuse
{
get
{
return 1072770;
}
}
/* Where are the items you've been tasked to supply for the feast? */
public override object Uncomplete
{
get
{
return 1072777;
}
}
/* Ah good, you're back. We're eager for the feast. */
public override object Complete
{
get
{
return 1074158;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Spellweaving;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheHumanBlightQuest : BaseQuest
{
public TheHumanBlightQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SeveredHumanEars), "severed human ears", 30, 0x312F));
this.AddReward(new BaseReward(typeof(ArcaneCircleScroll), 1071026)); // Arcane Circle
this.AddReward(new BaseReward(typeof(GiftOfRenewalScroll), 1071027)); // Gift of Renewal
this.AddReward(new BaseReward(typeof(SpellweavingBook), 1031600)); // Spellweaving Spellbook
}
public override QuestChain ChainID
{
get
{
return QuestChain.SpellweavingS;
}
}
/* The Human Blight */
public override object Title
{
get
{
return 1072757;
}
}
/* You have proven your desire to contribute to the community and serve the people. Now you must
demonstrate your willingness to defend Sosaria from the greatest blight that plagues her. The
human vermin that have spread as a disease, despoiling the land are the greatest blight we face.
Kill humans and return to me the proof of your actions. Bring me 30 human ears. */
public override object Description
{
get
{
return 1072766;
}
}
/* You must serve Sosaria with all your heart and strength. Your unwillingness does not reflect
favorably upon you. */
public override object Refuse
{
get
{
return 1072771;
}
}
/* Why do you delay? The human blight must be averted. */
public override object Uncomplete
{
get
{
return 1072778;
}
}
/* I will take the ears you have collected now. Hand them here. */
public override object Complete
{
get
{
return 1074160;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Spellweaving;
}
public override void GiveRewards()
{
this.Owner.Spellweaving = true;
base.GiveRewards();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,398 @@
using System;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class TamingPetQuest : BaseQuest
{
public TamingPetQuest()
: base()
{
AddObjective(new InternalObjective());
AddReward(new BaseReward(1157538)); // A step closer to mastering Animal Training.
}
public override QuestChain ChainID{get {return QuestChain.AnimalTraining; } }
public override Type NextQuest { get { return typeof(UsingAnimalLoreQuest); } }
/* Discovering Animal Training */
public override object Title { get { return 1157527; } }
/*Years of patience and meticulous study have paid off! New Animal Training techniques have been discovered!
* Animal tamers may now train their pets, teaching them new ways to fight and survive! The first step is to
* tame a creature. Find a creature in the wild, and using your animal taming skill - tame it!*/
public override object Description { get { return 1157528; } }
/* The life of an animal trainer is not for everyone, return to an Animal Trainer if you wish to try again. */
public override object Refuse { get { return 1157530; } }
/* Find a creature in the wild, and using the animal taming skill - tame it! */
public override object Uncomplete { get { return 1157531; } }
/* Well done! Now that you have your pet it is time to start training! */
public override object Complete { get { return 1157532; } }
public override int AcceptSound { get { return 0x2E8; } }
public override int CompleteMessage { get { return 1157539; } } // // You've completed an Animal Training quest! Visit an Animal Trainer to continue!
public static void CheckTame(PlayerMobile pm)
{
if (pm == null)
return;
var quest = QuestHelper.GetQuest(pm, typeof(TamingPetQuest));
if (quest != null && !quest.Completed)
{
quest.Objectives[0].CurProgress++;
quest.OnCompleted();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public class InternalObjective : BaseObjective
{
public override object ObjectiveDescription { get { return 1157529; } } // Tame a Creature
public InternalObjective()
: base(1)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
public class UsingAnimalLoreQuest : BaseQuest
{
public UsingAnimalLoreQuest()
: base()
{
AddObjective(new InternalObjective());
AddReward(new BaseReward(1157538)); // A step closer to mastering Animal Training.
}
public override QuestChain ChainID { get { return QuestChain.AnimalTraining; } }
public override Type NextQuest { get { return typeof(LeadingIntoBattleQuest); } }
//public override bool DoneOnce { get { return true; } }
/* Discovering Animal Training */
public override object Title { get { return 1157527; } }
/*Now that your pet is tame, you must begin the training process. Pets will train while they are engaged in
* combat, and will progress as they battle other creatures. Pets train best against wild creatures, and will
* learn the most from the fiercest creatures in the realm! There is a limit to how much a pet can learn from
* a single foe, so make sure your pet has fresh adversaries!<br><br>When you are ready to begin the training
* process, use the Animal Lore skill on your pet and select "Begin Animal Training." When your pet has
* completed the training process you can teach them new ways to fight and survive!*/
public override object Description { get { return 1157533; } }
/* The life of an animal trainer is not for everyone, return to an Animal Trainer if you wish to try again. */
public override object Refuse { get { return 1157530; } }
/* When you are ready to begin the training process, use the Animal Lore skill on your pet and select "Begin Animal Training." */
public override object Uncomplete { get { return 1157535; } }
/* Well done! Now that your pet has begun the Animal Training process return to the Animal Trainer to learn more about the next steps. */
public override object Complete { get { return 1157536; } }
public override void OnCompleted()
{
Owner.SendLocalizedMessage(1157536, null, 0x23); // Well done! Now that your pet has begun the Animal Training process return to the Animal Trainer to learn more about the next steps.
Owner.PlaySound(CompleteSound);
}
public static void CheckComplete(PlayerMobile pm)
{
if (pm == null)
return;
var quest = QuestHelper.GetQuest(pm, typeof(UsingAnimalLoreQuest));
if (quest != null && !quest.Completed)
{
quest.Objectives[0].CurProgress++;
quest.OnCompleted();
}
}
public class InternalObjective : BaseObjective
{
public override object ObjectiveDescription { get { return 1157534; } }
/*Use the Animal Lore Skill on your pet and select "Begin Animal Training."<br><br> */
public InternalObjective()
: base(1)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class LeadingIntoBattleQuest : BaseQuest
{
public LeadingIntoBattleQuest()
: base()
{
AddObjective(new InternalObjective());
AddReward(new BaseReward(1157538)); // A step closer to mastering Animal Training.
}
public override QuestChain ChainID { get { return QuestChain.AnimalTraining; } }
public override Type NextQuest { get { return typeof(TeachingSomethingNewQuest); } }
//public override bool DoneOnce { get { return true; } }
/* Discovering Animal Training */
public override object Title { get { return 1157527; } }
/*Now that you have started the training process it is time to lead your pet into battle! Pets will train while
* they are engaged in combat, and will progress as they battle other creatures. Pets train best against wild
* creatures, and will learn the most from the fiercest creatures in the realm! There is a limit to how much a
* pet can learn from a single foe, so make sure your pet has fresh adversaries! When the "Pet Training Progress"
* bar is full, your pet is ready to learn new ways to fight and survive. <br><br>Now you must lead your pet into
* the wild and battle it against other creatures!*/
public override object Description { get { return 1157540; } }
/* The life of an animal trainer is not for everyone, return to an Animal Trainer if you wish to try again. */
public override object Refuse { get { return 1157530; } }
/* Lead your pet into the wild and battle it against other creatures until the "Pet Training Progress" bar is full.
* Remember Pets train best against wild creatures, and will learn the most from the fiercest creatures in the realm!
* There is a limit to how much a pet can learn from a single foe, so make sure your pet has fresh adversaries! */
public override object Uncomplete { get { return 1157542; } }
/* Well done! Now that your pet has begun the Animal Training process return to the Animal Trainer to learn more about the next steps. */
public override object Complete { get { return 1157536; } }
public override void OnCompleted()
{
Owner.SendLocalizedMessage(1157536, null, 0x23); // Well done! Now that your pet has begun the Animal Training process return to the Animal Trainer to learn more about the next steps.
Owner.PlaySound(CompleteSound);
}
public static void CheckComplete(PlayerMobile pm)
{
if (pm == null)
return;
var quest = QuestHelper.GetQuest(pm, typeof(LeadingIntoBattleQuest));
if (quest != null && !quest.Completed)
{
quest.Objectives[0].CurProgress++;
quest.OnCompleted();
}
}
public class InternalObjective : BaseObjective
{
public override object ObjectiveDescription { get { return 1157541; } }
/*Lead your pet into the wild and battle it against other creatures until the "Pet Training Progress" bar is full.*/
public InternalObjective()
: base(1)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TeachingSomethingNewQuest : BaseQuest
{
public TeachingSomethingNewQuest()
: base()
{
AddObjective(new InternalObjective());
AddReward(new BaseReward(1157538)); // A step closer to mastering Animal Training.
}
public override QuestChain ChainID { get { return QuestChain.AnimalTraining; } }
public override Type NextQuest { get { return null; } }
public override bool DoneOnce { get { return true; } }
/* Discovering Animal Training */
public override object Title { get { return 1157527; } }
/*Now that your pet has fully trained, it is time to teach it something new! Use the Animal Lore skill on your pet and select
* "Pet Training Options." The Animal Training menu lists all of the available training properties you can apply to the pet.
* <br><br>The Categories pane shows the category of available properties:<br><br>Stats and Resists allow you to increase
* individual Stat and Resist properties for the pet.<br><br>Increase Magic Skill Caps and Increase Combat Skill Caps allow
* you to increase skill caps for various magical and combat related skills. This process requires the use of Power Scrolls
* and only increases the skill cap, you will still need to train the pet in the specific skill through traditional pet skill
* training. <br><br>Magical Abilities allow you to give the pet magical abilities in one of several spell schools<br><br>Special
* Abilities allow you to give the pet special abilities, different than those traditionally found as weapon special moves.
* <br><br>Special Moves allow you to give the pet special moves, similar to those traditionally found as weapon special moves.
* <br><br>Area Effect Abilities allow you to give the pet an area attack, targeting multiple adversaries within an area.<br><br>
* When you train your pet, the number of control slots the pet requires will increase. The maximum number of control slots any
* pet can have is 5, however individual pets have maximum control slots they can be trained to.<br><br>A pet can only learn so
* much during each training level. As you mix and match properties from the Animal Training menu, the amount of available training
* points will decrease based on your selections. Different property selections have different training point costs. When you are
* ready to apply a new property to your pet, select "Train Pet" and confirm you are ready to do so!*/
public override object Description { get { return 1157545; } }
/* The life of an animal trainer is not for everyone, return to an Animal Trainer if you wish to try again. */
public override object Refuse { get { return 1157530; } }
/*Use the Animal Lore skill on your pet and select "Pet Training Options" to mix and match which properties
* you will train your pet. When you are satisfied with the property you have chosen select "Train Pet"
* and confirm the training!.*/
public override object Uncomplete { get { return 1157546; } }
/* You have Discovered Animal Training! Train new pets and mix and match properties to create unique variations of pets to take into
* battle! Good Luck, Animal Trainer! */
public override object Complete { get { return 1157547; } }
public override void OnCompleted()
{
Owner.SendLocalizedMessage(1157539, null, 0x23); // You've completed an Animal Training quest! Visit an Animal Trainer to continue!
Owner.PlaySound(CompleteSound);
}
public static void CheckComplete(PlayerMobile pm)
{
if (pm == null)
return;
var quest = QuestHelper.GetQuest(pm, typeof(TeachingSomethingNewQuest));
if (quest != null && !quest.Completed)
{
quest.Objectives[0].CurProgress++;
quest.OnCompleted();
}
}
public override void GiveRewards()
{
base.GiveRewards();
Owner.AddToBackpack(new EthologistTitleDeed());
}
public class InternalObjective : BaseObjective
{
public override object ObjectiveDescription { get { return 1157546; } }
/*Use the Animal Lore skill on your pet and select "Pet Training Options" to mix and match which properties
* you will train your pet. When you are satisfied with the property you have chosen select "Train Pet"
* and confirm the training!.*/
public InternalObjective()
: base(1)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+249
View File
@@ -0,0 +1,249 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class DoughtyWarriorsQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.DoughtyWarriors; } }
public override Type NextQuest { get { return typeof(DoughtyWarriors2Quest); } }
public override bool DoneOnce { get { return true; } }
/* Doughty Warriors */
public override object Title { get { return 1075379; } }
/*Youngsters these days! Sorry, I didn’t introduce myself. I’m Kane,
* the Master of Arms for this city. This lot of trainees I got, they’re
* not worth a bucket of sour spit. You know the invasion some years back?
* Well, some of these pups weren’t even born then! What I need is an example,
* something that will put some steel into their spines. You seem pretty tough,
* what do you say to helping me out? */
public override object Description { get { return 1075380; } }
/* Ah. I see. Never mind then. */
public override object Refuse { get { return 1075382; } }
/* You’ll find mongbats all over the place. They’re a real pest.
* Once you’ve killed ten of them, come back and see me again. */
public override object Uncomplete { get { return 1075383; } }
/* Excellent! That’s the old fighting spirit. */
public override object Complete { get { return 1075384; } }
public DoughtyWarriorsQuest()
: base()
{
AddObjective(new SlayObjective(typeof(Mongbat), "Mongbats", 10));
AddReward(new BaseReward(1075381)); // Show them what a real warrior is made of!
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class DoughtyWarriors2Quest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.DoughtyWarriors; } }
public override Type NextQuest { get { return typeof(DoughtyWarriors3Quest); } }
public override bool DoneOnce { get { return true; } }
/* Doughty Warriors */
public override object Title { get { return 1075404; } }
/* You did great work. Thanks to you, my puppies are training harder than ever.
* I think they could actually take a mongbat now. I’m still worried they’ll
* slack off, though. What say you to slaying some Imps for me now? Show them
* how it’s really done? */
public override object Description { get { return 1075405; } }
/* You’re pretty sad. When I was a young warrior, I wasn’t one to walk away from a challenge. */
public override object Refuse { get { return 1075407; } }
/* You won’t find many imps on this continent. Mostly, they’re native to Ilshenar. Might be a
* few up around the hedge maze east of Skara Brae, though. */
public override object Uncomplete { get { return 1075408; } }
/* Hah! I knew you were up to the challenge. */
public override object Complete { get { return 1075409; } }
public DoughtyWarriors2Quest()
: base()
{
AddObjective(new SlayObjective(typeof(Imp), "Imps", 10));
AddReward(new BaseReward(1075406)); // Show them what a real warrior is REALLY made of!
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class DoughtyWarriors3Quest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.DoughtyWarriors; } }
public override bool DoneOnce { get { return true; } }
/* Doughty Warriors */
public override object Title { get { return 1075410; } }
/* You’ve really inspired my trainees. They’re working harder than ever. I’ve got
* one more request for you, and it’s a big one. Those mongbats didn’t pose a problem.
* You mowed down the imps with no trouble. But do you dare take on a couple of daemons? */
public override object Description { get { return 1075411; } }
/* What? You’re not scared of a couple of lousy daemons, are you? */
public override object Refuse { get { return 1075413; } }
/* There’s all kinds of daemons you can kill. There are some near the hedge maze,
* and some really powerful ones in Dungeon Doom. */
public override object Uncomplete { get { return 1075414; } }
/* Thanks for helping me out. You’re a real hero to my guards. Valor is its own reward,
* but maybe you wouldn’t mind wearing this sash. We don’t give these out to just
* anyone, you know! */
public override object Complete { get { return 1075415; } }
public DoughtyWarriors3Quest()
: base()
{
AddObjective(new SlayObjective(typeof(Daemon), "Daemons", 10));
AddReward(new BaseReward(typeof(SashOfMight), 1075412)); // Sash of Might
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Kane : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof( DoughtyWarriorsQuest )
};
}
}
[Constructable]
public Kane()
: base("Kane", "the Master of Arms")
{
if (!(this is MondainQuester))
this.Name = "Kane";
this.Title = "the Master of Arms";
}
public Kane(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
//Hue = 0x840C;
HairItemID = 0x203C;
HairHue = 0x3B3;
}
public override void InitOutfit()
{
AddItem( new PlateArms() );
AddItem( new PlateChest() );
AddItem( new PlateGloves() );
AddItem( new StuddedGorget() );
AddItem( new PlateLegs() );
switch ( Utility.Random( 4 ) )
{
case 0: AddItem( new PlateHelm() ); break;
case 1: AddItem( new NorseHelm() ); break;
case 2: AddItem( new CloseHelm() ); break;
case 3: AddItem( new Helmet() ); break;
}
switch ( Utility.Random( 3 ) )
{
case 0: AddItem( new BodySash( 0x482 ) ); break;
case 1: AddItem( new Doublet( 0x482 ) ); break;
case 2: AddItem( new Tunic( 0x482 ) ); break;
}
AddItem( new Broadsword() );
Item shield = new MetalKiteShield();
shield.Hue = Utility.RandomNondyedHue();
AddItem( shield );
switch ( Utility.Random( 2 ) )
{
case 0: AddItem( new Boots() ); break;
case 1: AddItem( new ThighBoots() ); break;
}
PackGold( 100, 200 );
Blessed = true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+510
View File
@@ -0,0 +1,510 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class TheJoysOfLifeQuest : BaseQuest
{
public TheJoysOfLifeQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(AriellesBauble), "arielle's baubles", 3, 0x23B));
this.AddReward(new BaseReward(1072809)); // The boon of Arielle.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* The Joys of Life */
public override object Title
{
get
{
return 1072787;
}
}
/* *giggle* So serious, so grim! *tickle* Enjoy life! Have fun! Laugh! Be merry! *giggle* Find three
of my baubles ... *giggle* I hid them! *giggles hysterically* Hid them! La la la! Bring them quickly! They
are magical and will hide themselves again if you are too slow. */
public override object Description
{
get
{
return 1072832;
}
}
/* *giggle* Too serious. Too thinky! */
public override object Refuse
{
get
{
return 1072833;
}
}
/* Magical baubles hidden, find them as you're bidden! *giggle* */
public override object Uncomplete
{
get
{
return 1072834;
}
}
/* *giggle* So pretty! */
public override object Complete
{
get
{
return 1074177;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074944, null, 0x23); // You have gained the boon of Arielle! You have been taught the importance of laughter and light spirits. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class DefendingTheHerdQuest : BaseQuest
{
public DefendingTheHerdQuest()
: base()
{
this.AddObjective(new EscortObjective("Bravehorn's drinking pool"));
this.AddReward(new BaseReward(1072806)); // The boon of Bravehorn.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Defending the Herd */
public override object Title
{
get
{
return 1072785;
}
}
/* *snort* ... guard-mates ... guard-herd *hoof stomp* ... defend-with-hoof-and-horn ... thirsty-drink.
*proud head-toss* */
public override object Description
{
get
{
return 1072825;
}
}
/* *snort* */
public override object Refuse
{
get
{
return 1072826;
}
}
/* *impatient hoof stomp* ... thirsty herd ... water scent. */
public override object Uncomplete
{
get
{
return 1072827;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074942, null, 0x23); // You have gained the boon of Bravehorn! You have glimpsed the nobility of those that sacrifice themselves for their people. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class CaretakerOfTheLandQuest : BaseQuest
{
public CaretakerOfTheLandQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SosariaSap), "sap of sosaria", 1, 0x1848));
this.AddReward(new BaseReward(1072804)); // The boon of Strongroot.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Caretaker of the Land */
public override object Title
{
get
{
return 1072783;
}
}
/* Hrrrrr. Hurrrr. Huuuman. *creaking branches* Suuun on baaark, roooooots diiig deeeeeep, wiiind caaaresses
leeeaves … Hrrrrr. Saaap of Sooosaria feeeeeeds us. Hrrrrr. Huuuman leeearn. Caaaretaker of plaaants … teeend
… prooove.<br> */
public override object Description
{
get
{
return 1072812;
}
}
/* Hrrrrr. Hrrrrr. Huuuman. */
public override object Refuse
{
get
{
return 1072813;
}
}
/* Hrrrr. Hrrrr. Roooooots neeeeeed saaap of Sooosaria. Hrrrrr. Roooooots tiiingle neeeaaar Yeeew. Seeeaaarch. Hrrrr! */
public override object Uncomplete
{
get
{
return 1072814;
}
}
/* Thiiirsty. Hurrr. Hurrr. */
public override object Complete
{
get
{
return 1074175;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074941, null, 0x23); // You have gained the boon of Strongroot! You have been approved by one whose roots touch the bones of Sosaria. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SeasonsQuest : BaseQuest
{
public SeasonsQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(RawFishSteak), "raw fish steaks", 20, 0x097A));
this.AddReward(new BaseReward(1072803)); // The boon of Maul.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Seasons */
public override object Title
{
get
{
return 1072782;
}
}
/* *rumbling growl* *sniff* ... not-smell ... seek-fight ... not-smell ... fear-stench ... *rumble* ... cold-soon-time
comes ... hungry ... eat-fish ... sleep-soon-time ... *deep fang-filled yawn* ... much-fish. */
public override object Description
{
get
{
return 1072802;
}
}
/* *yawn* ... cold-soon-time ... *growl* */
public override object Refuse
{
get
{
return 1072810;
}
}
/* *sniff* *sniff* ... not-much-fish ... hungry ... *grumble* */
public override object Uncomplete
{
get
{
return 1072811;
}
}
/* *sniff* fish! much-fish! */
public override object Complete
{
get
{
return 1074174;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074940, null, 0x23); // You have gained the boon of Maul! Your understanding of the seasons grows. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheBalanceOfNatureQuest : BaseQuest
{
public TheBalanceOfNatureQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(TimberWolf), "timber wolves", 15, "Huntsman's Forest"));
this.AddReward(new BaseReward(1072807)); // The boon of the Huntsman.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* The Balance of Nature */
public override object Title
{
get
{
return 1072786;
}
}
/* Ho, there human. Why do you seek out the Huntsman? The hunter serves the land by culling both predators and prey. The hunter
maintains the essential balance of life and does not kill for sport or glory. If you seek my favor, human, then demonstrate you
are capable of the duty. Cull the wolves nearby. */
public override object Description
{
get
{
return 1072829;
}
}
/* Then begone. I have no time to waste on you, human. */
public override object Refuse
{
get
{
return 1072830;
}
}
/* The timber wolves are easily tracked, human. */
public override object Uncomplete
{
get
{
return 1072831;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074943, null, 0x23); // You have gained the boon of the Huntsman! You have been given a taste of the bittersweet duty of those who guard the balance. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class WisdomOfTheSphynxQuest : BaseQuest
{
public WisdomOfTheSphynxQuest()
: base()
{
this.AddObjective(new InternalObjective());
this.AddReward(new BaseReward(1072805)); // The boon of Enigma.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Wisdom of the Sphynx */
public override object Title
{
get
{
return 1072784;
}
}
/* I greet thee human and divine my boon thou seek. Convey hence the object of my riddle and I shall reward thee
with thy desire.<br><br>Three lives have I.<br>Gentle enough to soothe the skin,<br>Light enough to caress the sky,
<br>Hard enough to crack rocks<br>What am I? */
public override object Description
{
get
{
return 1072822;
}
}
/* As thou wish, human. */
public override object Refuse
{
get
{
return 1072823;
}
}
/* I give thee a hint then human. The answer to my riddle must be held carefully or it cannot be contained at all.
Bring this elusive item to me in a suitable container. */
public override object Uncomplete
{
get
{
return 1072824;
}
}
/* Ah, thus it ends. */
public override object Complete
{
get
{
return 1074176;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074945, null, 0x23); // You have gained the boon of Enigma! You are wise enough to know how little you know. You are one step closer to claiming your elven heritage.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
private class InternalObjective : ObtainObjective
{
public InternalObjective()
: base(typeof(Pitcher), "answer to the riddle", 1)
{
}
public override bool IsObjective(Item item)
{
if (base.IsObjective(item))
{
Pitcher pitcher = (Pitcher)item;
if (pitcher.Content == BeverageType.Water && !pitcher.IsEmpty)
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
}
+612
View File
@@ -0,0 +1,612 @@
using System;
namespace Server.Engines.Quests.Ninja
{
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I><U>Important Quest Information</U></I><BR><BR>
*
* During your quest, any important information that a
* <a href = "?ForceTopic31">NPC</a> gives you, will appear in a
* window such as this one. You can review the information at
* any time during your quest.<BR><BR><U>Getting Help</U><BR><BR>
*
* Some of the text you will come across during your quest, will
* be underlined <a href = "?ForceTopic73">links to the codex of
* wisdom</a>, or online help system. You can click on the text
* to get detailed information on the underlined subject. You
* may also access the Codex Of Wisdom by pressing "F1" or by
* clicking on the "?" on the toolbar at the top of your screen.<BR><BR>
*
* <U>Context Menus</U><BR><BR>Context menus can be called up by
* single left-clicking (or Shift + single left-click, if you
* changed it) on most objects or NPCs in the world. Nearly
* everything, including your own avatar will have context menus
* available. Bringing up your avatar's context menu will give
* you options to cancel your quest and review various quest
* information.<BR><BR>
*/
return 1049092;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindEminoBeginObjective());
}
}
public class FindZoelConversation : QuestConversation
{
public FindZoelConversation()
{
}
public override object Message
{
get
{
/* Ah, another fledgling unfurls its wings. Welcome to my
* home young one. <BR><BR>
*
* I am Daimyo Emino, a passionate collector of sorts.
* One who is vengeful towards those impeding my reign. <BR><BR>
*
* You have the look of someone who could help me but
* your skills are untested. Are you willing to prove
* your mettle as my hireling? <BR><BR>
*
* Elite Ninja Zoel awaits you in the backyard. He will
* lead you to the first trial. You will be directed
* further when you arrive at your destination. You
* should speak to him before exploring the yard or cave entrance.
*/
return 1063175;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindZoelObjective());
}
}
public class RadarConversation : QuestConversation
{
public RadarConversation()
{
}
public override object Message
{
get
{
/* To view the surrounding area, you should learn about the Radar Map.<BR><BR>
*
* The Radar Map (or Overhead View) can be opened by pressing 'ALT-R'
* on your keyboard. It shows your immediate surroundings from a
* bird's eye view.<BR><BR>
*
* Pressing ALT-R twice, will enlarge the Radar Map a little.
* Use the Radar Map often as you travel throughout the world
* to familiarize yourself with your surroundings.
* */
return 1063033;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class EnterCaveConversation : QuestConversation
{
public EnterCaveConversation()
{
}
public override object Message
{
get
{
/* <I>Zoel studies your face as you approach him. Wryly, he says:</I><BR><BR>
*
* Daimyo Emino has sent another already? The stains from the
* last have not yet dried! <BR><BR>
*
* No matter, we’ll finish you off and clean it all at once, eh? <BR><BR>
*
* Now to the point, your only task is to survive in the abandoned inn.<BR><BR>
*
* You will be instructed when you need to act and when you should
* return to one of us. <BR><BR>
*
* Only a true Ninja is deft enough to finish and remain alive.<BR><BR>
*
* Your future... or your demise... lies in this cave beyond. <BR><BR>
*
* Now go.
*/
return 1063177;
}
}
public override void OnRead()
{
this.System.AddObjective(new EnterCaveObjective());
}
}
public class SneakPastGuardiansConversation : QuestConversation
{
public SneakPastGuardiansConversation()
{
}
public override object Message
{
get
{
/* A glowing archway stands before you. <BR><BR>
*
* To either side of its frame are mounted demon heads,
* breathing fire and watching your every move. <BR><BR>
*
* To pass through, you must first vanish from the demons’
* sight. Only then can you slowly traverse the entryway.
*/
return 1063180;
}
}
public override void OnRead()
{
this.System.AddObjective(new SneakPastGuardiansObjective());
}
}
public class NeedToHideConversation : QuestConversation
{
public NeedToHideConversation()
{
}
public override object Message
{
get
{
/* You’ll need to hide in order to pass through the door. <BR><BR>
*
* To find out how to use active skills, visit the
* <a href = "?ForceTopic73">Codex of Wisdom</a>.
* To activate a skill, locate it on your skills
* list and click the blue button located to the
* left of the skill's name.<br><br>Once you have
* successfully hidden, you may move slowly through the door.
*
*/
return 1063181;
}
}
}
public class UseTeleporterConversation : QuestConversation
{
public UseTeleporterConversation()
{
}
public override object Message
{
get
{
/*
* Through the door lies a short passageway.
* The path ends abruptly at a strange tile on the floor.
* The special tile is known as a teleporter.
* Step on the teleporter tile and you will be transported
* to a new location.
*/
return 1063182;
}
}
public override void OnRead()
{
this.System.AddObjective(new UseTeleporterObjective());
}
}
public class GiveZoelNoteConversation : QuestConversation
{
public GiveZoelNoteConversation()
{
}
public override object Message
{
get
{
/* <I>Daimyo Emino smiles as you approach him:</I> <BR><BR>
*
* I see that you have survived both the first trial and Zoel’s temper. <BR><BR>
*
* For that you have been rewarded with Leggings and Gloves
* befitting your occupation. The material is the only armor
* a <b><I>True Ninja</i></b> needs. <BR><BR>
*
* You have yet to prove yourself fully, young hireling.
* Another trial must be met. Off to Zoel you go.
* Bring him this note so he knows we have spoken.
*/
return 1063184;
}
}
public override void OnRead()
{
this.System.AddObjective(new GiveZoelNoteObjective());
}
}
public class LostNoteConversation : QuestConversation
{
public LostNoteConversation()
{
}
public override object Message
{
get
{
// You have lost my note? I will scribe another for you. Try not to lose this one.
return 1063187;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class GainInnInformationConversation : QuestConversation
{
public GainInnInformationConversation()
{
}
public override object Message
{
get
{
/* <I>Zoel quickly grabs the scroll from your
* hand and reads the note:</i> <BR><BR>
*
* Still alive then? You’ll have to impress me
* further before I will give my approval of
* you to Daimyo Emino. <BR><BR>
*
* You must return to the inn and begin the next trial. <BR><BR>
*
* We believe an associate has, shall we say,
* inadvertently negated our contract. <BR><BR>
*
* Find out what information you can and return
* to Daimyo Emino with the news. And be careful
* not to lose your head.<BR><BR>
*
* The Blue Teleporter Tile in Daimyo Emino’s
* residence will lead you to your fate.
* I suggest you hurry. <BR><BR>
*
* ...And take care to tread softly. There
* is no greater traitor than a heavy footfall upon a path.
*/
return 1063189;
}
}
public override void OnRead()
{
this.System.AddObjective(new GainInnInformationObjective());
}
}
public class ReturnFromInnConversation : QuestConversation
{
public ReturnFromInnConversation()
{
}
public override object Message
{
get
{
/* You quietly approach the door and see
* a woman named Jedah Entille speaking
* to a shady figure in dark clothing.
* You move closer so you can overhear
* the conversation. Fortunately, your
* entrance did not alert the preoccupied party. <BR><BR>
*
* Jedah’s brash voice permeates the air:<I><BR><BR>
*
* Now that it is hidden, we’ll hide out here
* until Daimyo Emino forgets about us.
* Once he realizes his beloved sword is missing,
* he’ll surely start looking for the thieves.
* We will be long gone by that time. </I><BR><BR>
*
* After overhearing the conversation,
* you understand why you were sent on
* this trial. You must immediately tell
* Daimyo Emino what you have learned.
* */
return 1063196;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnFromInnObjective());
}
}
public class SearchForSwordConversation : QuestConversation
{
public SearchForSwordConversation()
{
}
public override object Message
{
get
{
/* <I>Daimyo Emino frowns as you relay the information.
* He pauses for a moment before speaking to you:</i> <BR><BR>
*
* Jedah was once one of my most promising students,
* but her greed will be her downfall. <BR><BR>
*
* I will send one of my disciples to deal with her later.
* It is more important to get that sword back first. <BR><BR>
*
* I’m counting on you to find it. She would have kept it
* close to her. Take the White Teleporter, located in my
* backyard, and check inside boxes and chests around the
* treasure room of the inn and return it to me when you
* find it.<BR><BR>
*
* Be very careful. Jedah was an expert with traps and no
* doubt she’s protecting the sword with them. <BR><BR>
*
* If you find a trap, try timing it and you may be able
* to avoid damage. <BR><BR>
*
* I’ve provided you with several heal potions in case you
* become injured. <BR><BR>
*
* In the bag you will also find more clothing appropriate
* to your new found profession. <BR><BR>
*
* Please return the sword to me. I implore you not to take
* anything else that may be hidden in the Inn. <BR><BR>
*
* Thank you.
*/
return 1063199;
}
}
public override void OnRead()
{
this.System.AddObjective(new SearchForSwordObjective());
}
}
public class HallwayWalkConversation : QuestConversation
{
public HallwayWalkConversation()
{
}
public override object Message
{
get
{
/* A narrow hallway greets the teleporter.
* The enclosed space is the perfect setting
* for dangerous traps. Walk through the
* hallway being careful to avoid the traps.
* You may be able to time the traps to avoid injury.
*/
return 1063201;
}
}
public override void OnRead()
{
this.System.AddObjective(new HallwayWalkObjective());
}
}
public class ReturnSwordConversation : QuestConversation
{
public ReturnSwordConversation()
{
}
public override object Message
{
get
{
/* The lid of the chest refuses to budge at first,
* but slowly you are able to pry the lid open. <BR><BR>
*
* Inside lies the sword you have been in search of.
* You quickly take the sword and stash it in your backpack.
* Bring the sword back to Daimyo Emino.
*/
return 1063203;
}
}
public override void OnRead()
{
this.System.AddObjective(new ReturnSwordObjective());
}
}
public class SlayHenchmenConversation : QuestConversation
{
public SlayHenchmenConversation()
{
}
public override object Message
{
get
{
/* Screams echo through the chamber as you walk
* away from the chest. Jedah’s Henchmen have
* become cognizant of your presence. <BR><BR>
*
* It is time for your Ninja Spirit to come alive.
* Slay 3 of the Henchmen before returning to Daimyo Emino.
*/
return 1063205;
}
}
public override void OnRead()
{
this.System.AddObjective(new SlayHenchmenObjective());
}
}
public class ContinueSlayHenchmenConversation : QuestConversation
{
public ContinueSlayHenchmenConversation()
{
}
public override object Message
{
get
{
// Continue killing the henchmen!
return 1063208;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class GiveEminoSwordConversation : QuestConversation
{
public GiveEminoSwordConversation()
{
}
public override object Message
{
get
{
/* Go to Daimyo Emino. Go back through the chamber the way you came.<BR><BR>
*
* Give Daimyo Emino the sword when you've returned to his side.
*/
return 1063211;
}
}
public override void OnRead()
{
this.System.AddObjective(new GiveEminoSwordObjective());
}
}
public class LostSwordConversation : QuestConversation
{
public LostSwordConversation()
{
}
public override object Message
{
get
{
// What? You have returned without the sword? You need to go back and get it again!
return 1063212;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class EarnGiftsConversation : QuestConversation
{
public EarnGiftsConversation()
{
}
public override object Message
{
get
{
/* Beyond this path lies Zento City, your future home.
* To the right of the cave entrance you will find a luminous oval
* object known as a Moongate, step through it and you'll
* find yourself in Zento.<BR><BR>
*
* You may want to visit Ansella Gryen when you arrive. <BR><BR>
*
* Please accept the gifts I have placed in your pack. You
* have earned them. Farewell for now.
*/
return 1063216;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
public class EarnLessGiftsConversation : QuestConversation
{
public EarnLessGiftsConversation()
{
}
public override object Message
{
get
{
/* You have earned these gifts for returning the sword.
* For that I thank you. <BR><BR>
*
* However, your reward has been lessened by your greed
* in the treasure room. Do not think I did not notice your full pockets.
*/
return 1063217;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
}
+176
View File
@@ -0,0 +1,176 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Ninja
{
public class EminosUndertakingQuest : QuestSystem
{
private static readonly Type[] m_TypeReferenceTable = new Type[]
{
typeof(Ninja.AcceptConversation),
typeof(Ninja.FindZoelConversation),
typeof(Ninja.RadarConversation),
typeof(Ninja.EnterCaveConversation),
typeof(Ninja.SneakPastGuardiansConversation),
typeof(Ninja.NeedToHideConversation),
typeof(Ninja.UseTeleporterConversation),
typeof(Ninja.GiveZoelNoteConversation),
typeof(Ninja.LostNoteConversation),
typeof(Ninja.GainInnInformationConversation),
typeof(Ninja.ReturnFromInnConversation),
typeof(Ninja.SearchForSwordConversation),
typeof(Ninja.HallwayWalkConversation),
typeof(Ninja.ReturnSwordConversation),
typeof(Ninja.SlayHenchmenConversation),
typeof(Ninja.ContinueSlayHenchmenConversation),
typeof(Ninja.GiveEminoSwordConversation),
typeof(Ninja.LostSwordConversation),
typeof(Ninja.EarnGiftsConversation),
typeof(Ninja.EarnLessGiftsConversation),
typeof(Ninja.FindEminoBeginObjective),
typeof(Ninja.FindZoelObjective),
typeof(Ninja.EnterCaveObjective),
typeof(Ninja.SneakPastGuardiansObjective),
typeof(Ninja.UseTeleporterObjective),
typeof(Ninja.GiveZoelNoteObjective),
typeof(Ninja.GainInnInformationObjective),
typeof(Ninja.ReturnFromInnObjective),
typeof(Ninja.SearchForSwordObjective),
typeof(Ninja.HallwayWalkObjective),
typeof(Ninja.ReturnSwordObjective),
typeof(Ninja.SlayHenchmenObjective),
typeof(Ninja.GiveEminoSwordObjective)
};
private bool m_SentRadarConversion;
public EminosUndertakingQuest(PlayerMobile from)
: base(from)
{
}
// Serialization
public EminosUndertakingQuest()
{
}
public override Type[] TypeReferenceTable
{
get
{
return m_TypeReferenceTable;
}
}
public override object Name
{
get
{
// Emino's Undertaking
return 1063173;
}
}
public override object OfferMessage
{
get
{
// Your value as a Ninja must be proven. Find Daimyo Emino and accept the test he offers.
return 1063174;
}
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.MaxValue;
}
}
public override bool IsTutorial
{
get
{
return true;
}
}
public override int Picture
{
get
{
return 0x15D5;
}
}
public static bool HasLostNoteForZoel(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (pm == null)
return false;
QuestSystem qs = pm.Quest;
if (qs is EminosUndertakingQuest)
{
if (qs.IsObjectiveInProgress(typeof(GiveZoelNoteObjective)))
{
Container pack = from.Backpack;
return (pack == null || pack.FindItemByType(typeof(NoteForZoel)) == null);
}
}
return false;
}
public static bool HasLostEminosKatana(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (pm == null)
return false;
QuestSystem qs = pm.Quest;
if (qs is EminosUndertakingQuest)
{
if (qs.IsObjectiveInProgress(typeof(GiveEminoSwordObjective)))
{
Container pack = from.Backpack;
return (pack == null || pack.FindItemByType(typeof(EminosKatana)) == null);
}
}
return false;
}
public override void Accept()
{
base.Accept();
this.AddConversation(new AcceptConversation());
}
public override void Slice()
{
if (!this.m_SentRadarConversion && (this.From.Map != Map.Malas || this.From.X < 407 || this.From.X > 431 || this.From.Y < 801 || this.From.Y > 830))
{
this.m_SentRadarConversion = true;
this.AddConversation(new RadarConversation());
}
base.Slice();
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_SentRadarConversion = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_SentRadarConversion);
}
}
}
+392
View File
@@ -0,0 +1,392 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Ninja
{
public class FindEminoBeginObjective : QuestObjective
{
public FindEminoBeginObjective()
{
}
public override object Message
{
get
{
// Your value as a Ninja must be proven. Find Daimyo Emino and accept the test he offers.
return 1063174;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FindZoelConversation());
}
}
public class FindZoelObjective : QuestObjective
{
public FindZoelObjective()
{
}
public override object Message
{
get
{
// Find Elite Ninja Zoel immediately!
return 1063176;
}
}
public override void OnComplete()
{
this.System.AddConversation(new EnterCaveConversation());
}
}
public class EnterCaveObjective : QuestObjective
{
public EnterCaveObjective()
{
}
public override object Message
{
get
{
// Enter the cave and walk through it. You will be tested as you travel along the path.
return 1063179;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(406, 1141, 0), 2))
this.Complete();
}
public override void OnComplete()
{
this.System.AddConversation(new SneakPastGuardiansConversation());
}
}
public class SneakPastGuardiansObjective : QuestObjective
{
private bool m_TaughtHowToUseSkills;
public SneakPastGuardiansObjective()
{
}
public bool TaughtHowToUseSkills
{
get
{
return this.m_TaughtHowToUseSkills;
}
set
{
this.m_TaughtHowToUseSkills = value;
}
}
public override object Message
{
get
{
// Use your Ninja training to move invisibly past the magical guardians.
return 1063261;
}
}
public override void CheckProgress()
{
if (this.System.From.Map == Map.Malas && this.System.From.InRange(new Point3D(412, 1123, 0), 3))
this.Complete();
}
public override void OnComplete()
{
this.System.AddConversation(new UseTeleporterConversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_TaughtHowToUseSkills = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_TaughtHowToUseSkills);
}
}
public class UseTeleporterObjective : QuestObjective
{
public UseTeleporterObjective()
{
}
public override object Message
{
get
{
/* The special tile is known as a teleporter.
* Step on the teleporter tile and you will be transported to a new location.
*/
return 1063183;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GiveZoelNoteConversation());
}
}
public class GiveZoelNoteObjective : QuestObjective
{
public GiveZoelNoteObjective()
{
}
public override object Message
{
get
{
/* Bring the note to Elite Ninja Zoel and speak with him again.
* He is near the cave entrance. You can hand the note to Zoel
* by dragging it and dropping it on his body.
*/
return 1063185;
}
}
public override void OnComplete()
{
this.System.AddConversation(new GainInnInformationConversation());
}
}
public class GainInnInformationObjective : QuestObjective
{
public GainInnInformationObjective()
{
}
public override object Message
{
get
{
/* Take the Blue Teleporter Tile from Daimyo Emino's
* house to the Abandoned Inn. Quietly look around
* to gain information.
*/
return 1063190;
}
}
public override void CheckProgress()
{
Mobile from = this.System.From;
if (from.Map == Map.Malas && from.X > 399 && from.X < 408 && from.Y > 1091 && from.Y < 1099)
this.Complete();
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnFromInnConversation());
}
}
public class ReturnFromInnObjective : QuestObjective
{
public ReturnFromInnObjective()
{
}
public override object Message
{
get
{
// Go back through the blue teleporter and tell Daimyo Emino what you’ve overheard.
return 1063197;
}
}
public override void OnComplete()
{
this.System.AddConversation(new SearchForSwordConversation());
}
}
public class SearchForSwordObjective : QuestObjective
{
public SearchForSwordObjective()
{
}
public override object Message
{
get
{
/* Take the white teleporter and check the chests for the sword.
* Leave everything else behind. Avoid damage from traps you may
* encounter. To use a potion, make sure at least one hand is
* free and double click on the bottle.
*/
return 1063200;
}
}
public override void OnComplete()
{
this.System.AddConversation(new HallwayWalkConversation());
}
}
public class HallwayWalkObjective : QuestObjective
{
private bool m_StolenTreasure;
public HallwayWalkObjective()
{
}
public bool StolenTreasure
{
get
{
return this.m_StolenTreasure;
}
set
{
this.m_StolenTreasure = value;
}
}
public override object Message
{
get
{
/* Walk through the hallway being careful
* to avoid the traps. You may be able to
* time the traps to avoid injury.
*/
return 1063202;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ReturnSwordConversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_StolenTreasure = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_StolenTreasure);
}
}
public class ReturnSwordObjective : QuestObjective
{
public ReturnSwordObjective()
{
}
public override object Message
{
get
{
// Take the sword and bring it back to Daimyo Emino.
return 1063204;
}
}
public override void CheckProgress()
{
Mobile from = this.System.From;
if (from.Map != Map.Malas || from.Y > 992)
this.Complete();
}
public override void OnComplete()
{
this.System.AddConversation(new SlayHenchmenConversation());
}
}
public class SlayHenchmenObjective : QuestObjective
{
public SlayHenchmenObjective()
{
}
public override object Message
{
get
{
// Kill three henchmen.
return 1063206;
}
}
public override int MaxProgress
{
get
{
return 3;
}
}
public override void RenderProgress(BaseQuestGump gump)
{
if (!this.Completed)
{
// Henchmen killed:
gump.AddHtmlLocalized(70, 260, 270, 100, 1063207, BaseQuestGump.Blue, false, false);
gump.AddLabel(70, 280, 0x64, this.CurProgress.ToString());
gump.AddLabel(100, 280, 0x64, "/");
gump.AddLabel(130, 280, 0x64, this.MaxProgress.ToString());
}
else
{
base.RenderProgress(gump);
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is Henchman)
this.CurProgress++;
}
public override void OnComplete()
{
this.System.AddConversation(new GiveEminoSwordConversation());
}
}
public class GiveEminoSwordObjective : QuestObjective
{
public GiveEminoSwordObjective()
{
}
public override object Message
{
get
{
/* You have proven your fighting skills. Bring the Sword to
* Daimyo Emino immediately. Be sure to follow the
* path back to the teleporter.
*/
return 1063210;
}
}
public override void OnComplete()
{
}
}
}
+75
View File
@@ -0,0 +1,75 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class EndingtheThreat : BaseQuest
{
public EndingtheThreat()
: base()
{
this.AddObjective(new SlayObjective(typeof(GrayGoblin), "Gray Goblin", 10));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override object Title
{
get
{
return 1095012;
}
}//Ending the Threat
/*So be it, traveler. I thank you for the courage you have shown in the past. Speak to me again if you change your mind.*/
public override object Description
{
get
{
return 1095014;
}
}
/*So be it, traveler. I thank you for the courage you have shown in the past. Speak to me again if you change your mind.*/
public override object Refuse
{
get
{
return 1095015;
}
}
/*The goblins must learn again to fear humans and elves.
They can be cowed into submission, but if it is not done quickly they will become emboldened and start to venture out of the mountain to the villages and other settlements.
You must not let that happen.*/
public override object Uncomplete
{
get
{
return 1095016;
}
}
/*Oh, have mercy on us! Have you come to kill every one of us?
Take what you will and go! Your kind is more terrible than the mistress!
Woe are we, the gray goblins, we serve the mistress and yet she leaves us to be...*/
public override object Complete
{
get
{
return 1095017;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+101
View File
@@ -0,0 +1,101 @@
using System;
using System.Collections.Generic;
using Server;
using Server.Network;
using Server.Items;
using Server.Mobiles;
using Server.Engines;
using Server.Engines.Quests;
using Server.Gumps;
using Server.Spells.SkillMasteries;
namespace Server.Engines.Quests.TimeLord
{
public class Hawkwind : BaseQuester
{
[Constructable]
public Hawkwind()
: base("the Time Lord")
{
}
public Hawkwind(Serial serial) : base(serial) { }
public override bool CanBeDamaged() { return false; }
public override bool ChangeRace { get { return false; } }
public override void InitBody()
{
Name = "Hawkwind";
Female = false;
Body = Race.Human.MaleBody;
Hue = 33823;
HairItemID = 8252;
FacialHairItemID = 8267;
HairHue = FacialHairHue = 1129;
InitStats(100, 75, 75);
}
public override bool CanPaperdollBeOpenedBy(Mobile from)
{
return from.AccessLevel > AccessLevel.Player;
}
public override void InitOutfit()
{
Robe robe = new Robe();
robe.ItemID = 0x7816;
AddItem(robe); // TODO: Fancy Robe
}
public override int GetAutoTalkRange(PlayerMobile pm)
{
return 3;
}
public override void OnDoubleClick(Mobile from)
{
if (from is PlayerMobile)
{
OnTalk((PlayerMobile)from, false);
}
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
if (player.Quest is TimeForLegendsQuest && ((TimeForLegendsQuest)player.Quest).Objectives.Count == 0)
player.SendGump(new ChooseMasteryGump(player, (TimeForLegendsQuest)player.Quest));
else if (player.Quest == null && CanRecieveQuest(player))
{
Direction = GetDirectionTo(player);
TimeForLegendsQuest quest = new TimeForLegendsQuest(player);
quest.SendOffer();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public bool CanRecieveQuest(Mobile m)
{
foreach (SkillName sk in MasteryInfo.Skills)
{
if (!m.Skills[sk].HasLearnedMastery())
return true;
}
return false;
}
}
}
+51
View File
@@ -0,0 +1,51 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.TimeLord
{
public class TimeForLegendsObjective : QuestObjective
{
public override object Message { get { return 1156341; } } // Prove yourself to Hawkwind, defeat thy foe in order to begin your journey among the Legendary.
public override int MaxProgress { get { return 1; } }
public TimeForLegendsObjective()
{
}
public override void RenderProgress( BaseQuestGump gump )
{
if (System is TimeForLegendsQuest)
{
TimeForLegendsQuest q = System as TimeForLegendsQuest;
if (q.ToSlay == null)
gump.AddHtmlObject(70, 260, 270, 100, this.Completed ? 1049077 : 1049078, BaseQuestGump.Blue, false, false);
else
{
int index = Array.IndexOf(TimeForLegendsQuest.Targets, q.ToSlay);
gump.AddHtmlObject(70, 260, 150, 100, index <= 13 ? 1156324 + index : 1156354 + (index - 14), BaseQuestGump.Blue, false, false);
gump.AddHtmlObject(230, 260, 10, 100, ":", BaseQuestGump.Blue, false, false);
gump.AddHtmlObject(235, 260, 150, 100, this.Completed ? 1046033 : 1046034, BaseQuestGump.Blue, false, false);
}
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if(System is TimeForLegendsQuest && creature.GetType() == ((TimeForLegendsQuest)System).ToSlay)
{
Complete();
}
}
public override void Complete()
{
base.Complete();
System.Complete();
}
}
}
+190
View File
@@ -0,0 +1,190 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Gumps;
using Server.Spells.SkillMasteries;
namespace Server.Engines.Quests.TimeLord
{
public class TimeForLegendsQuest : QuestSystem
{
private Type[] _TypeReferenceTable = new Type[]
{
typeof(TimeForLegendsObjective)
};
public override Type[] TypeReferenceTable { get { return _TypeReferenceTable; } }
public override object Name { get { return 1156338; } } // A Time For Legends
public override object OfferMessage { get { return 1156339; } } /*Greetings Brave Traveler!<br><br>Throughout my travels in time I have forever
encountered those who've reached the pinnacle of their profession. These Legends
are told of in our most cherished tales and are the fabric by which heroes are born.
I offer you now a chance to walk the path of these Legends. Complete my task and
you too shall know the secrets of the Master.*/
public override TimeSpan RestartDelay { get { return TimeSpan.Zero; } }
public override bool IsTutorial { get { return false; } }
public override int Picture { get { return 0x1581; } }
public SkillName Mastery { get; set; }
public Type ToSlay { get; set; }
public TimeForLegendsQuest(PlayerMobile from)
: base(from)
{
}
public TimeForLegendsQuest()
{
}
public override void Accept()
{
base.Accept();
From.SendGump(new ChooseMasteryGump(From, this));
}
public override void Complete()
{
base.Complete();
From.SendLocalizedMessage(1156342); // You have proven your prowess on the battlefield and have completed the first step on the path of the Master!
From.SendLocalizedMessage(1156209); // You have received a mastery primer!
From.SendLocalizedMessage(1152339, "#1028794"); // A reward of ~1_ITEM~ has been placed in your backpack.
From.AddToBackpack(new BookOfMasteries());
var primer = new SkillMasteryPrimer(Mastery, 1);
if(primer != null)
From.AddToBackpack(primer);
}
public static Type[] Targets { get { return _Targets; } }
private static Type[] _Targets = new Type[]
{
typeof(Semidar), typeof(Mephitis), typeof(Rikktor), typeof(LordOaks), typeof(Neira), typeof(Barracoon), typeof(Serado), typeof(Meraktus), typeof(Ilhenir),
typeof(Twaulo), typeof(AbyssalInfernal), typeof(PrimevalLich), typeof(CorgulTheSoulBinder), typeof(CorgulTheSoulBinder) /*dragon turtle*/,
typeof(DreadHorn), typeof(Travesty), typeof(ChiefParoxysmus), typeof(LadyMelisande), typeof(MonstrousInterredGrizzle), typeof(ShimmeringEffusion)
};
public static Type TargetOfTheDay { get; set; }
public static DateTime NextTarget { get; set; }
public static void OnSave(WorldSaveEventArgs e)
{
Timer.DelayCall(TimeSpan.FromSeconds(30), () =>
{
if (DateTime.UtcNow > NextTarget)
{
NextTarget = DateTime.UtcNow + TimeSpan.FromHours(24);
TargetOfTheDay = _Targets[Utility.Random(_Targets.Length)];
}
});
}
public static void Initialize()
{
EventSink.WorldSave += OnSave;
TargetOfTheDay = _Targets[Utility.Random(_Targets.Length)];
Server.Commands.CommandSystem.Register("NewTargetOfTheDay", AccessLevel.GameMaster, e =>
{
TargetOfTheDay = _Targets[Utility.Random(_Targets.Length)];
e.Mobile.SendMessage("New Target of the Day: {0}", TargetOfTheDay.Name);
});
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((int)Mastery);
if (ToSlay != null)
{
writer.Write(0);
writer.Write(ToSlay.Name);
}
else
writer.Write(1);
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
Mastery = (SkillName)reader.ReadInt();
string name = null;
if(reader.ReadInt() == 0)
name = reader.ReadString();
if(name != null)
ToSlay = ScriptCompiler.FindTypeByName(name);
}
}
public class ChooseMasteryGump : Gump
{
public TimeForLegendsQuest Quest { get; set; }
public PlayerMobile User { get; set; }
public ChooseMasteryGump(PlayerMobile user, TimeForLegendsQuest quest)
: base(50, 50)
{
Quest = quest;
User = user;
AddImage(0, 0, 8000);
AddImage(20, 37, 8001);
AddImage(20, 107, 8002);
AddImage(20, 177, 8001);
AddImage(20, 247, 8002);
AddImage(20, 317, 8001);
AddImage(20, 387, 8002);
AddImage(20, 457, 8003);
AddHtmlLocalized(125, 40, 345, 16, 1156340, false, false); // Choose Your Path
int y = 60;
foreach (SkillName skName in MasteryInfo.Skills)
{
Skill sk = User.Skills[skName];
if (sk == null || skName == SkillName.Discordance || skName == SkillName.Provocation || skName == SkillName.Peacemaking)
continue;
if (sk.IsMastery && sk.VolumeLearned == 0)
{
AddButton(30, y, 4005, 4007, (int)skName + 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(75, y, 200, 16, MasteryInfo.GetLocalization(skName), 0x000F, false, false);
y += 20;
}
}
}
public override void OnResponse(Network.NetState state, RelayInfo info)
{
if (info.ButtonID == 0 && User.Quest != null && User.Quest is TimeForLegendsQuest)
User.Quest.Cancel();
int id = info.ButtonID - 1;
if (id >= 0 && id < SkillInfo.Table.Length)
{
Quest.Mastery = (SkillName)id;
Quest.ToSlay = TimeForLegendsQuest.TargetOfTheDay;
Quest.AddObjective(new TimeForLegendsObjective());
}
}
}
}
+257
View File
@@ -0,0 +1,257 @@
using Server;
using System;
using Server.Engines.Quests;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using Server.Multis;
namespace Server.Engines.MyrmidexInvasion
{
public static class GenerateMyrmidexQuest
{
public static void Generate()
{
Map map = Map.TerMur;
int z = -19;
Static s = new Static(40142);
s.MoveToWorld(new Point3D(888, 2303, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(889, 2304, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(896, 2295, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(897, 2296, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(904, 2303, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(905, 2304, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(896, 2311, z), map);
s = new Static(40142);
s.MoveToWorld(new Point3D(897, 2312, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(887, 2304, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(888, 2305, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(895, 2296, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(896, 2297, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(903, 2304, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(904, 2305, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(895, 2312, z), map);
s = new Static(40169);
s.MoveToWorld(new Point3D(896, 2313, z), map);
z = -20;
s = new Static(40161);
s.MoveToWorld(new Point3D(897, 2305, z), map);
s = new Static(40165);
s.MoveToWorld(new Point3D(894, 2306, z), map);
MoonstonePowerGeneratorAddon addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(884, 2292, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(896, 2286, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(909, 2291, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(914, 2305, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(909, 2318, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(896, 2323, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(884, 2316, z), map);
addon = new MoonstonePowerGeneratorAddon(true);
addon.MoveToWorld(new Point3D(878, 2304, z), map);
var idol = new MyrmidexIdol();
idol.MoveToWorld(new Point3D(488, 1856, 111), map);
Teleporter teleporter = new Teleporter(new Point3D(487, 1857, 95), map);
teleporter.MoveToWorld(new Point3D(896, 2304, 45), map);
teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2302, 0), map);
teleporter.MoveToWorld(new Point3D(121, 1682, -3), map);
teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2303, 0), Map.TerMur);
teleporter.MoveToWorld(new Point3D(121, 1683, -2), map);
teleporter = new MyrmidexQueenTeleporter(new Point3D(711, 2304, 0), Map.TerMur);
teleporter.MoveToWorld(new Point3D(121, 1684, -1), map);
teleporter = new Teleporter(new Point3D(120, 1682, -1), map);
teleporter.MoveToWorld(new Point3D(711, 2302, 0), map);
teleporter = new Teleporter(new Point3D(120, 1683, 1), map);
teleporter.MoveToWorld(new Point3D(711, 2303, 0), map);
teleporter = new Teleporter(new Point3D(120, 1684, 2), map);
teleporter.MoveToWorld(new Point3D(711, 2304, 0), map);
teleporter = new Teleporter(new Point3D(120, 1684, 2), map);
teleporter.MoveToWorld(new Point3D(711, 2305, 0), map);
teleporter = new MyrmidexPitTeleporter(Allegiance.Myrmidex, new Point3D(985, 1883, 0), map);
teleporter.MoveToWorld(new Point3D(176, 1835, 90), map);
teleporter = new MyrmidexPitTeleporter(Allegiance.Myrmidex, new Point3D(986, 1883, 0), map);
teleporter.MoveToWorld(new Point3D(177, 1835, 90), map);
teleporter = new Teleporter(new Point3D(176, 1834, 90), map);
teleporter.MoveToWorld(new Point3D(985, 1887, 0), map);
teleporter = new Teleporter(new Point3D(177, 1834, 90), map);
teleporter.MoveToWorld(new Point3D(986, 1887, 0), map);
teleporter = new MyrmidexPitTeleporter(Allegiance.Tribes, new Point3D(853, 1777, 0), map);
teleporter.MoveToWorld(new Point3D(224, 1724, 6), map);
teleporter = new MyrmidexPitTeleporter(Allegiance.Tribes, new Point3D(854, 1777, 0), map);
teleporter.MoveToWorld(new Point3D(224, 1725, 6), map);
teleporter = new Teleporter(new Point3D(225, 1724, 6), map);
teleporter.MoveToWorld(new Point3D(853, 1776, 11), map);
teleporter = new Teleporter(new Point3D(225, 1725, 6), map);
teleporter.MoveToWorld(new Point3D(854, 1776, 11), map);
teleporter = new Teleporter(new Point3D(225, 1725, 6), map);
teleporter.MoveToWorld(new Point3D(855, 1776, 11), map);
var los = new LOSBlocker();
los.MoveToWorld(new Point3D(121, 1682, -3), map);
los = new LOSBlocker();
los.MoveToWorld(new Point3D(121, 1683, -3), map);
los = new LOSBlocker();
los.MoveToWorld(new Point3D(121, 1684, -3), map);
var allegianceIdol = new AllegianceIdol(Allegiance.Tribes);
allegianceIdol.MoveToWorld(new Point3D(267, 1741, 85), map);
allegianceIdol = new AllegianceIdol(Allegiance.Myrmidex);
allegianceIdol.MoveToWorld(new Point3D(176, 1813, 91), map);
HealerCamp camp = new HealerCamp();
camp.Map = Map.TerMur;
camp.Location = new Point3D(262, 1716, 80);
GeoffreyCampAddon gcamp = new GeoffreyCampAddon();
gcamp.MoveToWorld(new Point3D(264, 1732, 80), Map.TerMur);
BattleSpawner spawner = new BattleSpawner();
spawner.MoveToWorld(new Point3D(851, 1776, 0), Map.TerMur);
Item st = new Static(0xA1F);
st.MoveToWorld(new Point3D(913, 1871, 0), Map.TerMur);
st = new Static(0xA1F);
st.MoveToWorld(new Point3D(914, 1871, 0), Map.TerMur);
BattleFlag bflag = new BattleFlag(0x42CB, 0);
bflag.MoveToWorld(new Point3D(914, 1872, 5), Map.TerMur);
st = new Static(0xA1F);
st.MoveToWorld(new Point3D(913, 1792, 0), Map.TerMur);
bflag = new BattleFlag(0x42C, 2520);
bflag.MoveToWorld(new Point3D(914, 1793, 6), Map.TerMur);
bflag = new BattleFlag(0x42D, 2520);
bflag.MoveToWorld(new Point3D(913, 1793, 6), Map.TerMur);
var sp = new XmlSpawner("Yar");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(169, 1813, 80), map);
sp.Respawn();
sp = new XmlSpawner("Bront");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(1448, 3774, 0), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("CollectorOfOddities");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(4305, 1003, 0), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("Carroll");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(2878, 723, 0), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("Eriathwen");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(1426, 1653, 0), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("EllieRafkin");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(261, 1742, 80), map);
sp.Respawn();
sp = new XmlSpawner("Yero");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(3692, 2252, 26), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("Alida");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(5257, 4012, 40), Map.Trammel);
sp.Respawn();
sp = new XmlSpawner("Foxx");
sp.SpawnRange = 1;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(269, 1727, 80), map);
sp.Respawn();
sp = new XmlSpawner("MyrmidexQueen/Cantwalk/true");
sp.SpawnRange = 0;
sp.HomeRange = 1;
sp.MoveToWorld(new Point3D(768, 2303, 0), map);
sp.Respawn();
}
}
}
+460
View File
@@ -0,0 +1,460 @@
using Server;
using System;
using Server.Engines.Quests;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Network;
using Server.Gumps;
namespace Server.Items
{
public class HiddenTreasuresTreasureMap : TreasureMap
{
[Constructable]
public HiddenTreasuresTreasureMap() : this(2, GetMap())
{
}
[Constructable]
public HiddenTreasuresTreasureMap(int level, Map map)
: base(level, map)
{
}
public HiddenTreasuresTreasureMap(int level, Map map, Point2D location)
{
Level = level;
Facet = map;
ChestLocation = location;
}
private static Map GetMap()
{
switch (Utility.Random(6))
{
default:
case 0: return Map.Ilshenar;
case 1: return Map.Malas;
case 2: return Map.Tokuno;
case 3: return Map.TerMur;
case 4: return Map.Trammel;
case 5: return Map.Felucca;
}
}
public override void OnMapComplete(Mobile from, TreasureMapChest chest)
{
base.OnMapComplete(from, chest);
if(chest != null)
chest.DropItem(new StasisChamberActivator());
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1156811); // *A Special Map Thought to Lead to Lost Kotl Technology*
}
public HiddenTreasuresTreasureMap(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class SaltySeaMIB : MessageInABottle
{
[Constructable]
public SaltySeaMIB() : this(Utility.RandomBool() ? Map.Trammel : Map.Felucca, 3)
{
}
[Constructable]
public SaltySeaMIB(Map map, int level)
: base(map, level)
{
}
public override void OnDoubleClick(Mobile from)
{
if ( from.InRange( GetWorldLocation(), 2 ) && from.InLOS( this ) )
{
Container cont = Parent as Container;
SOS sos = new SaltySeaSOS(TargetMap, Level);
Consume();
if( cont != null )
cont.AddItem(sos);
else
sos.MoveToWorld(this.Location, this.Map);
from.LocalOverheadMessage( Network.MessageType.Regular, 0x3B2, 501891 ); // You extract the message from the bottle.
}
else
{
from.SendLocalizedMessage(1019045); // I can't reach that.
}
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1156806); // *Coordinates to a Shipwreck thought to have Lost Kotl Technology*
}
public SaltySeaMIB(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class SaltySeaSOS : SOS
{
[Constructable]
public SaltySeaSOS(Map map, int level) : base(map, level)
{
//AssignLocation();
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1156806); // *Coordinates to a Shipwreck thought to have Lost Kotl Technology*
}
public override void OnSOSComplete(Container chest)
{
base.OnSOSComplete(chest);
if(chest != null)
chest.DropItem(new StasisChamberRegulator());
}
public SaltySeaSOS(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class MyrmidexIdol : Item
{
public override int LabelNumber { get { return 1156823; } } // Idol of Zipactriotl
private static Point3D _Destination = new Point3D(896, 2304, 45);
public MyrmidexIdol() : base(39453)
{
Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if(!(from is PlayerMobile))
return;
DestructionOfZipactriotlQuest q = QuestHelper.GetQuest((PlayerMobile)from, typeof(DestructionOfZipactriotlQuest)) as DestructionOfZipactriotlQuest;
if(q != null || from.AccessLevel > AccessLevel.Player)
{
BaseCreature.TeleportPets(from, _Destination, Map.TerMur);
from.MoveToWorld(_Destination, Map.TerMur);
Effects.SendLocationParticles( EffectItem.Create( from.Location, Map.TerMur, EffectItem.DefaultDuration ), 0x3728, 10, 10, 2023 );
Effects.SendLocationParticles( EffectItem.Create( _Destination, Map.TerMur, EffectItem.DefaultDuration ), 0x3728, 10, 10, 5023 );
from.PlaySound( 0x1FE );
}
else
from.SendLocalizedMessage(1156841); // You must be on the "Destruction of Zipactriotl" quest to enter. Visit the Barrabian Tinker in the Barrab village to the Southwest.
}
public MyrmidexIdol(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class StasisChamberPowerCore : Item
{
public override int LabelNumber { get { return 1156623; } }
[Constructable]
public StasisChamberPowerCore()
: base(40155)
{
}
public StasisChamberPowerCore(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class StasisChamberActivator : Item
{
public override int LabelNumber { get { return 1156624; } }
[Constructable]
public StasisChamberActivator()
: base(40158)
{
}
public StasisChamberActivator(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class StasisChamberRegulator : Item
{
public override int LabelNumber { get { return 1156626; } }
[Constructable]
public StasisChamberRegulator()
: base(40157)
{
}
public StasisChamberRegulator(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class StasisChamberStator : Item
{
public override int LabelNumber { get { return 1156628; } }
[Constructable]
public StasisChamberStator()
: base(40156)
{
}
public StasisChamberStator(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class BottledMyrmidexPheromone : Item
{
public override int LabelNumber { get { return 1156620; } }
[Constructable]
public BottledMyrmidexPheromone()
: base(3836)
{
}
public BottledMyrmidexPheromone(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class BottleOfConcentratedInsecticide : Item
{
public override int LabelNumber { get { return 1156617; } }
[Constructable]
public BottleOfConcentratedInsecticide()
: base(22344)
{
}
public BottleOfConcentratedInsecticide(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class MyrmidexPopulationReport : Item
{
public override int LabelNumber { get { return 1156775; } }
[Constructable]
public MyrmidexPopulationReport()
: base(18098)
{
Hue = 467;
}
public MyrmidexPopulationReport(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class UnabridgedAtlasOfEodon : Item
{
public override int LabelNumber { get { return 1156721; } } // Unabridged Atlas of Eodon
[Constructable]
public UnabridgedAtlasOfEodon()
: base(7185)
{
Hue = 2007;
}
public override void OnDoubleClick(Mobile m)
{
if (IsChildOf(m.Backpack))
{
Gump g = new Gump(100, 50);
g.AddImage(0, 0, 30236);
g.AddHtmlLocalized(115, 35, 350, 600, 1156723, 1, false, true);
m.SendGump(g);
}
}
public UnabridgedAtlasOfEodon(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+436
View File
@@ -0,0 +1,436 @@
using Server;
using System;
using Server.Mobiles;
using Server.Gumps;
using System.Collections.Generic;
using Server.Engines.Quests;
using Server.Network;
using Server.ContextMenus;
using Server.Multis;
namespace Server.Items
{
public class MyrmidexRewardBag : Backpack
{
public MyrmidexRewardBag()
{
Hue = BaseReward.RewardBagHue();
switch (Utility.Random(4))
{
default:
case 0: DropItem(new RecipeScroll(Utility.RandomMinMax(900, 905))); break;
case 1: DropItem(new EodonTribeRewardTitleToken()); break;
case 2: DropItem(new RecipeScroll(455)); break;
case 3: DropItem(new MoonstoneCrystal()); break;
}
}
public MyrmidexRewardBag(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class EodonianRewardBag : Backpack
{
public EodonianRewardBag()
{
Hue = BaseReward.RewardBagHue();
switch (Utility.Random(4))
{
default:
case 0: DropItem(new MonsterStatuette(MonsterStatuetteType.SakkhranBirdOfPrey)); break;
case 1: DropItem(new EodonTribeRewardTitleToken()); break;
case 2: DropItem(new RecipeScroll(1000)); break;
case 3:
if (0.5 > Utility.RandomDouble())
DropItem(new RawMoonstoneLargeAddonDeed());
else
DropItem(new RawMoonstoneSmallAddonDeed());
break;
}
}
public EodonianRewardBag(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class MoonstoneCrystal : Item, ISecurable
{
public static Dictionary<int, Point3D> Locations { get; set; }
private SecureLevel m_SecureLevel;
public static void Initialize()
{
Locations = new Dictionary<int, Point3D>();
Locations[1156705] = new Point3D(715, 1866, 40); // Eodon Moongate
Locations[1156706] = new Point3D(642, 1721, 40); // Barako Village
Locations[1156707] = new Point3D(701, 2106, 40); // Jukari Village
Locations[1156708] = new Point3D(355, 1873, 0); // Kurak Village
Locations[1156709] = new Point3D(552, 1471, 40); // Sakkhra Village
Locations[1156710] = new Point3D(412, 1595, 40); // Urali Village
Locations[1156711] = new Point3D(167, 1800, 80); // Barrab Village
Locations[1156712] = new Point3D(929, 2016, 50); // Shadowguard
Locations[1156713] = new Point3D(731, 1603, 40); // The great ape cave
Locations[1156714] = new Point3D(878, 2105, 40); // The Volcano
Locations[1156715] = new Point3D(390, 1690, 40); // Dragon Turtle Habitat
Locations[1156716] = new Point3D(269, 1726, 80); // Britannian Encampment
}
[CommandProperty(AccessLevel.GameMaster)]
public SecureLevel Level
{
get
{
return this.m_SecureLevel;
}
set
{
this.m_SecureLevel = value;
}
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
base.GetContextMenuEntries(from, list);
SetSecureLevelEntry.AddTo(from, this, list);
}
public override int LabelNumber { get { return 1124143; } } // Moonstone Crystal
[Constructable]
public MoonstoneCrystal() : base(0x9CBB)
{
Weight = 10;
}
public override void OnDoubleClick(Mobile from)
{
if((IsLockedDown || IsSecure) && from.InRange(GetWorldLocation(), 2))
{
from.SendGump(new InternalGump(from as PlayerMobile, this));
}
else if (!from.InRange(GetWorldLocation(), 2))
{
from.SendLocalizedMessage(500295); // You are too far away to do that.
}
else
from.SendLocalizedMessage(502692); // This must be in a house and be locked down to work.
}
private class InternalGump : Gump
{
public Item Moonstone { get; set; }
public PlayerMobile User { get; set; }
public InternalGump(PlayerMobile pm, Item moonstone) : base(75, 75)
{
Moonstone = moonstone;
User = pm;
AddGumpLayout();
}
public void AddGumpLayout()
{
AddBackground( 0, 0, 400, 400, 9270 );
AddHtmlLocalized( 0, 15, 400, 16, 1154645, "#1156704", 0xFFFF, false, false ); // Select your destination:
ColUtility.For<int, Point3D>(MoonstoneCrystal.Locations, (i, key, value) =>
{
AddHtmlLocalized(60, 45 + (i * 25), 250, 16, key, 0xFFFF, false, false);
AddButton(20, 50 + (i * 25), 2117, 2118, key, GumpButtonType.Reply, 0);
});
}
public override void OnResponse(NetState state, RelayInfo info)
{
if (info.ButtonID > 0)
{
int id = info.ButtonID;
if (MoonstoneCrystal.Locations.ContainsKey(id))
{
Point3D p = MoonstoneCrystal.Locations[id];
if (CheckTravel(p))
{
BaseCreature.TeleportPets(User, p, Map.TerMur);
User.Combatant = null;
User.Warmode = false;
User.Hidden = true;
User.MoveToWorld(p, Map.TerMur);
Effects.PlaySound(p, Map.TerMur, 0x1FE);
}
}
}
}
private bool CheckTravel(Point3D p)
{
if ( !User.InRange( Moonstone.GetWorldLocation(), 2 ) || User.Map != Moonstone.Map )
{
User.SendLocalizedMessage( 500295 ); // You are too far away to do that.
}
else if ( User.Murderer )
{
User.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
}
else if ( Server.Factions.Sigil.ExistsOn( User ) )
{
User.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
}
else if ( User.Criminal )
{
User.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
}
else if ( Server.Spells.SpellHelper.CheckCombat( User ) )
{
User.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
}
else if ( User.Spell != null )
{
User.SendLocalizedMessage( 1049616 ); // You are too busy to do that at the moment.
}
else if ( User.Map == Map.TerMur && User.InRange( p, 1 ) )
{
User.SendLocalizedMessage( 1019003 ); // You are already there.
}
else
return true;
return false;
}
}
public MoonstoneCrystal(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)this.m_SecureLevel); // At first, need to save world with this line before next starting.
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
this.m_SecureLevel = (SecureLevel)reader.ReadInt(); // If you have not saved world with above line in Serialize(), you should not add this line.
}
}
[TypeAlias("Server.Items.KotlPowerCoil")]
public class KotlPowerCore : Item
{
public override int LabelNumber { get { return 1124179; } } // Kotl Power Core
[Constructable]
public KotlPowerCore() : base(40147)
{
}
public KotlPowerCore(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
[Flipable(40253, 40252)]
public class EodonianWallMap : Item
{
public override int LabelNumber { get { return 1156690; } } // Wall Map of Eodon
[Constructable]
public EodonianWallMap()
: base(40253)
{
}
public override void OnDoubleClick(Mobile from)
{
if(from.InRange(GetWorldLocation(), 5))
{
Gump g = new Gump(0, 0);
g.AddImage(0, 0, 49999);
from.SendGump(g);
}
}
public EodonianWallMap(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class RawMoonstoneLargeAddon : BaseAddon
{
public override BaseAddonDeed Deed { get { return new RawMoonstoneLargeAddonDeed(); } }
[Constructable]
public RawMoonstoneLargeAddon()
{
AddComponent(new LocalizedAddonComponent(40129, 1124130), 0, 0, 0);
}
public RawMoonstoneLargeAddon(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class RawMoonstoneLargeAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon { get { return new RawMoonstoneLargeAddon(); } }
public override int LabelNumber { get { return 1156703; } }
[Constructable]
public RawMoonstoneLargeAddonDeed()
{
}
public RawMoonstoneLargeAddonDeed(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class RawMoonstoneSmallAddon : BaseAddon
{
public override BaseAddonDeed Deed { get { return new RawMoonstoneSmallAddonDeed(); } }
[Constructable]
public RawMoonstoneSmallAddon()
{
AddComponent(new LocalizedAddonComponent(40136, 1124130), 0, 0, 0);
}
public RawMoonstoneSmallAddon(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class RawMoonstoneSmallAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon { get { return new RawMoonstoneSmallAddon(); } }
public override int LabelNumber { get { return 1156702; } }
[Constructable]
public RawMoonstoneSmallAddonDeed()
{
}
public RawMoonstoneSmallAddonDeed(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+87
View File
@@ -0,0 +1,87 @@
using System;
using Server;
using Server.Mobiles;
using Server.Engines.MyrmidexInvasion;
using Server.Engines.Quests;
namespace Server.Items
{
public class MyrmidexPitTeleporter : Teleporter
{
public Allegiance Allegiance { get; set; }
[Constructable]
public MyrmidexPitTeleporter(Allegiance allegiance, Point3D dest, Map map)
: base(dest, map)
{
Allegiance = allegiance;
}
public override bool OnMoveOver(Mobile m)
{
if (MyrmidexInvasionSystem.IsAlliedWith(m, Allegiance) || m.AccessLevel > AccessLevel.Player)
return base.OnMoveOver(m);
m.SendLocalizedMessage(Allegiance == Allegiance.Myrmidex ? 1156838 : 1156839); // You must ally yourself to the Eodonians to enter.
return false;
}
public MyrmidexPitTeleporter(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)Allegiance);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
Allegiance = (Allegiance)reader.ReadInt();
}
}
public class MyrmidexQueenTeleporter : Teleporter
{
[Constructable]
public MyrmidexQueenTeleporter(Point3D p, Map map)
: base(p, map)
{
}
public override bool OnMoveOver(Mobile from)
{
if ((from is PlayerMobile && QuestHelper.GetQuest((PlayerMobile)from, typeof(InsecticideAndRegicideQuest)) != null) || from.AccessLevel > AccessLevel.Player)
return base.OnMoveOver(from);
from.SendLocalizedMessage(1156840); // You must be on the "Insecticide & Regicide" quest to enter. Visit Professor Rafkin in Sir Geoffrey's camp to the East.
return false;
}
public MyrmidexQueenTeleporter(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+764
View File
@@ -0,0 +1,764 @@
using Server;
using System;
using Server.Engines.Quests;
using System.Linq;
using System.Collections.Generic;
using Server.Items;
using Server.Network;
using Server.Movement;
using Server.Spells;
using Server.Spells.SkillMasteries;
using Server.Misc;
namespace Server.Mobiles
{
public class MyrmidexQueen : BaseCreature
{
private DateTime _NextCombo1;
private DateTime _NextCombo2;
private DateTime _NextEggThrow;
private List<BaseCreature> _Spawn;
public override bool AlwaysMurderer { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Parasitic; } }
public override Poison HitPoison { get { return Poison.Parasitic; } }
public override bool Unprovokable { get { return true; } }
[Constructable]
public MyrmidexQueen()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.3)
{
Body = 1404;
Name = "Myrmidex Queen";
BaseSoundID = 959;
SetHits(60000);
SetStr(900, 1000);
SetDex(535);
SetInt(1000, 1200);
SetDamage(18, 24);
SetDamageType(ResistanceType.Physical, 40);
SetDamageType(ResistanceType.Poison, 60);
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 80, 90);
SetResistance(ResistanceType.Energy, 60, 70);
SetSkill(SkillName.Wrestling, 110, 120);
SetSkill(SkillName.Tactics, 120, 130);
SetSkill(SkillName.MagicResist, 120, 130);
SetSkill(SkillName.Anatomy, 0, 10);
_NextCombo1 = DateTime.UtcNow;
_NextCombo2 = DateTime.UtcNow;
_NextEggThrow = DateTime.UtcNow;
_Spawn = new List<BaseCreature>();
Fame = 35000;
Karma = -35000;
}
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 5);
}
public override void OnThink()
{
base.OnThink();
if (Combatant == null)
return;
if (_NextCombo1 < DateTime.UtcNow && 0.1 > Utility.RandomDouble())
{
SpitOoze();
_NextCombo1 = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(15, 30));
}
if (_NextCombo2 < DateTime.UtcNow && 0.1 > Utility.RandomDouble())
{
if (0.5 > Utility.RandomDouble())
DropRocks();
else
RaiseRocks();
_NextCombo2 = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(30, 40));
}
if (_NextEggThrow < DateTime.UtcNow && 0.1 > Utility.RandomDouble())
{
ThrowEggs();
_NextEggThrow = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(90, 120));
}
}
public void ThrowEggs()
{
if (this.Map == null)
return;
int delay = 0;
for (byte i = 0; i <= 0x7; i++)
{
Direction d = (Direction)i;
int xOffset = 0;
int yOffset = 0;
Movement.Movement.Offset(d, ref xOffset, ref yOffset);
int x = this.X + (27 * xOffset);
int y = this.Y + (27 * yOffset);
Point3D p = new Point3D(x, y, this.Map.GetAverageZ(x, y));
if (!this.Map.CanFit(p, 16, false, false))
continue;
Timer.DelayCall(TimeSpan.FromSeconds(delay), () =>
{
Entity e = new Entity(Serial.Zero, p, this.Map);
this.MovingParticles(e, 4313, 10, 0, false, true, 1371, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0);
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(2, 3)), () =>
{
Type t = Utility.RandomList<Type>(typeof(MyrmidexWarrior), typeof(MyrmidexDrone), typeof(MyrmidexLarvae));
BaseCreature bc = Activator.CreateInstance(t) as BaseCreature;
if (bc != null)
{
bc.MoveToWorld(p, this.Map);
_Spawn.Add(bc);
}
});
delay++;
});
}
}
public void SpitOoze()
{
if (this.Map == null)
return;
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 7);
foreach (Mobile m in eable)
{
if (m != this && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
{
List<OozeItem> list = new List<OozeItem>();
var ooze1 = new OozeItem(this, 40222);
ooze1.MoveToWorld(m.Location, m.Map);
var ooze2 = new OozeItem(this, Utility.Random(40214, 2));
ooze2.MoveToWorld(new Point3D(m.X - 1, m.Y, m.Z), m.Map);
var ooze3 = new OozeItem(this, Utility.Random(40216, 2));
ooze3.MoveToWorld(new Point3D(m.X, m.Y + 1, m.Z), m.Map);
var ooze4 = new OozeItem(this, Utility.Random(40218, 2));
ooze4.MoveToWorld(new Point3D(m.X, m.Y - 1, m.Z), m.Map);
var ooze5 = new OozeItem(this, Utility.Random(40220, 2));
ooze5.MoveToWorld(new Point3D(m.X + 1, m.Y, m.Z), m.Map);
var ooze6 = new OozeItem(this, 40210);
ooze6.MoveToWorld(new Point3D(m.X - 1, m.Y + 1, m.Z), m.Map);
var ooze7 = new OozeItem(this, 40211);
ooze7.MoveToWorld(new Point3D(m.X + 1, m.Y + 1, m.Z), m.Map);
var ooze8 = new OozeItem(this, 40212);
ooze8.MoveToWorld(new Point3D(m.X - 1, m.Y - 1, m.Z), m.Map);
var ooze9 = new OozeItem(this, 40213);
ooze9.MoveToWorld(new Point3D(m.X + 1, m.Y - 1, m.Z), m.Map);
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(20, 30)), () =>
{
ooze1.Delete(); ooze2.Delete(); ooze3.Delete(); ooze4.Delete(); ooze5.Delete();
ooze6.Delete(); ooze7.Delete(); ooze8.Delete(); ooze9.Delete();
});
ooze1.OnMoveOver(m);
}
}
eable.Free();
}
public void DropRocks()
{
if (this.Map == null)
return;
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 12);
List<Mobile> random = new List<Mobile>();
foreach (Mobile m in eable)
{
if (m.Alive && m is PlayerMobile && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
random.Add(m);
}
eable.Free();
Mobile target = null;
if(random.Count > 0)
target = random[Utility.Random(random.Count)];
if (target != null)
{
Entity e = new Entity(Serial.Zero, new Point3D(target.X, target.Y, target.Z + 40), target.Map);
for (int i = 0; i < 5; i++)
Timer.DelayCall(TimeSpan.FromMilliseconds(100 * i), () =>
{
Effects.SendMovingParticles(e, target, 40136, 3, 60, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0);
});
Timer.DelayCall(TimeSpan.FromMilliseconds(250), () =>
{
Effects.SendLocationEffect(target.Location, this.Map, 40136, 120);
target.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156835, target.NetState); // *Crunch Crunch Crunch*
});
AOS.Damage(target, this, Utility.RandomMinMax(80, 100), 100, 0, 0, 0, 0);
target.SendSpeedControl(SpeedControlType.WalkSpeed);
Timer.DelayCall(TimeSpan.FromSeconds(5), () => target.SendSpeedControl(SpeedControlType.Disable));
}
ColUtility.Free(random);
}
public void RaiseRocks()
{
if (this.Map == null)
return;
IPooledEnumerable eable = this.Map.GetMobilesInRange(this.Location, 12);
List<Mobile> random = new List<Mobile>();
foreach (Mobile m in eable)
{
if (m.Alive && m is PlayerMobile && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
random.Add(m);
}
eable.Free();
Mobile target = null;
if (random.Count > 0)
target = random[Utility.Random(random.Count)];
if (target != null)
{
Direction d = Utility.GetDirection(this, target);
Rectangle2D r = new Rectangle2D(target.X - 8, target.Y - 2, 17, 5);
switch (d)
{
case Direction.West:
r = new Rectangle2D(this.X - 24, this.Y - 2, 20, 5); break;
case Direction.North:
r = new Rectangle2D(this.X - 2, this.Y - 24, 5, 20); break;
case Direction.East:
r = new Rectangle2D(this.X + 4, this.Y - 2, 20, 5); break;
case Direction.South:
r = new Rectangle2D(this.X - 4, this.Y + 4, 20, 5); break;
}
for (int x = r.X; x <= r.X + r.Width; x++)
{
for (int y = r.Y; y <= r.Y + r.Height; y++)
{
if (x > this.X - 4 && x < this.X + 4 && y > this.Y - 4 && y < this.Y + 4)
continue;
if (0.75 > Utility.RandomDouble())
{
int id = Utility.RandomList<int>(2282, 2273, 2277, 40106, 40107, 40108, 40106, 40107, 40108, 40106, 40107, 40108);
Effects.SendLocationEffect(new Point3D(x, y, this.Map.GetAverageZ(x, y)), this.Map, id, 60);
}
}
}
IPooledEnumerable eable2 = this.Map.GetMobilesInBounds(r);
foreach (Mobile m in eable2)
{
if (m.Alive && m is PlayerMobile && SpellHelper.ValidIndirectTarget(this, m) && this.CanBeHarmful(m, false))
{
if (m.X > this.X - 4 && m.X < this.X + 4 && m.Y > this.Y - 4 && m.Y < this.Y + 4)
continue;
m.Freeze(TimeSpan.FromSeconds(2));
BleedAttack.BeginBleed(m, this, false);
AOS.Damage(target, this, Utility.RandomMinMax(100, 110), 100, 0, 0, 0, 0);
m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156849, m.NetState); // *Rising columns of rock rip through your flesh and concuss you!*
}
}
eable2.Free();
}
}
public class OozeItem : Item
{
public override int LabelNumber { get { return 1156831; } } // Noxious Goo
public BaseCreature Owner { get; set; }
public OozeItem(BaseCreature bc, int id)
: base(id)
{
Owner = bc;
Movable = false;
Hue = 2966;
}
public override bool OnMoveOver(Mobile m)
{
if (m != Owner && SpellHelper.ValidIndirectTarget(Owner, m) && Owner.CanBeHarmful(m, false))
{
if (0.60 > Utility.RandomDouble())
{
m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156832, m.NetState); // *The noxious goo has poisoned you!*
m.Poison = Poison.Parasitic;
}
else
m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156830, m.NetState); // *You are drenched in a noxious goo!*
AOS.Damage(m, Owner, Utility.RandomMinMax(40, 60), 0, 0, 0, 100, 0);
}
return true;
}
public OozeItem(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
Delete();
}
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
c.DropItem(new MyrmidexEggsac(Utility.RandomMinMax(5, 10)));
}
public override void Delete()
{
base.Delete();
Timer.DelayCall(TimeSpan.FromSeconds(30), () =>
{
ColUtility.ForEach(_Spawn.Where(sp => sp != null && sp.Alive), sp => sp.Kill());
ColUtility.Free(_Spawn);
});
}
public MyrmidexQueen(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write(_Spawn.Count);
_Spawn.ForEach(sp => writer.Write(sp));
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
_Spawn = new List<BaseCreature>();
int c = reader.ReadInt();
for (int i = 0; i < c; i++)
{
BaseCreature bc = reader.ReadMobile() as BaseCreature;
if (bc != null)
_Spawn.Add(bc);
}
_NextCombo1 = DateTime.UtcNow;
_NextCombo2 = DateTime.UtcNow;
_NextEggThrow = DateTime.UtcNow;
}
}
public class Zipactriotl : BaseCreature
{
public bool IsQuest { get; set; }
public override bool AlwaysMurderer { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Parasitic; } }
public override bool Unprovokable { get { return true; } }
private DateTime _NextMastery;
private DateTime _NextSpecial;
[Constructable]
public Zipactriotl() : this(false) { }
public Zipactriotl(bool quest)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.15, 0.3)
{
Body = 1405;
Name = "Zipactriotl";
BaseSoundID = 609;
IsQuest = quest;
SetHits(60000);
SetStr(900, 1000);
SetDex(800, 850);
SetInt(1400, 1600);
SetDamage(22, 26);
SetDamageType(ResistanceType.Physical, 50);
SetDamageType(ResistanceType.Energy, 50);
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 60, 70);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 50, 60);
SetResistance(ResistanceType.Energy, 70, 80);
SetSkill(SkillName.Wrestling, 110, 120);
SetSkill(SkillName.Tactics, 110, 120);
SetSkill(SkillName.MagicResist, 120, 130);
SetSkill(SkillName.Anatomy, 40, 60);
_NextMastery = DateTime.UtcNow;
_NextSpecial = DateTime.UtcNow;
Fame = 35000;
Karma = -35000;
SetWeaponAbility(WeaponAbility.Disarm);
SetWeaponAbility(WeaponAbility.ParalyzingBlow);
}
public override bool TeleportsTo { get { return true; } }
public override TimeSpan TeleportDuration { get { return TimeSpan.FromSeconds(15); } }
public override double TeleportProb { get { return 0.33; } }
public override Mobile GetTeleportTarget()
{
IPooledEnumerable eable = this.GetMobilesInRange(TeleportRange);
List<Mobile> list = new List<Mobile>();
foreach (Mobile m in eable)
{
if (m != this && m is PlayerMobile && CanBeHarmful(m) && CanSee(m) && ((PlayerMobile)m).AllFollowers.Where(pet => !(pet is IMount) || ((IMount)pet).Rider == null).Count() > 0)
{
list.Add(m);
}
}
eable.Free();
Mobile mob = null;
if (list.Count > 0)
mob = list[Utility.Random(list.Count)];
ColUtility.Free(list);
return mob;
}
public override void OnThink()
{
base.OnThink();
if (Combatant == null)
return;
if (_NextMastery < DateTime.UtcNow)
{
if (SkillMasterySpell.HasSpell(this, typeof(RampageSpell)) || Utility.RandomDouble() > 0.5)
{
SpecialMove.SetCurrentMove(this, SpellRegistry.GetSpecialMove(740));
}
else
{
SkillMasterySpell spell = new RampageSpell(this, null);
spell.Cast();
}
_NextMastery = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 70));
}
if (_NextSpecial < DateTime.UtcNow)
{
DoSpecial();
_NextSpecial = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 60));
}
}
public void DoSpecial()
{
Map map = this.Map;
if (map == null || map == Map.Internal)
return;
int counter = 0;
int dist = 4;
Point3D p = Point3D.Zero;
IPooledEnumerable eable = map.GetMobilesInRange(Location, dist);
foreach (Mobile m in eable)
{
if (m is PlayerMobile)
{
m.Mana = 0;
m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156856, m.NetState); // *Your mana is converted to pure energy!*
}
}
eable.Free();
for ( int i = 0; i < _Offsets.Length; i += 2 )
{
int tarx = this.X + (int)(_Offsets[i] * dist);
int tary = this.Y + (int)(_Offsets[i + 1] * dist);
int tarz = this.Map.GetAverageZ(tarx, tary);
if (tarx == p.X && tary == p.Y)
continue;
p = new Point3D(tarx, tary, tarz);
Timer.DelayCall<Point3D>(TimeSpan.FromMilliseconds(350 * counter), (point) =>
{
//Point3D point = new Point3D(tarx, tary, tarz);
Entity e = new Entity(Serial.Zero, point, map);
this.MovingParticles(e, 0x3818, 10, 0, false, false, 1150, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0);
Timer.DelayCall<Point3D>(TimeSpan.FromMilliseconds(250), (pnt) =>
{
Effects.SendLocationEffect(pnt, this.Map, 14089, 30, 1150, 4); // TODO: Check
}, point);
}, p);
counter++;
}
Timer.DelayCall(TimeSpan.FromMilliseconds(Utility.RandomMinMax(300, 350) * (_Offsets.Length / 2)), () =>
{
eable = map.GetMobilesInRange(this.Location, dist);
foreach (Mobile m in eable)
{
if (m != this && m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).GetMaster() is PlayerMobile) && CanBeHarmful(m))
{
Direction d = Utility.GetDirection(this, m);
int range = 0;
int x = m.X;
int y = m.Y;
int orx = x;
int ory = y;
while (range < 15)
{
range++;
int lastx = x;
int lasty = y;
Movement.Movement.Offset(d, ref x, ref y);
int z = map.GetAverageZ(x, y);
if (!map.CanFit(new Point3D(x, y, z), 16, false, false))
{
m.MoveToWorld(new Point3D(lastx, lasty, map.GetAverageZ(lastx, lasty)), map);
AOS.Damage(m, this, Utility.RandomMinMax(100, 150), 0, 0, 0, 0, 100);
break;
}
if (range >= 15 && (orx != x || ory != y))
{
m.MoveToWorld(new Point3D(x, y, z), map);
AOS.Damage(m, this, Utility.RandomMinMax(100, 150), 0, 0, 0, 0, 100);
}
}
}
}
eable.Free();
});
}
private static readonly double[] _Offsets = new double[]
{
Math.Cos( 300.0 / 180.0 * Math.PI ), Math.Sin( 300.0 / 180.0 * Math.PI ),
Math.Cos( 320.0 / 180.0 * Math.PI ), Math.Sin( 320.0 / 180.0 * Math.PI ),
Math.Cos( 340.0 / 180.0 * Math.PI ), Math.Sin( 340.0 / 180.0 * Math.PI ),
Math.Cos( 000.0 / 180.0 * Math.PI ), Math.Sin( 000.0 / 180.0 * Math.PI ),
Math.Cos( 020.0 / 180.0 * Math.PI ), Math.Sin( 020.0 / 180.0 * Math.PI ),
Math.Cos( 040.0 / 180.0 * Math.PI ), Math.Sin( 040.0 / 180.0 * Math.PI ),
Math.Cos( 060.0 / 180.0 * Math.PI ), Math.Sin( 060.0 / 180.0 * Math.PI ),
Math.Cos( 080.0 / 180.0 * Math.PI ), Math.Sin( 080.0 / 180.0 * Math.PI ),
Math.Cos( 100.0 / 180.0 * Math.PI ), Math.Sin( 100.0 / 180.0 * Math.PI ),
Math.Cos( 120.0 / 180.0 * Math.PI ), Math.Sin( 120.0 / 180.0 * Math.PI ),
Math.Cos( 140.0 / 180.0 * Math.PI ), Math.Sin( 140.0 / 180.0 * Math.PI ),
Math.Cos( 160.0 / 180.0 * Math.PI ), Math.Sin( 160.0 / 180.0 * Math.PI ),
Math.Cos( 180.0 / 180.0 * Math.PI ), Math.Sin( 180.0 / 180.0 * Math.PI ),
Math.Cos( 200.0 / 180.0 * Math.PI ), Math.Sin( 200.0 / 180.0 * Math.PI ),
Math.Cos( 220.0 / 180.0 * Math.PI ), Math.Sin( 220.0 / 180.0 * Math.PI ),
Math.Cos( 240.0 / 180.0 * Math.PI ), Math.Sin( 240.0 / 180.0 * Math.PI ),
Math.Cos( 260.0 / 180.0 * Math.PI ), Math.Sin( 260.0 / 180.0 * Math.PI ),
Math.Cos( 280.0 / 180.0 * Math.PI ), Math.Sin( 280.0 / 180.0 * Math.PI ),
Math.Cos( 260.0 / 180.0 * Math.PI ), Math.Sin( 260.0 / 180.0 * Math.PI ),
Math.Cos( 240.0 / 180.0 * Math.PI ), Math.Sin( 240.0 / 180.0 * Math.PI ),
Math.Cos( 220.0 / 180.0 * Math.PI ), Math.Sin( 220.0 / 180.0 * Math.PI ),
Math.Cos( 200.0 / 180.0 * Math.PI ), Math.Sin( 200.0 / 180.0 * Math.PI ),
Math.Cos( 180.0 / 180.0 * Math.PI ), Math.Sin( 180.0 / 180.0 * Math.PI ),
Math.Cos( 160.0 / 180.0 * Math.PI ), Math.Sin( 160.0 / 180.0 * Math.PI ),
Math.Cos( 140.0 / 180.0 * Math.PI ), Math.Sin( 140.0 / 180.0 * Math.PI ),
Math.Cos( 120.0 / 180.0 * Math.PI ), Math.Sin( 120.0 / 180.0 * Math.PI ),
Math.Cos( 100.0 / 180.0 * Math.PI ), Math.Sin( 100.0 / 180.0 * Math.PI ),
Math.Cos( 080.0 / 180.0 * Math.PI ), Math.Sin( 080.0 / 180.0 * Math.PI ),
Math.Cos( 060.0 / 180.0 * Math.PI ), Math.Sin( 060.0 / 180.0 * Math.PI ),
Math.Cos( 040.0 / 180.0 * Math.PI ), Math.Sin( 040.0 / 180.0 * Math.PI ),
Math.Cos( 020.0 / 180.0 * Math.PI ), Math.Sin( 020.0 / 180.0 * Math.PI ),
Math.Cos( 000.0 / 180.0 * Math.PI ), Math.Sin( 000.0 / 180.0 * Math.PI ),
Math.Cos( 340.0 / 180.0 * Math.PI ), Math.Sin( 340.0 / 180.0 * Math.PI ),
Math.Cos( 320.0 / 180.0 * Math.PI ), Math.Sin( 320.0 / 180.0 * Math.PI ),
Math.Cos( 300.0 / 180.0 * Math.PI ), Math.Sin( 300.0 / 180.0 * Math.PI ),
};
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 5);
}
public override void Delete()
{
base.Delete();
if (IsQuest)
Timer.DelayCall(TimeSpan.FromMinutes(30), () => MoonstonePowerGeneratorAddon.ResetGenerators());
}
public Zipactriotl(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write(IsQuest);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
_NextMastery = DateTime.UtcNow;
_NextSpecial = DateTime.UtcNow;
IsQuest = reader.ReadBool();
}
}
public class IgnisFatalis : BaseCreature
{
public override bool AlwaysMurderer { get { return true; } }
[Constructable]
public IgnisFatalis()
: base(AIType.AI_Spellweaving, FightMode.Closest, 10, 1, 0.15, 0.3)
{
Body = 0x105;
Name = "Ignis Fatalis";
BaseSoundID = 0x56B;
SetHits(500);
SetStr(350, 360);
SetDex(100, 150);
SetInt(580, 620);
SetDamage(15, 22);
SetDamageType(ResistanceType.Physical, 0);
SetDamageType(ResistanceType.Energy, 100);
SetResistance(ResistanceType.Physical, 40, 50);
SetResistance(ResistanceType.Fire, 40, 50);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 70, 80);
SetResistance(ResistanceType.Energy, 100);
SetSkill(SkillName.Wrestling, 100);
SetSkill(SkillName.Tactics, 100);
SetSkill(SkillName.MagicResist, 100);
SetSkill(SkillName.DetectHidden, 100.0);
SetSkill(SkillName.Magery, 100.0);
SetSkill(SkillName.EvalInt, 100.0);
SetSkill(SkillName.Meditation, 100.0);
SetSkill(SkillName.Focus, 100.0);
SetSkill(SkillName.Spellweaving, 100.0);
SetAreaEffect(AreaEffect.AuraOfEnergy);
}
public IgnisFatalis(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+518
View File
@@ -0,0 +1,518 @@
using Server;
using System;
using Server.Engines.Quests;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Yar : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TheZealotryOfZipactriotlQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Yar() : base("Yar", "the Barrab Tinker")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = Race.RandomHair(false);
Hue = 34214;
}
public override void InitOutfit()
{
SetWearable(new BoneChest(), 1828);
SetWearable(new DecorativePlateKabuto(), 1828);
SetWearable(new LeatherHaidate(), 1828);
SetWearable(new Sandals(), 1828);
SetWearable(new SledgeHammer(), 1828);
}
public override void OnOfferFailed()
{
Say(1080107); // I'm sorry, I have nothing for you at this time.
}
public Yar(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Carroll : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(HiddenTreasuresQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Carroll() : base("Carroll", "the Gemologist")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = Race.RandomHair(false);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new FancyShirt());
SetWearable(new JinBaori(), 1366);
SetWearable(new LongPants(), 1336);
SetWearable(new GoldNecklace());
SetWearable(new GoldBracelet());
SetWearable(new GoldRing());
SetWearable(new Shoes());
}
public Carroll(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Bront : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TheSaltySeaQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Bront() : base("Bront", "the Captain")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = Race.RandomHair(false);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new TricorneHat());
SetWearable(new Epaulette());
SetWearable(new BodySash());
SetWearable(new ElvenShirt());
SetWearable(new WoodlandBelt());
SetWearable(new TattsukeHakama());
SetWearable(new Sandals());
}
public Bront(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Eriathwen : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(ATinkersTaskQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Eriathwen() : base("Eriathwen", "the Golem Maker")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Race = Race.Elf;
Female = true;
Body = 605;
HairItemID = Race.RandomHair(true);
Hue = 0x847E;
}
public override void InitOutfit()
{
SetWearable(new ElvenShirt(), 164);
SetWearable(new ElvenPants(), 1114);
SetWearable(new ElvenBoots(), 1828);
}
public Eriathwen(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class CollectorOfOddities : BaseVendor
{
private List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos{ get { return m_SBInfos; } }
public override void InitSBInfo()
{
m_SBInfos.Add( new InternalSB() );
}
[Constructable]
public CollectorOfOddities() : base("the collector of oddities")
{
}
public override void InitOutfit()
{
SetWearable(new FancyShirt(), 1156);
SetWearable(new Doublet(), 1316);
SetWearable(new ElvenPants(), 1151);
SetWearable(new Cloak(), 1151);
SetWearable(new ElvenBoots(), 2007);
}
private class InternalSB : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo;
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public InternalSB() : this(null)
{
}
public InternalSB(BaseVendor owner)
{
m_BuyInfo = new InternalBuyInfo(owner);
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : List<GenericBuyInfo>
{
public InternalBuyInfo(BaseVendor owner)
{
Add( new GenericBuyInfo( "Stasis Chamber Power Core", typeof( StasisChamberPowerCore ), 101250, 500, 40155, 0 ) );
Add(new GenericBuyInfo("1159014", typeof(CircuitTrapTrainingKit), 99375, 500, 41875, 0));
Add(new GenericBuyInfo("1159015", typeof(CylinderTrapTrainingKit), 99375, 500, 41875, 0));
Add(new GenericBuyInfo("1159016", typeof(SliderTrapTrainingKit), 99375, 500, 41875, 0));
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
}
}
}
public CollectorOfOddities(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class EllieRafkin : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(ExterminatingTheInfestationQuest) }; } }
public override bool ChangeRace { get { return false; } }
public override bool IsActiveVendor { get { return true; } }
private List<SBInfo> _SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos { get { return _SBInfos; } }
public override void InitSBInfo()
{
_SBInfos.Add(new InternalSB());
}
[Constructable]
public EllieRafkin() : base("Ellie Rafkin", "the Professor")
{
}
public override void OnOfferFailed()
{
Say(1080107); // I'm sorry, I have nothing for you at this time.
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Body = 0x191;
HairItemID = Race.RandomHair(true);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new FancyShirt());
SetWearable(new Kilt(), 933);
SetWearable(new ThighBoots(), 1);
}
private class InternalSB : SBInfo
{
private List<GenericBuyInfo> m_BuyInfo;
private IShopSellInfo m_SellInfo = new InternalSellInfo();
public InternalSB()
: this(null)
{
}
public InternalSB(BaseVendor owner)
{
m_BuyInfo = new InternalBuyInfo(owner);
}
public override IShopSellInfo SellInfo { get { return m_SellInfo; } }
public override List<GenericBuyInfo> BuyInfo { get { return m_BuyInfo; } }
public class InternalBuyInfo : List<GenericBuyInfo>
{
public InternalBuyInfo(BaseVendor owner)
{
Add(new GenericBuyInfo("Unabridged Map of Eodon", typeof(UnabridgedAtlasOfEodon), 62500, 500, 7185, 0));
}
}
public class InternalSellInfo : GenericSellInfo
{
public InternalSellInfo()
{
}
}
}
public EllieRafkin(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Foxx : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(PestControlQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Foxx() : base("Foxx", "the Lieutenant")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = Race.RandomHair(true);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new PlateChest());
SetWearable(new PlateLegs());
SetWearable(new BodySash(), 1828);
SetWearable(new OrderShield());
SetWearable(new Longsword());
}
public override void Advertise()
{
Say(1156619); // Fall in now! These Myrmidex aren't going to slay themselves! We've got to squash these bugs!
}
public Foxx(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Yero : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(GettingEvenQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Yero() : base("Yero", "the Gambler")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = Race.RandomHair(true);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new ShortPants());
SetWearable(new Sandals());
}
public Yero(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class Alida : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(OfVorpalsAndLettacesTheGardnerQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public Alida() : base("Alida", "the Gardener")
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Body = 0x191;
HairItemID = Race.RandomHair(true);
Hue = Race.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new Shirt());
SetWearable(new LongPants(), 1);
SetWearable(new HalfApron(), 263);
SetWearable(new LeatherGloves());
SetWearable(new FloppyHat());
}
public Alida(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+672
View File
@@ -0,0 +1,672 @@
using Server;
using System;
using Server.Mobiles;
using Server.Items;
using System.Linq;
using Server.Engines.ResortAndCasino;
using Server.Engines.MyrmidexInvasion;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class TheZealotryOfZipactriotlQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.MyrmidexAlliance; } }
public override Type NextQuest { get { return typeof(DestructionOfZipactriotlQuest); } }
public override object Title{ get{ return 1156751; } } // The Zealotry of Zipactriotl
public override object Description{ get{ return 1156752; } } /*All hail our Myrmidex Overlords! Now that the Britannians and the rest of Eodon
have been stopped from their offensive against the Myrmidex it is time for the
Barrab to restore the Myrmidex to power! Long ago the Kotl came to Eodon.
Their technology was far advanced and they built many creations. Before long
they decided they needed servents to tend to them beyond the metal giants they
called "Automatons" and so they created the Myrmidex. The Myrmidex would not stand
for their oppression and rose up against their reptilian masters! The Kotl
unleashed a great weapon called Zipactriotl to abolish the Myrmidex. In time
the Myrmidex were reduced in numbers and the Kotl placed Zipactriotl in stasis
until such time the Myrmidex were once again a threat. The alien technology of
the Kotl has spread throughout the realm in the eons since their arrival - we
must recover that technology so we may release Zipactriotl and destroy it once
and for all! The time is now for Myrmidex rule with the Barrabian at their
side! All hail the Myrmidex! All hail the Barrab!*/
public override object Refuse{ get{ return 1156753; } } /*I must question your commitment to the Myrmidex - are you satisfied with these
Britannian invaders and their Eodonian allies?*/
public override object Uncomplete{ get{ return 1156754; } } /*You must acquire the Activator from the Gemologist at the Shimmering Jewel in
Vesper, the Regulator from the Ship Captain at the Horse's Head in Jhelom, the
Stator from the Golem Maker at the Tinker's Guild in Britain, and Power Core
from the Oddities Collector at the Lycaeum in Moonglow before the Stasis Chamber
can be activated and Zipactriotl can be destroyed!*/
public override object Complete{ get{ return 1156755; } } /**Eyes widen with excitement!* All hail the Myrmidex! All hail the Barrab!
With these components I can bring the Stasis Chamber online and Zipactriotl can
be destroyed!*/
public TheZealotryOfZipactriotlQuest()
{
AddObjective(new ObtainObjective(typeof(StasisChamberPowerCore), "Stasis Chamber Power Core", 1));
AddObjective(new ObtainObjective(typeof(StasisChamberActivator), "Stasis Chamber Activator", 1));
AddObjective(new ObtainObjective(typeof(StasisChamberRegulator), "Stasis Chamber Regulator", 1));
AddObjective(new ObtainObjective(typeof(StasisChamberStator), "Stasis Chamber Stator", 1));
AddReward(new BaseReward(1156756)); // A step closer to destroying Zipactriotl...
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Myrmidex))
{
Owner.SendLocalizedMessage(1156778); // You must pledge allegiance to the Myrmidex and defeat the Eodonians in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Idol in the Barrab Village.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DestructionOfZipactriotlQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.MyrmidexAlliance; } }
public override object Title{ get{ return 1156757; } } // The Destruction of Zipactriotl
public override object Description{ get{ return 1156758; } } /*All Hail the Myrmidex! All Hail the Barrab! Muwahahah! With these components
the Stasis Chamber can be reactivated and Zipactriotl shall meet DOOM! Go now
to the Kotl Antechamber and destroy Zipactriotl so the Myrmidex may once again
rule the Valley of Eodon with the Barrab shall be at their side!*/
public override object Refuse{ get{ return 1156760; } } /*Only those warriors brave enough to join in the destruction of Zipactriotl
will reap in the glory! All hail the Myrmidex! All hail the Barrab!*/
public override object Uncomplete{ get{ return 1156761; } } /*Zipactriotl must be destroyed...the time is NOW! Go to the Antechamber in the
Great Pyramid and restore glory to the Myrmidex!*/
public override object Complete{ get{ return 1156762; } } /*MUWAHAHA! ZIPACTRIOTL IS DESTROYED! THE MYRMIDEX ARE FREE TO RECLAIM EODON!
THE BARRAB SHALL JOIN THEM AND TOGETHER WE SHALL RULE THE VALLEY!*/
public override bool CanOffer()
{
return MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Myrmidex);
}
public DestructionOfZipactriotlQuest()
{
AddObjective(new SlayObjective(typeof(Zipactriotl), "Zipactriotl", 1));
AddReward(new BaseReward(1156756)); // A step closer to destroying Zipactriotl...
}
public override void GiveRewards()
{
base.GiveRewards();
Owner.AddToBackpack(new MyrmidexRewardBag());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class HiddenTreasuresQuest : BaseQuest
{
public override object Title{ get{ return 1156800; } } // Hidden Treasures
public override object Description{ get{ return 1156801; } } /*Hello there, looking to buy? Sell? Perhaps a pearl necklace for your lover -
or maybe a fine ring to accompany your finest evening wear? We've got it all - just let
me know what we can do for you and I'm sure we can accomodate! Activator? Stasis Chamber!
Why I haven't an idea what you are talking about! *leans in and whispers* Not so
loud - can't be too sure who's listening in these days. Listen if you want to get
your hands on that item I know where you might be able to find one. I was able to
acquire a treasure map that'll get you where you need to go but I need something
first. My supply of prized gemstones has run low - you bring me those gem stones
and I'll supply you with the map to what you're seeking.*/
public override object Refuse{ get{ return 1156804; } } // Well if you don't want to do it, you shouldn't have asked. Hrmph.
public override object Uncomplete{ get{ return 1156803; } } /*Acquire the gemstones I've asked for and I'll give you a map that will take you to
the item you seek. It's very simple - now move along I've got customers to tend to!*/
public override object Complete{ get{ return 1156805; } } // *Examines the stones closely* Ahh yes, these will do quite nicely! As promised here's your map - good luck!
public HiddenTreasuresQuest()
{
AddObjective(new ObtainObjective(typeof(PerfectEmerald), "Perfect Emerald", 1));
AddObjective(new ObtainObjective(typeof(WhitePearl), "White Pearl", 1));
AddObjective(new ObtainObjective(typeof(BrilliantAmber), "Brilliant Amber", 1));
AddReward(new BaseReward(typeof(HiddenTreasuresTreasureMap), "A Special Treasure Map"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Myrmidex))
{
Owner.SendLocalizedMessage(1156778); // You must pledge allegiance to the Myrmidex and defeat the Eodonians in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Idol in the Barrab Village.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class TheSaltySeaQuest : BaseQuest
{
public override object Title{ get{ return 1156807; } } //The Salty Sea
public override object Description{ get{ return 1156808; } } /*Arr! The seas have become a wretched and dangerous place - a myriad o' creatures
be tormentin' me ships. Can't have it! Can't have it one bit - what's that?
Myrmidex. *He pauses and thinks for a moment as he sits back on the stool* Maybe
I heard of em, maybe I aint...I'll tell ya what ye go and clear some o' the creature
s that be plaguing the seas and maybe I tell ya what I know about them Myrmidex.*/
public override object Refuse{ get{ return 1156812; } } // What's the matter, aint got yer sea legs? Har Har Har!
public override object Uncomplete{ get{ return 1156813; } } /*Ye needin' to make the seas safe for Captains like me! Make sure ye killin' the
critters in the South Britannian Sea. The seas south of the Britannian continent
and between the far western Island of Jhelom and the Island of Valor. Big stretch
o' ocean to be clobberin sea monsters! Get yerself a special fishing net if ye can
't find the beasts, that'd be sure to wrangle them in!*/
public override object Complete{ get{ return 1156814; } } // Shiver me timbers! The sea be safe again! As promised here's the Message in a Bottle!
public TheSaltySeaQuest()
{
AddObjective(new SlayObjective(typeof(WaterElemental), "Water Elemental", 10, "South Britannian Sea"));
AddObjective(new SlayObjective(typeof(SeaSerpent), "Sea Serpent", 10, "South Britannian Sea"));
AddObjective(new SlayObjective(typeof(DeepSeaSerpent), "Deep Sea Serpent", 10, "South Britannian Sea"));
AddObjective(new SlayObjective(typeof(Kraken), "Kraken", 5, "South Britannian Sea"));
AddReward(new BaseReward(typeof(SaltySeaMIB), "A Special Message in a Bottle"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Myrmidex))
{
Owner.SendLocalizedMessage(1156778); // You must pledge allegiance to the Myrmidex and defeat the Eodonians in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Idol in the Barrab Village.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class ATinkersTaskQuest : BaseQuest
{
public override object Title{ get{ return 1156815; } } // A Tinker's Task
public override object Description{ get{ return 1156816; } } /*Ha ha...he he...hoo hoo...yes yes...its all coming together now if only...*the
tinker pauses and looks up* Myrmidex did you say? Oh yes, we are most certainly
on the same page here! I assume my Barrabian colleague sent you? Of course he
did! I'm almost ready to begin tinkering on the Automaton - but I need some
supplies first. You collect those supplies and I'll give you the Stator you seek.
Long live the Myrmidex! Long live the Barrab! Ha ha! He he! Hoo Hoo!*/
public override object Refuse{ get{ return 1156817; } } // No time to waste on those uncommitted to the cause - be gone with you!
public override object Uncomplete{ get{ return 1156818; } } /*Acquire the items I require to begin work on my Automaton and I'll give you the Stator.
Don't come back until you've got everything!*/
public override object Complete{ get{ return 1156819; } } /*Ha ha! He he! Hoo hoo! These are just what I needed - the Automaton won't take long now,
soon I shall wield this Kotl Technology and our Insect overlords will rule with the Barrab
at their side. Only those loyal Britannians will be spared! Here is the Stator as
I promised...*/
public ATinkersTaskQuest()
{
AddObjective(new ObtainObjective(typeof(IronIngot), "Iron Ingot", 500));
AddObjective(new ObtainObjective(typeof(Gears), "Gears", 25));
AddObjective(new ObtainObjective(typeof(PowerCrystal), "Power Crystal", 5));
AddObjective(new ObtainObjective(typeof(ClockworkAssembly), "Clockwork assembly", 2));
AddReward(new BaseReward(typeof(StasisChamberStator), "Stasis Chamber Stator"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Myrmidex))
{
Owner.SendLocalizedMessage(1156778); // You must pledge allegiance to the Myrmidex and defeat the Eodonians in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Idol in the Barrab Village.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
// The last piece is sold on a vendor
public class ExterminatingTheInfestationQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.EodonianAlliance; } }
public override Type NextQuest { get { return typeof(InsecticideAndRegicideQuest); } }
public override object Title{ get{ return 1156763; } } // Exterminating the Infestation
public override object Description{ get{ return 1156764; } } /*It is unfortunate it had to come to this. My hope was the knowledge gained from
all the peoples and creatures of Eodon would better our understanding of life -
alas the Myrmidex are an abomination, creatures born into enslavement by an
oppressive alien race, the Kotl. The Kotl came to Eodon to expand their empire
and in doing so upset the delicate ecosystem that is the natural wonder of this
place. The Valley cannot survive if the Myrmidex are allowed to spread, and there
is no guarantee Britannia will be safe - they must be destroyed from within.
We must quell their numbers significantly in order to force their Queen into
reproduction, we must also obtain a powerful pheromone to gain safe passage within
the deepest reaches of their pits, and we must also find an insecticide powerful
enough to destroy them. Only then can we confront the Myrmidex Queen and end the
Myrmidex threat.*/
public override object Refuse{ get{ return 1156767; } } /*I must question your commitment to our cause - are you satisfied with these Myrmidex
invaders and their Barrabian allies?*/
public override object Uncomplete{ get{ return 1156768; } } /*You must obtain the Insecticide from the Gambler at the Modest Damsel in New
Magincia, the Pheremone from the Gardener in Delucia, and the Population Report
from Lt. Foxx before we can launch an offensive against the Myrmidex Queen!*/
public override object Complete{ get{ return 1156769; } } /*I should be excited but I cannot help but grimace at the destruction of an entire
population *she frowns a bit* I must remain pragmatic though, this is for the
greater good of the Valley and Britannia. The time to destroy the Myrmidex Queen
is now.*/
public ExterminatingTheInfestationQuest()
{
AddObjective(new ObtainObjective(typeof(BottledMyrmidexPheromone), "Bottled Myrmidex Pheromone", 1));
AddObjective(new ObtainObjective(typeof(BottleOfConcentratedInsecticide), "Bottle of Concentrated Insecticide", 1));
AddObjective(new ObtainObjective(typeof(MyrmidexPopulationReport), "Myrmidex Population Report", 1));
AddReward(new BaseReward(1156766)); // A step closer to destroying the Myrmidex Queen...
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Tribes))
{
Owner.SendLocalizedMessage(1156779); // You must pledge allegiance to the Eodonians and defeat the Myrmidex in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Chaos banner in Sir Goeffrey's Camp.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class InsecticideAndRegicideQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.EodonianAlliance; } }
public override object Title{ get{ return 1156770; } } // Insecticide and Regicide
public override object Description{ get{ return 1156771; } } /*Everything is in place. In the depths of the Myrmidex Pits are the Queen's
chambers, it is there that she spawns new Myrmidex to bolster the numbers within
the colony. No doubt she is powerful - the energy of the moonstones is sure to
have seen to that. It pains me to say this but - take no mercy, she must be
destroyed for the safety of the peoples of Eodon.*/
public override object Refuse{ get{ return 1156767; } } /*I must question your commitment to our cause - are you satisfied with these Myrmidex
invaders and their Barrabian allies?;*/
public override object Uncomplete{ get{ return 1156773; } } /*You must go into the depths of the Myrmidex Pits and find the Queen - she must
be destroyed! The entrance to the deepest parts of the Myrmidex Pits are in the
sandy valley to the West.*/
public override object Complete{ get{ return 1156774; } } /*You are brave and courageous - the Valley of Eodon is now safe from the Myrmidex threat!;*/
public InsecticideAndRegicideQuest()
{
AddObjective(new SlayObjective(typeof(MyrmidexQueen), "Myrmidex Queen", 1));
AddReward(new BaseReward(1156766)); // A step closer to destroying the Myrmidex Queen...
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Tribes))
{
Owner.SendLocalizedMessage(1156779); // You must pledge allegiance to the Eodonians and defeat the Myrmidex in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Chaos banner in Sir Goeffrey's Camp.
return false;
}
return true;
}
public override void GiveRewards()
{
base.GiveRewards();
Owner.AddToBackpack(new EodonianRewardBag());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class PestControlQuest : BaseQuest
{
public override object Title{ get{ return 1156785; } } // Pest Control
public override object Description{ get{ return 1156776; } } /*A significant portion of the Myrmidex population has been quelled in the surface
reaches of their habitat. Population reduction estimated to meet or exceed
parameters set forth for operational security. Recommend proceed.*/
public override object Refuse{ get{ return 1156787; } } // I knew it, you must be yellar! Get out of my sight!
public override object Uncomplete{ get{ return 1156788; } } /*You've got to kill enough Myrmidex Larvae, Drones, and Warriors in the Valley in
order to force the queen to show herself, they've got to be Myrmidex in the Valley
- stay out of the Myrmidex Pits!*/
public override object Complete{ get{ return 1156789; } } /*Well color me surprised, you did it! Now that we've gotten rid of enough of these
pests the Queen will have no choice but to reveal herself - here's the population
report you'll need for Professor Rafkin!*/
public PestControlQuest()
{
AddObjective(new SlayObjective(typeof(MyrmidexLarvae), "Myrmidex Larvae", 20));
AddObjective(new SlayObjective(typeof(MyrmidexDrone), "Myrmidex Drone", 15));
AddObjective(new SlayObjective(typeof(MyrmidexWarrior), "Myrmidex Warrior", 10));
AddReward(new BaseReward(typeof(MyrmidexPopulationReport), "Myrmidex Population Report"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Tribes))
{
Owner.SendLocalizedMessage(1156779); // You must pledge allegiance to the Eodonians and defeat the Myrmidex in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Chaos banner in Sir Goeffrey's Camp.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class GettingEvenQuest : BaseQuest
{
public override object Title{ get{ return 1156790; } } // Getting Even
public override object Description{ get{ return 1156791; } } /* *Sobs* Whyyyyy couldn't I just stop, no just had to be one more hand - I knew if
I could just get on a hot streak I'd make it all better...but I lost everything,
even my shirt! I loved that shirt, was so puffy and soft. How can fortune have
cursed me so badly? The only thing left to do is drink this poison here and -
*pauses and looks at you* You want this poison? *eyebrow raises a bit* Well if
you want it so bad you've got to do me a solid, head to the Fortune's Fire Casino
and make them pay! Bring down the house and I'll let you have the poison, at least
show me SOMEONE can win in that wretched place!*/
public override object Refuse{ get{ return 1156796; } } // Can't even be bothered to help a guy down on his luck? *sigh*
public override object Uncomplete{ get{ return 1156797; } } /*You need to go to the Fortune's Fire Casino on Fire Island and show those dealers
who's boss! Win 3 games each of Chuckle's Luck, Hi-Mid-Lo, and Dice Rider and I'll give
you the poison!*/
public override object Complete{ get{ return 1156798; } } /*Luck be a lady tonight! Winner-winner chicken dinner! I'm back in the game, don't
need this poison anymore - here you go!*/
public GettingEvenQuest()
{
AddObjective(new InternalObjective(typeof(ChucklesLuck)));
AddObjective(new InternalObjective(typeof(HiMiddleLow)));
AddObjective(new InternalObjective(typeof(DiceRider)));
AddReward(new BaseReward(typeof(BottleOfConcentratedInsecticide), "A Bottle Of Concentrated Insecticide"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Tribes))
{
Owner.SendLocalizedMessage(1156779); // You must pledge allegiance to the Eodonians and defeat the Myrmidex in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Chaos banner in Sir Goeffrey's Camp.
return false;
}
return true;
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 160, 312, 16, 1156792, 0x15F90, false, false); //Win 3 Games of "Chuckle's Luck" at the Fortune's Fire Casino
g.AddHtmlLocalized(98, 176, 312, 16, 1156793, 0x15F90, false, false); //Win 3 games of "Hi-Middle-Lo" at the Fortune's Fire Casino
g.AddHtmlLocalized(98, 192, 312, 16, 1156794, 0x15F90, false, false); //Win 3 games of "Dice Rider" at the Fortune's Fire Casino
return true;
}
public void Update(Type t)
{
foreach (InternalObjective obj in this.Objectives.OfType<InternalObjective>())
{
if (obj.Update(t))
{
if(Completed)
OnCompleted();
else if(obj.Completed)
Owner.SendSound(UpdateSound);
}
}
}
public class InternalObjective : BaseObjective
{
public Type GameType { get; set; }
public InternalObjective(Type type)
: base(3)
{
GameType = type;
}
public override bool Update(object o)
{
Type t = o as Type;
if(t != null && t == GameType && Quest != null && Quest.Owner != null && Quest.Owner.Region.IsPartOf("FireIsleCasino"))
{
if(t == typeof(ChucklesLuck))
{
CurProgress++;
Quest.Owner.SendSound(Quest.UpdateSound);
if (CurProgress <= MaxProgress)
Quest.Owner.SendLocalizedMessage(1156795, String.Format("{0}\t{1}\t{2}", CurProgress.ToString(), MaxProgress.ToString(), "Chuckles' Luck")); // [Quest Event: Getting Even] You have won ~1_count~ of ~2_req~ games of ~3_game~!
}
else if (t == typeof(HiMiddleLow))
{
CurProgress++;
Quest.Owner.SendSound(Quest.UpdateSound);
if (CurProgress <= MaxProgress)
Quest.Owner.SendLocalizedMessage(1156795, String.Format("{0}\t{1}\t{2}", CurProgress.ToString(), MaxProgress.ToString(), "Hi-Middle-Low")); // [Quest Event: Getting Even] You have won ~1_count~ of ~2_req~ games of ~3_game~!
}
else if (t == typeof(DiceRider))
{
CurProgress++;
Quest.Owner.SendSound(Quest.UpdateSound);
if (CurProgress <= MaxProgress)
Quest.Owner.SendLocalizedMessage(1156795, String.Format("{0}\t{1}\t{2}", CurProgress.ToString(), MaxProgress.ToString(), "Dice Rider")); // [Quest Event: Getting Even] You have won ~1_count~ of ~2_req~ games of ~3_game~!
}
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class OfVorpalsAndLettacesTheGardnerQuest : BaseQuest
{
public override object Title{ get{ return 1156780; } } // Of Vorpals and Lettuces
public override object Description{ get{ return 1156781; } } /*I cannot believe these wretched pests! I can't even manage to plant a single head of lettuce
without these rascals chomping them up! *She pauses for a moment and looks at you
quizzically* Oh, hello there! What is it I can do for you? Roses? Watermelons?
Lettuces? We've got them all...well maybe not lettuces but...Myrmidex Pheremone?
Well that is certainly a special request - say, how about this? You take care of
my rabbit problem and I'll give you the pheremone. Sounds fair to me!*/
public override object Refuse{ get{ return 1156782; } } // Well if you're afraid of a little bunny then you haven't much business tackling a Myrmidex. Hrmph!
public override object Uncomplete{ get{ return 1156783; } } /*There's no time to lose! My lettuces won't grow until you deal with the dastardly
bunnies wreaking havoc on my gardens! Get a green thorn and plant it in the garden's dirt
to drive them out!*/
public override object Complete{ get{ return 1156784; } } /*Well done! With these pests out of my gardens I can finally get on with growing a prized lettuce!
Here's your Pheromone as I promised!*/
public OfVorpalsAndLettacesTheGardnerQuest()
{
AddObjective(new SlayObjective(typeof(VorpalBunny), "Vorpal Bunny", 1, "Delucia"));
AddReward(new BaseReward(typeof(BottledMyrmidexPheromone), "Bottled Myrmidex Pheromone"));
}
public override bool CanOffer()
{
if (!MyrmidexInvasionSystem.CanRecieveQuest(Owner, Allegiance.Tribes))
{
Owner.SendLocalizedMessage(1156779); // You must pledge allegiance to the Eodonians and defeat the Myrmidex in the Myrmidex Pits before you can embark on this quest. You may pledge allegiance by double clicking the Chaos banner in Sir Goeffrey's Camp.
return false;
}
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+840
View File
@@ -0,0 +1,840 @@
using System;
using Server;
using Server.Items;
using System.Collections.Generic;
using Server.Engines.Quests;
using System.Linq;
namespace Server.Mobiles
{
[CorpseName("a tyrannosaurus rex corpse")]
public class TRex : BaseCreature
{
private DateTime _NextFreeze;
[Constructable]
public TRex()
: base(AIType.AI_Melee, FightMode.Weakest, 10, 1, .08, .17)
{
Name = "Tyrannosaurus Rex";
Body = 1400;
BaseSoundID = 362;
SetStr(500, 700);
SetDex(500, 700);
SetInt(100, 180);
SetHits(15000);
SetDamage(33, 55);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 80, 90);
SetResistance(ResistanceType.Fire, 60, 80);
SetResistance(ResistanceType.Cold, 60, 70);
SetResistance(ResistanceType.Poison, 80, 100);
SetResistance(ResistanceType.Energy, 60, 70);
SetSkill(SkillName.Anatomy, 100.0);
SetSkill(SkillName.MagicResist, 140.0, 150.0);
SetSkill(SkillName.Tactics, 110.0, 130.0);
SetSkill(SkillName.Wrestling, 130.0, 150.0);
SetSkill(SkillName.Poisoning, 60.0, 70.0);
SetSkill(SkillName.Parry, 100);
Fame = 24000;
Karma = -24000;
_NextFreeze = DateTime.UtcNow;
CanSwim = true;
SetWeaponAbility(WeaponAbility.ArmorIgnore);
SetSpecialAbility(SpecialAbility.TailSwipe);
}
public override bool AutoDispel { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Lethal; } }
public override bool UseSmartAI { get { return true; } }
public override bool ReacquireOnMovement { get { return true; } }
public override bool AttacksFocus { get { return true; } }
public override bool CanFlee { get { return false; } }
public override int TreasureMapLevel { get { return 7; } }
// Missing Tail Swipe Ability
public override void OnThink()
{
base.OnThink();
if (Combatant == null)
return;
if (_NextFreeze < DateTime.UtcNow)
DoFreeze();
}
public void DoFreeze()
{
DoEffects(Direction.North);
DoEffects(Direction.West);
DoEffects(Direction.South);
DoEffects(Direction.East);
_NextFreeze = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 60));
}
private bool DoEffects(Direction d)
{
int x = X;
int y = Y;
int z = Z;
int range = 10;
int offset = 8;
switch (d)
{
case Direction.North:
x = X + Utility.RandomMinMax(-offset, offset);
y = Y - range;
break;
case Direction.West:
x = X - range;
y = Y + Utility.RandomMinMax(-offset, offset);
break;
case Direction.South:
x = X + Utility.RandomMinMax(-offset, offset);
y = Y + range;
break;
case Direction.East:
x = X + range;
y = Y + Utility.RandomMinMax(-offset, offset);
break;
}
for (int i = 0; i < range; i++)
{
switch (d)
{
case Direction.North: y += i; break;
case Direction.West: x += i; break;
case Direction.South: y -= i; break;
case Direction.East: x -= i; break;
}
z = Map.GetAverageZ(x, y);
Point3D p = new Point3D(x, y, z);
if (Server.Spells.SpellHelper.AdjustField(ref p, Map, 12, false))/*Map.CanFit(x, y, z, 16, false, false, true))/*Map.CanSpawnMobile(x, y, z)*/
{
MovementPath path = new MovementPath(this, p);
if (path.Success)
{
DropCrack(path);
return true;
}
}
}
return false;
}
private void DropCrack(MovementPath path)
{
int time = 10;
int x = X;
int y = Y;
for (int i = 0; i < path.Directions.Length; ++i)
{
Movement.Movement.Offset(path.Directions[i], ref x, ref y);
IPoint3D p = new Point3D(x, y, Map.GetAverageZ(x, y)) as IPoint3D;
Timer.DelayCall(TimeSpan.FromMilliseconds(time), new TimerStateCallback(ManaDrainEffects_Callback), new object[] { p, Map });
time += 200;
}
}
private void ManaDrainEffects_Callback(object o)
{
object[] objs = o as object[];
IPoint3D p = objs[0] as IPoint3D;
Map map = objs[1] as Map;
var item = new FreezeItem(Utility.RandomList(6913, 6915, 6917, 6919), this);
Spells.SpellHelper.GetSurfaceTop(ref p);
item.MoveToWorld(new Point3D(p), Map);
}
private class FreezeItem : Item
{
public Item Static { get; private set; }
public BaseCreature Owner { get; private set; }
public FreezeItem(int id, BaseCreature owner)
: base(id)
{
Owner = owner;
Movable = false;
Hue = 1152;
Timer.DelayCall(TimeSpan.FromSeconds(5), ChangeHue);
}
private void ChangeHue()
{
Hue = 1153;
Static.Hue = 1153;
Timer.DelayCall(TimeSpan.FromSeconds(0.5), Delete);
}
public override void Delete()
{
if (Static != null)
Static.Delete();
Static = null;
base.Delete();
}
public override void OnLocationChange(Point3D oldLocation)
{
Static = new Static(ItemID + 1);
Static.MoveToWorld(Location, Map);
IPooledEnumerable eable = Map.GetMobilesInRange(Location, 0);
foreach (Mobile m in eable)
{
OnMoveOver(m);
}
eable.Free();
}
public override bool OnMoveOver(Mobile m)
{
if ((m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).GetMaster() is PlayerMobile)) && m.CanBeHarmful(Owner, false))
{
m.Freeze(TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10)));
if (Owner.CanBeHarmful(m))
{
m.AggressiveAction(Owner);
Owner.InitialFocus = m;
Owner.Combatant = m;
}
}
return true;
}
public FreezeItem(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Delete();
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 2);
}
public TRex(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
[CorpseName("the corpse of a great ape")]
public class GreatApe : BaseCreature
{
private DateTime _NextSpecial;
private DateTime _NextBarrelThrow;
private int _LastTeleport;
private Point3D[] _TeleList =
{
new Point3D(874, 1439, 0),
new Point3D(847, 1425, 0),
new Point3D(847, 1389, 0),
new Point3D(866, 1366, 0),
new Point3D(887, 1390, 0),
new Point3D(889, 1407, 0),
new Point3D(882, 1426, 0),
new Point3D(858, 1412, 21),
new Point3D(868, 1412, 20),
new Point3D(869, 1409, 20),
new Point3D(869, 1404, 20),
new Point3D(858, 1412, 21),
new Point3D(868, 1412, 20),
new Point3D(869, 1409, 20),
new Point3D(869, 1404, 20),
};
private Point3D[] _PlayerTeleList =
{
new Point3D(875, 1380, -20),
new Point3D(855, 1442, -20)
};
private int[] _BarrelIDs =
{
3703, 4014, 5453, 7861,
17650
};
[CommandProperty(AccessLevel.GameMaster)]
public bool Teleports { get; set; }
[Constructable]
public GreatApe(bool teleports = false)
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, .08, .17)
{
Teleports = teleports;
Name = "a great ape";
Body = 1308;
BaseSoundID = 0x9E;
SetStr(986, 1185);
SetDex(177, 255);
SetInt(151, 250);
SetHits(12500);
SetDamage(20, 33);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 65, 80);
SetResistance(ResistanceType.Fire, 60, 80);
SetResistance(ResistanceType.Cold, 50, 60);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.Anatomy, 25.1, 50.0);
SetSkill(SkillName.MagicResist, 150.0);
SetSkill(SkillName.Tactics, 100);
SetSkill(SkillName.Wrestling, 100);
Fame = 35000;
Karma = -35000;
_NextSpecial = DateTime.UtcNow;
_NextBarrelThrow = DateTime.UtcNow;
}
public override void GenerateLoot()
{
AddLoot(LootPack.SuperBoss, 2);
}
public override bool AutoDispel { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Lethal; } }
public override bool UseSmartAI { get { return true; } }
public override int TreasureMapLevel { get { return 7; } }
public GreatApe(Serial serial)
: base(serial)
{
}
public override void OnThink()
{
base.OnThink();
if (Combatant == null)
return;
if (_NextSpecial < DateTime.UtcNow)
{
_NextSpecial = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(45, 60));
switch(Utility.Random(Teleports ? 3 : 2))
{
case 0:
IPooledEnumerable eable = Map.GetMobilesInRange(Location, 10);
foreach (Mobile m in eable)
{
if (m.Alive && m.AccessLevel == AccessLevel.Player && m is PlayerMobile && .75 > Utility.RandomDouble())
DoDismount(m);
}
eable.Free();
break;
case 1:
IPooledEnumerable eable2 = Map.GetMobilesInRange(Location, 10);
List<Mobile> mobiles = new List<Mobile>();
foreach (Mobile m in eable2)
{
if (m.Alive && m.AccessLevel == AccessLevel.Player && m is PlayerMobile)
mobiles.Add(m);
}
eable2.Free();
if (mobiles.Count > 0)
{
Mobile m = mobiles[Utility.Random(mobiles.Count)];
Point3D old2 = m.Location;
Point3D p2 = _PlayerTeleList[Utility.Random(_PlayerTeleList.Length)];
m.MoveToWorld(p2, Map);
m.ProcessDelta();
Effects.SendLocationParticles(EffectItem.Create(old2, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
Effects.SendLocationParticles(EffectItem.Create(p2, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
}
ColUtility.Free(mobiles);
break;
case 2:
int ran = -1;
while (ran < 0 || ran > _TeleList.Length || ran == _LastTeleport)
{
ran = Utility.Random(_TeleList.Length);
}
_LastTeleport = ran;
Point3D p = _TeleList[ran];
Point3D old = Location;
MoveToWorld(p, Map);
ProcessDelta();
Effects.SendLocationParticles(EffectItem.Create(old, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
Effects.SendLocationParticles(EffectItem.Create(p, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
break;
}
}
else if (_NextBarrelThrow < DateTime.UtcNow && .25 > Utility.RandomDouble())
{
_NextBarrelThrow = DateTime.UtcNow + TimeSpan.FromSeconds(Utility.RandomMinMax(5, 10));
int barrel = CheckBarrel();
if (barrel >= 0)
{
IPooledEnumerable eable = Map.GetMobilesInRange(Location, 10);
List<Mobile> mobiles = new List<Mobile>();
foreach (Mobile m in eable)
{
if (m.Alive && m.AccessLevel == AccessLevel.Player && m is PlayerMobile)
mobiles.Add(m);
}
eable.Free();
if (mobiles.Count > 0)
{
Mobile m = mobiles[Utility.Random(mobiles.Count)];
DoHarmful(m);
MovingParticles(m, barrel, 10, 0, false, true, 0, 0, 9502, 6014, 0x11D, EffectLayer.Waist, 0);
Timer.DelayCall(TimeSpan.FromSeconds(1), () =>
{
m.PlaySound(0x11D);
AOS.Damage(m, this, Utility.RandomMinMax(70, 120), 100, 0, 0, 0, 0);
});
}
ColUtility.Free(mobiles);
}
}
}
public void DoDismount(Mobile m)
{
MovingParticles(m, 0x36D4, 7, 0, false, true, 9502, 4019, 0x160);
PlaySound(0x15E);
double range = m.GetDistanceToSqrt(this);
Timer.DelayCall(TimeSpan.FromMilliseconds(250 * range), () =>
{
IMount mount = m.Mount;
if (mount != null)
{
if (m is PlayerMobile)
((PlayerMobile)m).SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(10), true);
else
mount.Rider = null;
}
else if (m.Flying)
{
((PlayerMobile)m).SetMountBlock(BlockMountType.Dazed, TimeSpan.FromSeconds(10), true);
}
PlaySound(0x220);
AOS.Damage(m, this, Utility.RandomMinMax(15, 25), 100, 0, 0, 0, 0);
m.SendLocalizedMessage(1156495); // *The shaking ground damages and disorients you!*
});
}
public int CheckBarrel()
{
IPooledEnumerable eable = Map.GetItemsInRange(Location, 2);
List<Item> items = new List<Item>();
foreach (Item item in eable)
{
if (!item.Movable && _BarrelIDs.Any(id => id == item.ItemID))
items.Add(item);
}
eable.Free();
int itemid;
if (items.Count > 0)
itemid = items[Utility.Random(items.Count)].ItemID;
else
itemid = -1;
ColUtility.Free(items);
return itemid;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(Teleports);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Teleports = reader.ReadBool();
_NextSpecial = DateTime.UtcNow;
_NextBarrelThrow = DateTime.UtcNow;
}
}
[CorpseName("the corpse of a tiger cub")]
public class TigerCub : BaseCreature
{
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Protector { get; set; }
[Constructable]
public TigerCub()
: base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4)
{
Name = "a tiger cub";
Body = 1309;
BaseSoundID = 0x69;
SetStr(100);
SetDex(100);
SetInt(20);
SetHits(50, 60);
SetMana(0);
SetDamage(10, 12);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 5, 10);
SetSkill(SkillName.MagicResist, 5.0);
SetSkill(SkillName.Tactics, 40.0);
SetSkill(SkillName.Wrestling, 50.0);
Fame = 0;
Karma = 500;
ControlSlots = 1;
MinTameSkill = 0;
}
public override void OnThink()
{
base.OnThink();
if (Protector != null && Protector is PlayerMobile && InRange(Home, 2))
{
PrideOfTheAmbushQuest quest = QuestHelper.GetQuest((PlayerMobile)Protector, typeof(PrideOfTheAmbushQuest)) as PrideOfTheAmbushQuest;
if (quest != null && !quest.Completed)
quest.Update(this);
Protector.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156501, Protector.NetState); // *You watch as the Tiger Cub safely returns to the Kurak Tribe*
Timer.DelayCall(TimeSpan.FromSeconds(.25), Delete);
Protector = null;
}
}
public override int Damage(int amount, Mobile from, bool informMount, bool checkfizzle)
{
if (from == Protector)
{
PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156500, from.NetState); // *The cub looks at you playfully. Your attack fails as you are overwhelmed by its cuteness*
return 0;
}
return base.Damage(amount, from, informMount, checkfizzle);
}
public override int Meat { get { return 1; } }
public override FoodType FavoriteFood { get { return FoodType.Meat | FoodType.Fish; } }
public override PackInstinct PackInstinct { get { return PackInstinct.Feline; } }
public TigerCub(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1);
writer.Write(Protector);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Protector = reader.ReadMobile();
if(version == 0)
{
ControlSlots = 1;
MinTameSkill = 0;
}
}
}
public class Trapper : Brigand
{
[Constructable]
public Trapper()
{
Title = "the trapper";
SetHits(2500);
SetStr(125, 150);
SetDex(200);
SetInt(61, 75);
SetDamage(20, 32);
SetSkill(SkillName.Fencing, 100);
SetSkill(SkillName.Macing, 100);
SetSkill(SkillName.MagicResist, 120);
SetSkill(SkillName.Swords, 100);
SetSkill(SkillName.Tactics, 100);
SetSkill(SkillName.Wrestling, 100);
Fame = 12000;
Karma = -12000;
Timer.DelayCall(TimeSpan.FromMinutes(10), Delete);
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich, 3);
}
public Trapper(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Delete();
}
}
public class Poacher : Trapper
{
[CommandProperty(AccessLevel.GameMaster)]
public NestWithEgg Nest { get; set; }
[Constructable]
public Poacher(NestWithEgg nest)
{
Title = "the poacher";
Nest = nest;
}
public override void GenerateLoot()
{
AddLoot(LootPack.Rich, 3);
}
public Poacher(Serial serial)
: base(serial)
{
}
public override void OnDeath(Container c)
{
base.OnDeath(c);
if (Nest != null && !Nest.Deleted)
Nest.OnPoacherKilled(this);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
[CorpseName("a lava elemental corpse")]
public class VolcanoElemental : BaseCreature
{
[Constructable]
public VolcanoElemental()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a volcano elemental";
Body = 15;
Hue = 2726;
SetStr(446, 510);
SetDex(173, 191);
SetInt(369, 397);
SetHits(800, 1200);
SetDamage(18, 24);
SetDamageType(ResistanceType.Physical, 10);
SetDamageType(ResistanceType.Fire, 90);
SetResistance(ResistanceType.Physical, 60, 70);
SetResistance(ResistanceType.Fire, 20, 30);
SetResistance(ResistanceType.Cold, 20, 30);
SetResistance(ResistanceType.Poison, 100);
SetResistance(ResistanceType.Energy, 40, 50);
SetSkill(SkillName.Anatomy, 0.0, 12.8);
SetSkill(SkillName.EvalInt, 84.8, 92.6);
SetSkill(SkillName.Magery, 90.1, 92.7);
SetSkill(SkillName.Meditation, 97.8, 102.8);
SetSkill(SkillName.MagicResist, 101.9, 106.2);
SetSkill(SkillName.Tactics, 80.3, 94.0);
SetSkill(SkillName.Wrestling, 71.7, 85.4);
Fame = 12500;
Karma = -12500;
SetSpecialAbility(SpecialAbility.DragonBreath);
}
public override void GenerateLoot()
{
AddLoot(LootPack.FilthyRich, 3);
AddLoot(LootPack.Gems, 2);
AddLoot(LootPack.MedScrolls);
}
public VolcanoElemental(Serial serial)
: base(serial)
{
}
public override int GetIdleSound()
{
return 1549;
}
public override int GetAngerSound()
{
return 1546;
}
public override int GetHurtSound()
{
return 1548;
}
public override int GetDeathSound()
{
return 1547;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,257 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Mobiles;
using System.Linq;
using Server.Engines.Quests;
namespace Server.Items
{
public class NestWithEgg : BaseAddon
{
public TimeSpan ResetPeriod { get { return TimeSpan.FromSeconds(Utility.RandomMinMax(120, 360)); } }
public List<BaseCreature> Poachers { get; set; }
public List<Mobile> FocusList { get; set; }
public BaseCreature Hatchling { get; set; }
public Mobile Focus { get; set; }
public bool IsHatching { get; set; }
public DateTime CooldownEnds { get; set; }
public Timer DeadlineTimer { get; set; }
public AddonComponent Egg
{
get
{
return Components.FirstOrDefault(c => c.ItemID == 16831);
}
}
public bool IsInCooldown { get { return CooldownEnds != DateTime.MinValue && DateTime.UtcNow < CooldownEnds; } }
[Constructable]
public NestWithEgg()
{
AddonComponent comp = new LocalizedAddonComponent(3518, 1026869);
comp.Hue = 449;
AddComponent(comp, 0, 0, 0);
comp = new LocalizedAddonComponent(3270, 1026869);
comp.Hue = 551;
AddComponent(comp, 0, 0, 2);
comp = new LocalizedAddonComponent(3374, 1026869);
comp.Hue = 551;
AddComponent(comp, 0, 0, 2);
comp = new LocalizedAddonComponent(16831, 1112469);
AddComponent(comp, 1, 1, 15);
FocusList = new List<Mobile>();
}
public override bool HandlesOnMovement { get { return !IsInCooldown; } }
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if(m is PlayerMobile && m.Location != oldLocation && m.InRange(this.Location, 3) && (!FocusList.Contains(m) || 0.015 > Utility.RandomDouble()))
{
EmptyNestQuest quest = QuestHelper.GetQuest((PlayerMobile)m, typeof(EmptyNestQuest)) as EmptyNestQuest;
if(quest != null && !quest.Completed)
{
if(Focus == null)
{
Focus = m;
m.RevealingAction();
SpawnPoachers(m);
DeadlineTimer = Timer.DelayCall(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5), () =>
{
DeadlineTimer.Stop();
if(Poachers != null && Poachers.Count > 0)
Delete();
else
{
Focus = null;
Hatchling = null;
CooldownEnds = DateTime.MinValue;
}
});
DeadlineTimer.Start();
}
else if(IsInCooldown)
{
CooldownEnds = DateTime.UtcNow + TimeSpan.FromMinutes(2);
}
}
}
}
public void SpawnPoachers(Mobile m)
{
Map map = m.Map;
if(map == null || map == Map.Internal)
return;
if(Poachers == null)
Poachers = new List<BaseCreature>();
for(int i = 0; i < 3; i++)
{
Poacher p = new Poacher(this);
Point3D pnt = m.Location;
for(int j = 0; j < 10; j++)
{
int x = Utility.RandomMinMax(m.X - 2, m.X + 2);
int y = Utility.RandomMinMax(m.Y - 2, m.Y + 2);
int z = map.GetAverageZ(x, y);
if(map.CanSpawnMobile(x, y, z))
{
pnt = new Point3D(x, y, z);
break;
}
}
p.MoveToWorld(pnt, map);
Poachers.Add(p);
}
Poachers.ForEach(poacher => poacher.Combatant = m);
}
public void OnPoacherKilled(BaseCreature bc)
{
if(Poachers != null && Poachers.Contains(bc))
{
Poachers.Remove(bc);
if(Poachers.Count == 0)
{
if(!IsHatching)
{
IsHatching = true;
ColUtility.Free(Poachers);
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(15, 30)), () =>
{
Hatchling = new DragonTurtleHatchling();
Hatchling.MoveToWorld(this.Location, this.Map);
Hatchling.Tamable = false;
SpawnPoachers(Hatchling);
if(Egg != null)
Egg.Visible = false;
});
}
else
{
if(Hatchling.Alive)
{
CooldownEnds = DateTime.UtcNow + ResetPeriod;
Timer.DelayCall(TimeSpan.FromSeconds(1), OnComplete, new object[] { Hatchling, Focus } );
if(!FocusList.Contains(Focus))
FocusList.Add(Focus);
}
else
Delete();
if(DeadlineTimer != null)
{
DeadlineTimer.Stop();
DeadlineTimer = null;
}
Hatchling = null;
Focus = null;
ColUtility.Free(Poachers);
Poachers = null;
}
}
}
}
private void OnComplete(object o)
{
object[] objs = o as object[];
BaseCreature hatchling = objs[0] as BaseCreature;
Mobile focus = objs[1] as Mobile;
if(hatchling != null)
{
focus.PublicOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156496); // *The Hatchling safely burrows into the sand*
Timer.DelayCall(TimeSpan.FromSeconds(1), hatchling.Delete);
}
if(focus != null && focus is PlayerMobile)
{
EmptyNestQuest quest = QuestHelper.GetQuest((PlayerMobile)focus, typeof(EmptyNestQuest)) as EmptyNestQuest;
if(quest != null)
{
quest.Update(hatchling);
// Quest Complete and crap can be handled in update
}
}
Timer.DelayCall(TimeSpan.FromMinutes(1), () =>
{
if(Egg != null && !Egg.Visible)
Egg.Visible = true;
});
IsHatching = false;
}
public override void Delete()
{
base.Delete();
if (DeadlineTimer != null)
{
DeadlineTimer.Stop();
DeadlineTimer = null;
}
if (Poachers != null)
ColUtility.Free(Poachers);
}
public NestWithEgg(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write(Hatchling);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Hatchling = reader.ReadMobile() as BaseCreature;
if(Hatchling != null)
Hatchling.Delete();
if(Egg != null && !Egg.Visible)
Egg.Visible = true;
FocusList = new List<Mobile>();
}
}
}
+759
View File
@@ -0,0 +1,759 @@
using Server;
using System;
using Server.Engines.Quests;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
namespace Server.Items
{
public class KingBlackthornOrders : BaseQuestItem
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof( TimeIsOfTheEssenceQuest )
};
}
}
public override int LabelNumber { get { return 1156516; } } // Orders from King Blackthorn to Sir Geoffrey
public override int Lifespan { get { return 360; } }
[Constructable]
public KingBlackthornOrders()
: base(8792)
{
}
public KingBlackthornOrders(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
/*public class LavaStone : Item
{
public override int LabelNumber { get { return 1151166; } } // lava rock
[Constructable]
public LavaStone()
: base(39638)
{
}
public LavaStone(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}*/
public class MosaicOfHeluzz : Item
{
public override int LabelNumber { get { return 1156467; } } // Mosaic of Heluzz
[Constructable]
public MosaicOfHeluzz() : base(39638)
{
Hue = 2952;
}
public MosaicOfHeluzz(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class TotemOfFabozz : Item
{
public override int LabelNumber { get { return 1156468; } } // Totem Of Faboz
[Constructable]
public TotemOfFabozz() : base(40092)
{
Hue = 2576;
}
public TotemOfFabozz(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class FiresOfKukuzz : Item
{
public override int LabelNumber { get { return 1156469; } } // Fires of Kukuzz
[Constructable]
public FiresOfKukuzz() : base(40014)
{
}
public FiresOfKukuzz(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class SkullOfMotazz : Item
{
public override int LabelNumber { get { return 1156470; } } // The Skull of Motazz
[Constructable]
public SkullOfMotazz() : base(40051)
{
Hue = 2500;
}
public SkullOfMotazz(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class SkullOfAphazz : Item
{
public override int LabelNumber { get { return 1156471; } } // The Skull of Aphazz
[Constructable]
public SkullOfAphazz() : base(8707)
{
}
public SkullOfAphazz(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public enum RugHue
{
Regular,
White,
Black
}
public class TigerRugAddon : BaseAddon
{
public override BaseAddonDeed Deed { get { return new TigerRugAddonDeed(this.RugType); } }
public RugHue RugType { get; set; }
[Constructable]
public TigerRugAddon() : this(RugHue.Regular, true)
{
}
[Constructable]
public TigerRugAddon(RugHue type, bool south)
{
RugType = type;
int hue = 0;
int cliloc;
switch(type)
{
default:
case RugHue.Regular:
cliloc = 1156481;
break;
case RugHue.White:
hue = 2500;
cliloc = 1156483;
break;
case RugHue.Black:
hue = 1175;
cliloc = 1156482;
break;
}
if(south)
{
AddComponent(new LocalizedAddonComponent(40057, cliloc), 0, 0, 0);
AddComponent(new LocalizedAddonComponent(40058, cliloc), -1, 0, 0);
AddComponent(new LocalizedAddonComponent(40059, cliloc), 0, -1, 0);
AddComponent(new LocalizedAddonComponent(40060, cliloc), -1, -1, 0);
AddComponent(new LocalizedAddonComponent(40061, cliloc), 0, -2, 0);
AddComponent(new LocalizedAddonComponent(40062, cliloc), -1, -2, 0);
}
else
{
AddComponent(new LocalizedAddonComponent(40051, cliloc), 0, 0, 0);
AddComponent(new LocalizedAddonComponent(40052, cliloc), 0, -1, 0);
AddComponent(new LocalizedAddonComponent(40053, cliloc), -1, 0, 0);
AddComponent(new LocalizedAddonComponent(40054, cliloc), -1, -1, 0);
AddComponent(new LocalizedAddonComponent(40055, cliloc), -2, 0, 0);
AddComponent(new LocalizedAddonComponent(40056, cliloc), -2, -1, 0);
}
Timer.DelayCall(() => Hue = hue);
}
public TigerRugAddon(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)RugType);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
RugType = (RugHue)reader.ReadInt();
}
}
public class TigerRugAddonDeed : BaseAddonDeed
{
public override int LabelNumber
{
get
{
switch(this.RugType)
{
case RugHue.Regular: return 1156481;
case RugHue.White: return 1156483;
case RugHue.Black: return 1156482;
}
return 1156481;
}
}
public override BaseAddon Addon { get { return new TigerRugAddon(this.RugType, SouthFacing); } }
public RugHue RugType { get; set; }
public bool SouthFacing { get; set; }
[Constructable]
public TigerRugAddonDeed() : this(RugHue.Regular)
{
}
[Constructable]
public TigerRugAddonDeed(RugHue type)
{
RugType = type;
}
public override void OnDoubleClick(Mobile from)
{
if(IsChildOf(from.Backpack))
{
from.SendGump(new SouthEastGump(s =>
{
SouthFacing = s;
base.OnDoubleClick(from);
}));
}
}
public TigerRugAddonDeed(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)RugType);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
RugType = (RugHue)reader.ReadInt();
}
}
public enum BananaHoardSize
{
Small,
Medium,
Large
}
public class BananaHoardAddon : BaseAddon
{
public override BaseAddonDeed Deed { get { return new BananaHoardAddonDeed(); } }
public BananaHoardSize BananaHoardSize { get; set; }
[Constructable]
public BananaHoardAddon()
{
}
public BananaHoardAddon(BananaHoardSize bananaHoardSize)
{
BananaHoardSize = bananaHoardSize;
switch(bananaHoardSize)
{
case BananaHoardSize.Small:
AddComponent(new LocalizedAddonComponent(40047, 1156484), 0, 0, 0);
AddComponent(new LocalizedAddonComponent(40046, 1156484), -1, 0, 0);
AddComponent(new LocalizedAddonComponent(40049, 1156484), 0, -1, 0);
AddComponent(new LocalizedAddonComponent(40050, 1156484), -1, -1, 0);
break;
case BananaHoardSize.Medium:
AddComponent(new LocalizedAddonComponent(40043, 1156485), 0, 0, 0);
AddComponent(new LocalizedAddonComponent(40044, 1156485), 0, -1, 0);
AddComponent(new LocalizedAddonComponent(40048, 1156485), -1, 0, 0);
AddComponent(new LocalizedAddonComponent(40045, 1156485), -1, -1, 0);
break;
case BananaHoardSize.Large:
AddComponent(new LocalizedAddonComponent(40042, 1156486), 0, 0, 0);
AddComponent(new LocalizedAddonComponent(40040, 1156486), -1, 0, 0);
AddComponent(new LocalizedAddonComponent(40041, 1156486), 0, -1, 0);
break;
}
}
public BananaHoardAddon(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write((int)this.BananaHoardSize);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
this.BananaHoardSize = (BananaHoardSize)reader.ReadInt();
}
}
public class BananaHoardAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon { get { return new BananaHoardAddon(BananaHoardSize); } }
public override int LabelNumber { get { return 1156556; } } // Great Ape's Banana Hoard
public BananaHoardSize BananaHoardSize { get; set; }
[Constructable]
public BananaHoardAddonDeed()
{
}
public override void OnDoubleClick(Mobile from)
{
if(IsChildOf(from.Backpack))
{
from.SendGump(new InternalGump(from as PlayerMobile, s =>
{
this.BananaHoardSize = s;
base.OnDoubleClick(from);
}));
}
}
private class InternalGump : Gump
{
public Action<BananaHoardSize> Callback { get; set; }
public PlayerMobile User { get; set; }
public InternalGump(PlayerMobile p, Action<BananaHoardSize> callback) : base(50, 50)
{
Callback = callback;
User = p;
AddGumpLayout();
}
public void AddGumpLayout()
{
AddBackground(0, 0, 200, 200, 5054);
AddBackground(10, 10, 180, 180, 3000);
AddHtml(55, 50, 150, 16, "Small", false, false);
AddHtml(55, 80, 150, 16, "Medium", false, false);
AddHtml(55, 110, 150, 16, "Large", false, false);
for(int i = 0; i < 3; i++)
{
AddButton(20, 50 + (i * 30), 4005, 4007, i + 1, GumpButtonType.Reply, 0);
}
}
public override void OnResponse(NetState state, RelayInfo info)
{
if (info.ButtonID > 0 && Callback != null)
{
Callback((BananaHoardSize)info.ButtonID - 1);
}
}
}
public BananaHoardAddonDeed(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DinosaurHunterRewardTitleDeed : BaseRewardTitleDeed
{
public override TextDefinition Title { get { return new TextDefinition("Dinosaur Hunter"); } }
[Constructable]
public DinosaurHunterRewardTitleDeed()
{
}
public DinosaurHunterRewardTitleDeed(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class LavaRockDisplay : Item
{
public override int LabelNumber { get { return 1124033; } } // lava rock display
[Constructable]
public LavaRockDisplay() : base(40009)
{
Weight = 5.0;
}
public LavaRockDisplay(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DragonTurtleFountainAddon : BaseAddon
{
public override BaseAddonDeed Deed { get { return new DragonTurtleFountainAddonDeed(); } }
[Constructable]
public DragonTurtleFountainAddon(bool south)
{
if (south)
{
AddComponent(new AddonComponent(40087), 0, 0, 0);
AddComponent(new AddonComponent(40089), 0, -1, 0);
AddComponent(new AddonComponent(40088), 1, -1, 0);
AddComponent(new AddonComponent(40090), 1, -2, 0);
}
else
{
AddComponent(new AddonComponent(40092), 0, 0, 0);
AddComponent(new AddonComponent(40093), -1, 0, 0);
AddComponent(new AddonComponent(40094), -1, 1, 0);
AddComponent(new AddonComponent(40096), -2, 1, 0);
}
}
public DragonTurtleFountainAddon(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class DragonTurtleFountainAddonDeed : BaseAddonDeed
{
public override BaseAddon Addon { get { return new DragonTurtleFountainAddon(SouthFacing); } }
public override int LabelNumber { get { return 1156488; } } // Dragon Turtle Fountain
public bool SouthFacing { get; set; }
[Constructable]
public DragonTurtleFountainAddonDeed()
{
}
public override void OnDoubleClick(Mobile from)
{
if (IsChildOf(from.Backpack))
{
from.SendGump(new SouthEastGump(s =>
{
SouthFacing = s;
base.OnDoubleClick(from);
}));
}
}
public DragonTurtleFountainAddonDeed(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
public class PetTigerCubStatuette : MonsterStatuette
{
public bool HasUsed { get; set; }
[Constructable]
public PetTigerCubStatuette() : base(MonsterStatuetteType.TigerCub)
{
IsRewardItem = false;
}
public override void OnDoubleClick(Mobile from)
{
if (HasUsed)
{
base.OnDoubleClick(from);
}
else if (IsLockedDown && from.Followers != from.FollowersMax)
{
BaseCreature cub = new TigerCub();
Point3D p = from.Location;
int x = p.X;
int y = p.Y;
Server.Movement.Movement.Offset(from.Direction, ref x, ref y);
int z = from.Map.GetAverageZ(x, y);
if (from.Map.CanSpawnMobile(x, y, z))
p = new Point3D(x, y, z);
cub.MoveToWorld(p, from.Map);
cub.SetControlMaster(from);
cub.IsBonded = true;
HasUsed = true;
}
}
public PetTigerCubStatuette(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(1);
writer.Write(HasUsed);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
switch(v)
{
case 1:
HasUsed = reader.ReadBool();
break;
case 0:
break;
}
}
}
public class UniqueTreasureBag : Pouch
{
public override int LabelNumber { get { return 1156581; } } // A bag with a unique treasure
[Constructable]
public UniqueTreasureBag()
{
switch (Utility.Random(6))
{
case 0: DropItem(new LavaRockDisplay()); break;
case 1:
double random = Utility.RandomDouble();
if (random <= .02)
DropItem(new TigerRugAddonDeed(RugHue.White));
else if (random < .15)
DropItem(new TigerRugAddonDeed(RugHue.Black));
else
DropItem(new TigerRugAddonDeed(RugHue.Regular));
break;
case 2: DropItem(new BananaHoardAddonDeed()); break;
case 3: DropItem(new DragonTurtleFountainAddonDeed()); break;
case 4: DropItem(new DinosaurHunterRewardTitleDeed()); break;
case 5: DropItem(new PetTigerCubStatuette()); break;
}
}
public UniqueTreasureBag(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
}
}
}
+251
View File
@@ -0,0 +1,251 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Mobiles;
using System.Linq;
using Server.Network;
using Server.Commands;
namespace Server.Items
{
public class MyrmidexHill : Item
{
private Type[] _SpawnList =
{
typeof(MyrmidexLarvae), typeof(MyrmidexDrone), typeof(MyrmidexWarrior)
};
[CommandProperty(AccessLevel.GameMaster)]
public DateTime NextSpawn { get; set; }
public EodonTribeRegion Zone { get; set; }
public List<BaseCreature> Spawn { get; set; }
[CommandProperty(AccessLevel.GameMaster)]
public Mobile Focus { get; set; }
public int SpawnCount { get { return Utility.RandomMinMax(6, 9); } }
public int HasSpawned { get; set; }
public MyrmidexHill(EodonTribeRegion zone, Mobile focus)
: base(8754)
{
Movable = false;
Focus = focus;
Zone = zone;
Spawn = new List<BaseCreature>();
}
public override bool HandlesOnMovement { get { return NextSpawn < DateTime.UtcNow; } }
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (m.InRange(this.Location, 7) && m.AccessLevel == AccessLevel.Player &&
(m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).GetMaster() is PlayerMobile)))
{
Focus = m;
DoSpawn();
}
}
public void DoSpawn()
{
Map map = this.Map;
if (Spawn == null)
return;
ColUtility.ForEach(Spawn.Where(bc => bc == null || !bc.Alive || bc.Deleted), bc => Spawn.Remove(bc));
if (map != null && map != Map.Internal && !this.Deleted && Spawn.Count == 0 && HasSpawned < 3)
{
HasSpawned++;
NextSpawn = DateTime.UtcNow + TimeSpan.FromMinutes(Utility.RandomMinMax(2, 5));
int time = 333;
for (int i = 0; i < SpawnCount - Spawn.Count; i++)
{
Timer.DelayCall(TimeSpan.FromMilliseconds(time), () =>
{
Point3D p = this.Location;
for (int j = 0; j < 25; j++)
{
int x = Utility.RandomMinMax(this.X - 3, this.X + 3);
int y = Utility.RandomMinMax(this.Y - 3, this.Y + 3);
int z = map.GetAverageZ(x, y);
if (map.CanSpawnMobile(x, y, z) && this.InLOS(new Point3D(x, y, z)))
{
p = new Point3D(x, y, z);
break;
}
}
BaseCreature bc = Activator.CreateInstance(_SpawnList[Utility.Random(_SpawnList.Length)]) as BaseCreature;
if (bc != null)
{
Spawn.Add(bc);
bc.MoveToWorld(p, map);
Timer.DelayCall<BaseCreature>(creature => creature.Combatant = Focus, bc);
}
});
time += 333;
}
}
}
public void CheckSpawn()
{
if (Spawn == null)
Delete();
else
{
int count = 0;
ColUtility.ForEach(Spawn.Where(bc => bc != null && bc.Alive), bc => count++);
if (count == 0)
Delete();
}
}
public override void Delete()
{
base.Delete();
if (Spawn != null)
{
ColUtility.Free(Spawn);
Spawn = null;
}
}
public MyrmidexHill(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(1);
writer.Write(HasSpawned);
writer.Write(Spawn == null ? 0 : Spawn.Count);
if (Spawn != null)
{
Spawn.ForEach(bc => writer.Write(bc));
}
Timer.DelayCall(TimeSpan.FromSeconds(30), CheckSpawn);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 1:
HasSpawned = reader.ReadInt();
goto case 0;
case 0:
int count = reader.ReadInt();
if (count > 0)
{
Spawn = new List<BaseCreature>();
for (int i = 0; i < count; i++)
{
BaseCreature bc = reader.ReadMobile() as BaseCreature;
if (bc != null)
Spawn.Add(bc);
}
}
break;
}
if (Spawn == null || Spawn.Count == 0)
Delete();
else
{
Timer.DelayCall(TimeSpan.FromSeconds(10), () =>
{
EodonTribeRegion r = Region.Find(this.Location, this.Map) as EodonTribeRegion;
if (r != null)
Zone = r;
});
}
}
}
public class EodonTribeRegion : Region
{
public static void Initialize()
{
_Zones[0] = new EodonTribeRegion(EodonTribe.Jukari, new Rectangle2D[] { new Rectangle2D(640, 2046, 115, 115) }, 6);
_Zones[1] = new EodonTribeRegion(EodonTribe.Kurak, new Rectangle2D[] { new Rectangle2D(291, 1817, 125, 90) }, 6);
_Zones[2] = new EodonTribeRegion(EodonTribe.Barrab, new Rectangle2D[] { new Rectangle2D(134, 1767, 33, 20), new Rectangle2D(142, 1786, 57, 80), new Rectangle2D(145, 1750, 20, 20) }, 5);
_Zones[3] = new EodonTribeRegion(EodonTribe.Barako, new Rectangle2D[] { new Rectangle2D(620, 1677, 95, 100) }, 5);
_Zones[4] = new EodonTribeRegion(EodonTribe.Urali, new Rectangle2D[] { new Rectangle2D(320, 1551, 160, 72) }, 5);
_Zones[5] = new EodonTribeRegion(EodonTribe.Sakkhra, new Rectangle2D[] { new Rectangle2D(482, 1375, 200, 200) }, 8);
}
public static EodonTribeRegion[] _Zones = new EodonTribeRegion[6];
public int MaxSpawns { get; private set; }
public EodonTribe Tribe { get; set; }
public int Spawns { get { return this.GetItemCount(i => i is MyrmidexHill); } }
public EodonTribeRegion(EodonTribe tribe, Rectangle2D[] rec, int maxSpawns)
: base(tribe.ToString() + " tribe", Map.TerMur, Region.DefaultPriority, rec)
{
Tribe = tribe;
Register();
MaxSpawns = maxSpawns;
}
public override void OnLocationChanged(Mobile m, Point3D oldLocation)
{
if (Tribe != EodonTribe.Barrab && Spawns < MaxSpawns)
{
double chance = Utility.RandomDouble();
if (0.005 > chance && (m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).GetMaster() is PlayerMobile)) && m.AccessLevel == AccessLevel.Player)
{
MyrmidexHill hill = new MyrmidexHill(this, m);
Point3D p = m.Location;
for (int i = 0; i < 10; i++)
{
int x = Utility.RandomMinMax(p.X - 5, p.X + 5);
int y = Utility.RandomMinMax(p.Y - 5, p.Y + 5);
int z = this.Map.GetAverageZ(x, y);
if (this.Map.CanFit(x, y, z, 16, false, false, true))
{
p = new Point3D(x, y, z);
break;
}
}
hill.MoveToWorld(p, this.Map);
hill.DoSpawn();
}
}
}
}
}
+415
View File
@@ -0,0 +1,415 @@
using System;
using Server;
using Server.Items;
using Server.Engines.Quests;
namespace Server.Mobiles
{
public class Hawkwind2 : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TimeIsOfTheEssenceQuest) }; } }
[Constructable]
public Hawkwind2()
: base("Hawkwind", "the Time Lord")
{
}
public Hawkwind2(Serial serial)
: base(serial)
{
}
public override void OnTalk(PlayerMobile player)
{
if (QuestHelper.HasQuest(player, typeof(UnitingTheTribesQuest)))
{
OnOfferFailed();
return;
}
base.OnTalk(player);
}
public override void Advertise()
{
Say(1156465); // The situation is dire, King Blackthorn. I fear only a courageous adventurer can aid us...
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
Hue = 0x83EB;
}
public override void InitOutfit()
{
Robe robe = new Robe();
robe.ItemID = 0x7816;
AddItem(robe);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SirGeoffery : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(UnitingTheTribesQuest) }; } }
public override bool ChangeRace { get { return false; } }
[Constructable]
public SirGeoffery()
: base("Sir Geoffrey", "the Guardsman")
{
}
public override void InitBody()
{
InitStats(125, 150, 25);
Female = false;
Body = 0x190;
FacialHairItemID = 8267;
HairItemID = Race.RandomHair(false);
HairHue = Race.RandomHairHue();
Hue = Utility.RandomSkinHue();
}
public override void InitOutfit()
{
SetWearable(new PlateArms());
SetWearable(new PlateChest());
SetWearable(new Doublet(), 1702);
SetWearable(new BodySash(), 437);
SetWearable(new ChainLegs());
SetWearable(new PlateGorget());
SetWearable(new Helmet());
SetWearable(new Halberd());
SetWearable(new ShortPants(), 2305);
SetWearable(new Shoes(), 2305);
}
public SirGeoffery(Serial serial)
: base(serial)
{
}
public override void OnTalk(PlayerMobile player)
{
TimeIsOfTheEssenceQuest q = QuestHelper.GetQuest(player, typeof(TimeIsOfTheEssenceQuest)) as TimeIsOfTheEssenceQuest;
if (QuestHelper.HasQuest(player, typeof(TimeIsOfTheEssenceQuest)) || QuestHelper.HasQuest(player, typeof(UnitingTheTribesQuest)))
{
base.OnTalk(player);
}
else
{
Advertise();
}
}
public override void Advertise()
{
Say(1156466); // Get these supplies unloaded! Set up a perimeter! I don't want to see a Myrmidex within 10 feet of this camp! Where's that bloody assistance the King promised!?
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SakkhraHighChieftess : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TheGreatHuntQuest) }; } }
[Constructable]
public SakkhraHighChieftess()
: base(BaseEodonTribesman.GetRandomName(), "the sakkhra high chieftess")
{
}
public SakkhraHighChieftess(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Body = 0x191;
HairItemID = 0x203C;
Hue = 34894;
}
public override void InitOutfit()
{
SetWearable(new StuddedChest(), 2118);
SetWearable(new LeatherArms(), 2106);
SetWearable(new LeatherGloves(), 2106);
SetWearable(new SkullCap(), 2118);
SetWearable(new RingmailLegs(), 2106);
SetWearable(new ThighBoots(), 2106);
SetWearable(new Yumi(), 2118);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Title != "the sakkhra high chieftess")
Title = "the sakkhra high chieftess";
}
}
public class UraliHighChieftess : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(EmptyNestQuest) }; } }
[Constructable]
public UraliHighChieftess()
: base(BaseEodonTribesman.GetRandomName(), "the urali high chieftess")
{
}
public UraliHighChieftess(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Body = 0x25E;
Race = Race.Elf;
HairItemID = 0x2FD0;
Hue = 35356;
}
public override void InitOutfit()
{
SetWearable(new ChainLegs(), 2576);
SetWearable(new DragonChest(), 2576);
SetWearable(new DragonArms(), 2576);
SetWearable(new MetalShield(), 2576);
SetWearable(new Circlet(), 2576);
SetWearable(new JinBaori(), 2592);
SetWearable(new Waraji(), 2576);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Title != "the urali high chieftess")
Title = "the urali high chieftess";
}
}
public class JukariHighChief : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TheGreatVolcanoQuest) }; } }
[Constructable]
public JukariHighChief()
: base(BaseEodonTribesman.GetRandomName(), "the jukari high chief")
{
}
public JukariHighChief(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = 0;
Hue = 34723;
}
public override void InitOutfit()
{
SetWearable(new LeatherLegs(), 1175);
SetWearable(new Shirt(), 1175);
SetWearable(new Torch());
SetWearable(new Bokuto(), 1175);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Title != "the jukari high chief")
Title = "the jukari high chief";
}
}
public class KurakHighChief : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(PrideOfTheAmbushQuest) }; } }
[Constructable]
public KurakHighChief()
: base(BaseEodonTribesman.GetRandomName(), "the kurak high chief")
{
}
public KurakHighChief(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = 0x203B;
Hue = 33960;
}
public override void InitOutfit()
{
SetWearable(new LeatherDo(), 1175);
SetWearable(new FancyShirt(), 1175);
SetWearable(new TattsukeHakama());
SetWearable(new Sandals(), 1175);
SetWearable(new Tekagi(), 1175);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Title != "the kurak high chief")
Title = "the kurak high chief";
}
}
public class BarakoHighChief : MondainQuester
{
public override Type[] Quests { get { return new Type[] { typeof(TheGreatApeQuest) }; } }
[Constructable]
public BarakoHighChief()
: base(BaseEodonTribesman.GetRandomName(), "the barako high chief")
{
}
public BarakoHighChief(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Body = 0x190;
HairItemID = 0x203C;
Hue = 35187;
}
public override void InitOutfit()
{
SetWearable(new BoneChest(), 2407);
SetWearable(new LeatherNinjaPants(), 2407);
SetWearable(new StuddedHiroSode(), 2407);
SetWearable(new BoneGloves(), 2407);
SetWearable(new StuddedGorget(), 2407);
SetWearable(new Boots(), 2407);
SetWearable(new Scepter(), 2407);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (Title != "the barako high chief")
Title = "the barako high chief";
}
}
}
+671
View File
@@ -0,0 +1,671 @@
using Server;
using System;
using System.Linq;
using System.Collections.Generic;
using Server.Items;
using Server.Mobiles;
using Server.Engines.Harvest;
using Server.Network;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class TimeIsOfTheEssenceQuest : BaseQuest
{
public override QuestChain ChainID{ get{ return QuestChain.ValleyOfOne; } }
public override Type NextQuest{ get{ return typeof( UnitingTheTribesQuest ); } }
public override object Title{ get{ return 1156512; } } /*The Valley of One*/
public override object Description{ get{ return 1156458; } } /*Hawkwind: I'm afraid I have foreseen a most unfortunate timeline of events...
<br><br>Blackthorn: Tell me, what is it that troubles you?<br><br>Hawkwind: I
brought the Britannians to Shadowguard to aid in the battle against Minax, in
doing so I fear I may have placed the native peoples in grave peril. The
Britannians are a curious and brave people, I fear that curiosity has put the
Valley of Eodon at risk. Britannians seek to take advantage of the natural
resources in Eodon.<br><br>Blackthorn: Such is the nature of all humans. Surely
you knew of this risk?<br><br>Hawkwind: Indeed, for every action there is an
equal and opposite reaction. Cause and effect are linked at the most fundamental
levels.<br><br>Blackthorn: And so what is the effect of the Britannian's
adventurism?<br><br>Hawkwind: Scores of Dragon Turtles lay dead, tiger carcasses
litter the jungle floor. Native tribes people have been murdered at the hands of
what they only know as foreign invaders.<br><br>Blackthorn: *Blackthorn looks down
solemnly* One must ask whether the ends justify the means...<br><br>Hawkwind: We
could not allow Minax to take hold in Eodon. As any other threat, I am certain the
Britannians will answer the call.<br><br>Blackthorn: Tis the very nature of my Kingdom
and its peoples to rise in a time of need.<br><br>Hawkwind: With so much death the
Myrmidex have grown increasingly bold. The abundance of carrion has lured them from
their dark pits to feed and bolster their numbers. The Barrab Tribe has seen this as
an omen and increased the fervor of their zealotism. If the Myrmidex are not held in
check, I fear the entire Valley will be overrun.<br><br>Blackthorn: Is there no way to
stop the invasion?<br><br>Hawkwind: There is always another path on the Time Line.
We must unite the Tribes of Eodon against the Barrab. Only then can they stop the
Myrmidex invasion.<br><br>Blackthorn: *King Blackthorn smiles at you* Well then!
Take these orders to Sir Geoffrey at his camp near the Barrab Tribe in the Valley of
Eodon. Godspeed!*/
public override object Refuse{ get{ return 1156460; } } /* Tis unfortunate, in this time of great need we must look to our inner courage... */
public override object Uncomplete{ get{ return 1156461; } } /*There is little time to delay. Deliver the orders to Sir Geoffrey at his camp near
the Barrab Tribe in the Valley of Eodon.*/
public override object Complete{ get{ return 1156462; } } /* Ahh, King Blackthorn sent you did he? */
public TimeIsOfTheEssenceQuest() : base()
{
AddObjective( new DeliverObjective( typeof(KingBlackthornOrders), "Orders from King Blackthorn to Sir Geoffrey", 1, typeof(SirGeoffery), "Sir Geoffery", 360 ) );
AddReward( new BaseReward( 1156459 ) ); // A step closer to quelling the Myrmidex threat...
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
g.AddHtmlLocalized(98, 1, 40, 16, 1072207, 0x15F90, false, false); // Deliver
g.AddHtmlLocalized(143, 172, 300, 16, 1156516, 0xFFFF, false, false); // Orders from King Blackthorn to Sir Geoffrey
return true;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class UnitingTheTribesQuest : BaseQuest
{
public override QuestChain ChainID{ get{ return QuestChain.ValleyOfOne; } }
public override object Title{ get{ return 1156463; } } /* Uniting the Tribes */
public override object Description{ get{ return 1156464; } } /* *Sir Geoffrey looks up at you* What's this? Ah! Here to join the effort then?
We've been trying for weeks to push through to the Barrab and get them to give
us the secrets to entering the Myrmidex pits, but alas we have had little luck.
King Blackthorn seems to think our only hope is to pressure the Barrab via the
other Eodonian tribes. We tried to approach them initially but were met with
aggression. It wasn't until Professor Rafkin arrived that we were able to peacefully
communicate with them. In order for them to join our cause you'll need to gain their
trust. The Sakkhra worship these overgrown Lizardmen, "Di-no-saur" is the word they
use, bunch of rubbish if you ask me, but you should find their High Chief in the
Sakkhra walled village to the North beyond the rivers. The Urali worship the
Dragon Turtle, shucks, to be honest I thought such a creature was myth until one
came crashing up on a beach during one of our early expeditions. You can find the
Urali just north of the beach lined streams that are home to the Dragon Turtles. The
Jukari worship the great Volcano. Nasty bunch too, took out a company of my men with
pickaxes to the skull. In any case, they can be found at the base of the Volcano to
the Southeast. The Kurak are lightning fast and worship the jungle cats they call
"Ti-gers" Cute little things until one rips you apart and drags you back to its den
*chuckles a bit* Their tribe is in the lowlands to the Southwest. The Barako live
high up in the trees and worship the gorillas that populate that region. Professor
Rafkin says something about a mythical giant ape, bunch of baloney if you ask me.
Their tribe sits in the forest canopy to the East. Bring me back proof that the
tribes have agreed to join our cause and you'll be rewarded handsomely. Or this jungle
will tear you apart, whichever happens first. Good luck!*/
public override object Refuse{ get{ return 1156472; } } /* Well then stop wasting my bloody time! Haven't you see we've got a war to win?! */
public override object Uncomplete{ get{ return 1156518; } } /* These tribes aren't going to unite themselves, best get on with it and visit the Sakkhra,
Urali, Jukari, Kurak, and Barako tribes! We've got a war to win! */
public override object Complete{ get{ return 1156519; } } /*Well done! I don't know how you managed to pull it off but this is the break we've
been waiting for! With the support of the other tribes we can begin to plan an offensive
to quell the Myrmidex threat! It will likely take some time before our troops and the
Tribes are ready. I will send word when the time to attack comes!*/
public UnitingTheTribesQuest() : base()
{
AddObjective(new ObtainObjective(typeof(MosaicOfHeluzz), "Trust of the Sakkhra Tribe", 1));
AddObjective(new ObtainObjective(typeof(TotemOfFabozz), "Trust of the Urali Tribe", 1));
AddObjective(new ObtainObjective(typeof(FiresOfKukuzz), "Trust of the Jukari Tribe", 1));
AddObjective(new ObtainObjective(typeof(SkullOfMotazz), "Trust of the Kurak Tribe", 1));
AddObjective(new ObtainObjective(typeof(SkullOfAphazz), "Trust of the Barako Tribe", 1));
AddReward(new BaseReward(typeof(UniqueTreasureBag), 1, 1156581)); // A bag with a unique treasure
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class TheGreatHuntQuest : BaseQuest
{
public override object Title{ get{ return 1156521; } } /* The Great Hunt */
public override object Description{ get{ return 1156522; } } /* *The Sakkhra High Chieftess looks at you apprehensively,
as the greeting Professor Rafkin's book taught you rolls from your tongue The
High Chief smiles and warms to you* Rafkin say you can help Sakkhra. Sakkhra
do not trust you. You want Sakkhra trust, then you fight biggest of all dinosaur,
T Rex! You survive the T Rex hunt, then Sakkhra trust you. *The Chief motions you
west to the nearby dinosaur plains* */
public override object Refuse{ get{ return 1156550; } } /* *The Chieftess looks at you...* */
public override object Uncomplete{ get{ return 1156531; } } /* You not kill giant dino yet? Sakkhra will not help until you kill big dino! */
public override object Complete{ get{ return 1156557; } } /* Ahh-Ooo! Ahh-Ooo! Britainnian kill big dino! Show courage and strength! Sakkrah trust you now! */
public TheGreatHuntQuest() : base()
{
AddObjective(new SlayObjective(typeof(TRex), "Slay the Tyrannosaurus Rex", 1));
AddReward( new BaseReward( typeof(MosaicOfHeluzz), 1, 1156551 ) ); // Trust of the Sakkhra Tribe
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
g.AddHtmlLocalized(98, 172, 300, 16, 1156533, 0xFFFF, false, false); // Slay the Tyrannosaurus Rex
return true;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class EmptyNestQuest : BaseQuest
{
public override object Title{ get{ return 1156523; } } /* Empty Nest */
public override object Description{ get{ return 1156524; } } /* *The Urali High Chieftess looks at you apprehensively, as the greeting Professor
Rafkin's book taught you rolls from your tongue The Chieftess smiles and warms to you*
Rafkin say you can help Urali. Urali do not trust you. You want Urali trust, then you
stop them taking Dragon Turtle Egg. You stop Dragon Turtle Egg theft, then Urali trust you.
*The Chieftess motions you south towards the nearby nesting beach* */
public override object Refuse{ get{ return 1156550; } } /* *The Chieftess looks at you...* */
public override object Uncomplete{ get{ return 1156536; } } /* You not save Dragon Turtle Hatchlings yet? Urali will not help until you save Dragon Turtle Hatchlings! */
public override object Complete{ get{ return 1156537; } } /* Ahhh-OOO! Ahhh-OOO! Dragon Turtle dig-dig and swim-swim! You good to Urali! Urali trust you! */
public EmptyNestQuest() : base()
{
AddObjective( new InternalObjective());
AddReward( new BaseReward( typeof(TotemOfFabozz), 1, 1156552 ) ); // Trust of the Urali Tribe
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
g.AddHtmlLocalized(98, 172, 300, 16, 1156534, 0xFFFF, false, false); // Rescue 5 Dragon Turtle Hatchlings from poachers
return true;
}
public void Update(object o)
{
foreach (BaseObjective obj in Objectives)
{
obj.Update(o);
if (!Completed)
{
Owner.PlaySound(UpdateSound);
Owner.SendLocalizedMessage(1156535, String.Format("{0}\t{1}", obj.CurProgress.ToString(), obj.MaxProgress.ToString())); // You have rescued ~1_count~ of ~2_max~ Dragon Turtle Hatchlings.
}
else
{
OnCompleted();
}
}
}
public override void OnCompleted()
{
Owner.SendLocalizedMessage(1046258, null, 0x23); // Your quest is complete.
Owner.PlaySound(CompleteSound);
}
public class InternalObjective : BaseObjective
{
public InternalObjective() : base(5)
{
}
public override bool Update(object o)
{
CurProgress++;
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class TheGreatVolcanoQuest : BaseQuest
{
public override object Title{ get{ return 1156525; } } /* The Great Volcano */
public override object Description{ get{ return 1156526; } } /* *The Jukari High Chief looks at you apprehensively, as the greeting Professor
Rafkin's book taught you rolls from your tongue The Chief smiles and warms to you*
Rafkin say you can help Jukari. Jukari do not trust you. You want Jukari trust, then
you mine Jukari Lavastone from Volcano. Volcano no eat you, then Jukari trust you.
*The chief motions you east toward the Volcano* */
public override object Refuse{ get{ return 1156532; } } /* *The Chief looks at you...* */
public override object Uncomplete{ get{ return 1156540; } } /* You afraid of Great Volcano? Ha Ha! Britannian afraid! */
public override object Complete{ get{ return 1156541; } } /* OOO! You bring Jukari lava rock, mean Volcano no like your taste HA HA! Jukari help you! */
public TheGreatVolcanoQuest() : base()
{
//AddObjective( new ObtainObjective( typeof(LavaStone), "Recover 5 lava rocks from the Caldera of the Great Volcano", 5 ) );
AddObjective(new InternalObjective());
AddReward( new BaseReward( typeof(FiresOfKukuzz), 1, 1156553 ) ); // Trust of the Jukari Tribe
}
public static Rectangle2D VolcanoMineBounds = new Rectangle2D(879, 1568, 95, 95);
public static bool OnHarvest(Mobile m, Item tool)
{
if (!(m is PlayerMobile) || m.Map != Map.TerMur)
return false;
PlayerMobile pm = m as PlayerMobile;
if ((pm.ToggleMiningStone || pm.ToggleStoneOnly) && VolcanoMineBounds.Contains(m.Location))
{
object locked = tool;
if (!m.BeginAction(locked))
return false;
m.Animate(AnimationType.Attack, 3);
Timer.DelayCall(Mining.System.OreAndStone.EffectSoundDelay, () =>
{
m.PlaySound(Utility.RandomList(Mining.System.OreAndStone.EffectSounds));
});
Timer.DelayCall(Mining.System.OreAndStone.EffectDelay, () =>
{
TheGreatVolcanoQuest quest = QuestHelper.GetQuest(pm, typeof(TheGreatVolcanoQuest)) as TheGreatVolcanoQuest;
if (quest != null && !quest.Completed && 0.05 > Utility.RandomDouble())
{
if (m.CheckSkill(SkillName.Mining, 90, 100))
{
double chance = Utility.RandomDouble();
if (0.08 > chance)
{
BaseCreature spawn = new VolcanoElemental();
Point3D p = m.Location;
for (int i = 0; i < 10; i++)
{
int x = Utility.RandomMinMax(p.X - 1, p.X + 1);
int y = Utility.RandomMinMax(p.Y - 1, p.Y + 1);
int z = Map.TerMur.GetAverageZ(x, y);
if (Map.TerMur.CanSpawnMobile(x, y, z))
{
p = new Point3D(x, y, z);
break;
}
}
spawn.OnBeforeSpawn(p, Map.TerMur);
spawn.MoveToWorld(p, Map.TerMur);
spawn.OnAfterSpawn();
spawn.Combatant = m;
m.SendLocalizedMessage(1156508); // Uh oh...that doesn't look like a lava rock!
}
else if (0.55 > chance)
{
m.PrivateOverheadMessage(Server.Network.MessageType.Regular, 1154, 1156507, m.NetState); // *You uncover a lava rock and carefully store it for later!*
quest.Update(m);
}
else
m.LocalOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, 1156509); // You loosen some dirt but fail to find anything.
}
else
m.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1156509); // You loosen some dirt but fail to find anything.
}
else
m.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1156509); // You loosen some dirt but fail to find anything.
if (tool is IUsesRemaining)
{
((IUsesRemaining)tool).UsesRemaining--;
if (((IUsesRemaining)tool).UsesRemaining <= 0)
{
m.SendLocalizedMessage(1044038); // You have worn out your tool!
tool.Delete();
}
}
m.EndAction(locked);
});
return true;
}
return false;
}
public bool Update(object o)
{
foreach (BaseObjective obj in Objectives)
{
obj.Update(o);
if (!Completed)
{
Owner.PlaySound(UpdateSound);
Owner.SendLocalizedMessage(1156539, String.Format("{0}\t{1}", obj.CurProgress.ToString(), obj.MaxProgress.ToString())); // You have recovered ~1_count~ of ~2_max~ Lava Rocks.
}
else
{
OnCompleted();
}
}
return true;
}
private class InternalObjective : BaseObjective
{
public override object ObjectiveDescription
{
get { return 1156538; } // Recover 5 lava rocks from the Caldera of the Great Volcano
}
public InternalObjective()
: base(5)
{
}
public override bool Update(object o)
{
CurProgress++;
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class PrideOfTheAmbushQuest : BaseQuest
{
public override object Title{ get{ return 1156527; } } /* The Pride of the Ambush */
public override object Description{ get{ return 1156528; } } /* *The Kurak High Chief looks at you apprehensively, as the greeting Professor
Rafkin's book taught you rolls from your tongue The Chieftess smiles and warms
to you* Rafkin say you can help Kurak. Kurak do not trust you. You want Kurak
trust, then you free cubs from trappers. You free cubs from trappers, then
Kurak trust you. *The chieftess motions you south to the lowlands* */
public override object Refuse{ get{ return 1156532; } } /* *The Chief looks at you...* */
public override object Uncomplete{ get{ return 1156545; } } /* You save tiger cubs! They little and helpless! Kurak will not help until you save tiger cubs! */
public override object Complete{ get{ return 1156546; } } /* You save tiger cubs! Kurak thank you and help you! */
public PrideOfTheAmbushQuest() : base()
{
AddObjective( new InternalObjective( ) );
AddReward( new BaseReward( typeof(SkullOfMotazz), 1, 1156554 ) ); // Trust of the Kurak Tribe
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
g.AddHtmlLocalized(98, 172, 300, 16, 1156544, 0xFFFF, false, false); // Rescue 5 tiger cubs from the trapper enclosures.
return true;
}
public bool Update(object o)
{
foreach (BaseObjective obj in Objectives)
{
obj.Update(o);
if (!Completed)
{
Owner.PlaySound(UpdateSound);
Owner.SendLocalizedMessage(1156543, String.Format("{0}\t{1}", obj.CurProgress.ToString(), obj.MaxProgress.ToString())); // You have rescued ~1_count~ of ~2_max~ tiger cubs.
}
else
{
OnCompleted();
}
}
return true;
}
public override void OnCompleted()
{
Owner.SendLocalizedMessage(1046258, null, 0x23); // Your quest is complete.
Owner.PlaySound(CompleteSound);
}
public class InternalObjective : BaseObjective
{
public InternalObjective()
: base(5)
{
}
public override bool Update(object o)
{
CurProgress++;
return true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
public class TheGreatApeQuest : BaseQuest
{
public override object Title{ get{ return 1156529; } } /* The Great Ape */
public override object Description{ get{ return 1156530; } } /* *The Barako High Chief looks at you apprehensively, as the greeting
Professor Rafkin's book taught you rolls from your tongue The Chief smiles
and warms to you* Rafkin say you can help Barako. Barako do not trust you.
You want Barako trust, then you battle Great Ape. You go to banana cave and
ape no eat you, then Barako trust you. *The Chief motions you northeast toward
the nearby banana cave* */
public override object Refuse{ get{ return 1156532; } } /* *The Chief looks at you...* */
public override object Uncomplete{ get{ return 1156548; } } /* *Thumps chest!* You battle Great Ape or Barako will not trust you! */
public override object Complete{ get{ return 1156549; } } /* *Thumps chest* You battle Great Ape and win! You strong and Barako respect and trust you! */
public TheGreatApeQuest() : base()
{
AddObjective( new SlayObjective( typeof(GreatApe), "Defeat the Great Ape", 1 ) ); // Defeat the Great Ape
AddReward( new BaseReward( typeof(SkullOfAphazz), 1, 1156555 ) ); // Trust of the Barako Tribe
}
public override bool RenderObjective(MondainQuestGump g, bool offer)
{
if (offer)
g.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
g.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
g.AddButton(130, 430, 0x2EEF, 0x2EF1, (int)Buttons.PreviousPage, GumpButtonType.Reply, 0);
g.AddButton(275, 430, 0x2EE9, 0x2EEB, (int)Buttons.NextPage, GumpButtonType.Reply, 0);
g.AddHtmlObject(160, 70, 330, 16, Title, BaseQuestGump.DarkGreen, false, false);
g.AddHtmlLocalized(98, 140, 312, 16, 1049073, 0x2710, false, false); // Objective:
g.AddHtmlLocalized(98, 156, 312, 16, 1072208, 0x2710, false, false); // All of the following
g.AddHtmlLocalized(98, 172, 300, 16, 1156547, 0xFFFF, false, false); // Defeat the Great Ape
return true;
}
public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 ); // version
}
public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}
@@ -0,0 +1,457 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Mobiles;
using System.Linq;
using Server.Gumps;
using Server.Engines.Quests;
using Server.Network;
namespace Server.Items
{
public class CubEnclosure : BaseAddon
{
public EnclosureDoor Door { get; set; }
public TigerCub Cub { get; set; }
public static readonly Point3D DoorOffset = new Point3D(2, 2, 0);
public static readonly Point3D HomeLocation = new Point3D(354, 1894, 2);
[Constructable]
public CubEnclosure()
{
AddComponent(new AddonComponent(2103), 0, 0, 0);
AddComponent(new AddonComponent(2103), 0, 1, 0);
AddComponent(new AddonComponent(2103), 0, 2, 0);
AddComponent(new AddonComponent(2102), 1, 2, 0);
AddComponent(new AddonComponent(2101), 3, 2, 0);
AddComponent(new AddonComponent(2103), 3, 1, 0);
AddComponent(new AddonComponent(2103), 3, 0, 0);
AddComponent(new AddonComponent(2102), 2, -1, 0);
AddComponent(new AddonComponent(2102), 1, -1, 0);
AddComponent(new AddonComponent(2102), 3, -1, 0);
Door = new EnclosureDoor(this);
Cub = new TigerCub();
Cub.Blessed = true;
Cub.RangeHome = 5;
Cub.Location = new Point3D(this.Location.X + 1, this.Location.Y + 1, this.Location.Z);
}
public override void OnLocationChange(Point3D oldLocation)
{
base.OnLocationChange(oldLocation);
if(Door != null)
Door.MoveToWorld(new Point3D(X + DoorOffset.X, Y + DoorOffset.Y, Z + DoorOffset.Z), this.Map);
if(Cub != null)
{
Cub.MoveToWorld(new Point3D(X + 1, Y + 1, Z), this.Map);
Cub.Home = Cub.Location;
}
}
public override void OnMapChange()
{
base.OnMapChange();
if(Door != null)
Door.Map = this.Map;
if(Cub != null)
Cub.Map = this.Map;
}
public bool Contains(Point3D p)
{
foreach (AddonComponent c in Components)
{
if (c.Location == p)
return true;
}
return Door != null && Door.Location == p;
}
public void OnPuzzleCompleted(PlayerMobile pm)
{
if(Door != null)
{
pm.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156501, pm.NetState); // *You watch as the Tiger Cub safely returns to the Kurak Tribe*
Timer.DelayCall(TimeSpan.FromSeconds(.25), Delete);
//1156499;*The enclosure unlocks!* Is this used?
if(Cub != null)
{
Cub.Blessed = false;
Cub.Protector = pm;
Cub.Home = HomeLocation;
Cub.RangeHome = 1;
}
}
}
public void OnBadDirection(PlayerMobile pm)
{
if(Utility.RandomBool())
{
if(Door != null)
pm.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156493, pm.NetState); //*A poisonous dart embeds itself into your neck!*
Effects.PlaySound(pm.Location, pm.Map, 0x22E);
pm.Damage(Utility.RandomMinMax(20, 40));
pm.ApplyPoison(pm, Poison.Deadly);
}
else
{
if(Door != null)
pm.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x35, 1156494, pm.NetState); //*You are ambushed by attacking trappers!*
SpawnTrappers(pm);
}
}
public void SpawnTrappers(Mobile m)
{
if(m == null || !m.Alive)
return;
for(int i = 0; i < 3; i++)
{
Point3D p = m.Location;
for(int j = 0; j < 25; j++)
{
int x = p.X + Utility.RandomMinMax(p.X - 2, p.X + 2);
int y = p.Y + Utility.RandomMinMax(p.Y - 2, p.Y + 2);
int z = m.Map.GetAverageZ(x, y);
if(m.Map.CanSpawnMobile(x, y, z) && !this.Contains(new Point3D(x, y, z)))
{
p = new Point3D(x, y, z);
break;
}
}
BaseCreature bc = new Trapper();
bc.MoveToWorld(p, m.Map);
Timer.DelayCall(TimeSpan.FromSeconds(.25), (mob) => ((Mobile)mob).Combatant = m, bc);
}
}
public override void Delete()
{
base.Delete();
if (Door != null)
Door.Delete();
if (Cub != null && Cub.Protector == null)
Cub.Delete();
}
public CubEnclosure(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
writer.Write(Door);
writer.Write(Cub);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
Door = reader.ReadItem() as EnclosureDoor;
Cub = reader.ReadMobile() as TigerCub;
if (Door != null)
Door.Enclosure = this;
}
}
public class EnclosureDoor : Item
{
[CommandProperty(AccessLevel.GameMaster)]
public CubEnclosure Enclosure { get; set; }
public List<int> Path { get; set; }
public EnclosureDoor(CubEnclosure enclosure) : base(2086)
{
Enclosure = enclosure;
Path = GetRandomPath();
Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if(from is PlayerMobile && from.InRange(GetWorldLocation(), 2) && from.InLOS(this))
{
PrideOfTheAmbushQuest quest = QuestHelper.GetQuest((PlayerMobile)from, typeof(PrideOfTheAmbushQuest)) as PrideOfTheAmbushQuest;
if(quest != null)
{
from.SendGump(new LockingMechanismGump((PlayerMobile)from, this));
}
}
}
private int[] m_Possibles = new int[]
{
0, 1, 2, 3,
4, 5, 6, 7,
8, 9, 10, 11,
12, 13, 14, 15
};
private int[][] _Paths = new int[][]
{
new int[] { 0, 1, 2, 3, 7, 11, 15 },
new int[] { 0, 4, 8, 12, 13, 9, 5, 1, 2, 6, 10, 14, 15 },
new int[] { 0, 4, 5, 1, 2, 3, 7, 6, 10, 14, 15 },
new int[] { 0, 4, 8, 12, 13, 14, 10, 6, 2, 3, 7, 11, 15 }, //
new int[] { 0, 4, 5, 9, 13, 14, 10, 11, 15 },
new int[] { 0, 4, 5, 1, 2, 6, 10, 9, 13, 14, 15 },
new int[] { 0, 1, 5, 4, 8, 12, 13, 14, 10, 11, 15 },
new int[] { 0, 1, 2, 6, 5, 4, 8, 12, 13, 9, 10, 11, 15 },
new int[] { 0, 1, 5, 6, 7, 11, 10, 9, 13, 14, 15 },
new int[] { 0, 1, 5, 6, 7, 11, 15 },
new int[] { 0, 1, 5, 6, 10, 9, 13, 14, 15 },
new int[] { 0, 1, 2, 3, 7, 6, 5, 4, 8, 9, 1, 11, 12, 13, 14, 15 },
new int[] { 0, 4, 8, 12, 13, 14, 15 },
new int[] { 0, 4, 5, 9, 8, 12, 13, 14, 10, 6, 2, 3, 7, 11, 15 }
};
public List<int> GetRandomPath()
{
return new List<int>(_Paths[Utility.Random(_Paths.Length)]);
}
public class LockingMechanismGump : Gump
{
public EnclosureDoor Door { get; set; }
public bool ShowNext { get; set; }
public PlayerMobile User { get; set; }
public List<int> Path { get { return Door != null && !Door.Deleted ? Door.Path : null; } }
public List<int> Progress { get; set; }
public LockingMechanismGump(PlayerMobile pm, EnclosureDoor door)
: base(25, 25)
{
Door = door;
User = pm;
Progress = new List<int>();
Progress.Add(0);
AddGumpLayout();
}
public void Refresh()
{
Entries.Clear();
Entries.TrimExcess();
AddGumpLayout();
User.CloseGump(this.GetType());
User.SendGump(this, false);
}
public void AddGumpLayout()
{
AddBackground(50, 50, 550, 440, 2600);
AddBackground(100, 75, 450, 90, 2600);
AddBackground(90, 175, 270, 270, 2600);
AddBackground(100, 185, 250, 250, 5120);
AddBackground(370, 175, 178, 200, 5120);
AddImage(145, 95, 10451);
AddImage(435, 95, 10451);
AddImage(0, 50, 10400);
AddImage(0, 200, 10401);
AddImage(0, 360, 10402);
AddImage(565, 50, 10410);
AddImage(565, 200, 10411);
AddImage(565, 360, 10412);
AddImage(370, 175, 10452);
AddImage(370, 360, 10452);
AddImageTiled(125, 207, 130, 3, 5031);
AddImageTiled(125, 247, 130, 3, 5031);
AddImageTiled(125, 287, 130, 3, 5031);
AddImageTiled(125, 327, 130, 3, 5031);
AddImageTiled(123, 205, 3, 130, 5031);
AddImageTiled(163, 205, 3, 130, 5031);
AddImageTiled(203, 205, 3, 130, 5031);
AddImageTiled(243, 205, 3, 130, 5031);
AddImage(420, 250, 1417);
AddImage(440, 270, 2642);
AddHtmlLocalized(220, 90, 210, 16, 1156490, false, false); // <center>Enclosure Locking Mechanism</center>
AddHtmlLocalized(220, 112, 210, 16, 1153748, false, false); // <center>Use the Directional Controls to</center>
AddHtmlLocalized(220, 131, 210, 16, 1156491, false, false); // <center>Unlock the Enclosure</center>
int x = 110;
int y = 195;
int xOffset = 0;
int yOffset = 0;
for (int i = 0; i < 16; i++)
{
int itemID = Progress.Contains(i) ? 2152 : 9720;
if (i < 4)
{
xOffset = x + (40 * i);
yOffset = y;
}
else if (i < 8)
{
xOffset = x + (40 * (i - 4));
yOffset = y + 40;
}
else if (i < 12)
{
xOffset = x + (40 * (i - 8));
yOffset = y + 80;
}
else if (i < 16)
{
xOffset = x + (40 * (i - 12));
yOffset = y + 120;
}
AddImage(xOffset, yOffset, itemID);
if (i == Progress[Progress.Count - 1])
AddImage(xOffset + 8, yOffset + 8, 5032);
if (ShowNext && Progress.Count <= Path.Count && i == Path[Progress.Count])
AddImage(xOffset + 8, yOffset + 8, 2361);
}
ShowNext = false;
if (User.Skills[SkillName.Lockpicking].Base >= 100)
{
AddHtmlLocalized(410, 415, 150, 32, 1156492, false, false); // Attempt to pick the enclosure lock
AddButton(370, 415, 4005, 4005, 5, GumpButtonType.Reply, 0);
}
AddButton(453, 245, 10700, 10701, 1, GumpButtonType.Reply, 0); // up
AddButton(478, 281, 10710, 10711, 2, GumpButtonType.Reply, 0); // right
AddButton(453, 305, 10720, 10721, 3, GumpButtonType.Reply, 0); // down
AddButton(413, 281, 10730, 10731, 4, GumpButtonType.Reply, 0); // left
}
public override void OnResponse(NetState state, RelayInfo info)
{
if (info.ButtonID > 0 && info.ButtonID <= 5)
HandleButton(info.ButtonID);
}
public void HandleButton(int id)
{
if (Door == null || Door.Deleted)
return;
if (id > 0 && id < 5)
{
int current = Progress[Progress.Count - 1];
int next = 15;
int pick;
if (Progress.Count >= 0 && Progress.Count < Path.Count)
next = Path[Progress.Count];
switch (id)
{
default:
case 1: pick = current - 4; break;
case 2: pick = current + 1; break;
case 3: pick = current + 4; break;
case 4: pick = current - 1; break;
}
if (Progress.Contains(pick) || pick < 0 || pick > 15) //Off board or already chosen spot
{
User.PlaySound(0x5B6);
Refresh();
}
else if ((current == 10 || current == 11 || current == 14) && pick == 15)
{
User.PlaySound(0x3D);
if (Door.Enclosure != null)
Door.Enclosure.OnPuzzleCompleted(User);
}
else if (pick == next) //Found next
{
Progress.Add(pick);
User.PlaySound(0x1F5);
Refresh();
}
else // Wrong Mutha Fucka!
{
if (Door.Enclosure != null)
Door.Enclosure.OnBadDirection(User);
ClearProgress();
}
}
else if (id == 5)
{
ShowNext = true;
Refresh();
}
}
public void ClearProgress()
{
Progress.Clear();
Progress.Add(0);
}
}
public EnclosureDoor(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int v = reader.ReadInt();
Path = GetRandomPath();
}
}
}
+226
View File
@@ -0,0 +1,226 @@
using System;
using Server;
using System.Collections.Generic;
using Server.Mobiles;
using System.Linq;
using Server.Network;
using Server.Regions;
using Server.Spells;
namespace Server.Items
{
public class Volcano
{
public static readonly Rectangle2D LavaStart = new Rectangle2D(927, 1615, 2, 2);
public static readonly int LastLavaStage = 70;
public static readonly Rectangle2D[] SafeZone = new Rectangle2D[]
{
new Rectangle2D(959, 1704, 15, 14),
new Rectangle2D(915, 1696, 15, 15),
new Rectangle2D(1056, 1584, 17, 19),
new Rectangle2D(884, 1695, 13, 15),
new Rectangle2D(1009, 1663, 13, 13),
new Rectangle2D(994, 1526, 15, 15),
new Rectangle2D(1012, 1541, 15, 14),
new Rectangle2D(1032, 1520, 19, 18),
new Rectangle2D(1011, 1601, 9, 9),
new Rectangle2D(897, 1554, 15, 15),
new Rectangle2D(834, 1546, 23, 20),
new Rectangle2D(837, 1675, 11, 14),
new Rectangle2D(838, 1636, 15, 12),
new Rectangle2D(856, 1697, 19, 18),
new Rectangle2D(879, 1668, 15, 19),
new Rectangle2D(991, 1590, 15, 15)
};
public static bool InSafeZone(IPoint3D point)
{
foreach (Rectangle2D rec in SafeZone)
{
if (rec.Contains(point))
return true;
}
return false;
}
public static TimeSpan FlameRespawn { get { return TimeSpan.FromSeconds(Utility.RandomMinMax(1, 3)); } }
public static TimeSpan LavaRespawn { get { return TimeSpan.FromSeconds(Utility.RandomMinMax(20, 30)); } }
public static TimeSpan LavaAdvance { get { return TimeSpan.FromSeconds(2); } }
public static Volcano Instance { get; set; }
private Timer _LavaTimer;
private DateTime _NextLava;
private long _NextLavaAdvance;
private int _LavaStage;
private Rectangle2D _CurrentLava;
private Rectangle2D _SafeZone;
private Region _Region;
public static void Initialize()
{
Instance = new Volcano();
}
public Volcano()
{
_Region = new VolcanoRegion(this);
Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), OnTick);
}
public void OnTick()
{
if (_Region == null)
return;
int count = _Region.GetPlayerCount();
if (count == 0 && _LavaTimer == null && _NextLava < DateTime.UtcNow)
{
_NextLava = DateTime.UtcNow + LavaRespawn;
return;
}
if (count > 0 && _LavaTimer == null && _NextLava < DateTime.UtcNow)
{
List<Mobile> players = _Region.GetPlayers();
players.ForEach(m =>
{
if (m.AccessLevel == AccessLevel.Player)
m.PrivateOverheadMessage(MessageType.Regular, 0x21, 1156506, m.NetState); // *The Volcano is becoming unstable!*
});
ColUtility.Free(players);
_CurrentLava = LavaStart;
_NextLavaAdvance = Core.TickCount + 450;
_LavaTimer = Timer.DelayCall(TimeSpan.FromMilliseconds(250), TimeSpan.FromMilliseconds(250), () =>
{
if (Core.TickCount - _NextLavaAdvance >= 0)
{
_CurrentLava = new Rectangle2D(_CurrentLava.X - 2, _CurrentLava.Y - 2, _CurrentLava.Width + 4, _CurrentLava.Height + 4);
_SafeZone = new Rectangle2D(_CurrentLava.X + 2, _CurrentLava.Y + 2, _CurrentLava.Width - 4, _CurrentLava.Height - 4);
_NextLavaAdvance = Core.TickCount + 450;
AddLava();
}
});
_LavaTimer.Start();
}
}
public bool CheckCoordinate(int x, int y)
{
if (x <= _CurrentLava.X + 2 || x >= (_CurrentLava.X + _CurrentLava.Width) - 2 || y <= _CurrentLava.Y + 2 || y >= (_CurrentLava.Y + _CurrentLava.Height) - 2)
{
return true;
}
return false;
}
public void AddLava()
{
_LavaStage++;
for (int x = _CurrentLava.X; x <= _CurrentLava.X + _CurrentLava.Width; x++)
{
for (int y = _CurrentLava.Y; y <= _CurrentLava.Y + _CurrentLava.Height; y++)
{
if (CheckCoordinate(x, y))
{
Point3D p = new Point3D(x, y, 0);
IPooledEnumerable mobiles = Map.TerMur.GetMobilesInRange(p, 20);
foreach (Mobile m in mobiles)
{
if (m.AccessLevel == AccessLevel.Player && m is PlayerMobile)
m.PlaySound(520);
}
mobiles.Free();
if (Map.TerMur.CanFit(x, y, 0, 16, false, false, true) && !InSafeZone(p))
{
Effects.SendLocationEffect(p, Map.TerMur, 4847, (int)LavaAdvance.TotalSeconds * 10);
IPooledEnumerable eable = Map.TerMur.GetMobilesInRange(p, 0);
foreach (Mobile m in eable)
{
if (m.Alive && m.AccessLevel == AccessLevel.Player && (m is PlayerMobile || (m is BaseCreature && ((BaseCreature)m).GetMaster() is PlayerMobile)))
DoLavaDamageDelayed(m);
}
eable.Free();
}
}
}
}
if (_LavaStage >= LastLavaStage)
{
if (_LavaTimer != null)
{
_LavaTimer.Stop();
_LavaTimer = null;
}
_NextLava = DateTime.UtcNow + LavaRespawn;
_LavaStage = 0;
}
}
public void CheckMovement(Mobile m)
{
if (!m.Alive || m.AccessLevel > AccessLevel.Player || (m is BaseCreature && ((BaseCreature)m).GetMaster() == null))
return;
if (_LavaTimer != null && m.AccessLevel == AccessLevel.Player && m.Alive && _CurrentLava.Contains(m) && !_SafeZone.Contains(m) && !InSafeZone(m))
{
DoLavaDamageDelayed(m);
}
}
public void DoLavaDamage(Mobile m)
{
m.PrivateOverheadMessage(MessageType.Regular, 0x22, 1156497, m.NetState); // *The flowing lava scorches you!*
AOS.Damage(m, null, Utility.RandomMinMax(200, 300), 0, 100, 0, 0, 0);
}
public void DoLavaDamageDelayed(Mobile m)
{
Timer.DelayCall(TimeSpan.FromSeconds(.25), new TimerStateCallback<Mobile>(DoLavaDamage), m);
}
}
public class VolcanoRegion : BaseRegion
{
public Volcano Volcano { get; private set; }
public VolcanoRegion(Volcano volcano)
: base("Eodon_Volcano", Map.TerMur, Region.DefaultPriority, new Rectangle2D[] { new Rectangle2D(832, 1502, 255, 217)})
{
Volcano = volcano;
Register();
}
public override bool CheckTravel(Mobile m, Point3D newLocation, TravelCheckType travelType)
{
return travelType >= (TravelCheckType)4; // teleport only
}
public override void OnLocationChanged(Mobile m, Point3D oldLocation)
{
if(Volcano != null)
Volcano.CheckMovement(m);
base.OnLocationChanged(m, oldLocation);
}
}
}
+58
View File
@@ -0,0 +1,58 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class EscortToDugan : BaseQuest
{
public EscortToDugan()
: base()
{
AddObjective(new EscortObjective(1113623, "NPC Encampment")); // Human settler camp entrance
AddReward(new BaseReward(typeof(TalismanofGoblinSlaying), "Talisman of Goblin Slaying"));
}
/* The Lost Brightwhistle */
public override object Title { get { return 1095003; } }
/* Escort Neville Brightwhistle to Elder Dugan. After Neville is safe, speak
* to Elder Dugan for your reward.
*
* I was separated from my brothers when the goblins attacked. I am a member
* of the Society of Ariel Haven, come to colonize these halls that we had
* though abandoned. I must get out of here and warn Elder Dugan that these
* creatures live here and are very dangerous! Will you show me the way out? */
public override object Description { get { return 1095005; } }
/* Oh, have mercy on me! I will have to make it on my own. */
public override object Refuse { get { return 1095006; } }
/* Is it much farther to the camp? */
public override object Uncomplete { get { return 1095007; } }
/* You have done me and my people a great service, traveler. I had assumed
* the worst had befallen Neville and I do not doubt it would have soon if
* you had not intervened.
*
* The goblins are a creature of legend; it was thought that they had all
* been killed. They are not as strong as they are evil, but their blight
* can become a plague. Take this talisman, it was worn by those sent to
* end the previous goblin menace. It has magical powers and will aid you
* in defending yourself against the goblins. I know where I can get more
* of them and I will send for some for the rest of my people. */
public override object Complete { get { return 1095008; } }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+1435
View File
File diff suppressed because it is too large Load Diff
+436
View File
@@ -0,0 +1,436 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class FriendsOfTheLibraryQuest : BaseQuest
{
public FriendsOfTheLibraryQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(LibraryApplication), "friends of the library application", 1, typeof(Sarakki), "Sarakki (Britain)"));
this.AddReward(new BaseReward(1072749)); // Friends of the Library Membership Token.
}
public override QuestChain ChainID
{
get
{
return QuestChain.LibraryFriends;
}
}
public override Type NextQuest
{
get
{
return typeof(BureaucraticDelayQuest);
}
}
/* Friends of the Library */
public override object Title
{
get
{
return 1072716;
}
}
/* Shhh! *angry whisper* This is a library, not some bawdy house! If you wish to become a friend of the library
you'll learn to moderate your volume. And, of course, you'll take this application and have it notarized by Sarakki
the Notary. Until you've become an official friend of the library, I can't allow you to make donations. It wouldn't
be proper. */
public override object Description
{
get
{
return 1072720;
}
}
/* Hrmph! */
public override object Refuse
{
get
{
return 1072721;
}
}
/* *glare* Shhhh! You need to visit the notary. She can be found near the castle. */
public override object Uncomplete
{
get
{
return 1072722;
}
}
/* Greetings! */
public override object Complete
{
get
{
return 1073985;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PublicDonations;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BureaucraticDelayQuest : BaseQuest
{
public BureaucraticDelayQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(SealingWaxOrder), "sealing wax order", 1, typeof(Petrus), "Petrus (Ilshenar)"));
this.AddReward(new BaseReward(1074871)); // A step closer to having sealing wax.
}
public override QuestChain ChainID
{
get
{
return QuestChain.LibraryFriends;
}
}
public override Type NextQuest
{
get
{
return typeof(TheSecretIngredientQuest);
}
}
/* Bureaucratic Delay */
public override object Title
{
get
{
return 1072717;
}
}
/* What do you have there? Oh. *look of dismay* It seems everyone is interested in helping the library -- but
no one warned me to stock up on sealing wax. I'm afraid I'm out of the mixture we use to notarize offical documents.
There will be a delay ... unless you'd like to take matters into your own hands and retrieve more for me from Petrus? */
public override object Description
{
get
{
return 1072724;
}
}
/* I do apologize for being unprepared. Perhaps when you return later I'll have more wax in stock. */
public override object Refuse
{
get
{
return 1072725;
}
}
/* Petrus lives in Ilshenar, past the Compassion gate and beyond the gypsy camp. */
public override object Uncomplete
{
get
{
return 1072726;
}
}
/* Hello, hello. */
public override object Complete
{
get
{
return 1073986;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PublicDonations;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheSecretIngredientQuest : BaseQuest
{
public TheSecretIngredientQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SpeckledPoisonSac), "speckled poison sacs", 5, 0x23A, 3600));
this.AddReward(new BaseReward(1074871)); // A step closer to having sealing wax.
}
public override QuestChain ChainID
{
get
{
return QuestChain.LibraryFriends;
}
}
public override Type NextQuest
{
get
{
return typeof(SpecialDeliveryQuest);
}
}
/* The Secret Ingredient */
public override object Title
{
get
{
return 1072718;
}
}
/* What's this? Sealing wax ... Sarakki ... official documents ... Oh, I see. Can do, can do. You will need to get me the poison
sacs of course. They are so volatile they aren't viable after an hour or so ... yes, yes. Right, well off you go, speckled scorpions
are the only critters that have the right poison. They live in the desert near here. */
public override object Description
{
get
{
return 1072727;
}
}
/* I see. I see. Well good luck to you. */
public override object Refuse
{
get
{
return 1072728;
}
}
/* Hello, hello! Speckled, that's what they are. All covered with spots and speckles when you look very closely. Speckled scorpion
poison sacs will do the trick. */
public override object Uncomplete
{
get
{
return 1072729;
}
}
/* Fine, fine. Do you have them? */
public override object Complete
{
get
{
return 1073987;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PublicDonations;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SpecialDeliveryQuest : BaseQuest
{
public SpecialDeliveryQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(OfficialSealingWax), "sealing wax", 1, typeof(Sarakki), "Sarakki (Britain)"));
this.AddReward(new BaseReward(1072749)); // Friends of the Library Membership Token.
}
public override QuestChain ChainID
{
get
{
return QuestChain.LibraryFriends;
}
}
public override Type NextQuest
{
get
{
return typeof(AccessToTheStacksQuest);
}
}
/* Special Delivery */
public override object Title
{
get
{
return 1072719;
}
}
/* Good good! The wax is just cooling now and will be ready by the time you get it back to Sarakki. You still want the wax, right? */
public override object Description
{
get
{
return 1072741;
}
}
/* Sorry, sorry. I'll hold onto your order in case you change your mind. */
public override object Refuse
{
get
{
return 1072746;
}
}
/* Hello, hello. No rush of course. I'm sure Sarakki is patient and doesn't mind waiting for the wax. */
public override object Uncomplete
{
get
{
return 1072747;
}
}
/* Oh welcome back! Do you have my wax? */
public override object Complete
{
get
{
return 1073988;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PublicDonations;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class AccessToTheStacksQuest : BaseQuest
{
public AccessToTheStacksQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(NotarizedApplication), "notarized application", 1, typeof(Verity), "Verity (Britain)"));
this.AddReward(new BaseReward(typeof(FriendOfTheLibraryToken), 1072749)); // Friends of the Library Membership Token.
}
public override QuestChain ChainID
{
get
{
return QuestChain.LibraryFriends;
}
}
/* Access to the Stacks */
public override object Title
{
get
{
return 1072723;
}
}
/* There you are! *pleased smile* Don't you just love when a form is all filled in like that? All of the sections are complete,
everything is neat and tidy and the official seal is perfectly formed and in exactly the right spot. It's comforting. Here you are.
All you need to do now is return the form to Librarian Verity. Have a nice day! */
public override object Description
{
get
{
return 1072748;
}
}
/* Oh dear! You've changed your mind? *looks flustered* I'll file your notarized application then, in case you decide at a future
date to become a friend of the library. */
public override object Refuse
{
get
{
return 1072750;
}
}
/* The librarian can always be found in the Library. *admiring tone* She's got a really strong work ethic. */
public override object Uncomplete
{
get
{
return 1072751;
}
}
/* As an official friend of the library you can make contributions at a donation area. */
public override object Complete
{
get
{
return 1074811;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PublicDonations;
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.LibraryFriend = true;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+290
View File
@@ -0,0 +1,290 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class GatheringOfEvidence : BaseQuest
{
public override bool DoneOnce { get { return true; } }
public GatheringOfEvidence() : base()
{
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedArcaneEssence), "Void Crystal of Corrupted Arcane Essence", 1));
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedSpiritualEssence), "Void Crystal of Corrupted Spiritual Essence", 1));
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedMysticalEssence), "Void Crystal of Corrupted Mystical Essence", 1));
this.AddReward(new BaseReward(typeof(ResonantShieldOfVengeance), "Resonant Shield of Vengeance"));
this.AddReward(new BaseReward(typeof(WindOfCorruption), "Wind of Corruption"));
}
public override object Title
{
get
{
return 1150316; // Gathering of Evidence (Gargoyle Rewards)
}
}
/*There seems to be unrest spreading among the refugees surrounding the Royal city. There are
* rumors of gargoyles willingly leaving their encampments and disappearing into the abyss.
* Through our own investigations, we have learned that there are militant gargoyle camps in
* the abyss where their magically gifted members are tapping into a new source of magic. We
* suspect they are tapping the void energies and require you to obtain proof so that we can
* prepare a plan of action to deal with any threat they may pose. Bring back all of the following;
* Void Crystal of Corrupted Arcane Essence, Void Crystal of Corrupted Spiritual Essence, and a
* Void Crystal of Corrupted Mystical Essence.*/
public override object Description
{
get
{
return 1150317;
}
}
public override object Refuse
{
get
{
return "That's a shame.";
}
}
//Have you retrieved the essences? We cannot prepare our strategy without solid evidence.
public override object Uncomplete
{
get
{
return 1150319;
}
}
/*Well Done! This is just what we needed. We can ill afford these separatist encampments
* upsetting the delicate balance with the void consuming our world.*/
public override object Complete
{
get
{
return 1150320;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class GatheringProof : BaseQuest
{
public override bool DoneOnce { get { return true; } }
public GatheringProof()
: base()
{
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedArcaneEssence), "Void Crystal of Corrupted Arcane Essence", 1));
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedSpiritualEssence), "Void Crystal of Corrupted Spiritual Essence", 1));
this.AddObjective(new ObtainObjective(typeof(VoidCrystalOfCorruptedMysticalEssence), "Void Crystal of Corrupted Mystical Essence", 1));
this.AddReward(new BaseReward(typeof(ResonantShieldOfVengeanceHuman), "Resonant Shield of Vengeance"));
this.AddReward(new BaseReward(typeof(WindOfCorruptionHuman), "Wind of Corruption"));
}
public override object Title
{
get
{
return 1150384; // Gathering Proof (Human Rewards)
}
}
/*There seems to be unrest spreading among the refugees surrounding the Royal city. There are
* rumors of gargoyles willingly leaving their encampments and disappearing into the abyss.
* Through our own investigations, we have learned that there are militant gargoyle camps in
* the abyss where their magically gifted members are tapping into a new source of magic. We
* suspect they are tapping the void energies and require you to obtain proof so that we can
* prepare a plan of action to deal with any threat they may pose. Bring back all of the following;
* Void Crystal of Corrupted Arcane Essence, Void Crystal of Corrupted Spiritual Essence, and a
* Void Crystal of Corrupted Mystical Essence.*/
public override object Description
{
get
{
return 1150317;
}
}
public override object Refuse
{
get
{
return "That's a shame.";
}
}
//Have you retrieved the essences? We cannot prepare our strategy without solid evidence.
public override object Uncomplete
{
get
{
return 1150319;
}
}
/*Well Done! This is just what we needed. We can ill afford these separatist encampments
* upsetting the delicate balance with the void consuming our world.*/
public override object Complete
{
get
{
return 1150320;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Xeninlor : MondainQuester
{
[Constructable]
public Xeninlor()
: base("Xeninlor", "the Security Advisor")
{
}
public Xeninlor(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(GatheringOfEvidence)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.CantWalk = true;
Race = Race.Gargoyle;
this.Body = 666;
Utility.AssignRandomHair(this);
Utility.AssignRandomFacialHair(this);
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new GargishClothChest(Utility.RandomNeutralHue()));
this.AddItem(new GargishClothKilt(Utility.RandomNeutralHue()));
this.AddItem(new GargishClothLegs(Utility.RandomNeutralHue()));
this.AddItem(new SerpentStoneStaff());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Prassel : MondainQuester
{
[Constructable]
public Prassel()
: base("Prassel", "the Security Liason")
{
}
public Prassel(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(GatheringProof)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
Race = Race.Human;
this.Body = 0x190;
Utility.AssignRandomHair(this);
Utility.AssignRandomFacialHair(this);
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Tunic(Utility.RandomNeutralHue()));
this.AddItem(new ShortPants(Utility.RandomNeutralHue()));
this.AddItem(new Boots());
this.AddItem(new Halberd());
}
public override bool CheckTerMur()
{
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+356
View File
@@ -0,0 +1,356 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class WarriorsOfTheGemkeeperQuest : BaseQuest
{
public WarriorsOfTheGemkeeperQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(MapFragment), "fragment of a map", 1));
this.AddReward(new BaseReward(1074876)); // Knowledge of the legendary minotaur.
}
public override QuestChain ChainID
{
get
{
return QuestChain.GemkeeperWarriors;
}
}
public override Type NextQuest
{
get
{
return typeof(CloseEnoughQuest);
}
}
/* Warriors of the Gemkeeper */
public override object Title
{
get
{
return 1074536;
}
}
/* Here we honor the Gemkeeper's Apprentice and seek to aid her efforts against the humans responsible
for the death of her teacher - and the destruction of the elven way of life. Our tales speak of a fierce
race of servants of the Gemkeeper, the men-bulls whose battle-skill was renowned. It is desireable to
discover the fate of these noble creatures after the Rupture. Will you seek information? */
public override object Description
{
get
{
return 1074537;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* I care not how you get the information. Kill as many humans as you must ... but find the fate of the
minotaurs. Perhaps another of the Gemkeeper's servants has the knowledge we seek. */
public override object Uncomplete
{
get
{
return 1074540;
}
}
/* What have you found? */
public override object Complete
{
get
{
return 1074542;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Labyrinth;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1074541, null, 0x23); // You have discovered an important clue!
this.Owner.PlaySound(this.CompleteSound);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class CloseEnoughQuest : BaseQuest
{
public CloseEnoughQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(MapFragment), "fragment of a map", 1, typeof(Canir), "Canir (Sanctuary)"));
this.AddReward(new BaseReward(1074876)); // Knowledge of the legendary minotaur.
}
public override QuestChain ChainID
{
get
{
return QuestChain.GemkeeperWarriors;
}
}
public override Type NextQuest
{
get
{
return typeof(TakingTheBullByTheHornsQuest);
}
}
/* Close Enough */
public override object Title
{
get
{
return 1074544;
}
}
/* Ah ha! You see here ... and over here ... The map fragment places the city of the bull-men, Labyrinth,
on that piece of Sosaria that was thrown into the sky. Hmmm, I would have you go there and seek out these
warriors to see if they might join our cause. But, legend speaks of a mighty barrier to prevent invasion
of the city. Take this map to Canir and explain the problem. Perhaps she can devise a solution. */
public override object Description
{
get
{
return 1074546;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Canir is nearby, run and speak with her. */
public override object Uncomplete
{
get
{
return 1074548;
}
}
/* Yes? What do you want? I'm very busy. */
public override object Complete
{
get
{
return 1074549;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Labyrinth;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TakingTheBullByTheHornsQuest : BaseQuest
{
public TakingTheBullByTheHornsQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(GamanHorns), "gaman horns", 20, 0x1084));
this.AddReward(new BaseReward(1074876)); // Knowledge of the legendary minotaur.
}
public override QuestChain ChainID
{
get
{
return QuestChain.GemkeeperWarriors;
}
}
public override Type NextQuest
{
get
{
return typeof(EmissaryToTheMinotaurQuest);
}
}
/* Taking the Bull by the Horns */
public override object Title
{
get
{
return 1074551;
}
}
/* Interesting. I believe I have a way. I will need some materials to infuse you with the essence of a
bull-man, so you can fool their defenses. The most similar beast to the original Baratarian bull that the
minotaur were bred from is undoubtedly the mighty Gaman, native to the Lands of the Feudal Lords. I need
horns, in great quantity to undertake this magic. */
public override object Description
{
get
{
return 1074553;
}
}
/* Oh come now, don't be afraid. The magic won't harm you. */
public override object Refuse
{
get
{
return 1074554;
}
}
/* I cannot grant you the ability to pass through the bull-men's defenses without the gaman horns. */
public override object Uncomplete
{
get
{
return 1074555;
}
}
/* You've returned at last! Give me just a moment to examine what you've brought and I can perform the
magic that will allow you enter the Labyrinth. */
public override object Complete
{
get
{
return 1074556;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Labyrinth;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class EmissaryToTheMinotaurQuest : BaseQuest
{
public EmissaryToTheMinotaurQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(MinotaurArtifact), "minotaur artifacts", 3));
this.AddReward(new BaseReward(typeof(RewardBox), 1072584)); // A strongbox.
}
public override QuestChain ChainID
{
get
{
return QuestChain.GemkeeperWarriors;
}
}
/* Emissary to the Minotaur */
public override object Title
{
get
{
return 1074824;
}
}
/* *whew* It is done! The fierce essence of the bull has been infused into your aura. You are able
now to breach the ancient defenses of the city. Go forth and seek the minotaur -- and then return
with wonderous tales and evidence of your visit to the Labyrinth. */
public override object Description
{
get
{
return 1074825;
}
}
/* As you wish. I can't understand why you'd pass up such a remarkable opportunity. Think of the
adventures you would have. */
public override object Refuse
{
get
{
return 1074827;
}
}
/* You won't reach the minotaur city by loitering around here! What are you waiting for? You need to
get to Malas and find the access point for the island. You'll be renowned for your discovery! */
public override object Uncomplete
{
get
{
return 1074828;
}
}
/* Oh! You've returned at last! I can't wait to hear the tales ... but first, let me see those artifacts.
You've certainly earned this reward. */
public override object Complete
{
get
{
return 1074829;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Labyrinth;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+266
View File
@@ -0,0 +1,266 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class GhostOfCovetousQuest : BaseQuest
{
public GhostOfCovetousQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(SpiritBottle), "spirit bottle", 1, typeof(Frederic), "The Ghost of Frederic Smithson"));
this.AddReward(new BaseReward(1075284)); // Return the filled Spirit Bottle to Griswolt the Master Necromancer to receive a reward.
}
public override QuestChain ChainID
{
get
{
return QuestChain.CovetousGhost;
}
}
public override Type NextQuest
{
get
{
return typeof(SaveHisDadQuest);
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* A Ghost of Covetous */
public override object Title
{
get
{
return 1075287;
}
}
/* What? Oh, you startled me! Sorry, I'm a little jumpy. My master Griswolt learned that a ghost has recently taken up residence in the
Covetous dungeon. He sent me to capture it, but I . . . well, it terrified me, to be perfectly honest. If you think yourself courageous
enough, I'll give you my Spirit Bottle, and you can try to capture it yourself. I'm certain my master would reward you richly for such
service. */
public override object Description
{
get
{
return 1075286;
}
}
/* That's okay, I'm sure someone with more courage than either of us will come along eventually. */
public override object Refuse
{
get
{
return 1075288;
}
}
/* You'll find that ghost in the mountain pass above the Covetous dungeon. */
public override object Uncomplete
{
get
{
return 1075290;
}
}
/* (As you try to use the Spirit Bottle, the ghost snatches it out of your hand and smashes it on the rocks) Please, don't be frightened.
I need your help! */
public override object Complete
{
get
{
return 1075291;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SaveHisDadQuest : BaseQuest
{
public SaveHisDadQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(DreadSpiderSilk), "dread spider silk", 1, typeof(Leon), "Leon", 600));
this.AddReward(new BaseReward(1075339)); // Hurry! You must get the silk to Leon the Alchemist quickly, or it will crumble and become useless!
}
public override QuestChain ChainID
{
get
{
return QuestChain.CovetousGhost;
}
}
public override Type NextQuest
{
get
{
return typeof(FathersGratitudeQuest);
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* Save His Dad */
public override object Title
{
get
{
return 1075337;
}
}
/* My father, Andros, is a smith in Minoc. Last week his forge overturned and he was splashed by molten steel. He was horribly burned,
and we feared he would die. An alchemist in Vesper promised to make a bandage that could heal him, but he needed the silk of a dread
spider. I came here to get some, but I was careless, and succumbed to their poison. Please, won’t you help my father? */
public override object Description
{
get
{
return 1075338;
}
}
/* Oh . . . that’s your decision . . . OooOoooOOoo . . . */
public override object Refuse
{
get
{
return 1075340;
}
}
/* Thank you! Deliver it to Leon the Alchemist in Vesper. The silk crumbles easily, and much time has already passed since I died.
Please! Hurry! */
public override object Uncomplete
{
get
{
return 1075341;
}
}
/* How may I help thee? You have the silk of a dread spider? Of course I can make you a bandage, but what happened to Frederic? */
public override object Complete
{
get
{
return 1075342;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class FathersGratitudeQuest : BaseQuest
{
public FathersGratitudeQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(AlchemistsBandage), "alchemist's bandage", 1, typeof(Andros), "Andros"));
this.AddReward(new BaseReward(typeof(AndrosGratitude), 1075345)); // Andros’ Gratitude
}
public override QuestChain ChainID
{
get
{
return QuestChain.CovetousGhost;
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* A Father’s Gratitude */
public override object Title
{
get
{
return 1075343;
}
}
/* That is simply terrible. First Andros, and now his son. Well, let’s make sure Frederic’s sacrifice wasn’t in vain. Will you take
the bandages to his father? You can probably deliver them faster than I can, can’t you? */
public override object Description
{
get
{
return 1075344;
}
}
/* Well I’m sorry to hear you say that. Without your help, I don’t know if I can get these to Andros quickly enough to help him. */
public override object Refuse
{
get
{
return 1075346;
}
}
/* I don’t know how much longer Andros will survive. You’d better get this to him as quick as you can. Every second counts! */
public override object Uncomplete
{
get
{
return 1075347;
}
}
/* Sorry, I’m not accepting commissions at the moment. What? You have the bandage I need from Leon? Thank you so much! But why didn’t
my son bring this to me himself? . . . Oh, no! You can't be serious! *sag* My Freddie, my son! Thank you for carrying out his last wish.
Here -- I made this for my son, to give to him when he became a journeyman. I want you to have it. */
public override object Complete
{
get
{
return 1075348;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+705
View File
@@ -0,0 +1,705 @@
using System;
namespace Server.Engines.Quests.Samurai
{
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I><U>Important Quest Information</U></I><BR><BR>
*
* During your quest, any important information that a
* <a href = "?ForceTopic31">NPC</a> gives you, will appear in a window
* such as this one. You can review the information at any time during your
* quest.<BR><BR>
*
* <U>Getting Help</U><BR><BR>
*
* Some of the text you will come across during your quest,
* will be underlined <a href = "?ForceTopic73">links to the codex of wisdom</a>,
* or online help system. You can click on the text to get detailed information
* on the underlined subject. You may also access the Codex Of Wisdom by
* pressing "F1" or by clicking on the "?" on the toolbar at the top of
* your screen.<BR><BR><U>Context Menus</U><BR><BR>
*
* Context menus can be called up by single left-clicking (or Shift + single
* left-click, if you changed it) on most objects or NPCs in the world.
* Nearly everything, including your own avatar will have context menus available.
* Bringing up your avatar's context menu will give you options to cancel your quest
* and review various quest information.<BR><BR>
*/
return 1049092;
}
}
public override void OnRead()
{
this.System.AddObjective(new FindHaochiObjective());
}
}
public class RadarConversation : QuestConversation
{
public RadarConversation()
{
}
public override object Message
{
get
{
/* To view the surrounding area, you should learn about the Radar Map.<BR><BR>
*
* The Radar Map (or Overhead View) can be opened by pressing 'ALT-R'
* on your keyboard. It shows your immediate surroundings from a
* bird's eye view.<BR><BR>
*
* Pressing ALT-R twice, will enlarge the Radar Map a little.
* Use the Radar Map often as you travel throughout the world
* to familiarize yourself with your surroundings.
* */
return 1063033;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class FirstTrialIntroConversation : QuestConversation
{
public FirstTrialIntroConversation()
{
}
public override object Message
{
get
{
/* Greetings. I am Daimyo Haochi, the Feudal Lord of this region. <BR><BR>
*
* Since you are here at my side, you must wish to learn the ways of the Samurai.<BR><BR>
*
* Wielding a blade is easy, anyone can grasp a sword’s hilt. Learning how to
* fight properly and skillfully is to become an Armsman.<BR><BR>
*
* Learning how to master weapons, and even more importantly when not to use
* them, is the Way of the Warrior. The Way of the Samurai. The Code of the
* Bushido. That is why you are here. <BR><BR>
*
* You will go through 7 trials to prove your adherence to the Samurai code. <BR><BR>
*
* The first trial will test your decision making skills. You only have to enter
* the area beyond the green passageway. <BR><BR>
*
* Do not attempt to hurry your trials. The guards will only let you through
* to each trial when I have deemed you ready.<br><br>
*
* As a last resort you may use the golden teleporter tiles in each trial area
* but do so at your own risk. You may not be able to return and complete your
* trials once you have chosen to escape.
*/
return 1063029;
}
}
public override void OnRead()
{
this.System.AddObjective(new FirstTrialIntroObjective());
}
}
public class FirstTrialKillConversation : QuestConversation
{
public FirstTrialKillConversation()
{
}
public override object Message
{
get
{
/* Beyond you are two troubled groups.<BR><BR>
*
* The Cursed Souls were once proud warriors that were ensorcelled
* by an evil mage. The mage trapped and killed them later but the spell
* has not lifted from their souls in death. <BR><BR>
*
* The Young Ronin were former Samurai in training who lost their way.
* They are loyal only to those with enough coin in their pocket. <BR><BR>
*
* You must decide who needs to be fought to the death. You may wish to
* <a href="?ForceTopic27">review combat techniques</a> as well as
* <a href = "?ForceTopic29">information on healing yourself</a>. <BR><BR>
*
* Return to Daimyo Haochi after you have finished with your trial.<br><br>
*
* If you should die during any of your trials, visit one of the Ankh Shrines
* and you will be resurrected. You should retrieve your belongings from your
* body before returning to the Daimyo or you may not be able to return to your corpse.
*/
return 1063031;
}
}
public override void OnRead()
{
this.System.AddObjective(new FirstTrialKillObjective());
}
}
public class GainKarmaConversation : QuestConversation
{
private bool m_CursedSoul;
public GainKarmaConversation(bool cursedSoul)
{
this.m_CursedSoul = cursedSoul;
}
public GainKarmaConversation()
{
}
public override object Message
{
get
{
if (this.m_CursedSoul)
{
// You have just gained some <a href="?ForceTopic45">Karma</a> for killing a Cursed Soul.
return 1063040;
}
else
{
// You have just gained some <a href="?ForceTopic45">Karma</a> for killing a Young Ronin.
return 1063041;
}
}
}
public override bool Logged
{
get
{
return false;
}
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_CursedSoul = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_CursedSoul);
}
}
public class SecondTrialIntroConversation : QuestConversation
{
private bool m_CursedSoul;
public SecondTrialIntroConversation(bool cursedSoul)
{
this.m_CursedSoul = cursedSoul;
}
public SecondTrialIntroConversation()
{
}
public override object Message
{
get
{
if (this.m_CursedSoul)
{
/* It is good that you rid the land of the Cursed Souls so they can
* be at peace in death. They had been cursed for doing what they
* thought was an honorable deed. Now they can have respect in their death.<BR><BR>
*
* I have placed a reward in your pack. <BR><BR>
*
* The second trial will test your courage. You only have to follow the yellow
* path to see what awaits you.
*/
return 1063045;
}
else
{
/* It is good that you rid the land of those dishonorable Samurai.
* Perhaps they will learn a greater lesson in death.<BR><BR>
*
* I have placed a reward in your pack.<BR><BR>
*
* The second trial will test your courage. You only have to follow
* the yellow path to see what awaits you.
*/
return 1063046;
}
}
}
public override void OnRead()
{
this.System.AddObjective(new SecondTrialIntroObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_CursedSoul = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_CursedSoul);
}
}
public class SecondTrialAttackConversation : QuestConversation
{
public SecondTrialAttackConversation()
{
}
public override object Message
{
get
{
/* Beyond the guards is a test of courage. You must face your fear and attack a
* great beast. You must choose which beast to slay for there is more than
* one beyond the courtyard doors. <BR><BR>
*
* The imp entered the courtyard unaware of its surroundings. The dragon came
* knowingly, hunting for the flesh of humans – A feast for the beast. <BR><BR>
*
* You must rid the courtyard of these beasts but you may only choose one to
* attack. Go and choose wisely.
*/
return 1063057;
}
}
public override void OnRead()
{
this.System.AddObjective(new SecondTrialAttackObjective());
}
}
public class ThirdTrialIntroConversation : QuestConversation
{
private bool m_Dragon;
public ThirdTrialIntroConversation(bool dragon)
{
this.m_Dragon = dragon;
}
public ThirdTrialIntroConversation()
{
}
public override object Message
{
get
{
if (this.m_Dragon)
{
/* You faced the dragon knowing it would be your certain death.
* That is the courage of a Samurai. <BR><BR>
*
* Your spirit speaks as a Samurai already. <BR><BR>
*
* In these lands, death is not forever. The shrines can make you whole
* again as can a helpful mage or healer. <BR><BR>
*
* Seek them out when you have been mortally wounded. <BR><BR>
*
* The next trial will test your benevolence. You only have to walk the blue path.
*/
return 1063060;
}
else
{
/* Fear remains in your eyes but you have learned that not all is
* what it appears to be. <BR><BR>
*
* You must have known the dragon would slay you instantly.
* You elected the weaker opponent though the imp did not come
* here to destroy. You have much to learn. <BR><BR>
*
* In these lands, death is not forever. The shrines can make you whole
* again as can a helpful mage or healer. <BR><BR>
*
* Seek them out when you have been mortally wounded. <BR><BR>
*
* The next trial will test your benevolence. You only have to walk the blue path.
*/
return 1063059;
}
}
}
public override void OnRead()
{
this.System.AddObjective(new ThirdTrialIntroObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Dragon = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_Dragon);
}
}
public class ThirdTrialKillConversation : QuestConversation
{
public ThirdTrialKillConversation()
{
}
public override object Message
{
get
{
/* A pack of wolves circle your feet. They have been injured and are in pain.
* A quick death will end their suffering.<br><br>
*
* Use your Honorable Execution skill or other means to finish off a wounded wolf.
* Do so and return to Daimyo Haochi.
*/
return 1063062;
}
}
public override void OnRead()
{
this.System.AddObjective(new ThirdTrialKillObjective());
}
}
public class FourthTrialIntroConversation : QuestConversation
{
public FourthTrialIntroConversation()
{
}
public override object Message
{
get
{
/* <I>Daimyo Haochi smiles as you walk up to him. Quietly he says:</I><BR><BR>
*
* A Samurai understands the need to help others even as he wields a blade against
* them. <BR><BR>
*
* You have shown compassion. A true Samurai is benevolent even to an enemy.
* For this you have been rewarded. <BR><BR>
*
* And now you must prove yourself again. Walk the red path.
* We will talk again later.
*/
return 1063065;
}
}
public override void OnRead()
{
this.System.AddObjective(new FourthTrialIntroObjective());
}
}
public class FourthTrialCatsConversation : QuestConversation
{
public FourthTrialCatsConversation()
{
}
public override object Message
{
get
{
/* <I>You approach a disheveled gypsy standing near a small shed.
* You sense that she has not eaten nor bathed in quite some time. <BR><BR>
*
* Around her is a large colony of mangy and diseased cats. It appears
* she has spent what little money she’s earned to feed the cats instead
* of herself. <BR><BR>
*
* You have a decision to make. You can give her gold so she can buy some
* food for her animals and herself. You can also remove the necessity
* of the extra mouths to feed so she may concentrate on saving herself.</i><br><br>
*
* If you elect to give the gypsy money, you can do so by clicking your stack
* of gold and selecting ‘1’. Then dragging it and dropping it on the Gypsy.
*/
return 1063067;
}
}
public override void OnRead()
{
this.System.AddObjective(new FourthTrialCatsObjective());
}
}
public class FifthTrialIntroConversation : QuestConversation
{
private bool m_KilledCat;
public FifthTrialIntroConversation(bool killedCat)
{
this.m_KilledCat = killedCat;
}
public FifthTrialIntroConversation()
{
}
public override object Message
{
get
{
if (this.m_KilledCat)
{
/* Respect comes from allowing another to make their own decisions.
* By denying the gypsy her animals, you negate the respect she is due.
* Perhaps you will have learned something to use next time a similar
* situation arises. <BR><BR>
*
* And now you must prove yourself again. Please retrieve my katana
* from the treasure room and return it to me.
*/
return 1063071;
}
else
{
/* You showed respect by helping another out while allowing the gypsy
* what little dignity she has left. <BR><BR>
*
* Now she will be able to feed herself and gain enough energy to walk
* to her camp. <BR><BR>
*
* The cats are her family members– cursed by an evil mage. <BR><BR>
*
* Once she has enough strength to walk back to the camp, she will be
* able to undo the spell. <BR><BR>
*
* You have been rewarded for completing your trial. And now you must
* prove yourself again. <BR><BR>Please retrieve my katana from the
* treasure room and return it to me.
*/
return 1063070;
}
}
}
public override void OnRead()
{
this.System.AddObjective(new FifthTrialIntroObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_KilledCat = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_KilledCat);
}
}
public class FifthTrialReturnConversation : QuestConversation
{
public FifthTrialReturnConversation()
{
}
public override object Message
{
get
{
/* <i>The guards let you through without question, and pay you no mind as
* you walk into the Daimyo's treasure cache. A vast fortune in gold,
* gemstones, and jewelry is stored here! Surely, the Daimyo wouldn't
* miss a single small item...<br><br>
*
* You spot the sword quickly amongst the cache of gemstones and other valuables.
* In one quick motion you retrieve it and stash it in your pack.</i>
*/
return 1063248;
}
}
public override void OnRead()
{
this.System.AddObjective(new FifthTrialReturnObjective());
}
}
public class LostSwordConversation : QuestConversation
{
public LostSwordConversation()
{
}
public override object Message
{
get
{
// What? You have returned without the sword? Go back and look for it again.
return 1063074;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class SixthTrialIntroConversation : QuestConversation
{
private bool m_StolenTreasure;
public SixthTrialIntroConversation(bool stolenTreasure)
{
this.m_StolenTreasure = stolenTreasure;
}
public SixthTrialIntroConversation()
{
}
public override object Message
{
get
{
if (this.m_StolenTreasure)
{
/* I thank you for returning this sword. However, you should admonished
* for also taking treasure that was not asked for nor given back. <BR><BR>
*
* Think about your actions youngling. <BR><BR>
*
* Your training is nearly complete. Before you have your final trial,
* you should pay homage to Samurai who came before you. <BR><BR>
*
* Go into the Altar Room and light a candle for them.
* Afterwards, return to me.
*/
return 1063077;
}
else
{
/* Thank you for returning this sword to me and leaving the remaining
* treasure alone. <BR><BR>
*
* Your training is nearly complete. Before you have your final trial,
* you should pay homage to Samurai who came before you. <BR><BR>
*
* Go into the Altar Room and light a candle for them. Afterwards, return to me.
*/
return 1063076;
}
}
}
public override void OnRead()
{
this.System.AddObjective(new SixthTrialIntroObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_StolenTreasure = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_StolenTreasure);
}
}
public class SeventhTrialIntroConversation : QuestConversation
{
public SeventhTrialIntroConversation()
{
}
public override object Message
{
get
{
/* You have done well young Samurai. There is but one thing left to do. <BR><BR>
*
* In the final room is the holding cell containing young Ninjas who came to
* take my life. They were caught and placed in my custody. <BR><BR>
*
* Take care of these miscreants and show them where your loyalty lies. <BR><BR>
*
* This is your final act as a Samurai in training.
*/
return 1063079;
}
}
public override void OnRead()
{
this.System.AddObjective(new SeventhTrialIntroObjective());
}
}
public class EndConversation : QuestConversation
{
public EndConversation()
{
}
public override object Message
{
get
{
/* You have proven yourself young one. You will continue to improve as your skills
* are honed with age. <BR><BR>
*
* Now it is time for you to explore the lands. Beyond this path lies Zento
* City, your future home. On these grounds you will find a golden oval object
* known as a Moongate, step through it and you'll find yourself in Zento.<BR><BR>
*
* You may want to visit Ansella Gryen when you arrive. <BR><BR>
*
* You have learned the ways. You are an honorable warrior, a Samurai in
* the highest regards. <BR><BR>
*
* Please accept the gifts I have placed in your pack. You have earned them.
* Farewell for now.
*/
return 1063125;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
}
+168
View File
@@ -0,0 +1,168 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class HaochisTrialsQuest : QuestSystem
{
private static readonly Type[] m_TypeReferenceTable = new Type[]
{
typeof(Samurai.AcceptConversation),
typeof(Samurai.RadarConversation),
typeof(Samurai.FirstTrialIntroConversation),
typeof(Samurai.FirstTrialKillConversation),
typeof(Samurai.GainKarmaConversation),
typeof(Samurai.SecondTrialIntroConversation),
typeof(Samurai.SecondTrialAttackConversation),
typeof(Samurai.ThirdTrialIntroConversation),
typeof(Samurai.ThirdTrialKillConversation),
typeof(Samurai.FourthTrialIntroConversation),
typeof(Samurai.FourthTrialCatsConversation),
typeof(Samurai.FifthTrialIntroConversation),
typeof(Samurai.FifthTrialReturnConversation),
typeof(Samurai.LostSwordConversation),
typeof(Samurai.SixthTrialIntroConversation),
typeof(Samurai.SeventhTrialIntroConversation),
typeof(Samurai.EndConversation),
typeof(Samurai.FindHaochiObjective),
typeof(Samurai.FirstTrialIntroObjective),
typeof(Samurai.FirstTrialKillObjective),
typeof(Samurai.FirstTrialReturnObjective),
typeof(Samurai.SecondTrialIntroObjective),
typeof(Samurai.SecondTrialAttackObjective),
typeof(Samurai.SecondTrialReturnObjective),
typeof(Samurai.ThirdTrialIntroObjective),
typeof(Samurai.ThirdTrialKillObjective),
typeof(Samurai.ThirdTrialReturnObjective),
typeof(Samurai.FourthTrialIntroObjective),
typeof(Samurai.FourthTrialCatsObjective),
typeof(Samurai.FourthTrialReturnObjective),
typeof(Samurai.FifthTrialIntroObjective),
typeof(Samurai.FifthTrialReturnObjective),
typeof(Samurai.SixthTrialIntroObjective),
typeof(Samurai.SixthTrialReturnObjective),
typeof(Samurai.SeventhTrialIntroObjective),
typeof(Samurai.SeventhTrialReturnObjective)
};
private bool m_SentRadarConversion;
public HaochisTrialsQuest(PlayerMobile from)
: base(from)
{
}
// Serialization
public HaochisTrialsQuest()
{
}
public override Type[] TypeReferenceTable
{
get
{
return m_TypeReferenceTable;
}
}
public override object Name
{
get
{
// Haochi's Trials
return 1063022;
}
}
public override object OfferMessage
{
get
{
/* <i>As you enter the courtyard you notice a faded sign.
* It reads: </i><br><br>
*
* Welcome to your new home, Samurai.<br><br>
*
* Though your skills are only a shadow of what they can be some day,
* you must prove your adherence to the code of the Bushido.<br><br>
*
* Seek Daimyo Haochi for guidance.<br><br>
*
* <i>Will you accept the challenge?</i>
*/
return 1063023;
}
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.MaxValue;
}
}
public override bool IsTutorial
{
get
{
return true;
}
}
public override int Picture
{
get
{
return 0x15D7;
}
}
public static bool HasLostHaochisKatana(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (pm == null)
return false;
QuestSystem qs = pm.Quest;
if (qs is HaochisTrialsQuest)
{
if (qs.IsObjectiveInProgress(typeof(FifthTrialReturnObjective)))
{
Container pack = from.Backpack;
return (pack == null || pack.FindItemByType(typeof(HaochisKatana)) == null);
}
}
return false;
}
public override void Accept()
{
base.Accept();
this.AddConversation(new AcceptConversation());
}
public override void Slice()
{
if (!this.m_SentRadarConversion && (this.From.Map != Map.Malas || this.From.X < 360 || this.From.X > 400 || this.From.Y < 760 || this.From.Y > 780))
{
this.m_SentRadarConversion = true;
this.AddConversation(new RadarConversation());
}
base.Slice();
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_SentRadarConversion = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt(0); // version
writer.Write((bool)this.m_SentRadarConversion);
}
}
}
+561
View File
@@ -0,0 +1,561 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Samurai
{
public class FindHaochiObjective : QuestObjective
{
public FindHaochiObjective()
{
}
public override object Message
{
get
{
// Speak to Daimyo Haochi.
return 1063026;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FirstTrialIntroConversation());
}
}
public class FirstTrialIntroObjective : QuestObjective
{
public FirstTrialIntroObjective()
{
}
public override object Message
{
get
{
// Follow the green path. The guards will now let you through.
return 1063030;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FirstTrialKillConversation());
}
}
public class FirstTrialKillObjective : QuestObjective
{
private int m_CursedSoulsKilled;
private int m_YoungRoninKilled;
public FirstTrialKillObjective()
{
}
public override object Message
{
get
{
// Kill 3 Young Ronin or 3 Cursed Souls. Return to Daimyo Haochi when you have finished.
return 1063032;
}
}
public override int MaxProgress
{
get
{
return 3;
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is CursedSoul)
{
if (this.m_CursedSoulsKilled == 0)
this.System.AddConversation(new GainKarmaConversation(true));
this.m_CursedSoulsKilled++;
// Cursed Souls killed: ~1_COUNT~
this.System.From.SendLocalizedMessage(1063038, this.m_CursedSoulsKilled.ToString());
}
else if (creature is YoungRonin)
{
if (this.m_YoungRoninKilled == 0)
this.System.AddConversation(new GainKarmaConversation(false));
this.m_YoungRoninKilled++;
// Young Ronin killed: ~1_COUNT~
this.System.From.SendLocalizedMessage(1063039, this.m_YoungRoninKilled.ToString());
}
this.CurProgress = Math.Max(this.m_CursedSoulsKilled, this.m_YoungRoninKilled);
}
public override void OnComplete()
{
this.System.AddObjective(new FirstTrialReturnObjective(this.m_CursedSoulsKilled > this.m_YoungRoninKilled));
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_CursedSoulsKilled = reader.ReadEncodedInt();
this.m_YoungRoninKilled = reader.ReadEncodedInt();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.WriteEncodedInt(this.m_CursedSoulsKilled);
writer.WriteEncodedInt(this.m_YoungRoninKilled);
}
}
public class FirstTrialReturnObjective : QuestObjective
{
bool m_CursedSoul;
public FirstTrialReturnObjective(bool cursedSoul)
{
this.m_CursedSoul = cursedSoul;
}
public FirstTrialReturnObjective()
{
}
public override object Message
{
get
{
// The first trial is complete. Return to Daimyo Haochi.
return 1063044;
}
}
public override void OnComplete()
{
this.System.AddConversation(new SecondTrialIntroConversation(this.m_CursedSoul));
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_CursedSoul = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_CursedSoul);
}
}
public class SecondTrialIntroObjective : QuestObjective
{
public SecondTrialIntroObjective()
{
}
public override object Message
{
get
{
// Follow the yellow path. The guards will now let you through.
return 1063047;
}
}
public override void OnComplete()
{
this.System.AddConversation(new SecondTrialAttackConversation());
}
}
public class SecondTrialAttackObjective : QuestObjective
{
public SecondTrialAttackObjective()
{
}
public override object Message
{
get
{
// Choose your opponent and attack one with all your skill.
return 1063058;
}
}
}
public class SecondTrialReturnObjective : QuestObjective
{
private bool m_Dragon;
public SecondTrialReturnObjective(bool dragon)
{
this.m_Dragon = dragon;
}
public SecondTrialReturnObjective()
{
}
public override object Message
{
get
{
// The second trial is complete. Return to Daimyo Haochi.
return 1063229;
}
}
public bool Dragon
{
get
{
return this.m_Dragon;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ThirdTrialIntroConversation(this.m_Dragon));
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Dragon = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_Dragon);
}
}
public class ThirdTrialIntroObjective : QuestObjective
{
public ThirdTrialIntroObjective()
{
}
public override object Message
{
get
{
/* The next trial will test your benevolence. Follow the blue path.
* The guards will now let you through.
*/
return 1063061;
}
}
public override void OnComplete()
{
this.System.AddConversation(new ThirdTrialKillConversation());
}
}
public class ThirdTrialKillObjective : QuestObjective
{
public ThirdTrialKillObjective()
{
}
public override object Message
{
get
{
/* Use your Honorable Execution skill to finish off the wounded wolf.
* Double click the icon in your Book of Bushido to activate the skill.
* When you are done, return to Daimyo Haochi.
*/
return 1063063;
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is InjuredWolf)
this.Complete();
}
public override void OnComplete()
{
this.System.AddObjective(new ThirdTrialReturnObjective());
}
}
public class ThirdTrialReturnObjective : QuestObjective
{
public ThirdTrialReturnObjective()
{
}
public override object Message
{
get
{
// Return to Daimyo Haochi.
return 1063064;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FourthTrialIntroConversation());
}
}
public class FourthTrialIntroObjective : QuestObjective
{
public FourthTrialIntroObjective()
{
}
public override object Message
{
get
{
// Follow the red path and pass through the guards to the entrance of the fourth trial.
return 1063066;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FourthTrialCatsConversation());
}
}
public class FourthTrialCatsObjective : QuestObjective
{
public FourthTrialCatsObjective()
{
}
public override object Message
{
get
{
/* Give the gypsy gold or hunt one of the cats to eliminate the undue
* need it has placed on the gypsy.
*/
return 1063068;
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is DiseasedCat)
{
this.Complete();
this.System.AddObjective(new FourthTrialReturnObjective(true));
}
}
}
public class FourthTrialReturnObjective : QuestObjective
{
private bool m_KilledCat;
public FourthTrialReturnObjective(bool killedCat)
{
this.m_KilledCat = killedCat;
}
public FourthTrialReturnObjective()
{
}
public override object Message
{
get
{
// You have made your choice. Return now to Daimyo Haochi.
return 1063242;
}
}
public bool KilledCat
{
get
{
return this.m_KilledCat;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FifthTrialIntroConversation(this.m_KilledCat));
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_KilledCat = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_KilledCat);
}
}
public class FifthTrialIntroObjective : QuestObjective
{
private bool m_StolenTreasure;
public FifthTrialIntroObjective()
{
}
public override object Message
{
get
{
// Retrieve Daimyo Haochi’s katana from the treasure room.
return 1063072;
}
}
public bool StolenTreasure
{
get
{
return this.m_StolenTreasure;
}
set
{
this.m_StolenTreasure = value;
}
}
public override void OnComplete()
{
this.System.AddConversation(new FifthTrialReturnConversation());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_StolenTreasure = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_StolenTreasure);
}
}
public class FifthTrialReturnObjective : QuestObjective
{
public FifthTrialReturnObjective()
{
}
public override object Message
{
get
{
// Give the sword to Daimyo Haochi.
return 1063073;
}
}
}
public class SixthTrialIntroObjective : QuestObjective
{
public SixthTrialIntroObjective()
{
}
public override object Message
{
get
{
// Light one of the candles near the altar and return to Daimyo Haochi.
return 1063078;
}
}
public override void OnComplete()
{
this.System.AddObjective(new SixthTrialReturnObjective());
}
}
public class SixthTrialReturnObjective : QuestObjective
{
public SixthTrialReturnObjective()
{
}
public override object Message
{
get
{
// You have done as requested. Return to Daimyo Haochi.
return 1063252;
}
}
public override void OnComplete()
{
this.System.AddConversation(new SeventhTrialIntroConversation());
}
}
public class SeventhTrialIntroObjective : QuestObjective
{
public SeventhTrialIntroObjective()
{
}
public override object Message
{
get
{
/* Three young Ninja must be dealt with. Your job is to kill them.
* When you have done so, return to Daimyo Haochi.
*/
return 1063080;
}
}
public override int MaxProgress
{
get
{
return 3;
}
}
public override void OnKill(BaseCreature creature, Container corpse)
{
if (creature is YoungNinja)
this.CurProgress++;
}
public override void OnComplete()
{
this.System.AddObjective(new SeventhTrialReturnObjective());
}
}
public class SeventhTrialReturnObjective : QuestObjective
{
public SeventhTrialReturnObjective()
{
}
public override object Message
{
get
{
// The executions are complete. Return to the Daimyo.
return 1063253;
}
}
public override void OnComplete()
{
this.System.AddConversation(new EndConversation());
}
}
}
+177
View File
@@ -0,0 +1,177 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class HonestBeggarQuest : BaseQuest
{
public HonestBeggarQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(ReginasRing), "regina's ring", 1, typeof(Regina), "Regina"));
this.AddReward(new BaseReward(1075394)); // Find the ring’s owner.
}
public override QuestChain ChainID
{
get
{
return QuestChain.HonestBeggar;
}
}
public override Type NextQuest
{
get
{
return typeof(ReginasThanksQuest);
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* Honest Beggar */
public override object Title
{
get
{
return 1075392;
}
}
/* Beg pardon, sir. I mean, madam. Uh, can I ask a favor of you? I found this jeweled ring. Most people would sell
it and keep the money, but not me. I ain't never stole nothing, and I ain't about to start. I tried to take it over
to Brit castle, figgerin' it must belong to some highborn lady, but the guards threw me out. You look like they might
let you pass. Will you take the ring over there and see if you can find the owner? */
public override object Description
{
get
{
return 1075393;
}
}
/* I see. Too good to help an honest beggar like me, eh? */
public override object Refuse
{
get
{
return 1075395;
}
}
/* A jewel like this must be worth a lot, so it must belong to some noble or another. I would show it around the castle.
Someone’s bound to recognize it. */
public override object Uncomplete
{
get
{
return 1075396;
}
}
/* Didst thou find my ring? I thank thee very much! It is an old ring, and a gift from my husband. I was most distraught
when I realized it was missing. */
public override object Complete
{
get
{
return 1075397;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class ReginasThanksQuest : BaseQuest
{
public ReginasThanksQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(ReginasLetter), "regina's letter", 1, typeof(Evan), "Evan"));
this.AddReward(new BaseReward(typeof(TransparentHeart), 1075400));
}
public override QuestChain ChainID
{
get
{
return QuestChain.HonestBeggar;
}
}
public override bool DoneOnce
{
get
{
return true;
}
}
/* Regina’s Thanks */
public override object Title
{
get
{
return 1075398;
}
}
/* What’s that you say? It was a humble beggar that found my ring? Such honesty must be rewarded. Here, take this packet
and return it to him, and I will be in your debt. */
public override object Description
{
get
{
return 1075399;
}
}
/* Hmph. Very well. What did you say his name was? */
public override object Refuse
{
get
{
return 1075401;
}
}
/* Take the packet and return it to the beggar who found my ring. */
public override object Uncomplete
{
get
{
return 1075402;
}
}
/* What? For me? Let me see . . . these sapphire earrings are for you, it says. Oh, she wants to offer me a job! This is
the most wonderful thing that ever happened to me! */
public override object Complete
{
get
{
return 1075403;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+256
View File
@@ -0,0 +1,256 @@
using System;
using Server;
using Server.Items;
namespace Server.Engines.Quests
{
public class HonorOfDeBoorsQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.HonorOfDeBoors; } }
public override Type NextQuest { get { return typeof(JackTheVillainQuest); } }
public override bool DoneOnce { get { return true; } }
/* The Honor of the De Boors */
public override object Title { get { return 1075416; } }
/* I beg your pardon, but will you listen to my story? My family, the de Boors family, have been jewel traders
as far back as anyone can remember. Alas, by the time I was born, we had fallen on hard times.
To survive, I have had to sell much of my family’s property. Most of it was meaningless, but I regret that a
few years ago I made a terrible mistake. I pawned a shield bearing my family’s coat of arms to a loan shark.
That shield was borne into battle by Jaan de Boors, the founder of our house! It has no value to anyone, but
that blackguard won’t believe I have no money. He wants a fortune in jewels before he will return it.
Now I have learned that I am dying. Soon I will be gone, and my lineage with me. For the sake of what little
honor is left to me and my family name, I cannot bear to leave our ancestral shield in the hands of that villain.
Will you help me recover it? */
public override object Description { get { return 1075417; } }
/* I know how much I am asking. Please, can you not help a dying man restore his family’s honor? */
public override object Refuse { get { return 1075419; } }
/* Are you sure? You are very kind. Many of the monsters around here, when slain, are found to have jewels in their stomachs.
From innocents they have eaten, no doubt. */
public override object Uncomplete { get { return 1075420; } }
/* You have done it! Bless you! I do appreciate this very much! Though, will you do me one last favor? */
public override object Complete { get { return 1075421; } }
public HonorOfDeBoorsQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Diamond), "Diamonds", 10));
AddObjective(new ObtainObjective(typeof(Ruby), "Rubies", 10));
AddObjective(new ObtainObjective(typeof(Emerald), "Emeralds", 10));
AddReward(new BaseReward(1075418)); // Gather them quickly. Who knows how long Derek has to live?
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class JackTheVillainQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.HonorOfDeBoors; } }
public override Type NextQuest { get { return typeof(SavedHonorQuest); } }
public override bool DoneOnce { get { return true; } }
/* Jack the Villain */
public override object Title { get { return 1075422; } }
/*Will you take the jewels to the loan shark? I am not well enough to go myself, though it is not far. */
public override object Description { get { return 1075423; } }
/* Ah well. You have already helped me by gathering the jewels. I cannot complain. */
public override object Refuse { get { return 1075425; } }
/* The name of the villain is Jack, you will find him over by the port. */
public override object Uncomplete { get { return 1075426; } }
/* What do you want? Oh, that jewel merchant wants his shield back, eh? */
public override object Complete { get { return 1075427; } }
public JackTheVillainQuest()
: base()
{
AddObjective(new DeliverObjective(typeof(BagOfJewels), "Bag of Jewels", 1, typeof(JackLoanShark), "Jack the Loan Shark"));
AddReward(new BaseReward(1075424)); // Deliver the bag of jewels to the loan shark.
}
public override void OnCompleted()
{
Owner.PlaySound(CompleteSound);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SavedHonorQuest : BaseQuest
{
public override QuestChain ChainID { get { return QuestChain.HonorOfDeBoors; } }
public override bool DoneOnce { get { return true; } }
/* Saved Honor */
public override object Title { get { return 1075428; } }
/* That idiot! This beat up piece of junk isn’t worth more than three gold coins, four at most!
* Oh, well, a deal’s a deal! */
public override object Description { get { return 1075429; } }
/* I don’t care what you do! */
public override object Refuse { get { return 1075431; } }
/* Go away and never come back. */
public override object Uncomplete { get { return 1075432; } }
/* My shield! My family’s honor! You have my gratitude. Please, take this goblet.
* It is small enough repayment for all you have done for me, but it is the only
* thing of my family’s that I have left. */
public override object Complete { get { return 1075433; } }
public SavedHonorQuest()
: base()
{
AddObjective(new DeliverObjective(typeof(DeBoorShield), "Ancestral Shield", 1, typeof(DerekMerchant), "Derek the Merchant"));
AddReward(new BaseReward(typeof(GobletOfCelebration), 1075309)); // Goblet of Celebration
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class DerekMerchant : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[] { typeof( HonorOfDeBoorsQuest ) };
}
}
[Constructable]
public DerekMerchant()
: base("Derek", "the Merchant")
{
}
public DerekMerchant(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
Hue = 0x8406;
HairItemID = 0x2048;
HairHue = 0x473;
FacialHairItemID = 0x204B;
FacialHairHue = 0x473;
}
public override void InitOutfit()
{
AddItem(new Shoes());
AddItem(new LongPants(0x901));
AddItem(new FancyShirt(0x5F4));
AddItem(new Backpack());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class JackLoanShark : MondainQuester
{
public override Type[] Quests { get { return null; } } //JackTheVillainQuest
[Constructable]
public JackLoanShark()
: base("Jack", "the Loan Shark")
{
}
public JackLoanShark(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Human;
Hue = 0x83EC;
HairItemID = 0x2045;
HairHue = 0x464;
FacialHairItemID = 0x204B;
FacialHairHue = 0x464;
}
public override void InitOutfit()
{
AddItem(new Dagger());
AddItem(new ThighBoots(0x901));
AddItem(new LongPants(0x521));
AddItem(new FancyShirt(0x5A7));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+326
View File
@@ -0,0 +1,326 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class IngenuityQuest : BaseQuest
{
public IngenuityQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(PowerCrystal), "power crystals", 10, 0x1F1C));
this.AddReward(new BaseReward(1074875)); // Another step closer to becoming human.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Ingenuity */
public override object Title
{
get
{
return 1074350;
}
}
/* The best thing about my job is that I do a little bit of everything, every day. It's what we're good
at really. Just picking up something and making it do something else. Listen, I'm really low on parts.
Are you interested in fetching me some supplies? */
public override object Description
{
get
{
return 1074462;
}
}
/* Okay. Best of luck with your other endeavors. */
public override object Refuse
{
get
{
return 1074508;
}
}
/* Lord overseers are the best source I know for power crystals of the type I need. Iron golems too,
can have them but they're harder to find. */
public override object Uncomplete
{
get
{
return 1074509;
}
}
/* Do you have those power crystals? I'm ready to put the finishing touches on my latest experiment. */
public override object Complete
{
get
{
return 1074510;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074946, null, 0x23); // You have demonstrated your ingenuity! Humans are jacks of all trades and know a little about a lot of things. You are one step closer to achieving humanity.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class HeaveHoQuest : BaseQuest
{
public HeaveHoQuest()
: base()
{
this.AddObjective(new DeliverObjective(typeof(CrateForSledge), "crates for Sledge", 5, typeof(Sledge), "Sledge (Buc's Den)", 3600));
this.AddReward(new BaseReward(1074875)); // Another step closer to becoming human.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Heave Ho! */
public override object Title
{
get
{
return 1074351;
}
}
/* Ho there! There's nothing quite like a day's honest labor to make you appreciate being alive. Hey,
maybe you'd like to help out with this project? These crates need to be delivered to Sledge. The only
thing is -- it's a bit of a rush job and if you don't make it in time, he won't take them. Can I trust
you to help out? */
public override object Description
{
get
{
return 1074519;
}
}
/* Oh yah, if you're too busy, no problem. */
public override object Refuse
{
get
{
return 1074521;
}
}
/* Sledge can be found in Buc's Den. Better hurry, he won't take those crates if you take too long with them. */
public override object Uncomplete
{
get
{
return 1074522;
}
}
/* Hey, if you have cargo for me, you can start unloading over here. */
public override object Complete
{
get
{
return 1074523;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074948, null, 0x23); // You have demonstrated your physical strength! Humans can carry vast loads without complaint. You are one step closer to achieving humanity.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class ResponsibilityQuest : BaseQuest
{
public ResponsibilityQuest()
: base()
{
this.AddObjective(new EscortObjective("Sheep Farm"));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* Responsibility */
public override object Title
{
get
{
return 1074352;
}
}
/* Oh! I just don't know what to do. My mother is away and my father told me not to talk to strangers ...
*worried frown* But my grandfather has sent word that he has been hurt and needs me to tend his wounds.
He has a small farm southeast of here. Would you ... could you ... escort me there safely? */
public override object Description
{
get
{
return 1074524;
}
}
/* I hope my grandfather will be alright. */
public override object Refuse
{
get
{
return 1074525;
}
}
/* Grandfather's farm is a ways west of the Shrine of Spirituality. So, we're not quite there yet. Thank
you again for keeping me safe. */
public override object Uncomplete
{
get
{
return 1074526;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074949, null, 0x23); // You have demonstrated your compassion! Your kind actions have been noted.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class AllSeasonAdventurerQuest : BaseQuest
{
public AllSeasonAdventurerQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Efreet), "efreets", 5, "Fire"));
this.AddObjective(new SlayObjective(typeof(IceFiend), "ice fiends", 5, "Ice"));
this.AddReward(new BaseReward(1074875)); // Another step closer to becoming human.
}
public override bool ForceRemember
{
get
{
return true;
}
}
/* All Season Adventurer */
public override object Title
{
get
{
return 1074353;
}
}
/* It's all about hardship, suffering, struggle and pain. Without challenges, you've got nothing to test
yourself against -- and that's what life is all about. Self improvement! Honing your body and mind!
Overcoming obstacles ... You'll see what I mean if you take on my challenge. */
public override object Description
{
get
{
return 1074527;
}
}
/* My way of life isn't for everyone, that's true enough. */
public override object Refuse
{
get
{
return 1074528;
}
}
/* You're not making much progress in the honing-mind-and-body department, are you? */
public override object Uncomplete
{
get
{
return 1074529;
}
}
/* Ahhhh! Don't you feel great? Struggle is good for the soul. */
public override object Complete
{
get
{
return 1074530;
}
}
public override void GiveRewards()
{
base.GiveRewards();
this.Owner.SendLocalizedMessage(1074947, null, 0x23); // You have demonstrated your toughness! Humans are able to endure unimaginable hardships in pursuit of their goals. You are one step closer to achieving humanity.
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+176
View File
@@ -0,0 +1,176 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class JourneyToTheAthenaeumIsleQuest : BaseQuest
{
public override object Title { get { return 1150929; } } // Journey to the Athenaeum Isle
public override object Description { get { return 1150902; } } /*Greetings, adventurer. <br><br> As you know, my people have suffered the
* incessant onslaught of the Void and its minions for as long as Gargish
* history exists. Protecting Ter Mur from the darkness, and its desire to
* consume the land completely, is a burden passed down from one ruler to another
* upon ascension to the throne. During my rule, I have been more successful
* than my predecessors but, now, I fear that the greatest evil both myself and
* my people have ever faced is about to return.<br><br> Long ago, Ter Mur was
* assaulted by the most formidable and horrid servant of the Void it had ever faced.
* Called Scelestus the Defiler, this daemon proved invincible to any weapon or spell
* that was utilized against him. I was unable to defeat him and was forced to
* imprison him instead. Sadly, my own daughter was caught in the spell and stands
* imprisoned next to the daemon. It has been this way for a thousand years now.
* <br><br> I have received word that the isle which houses the daemon, Athenaeum
* Isle, is once again swarming with daemons. Based on the description provided to
* me, I believe these are the minions of the Defiler himself. They have no doubt
* crawled out of the dark in anticipation of their master’s return. In truth, the
* prison I placed him within will not last forever.<br><br> I ask that you journey
* to the southwestern flight tower, adventurer, and head further southwest towards
* the shore. Near the water's edge, you will find an ancient teleport site which
* will transport you to the isle. Once there, please slay as many of these monsters
* as you can. Additionally, please keep your eye out for any documents that you may
* discover. This isle was the former home of our Great Library and, when it fell,
* not all of the documents and books were able to be taken to the new location here
* in the Royal City.<br><br> Slay the beasts and return to me any documents that
* you acquire.<br><br> Be careful, and go with honor.*/
public override object Refuse { get { return 1150930; } } // Understood. Perhaps you are not as brave as I initially thought. Be on your way, then.
public override object Uncomplete { get { return 1150931; } } // You have returned. Did you manage to slay the beasts and obtain any documents that may be of interest?
public override object Complete { get { return 1150903; } } /*You have returned! I cannot thank you enough for the service you have done me,
* adventurer. <br><br> The documents that you have retrieved may seem unimportant
* to you, as they are naught but random letters and doctrines. But they each
* represent an echo of the past, musings of our ancestors. I had always meant to
* return to the former library and retrieve all that I could, but I had thought they
* were safe, gathering dust in the ruins. I will immediately have these cleaned and
* placed in the Great Library here in the Royal City.<br><br> As thanks, I offer
* you this book. It is the chronicle of my life, of the arrival of the Defiler, and
* a history of my people. In hopes that you will be granted further understanding of
* the impending danger we suffer, I offer it to you as a gesture of friendship and
* goodwill.<br><br> Thank you again, on behalf of the Gargoyle people. I may have
* need of your assistance at another time, should you be willing to come to my aid
* again.<br><br> Until then, farewell.*/
public JourneyToTheAthenaeumIsleQuest()
{
AddObjective( new SlayObjective ( typeof( MinionOfScelestus), "Minion of Scelestus", 10 ) );
for(int i = 0; i < m_Types.Length; i++)
{
ObtainObjective obtain = new ObtainObjective(m_Types[i], m_Names[i], 1);
AddObjective(obtain);
}
//AddObjective( new InternalObjective() );
AddReward(new BaseReward(typeof(ChronicleOfTheGargoyleQueen1), 1, "Chronicle of the Gargoyle Queen Vol. I"));
}
public override bool RenderObjective(MondainQuestGump gump, bool offer)
{
int offset = 163;
int page = 1;
var slay = Objectives.FirstOrDefault(o => o is SlayObjective) as SlayObjective;
if (offer)
gump.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
gump.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
gump.AddHtmlObject(160, 70, 200, 40, Title, BaseQuestGump.DarkGreen, false, false);
gump.AddPage(page);
gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1);
gump.AddHtmlLocalized(98, 147, 312, 16, 1072208, 0x2710, false, false); // All of the following
gump.AddHtmlLocalized(98, offset, 30, 16, 1072204, 0x15F90, false, false); // Slay
gump.AddLabel(133, offset, 0x481, "10 " + slay.Name); // %count% + %name%
offset += 16;
if (!offer)
{
gump.AddHtmlLocalized(103, offset, 120, 16, 3000087, 0x15F90, false, false); // Total
gump.AddLabel(223, offset, 0x481, slay.CurProgress.ToString()); // %current progress%
offset += 16;
}
offset += 75;
for (int i = 1; i < Objectives.Count; i++)
{
gump.AddHtmlLocalized(98, offset, 305, 16, 1150933 + (i - 1), 0x15F90, false, false);
if (offset + 80 > 335)
{
offset = 163;
gump.AddButton(275, 430, 0x2EE9, 0x2EEB, 0, GumpButtonType.Page, page + 1);
gump.AddPage(++page);
gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1);
if (i == Objectives.Count - 1)
{
RenderRewardPage(gump, offer);
break;
}
}
// render rewards page
else if (i == Objectives.Count - 1)
{
gump.AddButton(275, 430, 0x2EE9, 0x2EEB, 0, GumpButtonType.Page, page + 1);
gump.AddPage(++page);
RenderRewardPage(gump, offer);
gump.AddButton(130, 430, 0x2EEF, 0x2EF1, 0, GumpButtonType.Page, page - 1);
break;
}
else
{
offset += 80;
}
}
return true;
}
private void RenderRewardPage(MondainQuestGump gump, bool offer)
{
int offset = 163;
if (offer)
gump.AddHtmlLocalized(130, 45, 270, 16, 1049010, 0xFFFFFF, false, false); // Quest Offer
else
gump.AddHtmlLocalized(130, 45, 270, 16, 1046026, 0xFFFFFF, false, false); // Quest Log
gump.AddHtmlLocalized(98, 140, 312, 16, 1072201, 0x2710, false, false); // Reward
BaseReward reward = Rewards[0];
gump.AddImage(105, offset, 0x4B9);
gump.AddHtmlObject(133, offset, 280, 100, reward.Name, BaseQuestGump.LightGreen, false, false);
}
private Type[] m_Types = new Type[]
{
typeof(ChallengeRite), typeof(AnthenaeumDecree), typeof(LetterFromTheKing),
typeof(OnTheVoid), typeof(ShilaxrinarsMemorial), typeof(ToTheHighScholar),
typeof(ToTheHighBroodmother), typeof(ReplyToTheHighScholar), typeof(AccessToTheIsle),
typeof(InMemory)
};
private string[] m_Names = new string[]
{
"Obtain Gargish Document - Challenge Rite", "Obtain Gargish Document - Athenaeum Decree", "Obtain Gargish Document - Letter from the King",
"Obtain Gargish Document - On the Void", "Obtain Gargish Document - Shilaxrinar's Memorial", "Obtain Gargish Document - To the High Scholar",
"Obtain Gargish Document - To the High Broodmother", "Obtain Gargish Document - Reply to the High Scholar", "Obtain Gargish Document - Access to the Isle",
"Obtain Gargish Document - In Memory"
};
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class KnowledgeoftheSoulforge : BaseQuest
{
public KnowledgeoftheSoulforge()
: base()
{
this.AddObjective(new ObtainObjective(typeof(EnchantedEssence), "Enchanted Essence", 50, 0x2DB2));
this.AddReward(new BaseReward(typeof(ScrollBox), 1, "Knowledge"));
}
public override object Title
{
get
{
return "Knowledge of the Soulforge";
}
}
public override object Description
{
get
{
return 1112526;
}
}
public override object Refuse
{
get
{
return 1112546;
}
}
public override object Uncomplete
{
get
{
return 1112547;
}
}
public override object Complete
{
get
{
return 1112527;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+84
View File
@@ -0,0 +1,84 @@
using System;
using Server;
namespace Server.Mobiles
{
public enum ClockworkCreatureType
{
ExodusOverseer = 1075914,
Betrayer = 1029734,
ClockworkScorpion = 1112861,
Vollem = 1112860,
Juggernaut = 1029746,
ExodusMinion = 1075915,
LeatherWolf = 1112859
}
public class ClockworkCreatureDef
{
private ClockworkCreatureType m_CreatureType;
private string m_Name;
private int m_BodyId;
public ClockworkCreatureType CreatureType { get { return m_CreatureType; } }
public string Name { get { return m_Name; } }
public int BodyId { get { return m_BodyId; } }
public ClockworkCreatureDef(ClockworkCreatureType type, string name, int bodyId)
{
m_CreatureType = type;
m_Name = name;
m_BodyId = bodyId;
}
}
public class ClockworkCreature : Mobile
{
public static ClockworkCreatureDef[] Definitions { get { return m_Definitions; } }
private static readonly ClockworkCreatureDef[] m_Definitions = new ClockworkCreatureDef[]
{
new ClockworkCreatureDef( ClockworkCreatureType.ExodusOverseer, "an exodus overseer", 0x2F4 ),
new ClockworkCreatureDef( ClockworkCreatureType.Betrayer, "a betrayer", 0x2FF ),
new ClockworkCreatureDef( ClockworkCreatureType.ClockworkScorpion, "a clockwork scorpion", 0x2CD ),
new ClockworkCreatureDef( ClockworkCreatureType.Vollem, "a vollem", 0x125 ),
new ClockworkCreatureDef( ClockworkCreatureType.Juggernaut, "a juggernaut", 0x300 ),
new ClockworkCreatureDef( ClockworkCreatureType.ExodusMinion, "an exodus minion", 0x2F5 ),
new ClockworkCreatureDef( ClockworkCreatureType.LeatherWolf, "a leather wolf", 0x2E3 ),
};
[Constructable]
public ClockworkCreature(ClockworkCreatureDef def)
{
Name = def.Name;
Body = def.BodyId;
Hits = HitsMax;
Blessed = true;
Frozen = true;
}
public ClockworkCreature(Serial serial)
: base(serial)
{
}
public override bool CanBeDamaged()
{
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
+178
View File
@@ -0,0 +1,178 @@
using System;
using Server.Network;
using Server.Mobiles;
using Server.Engines.Quests;
using Server.Gumps;
namespace Server.Items
{
public class ClockworkMechanism : BaseDecayingItem
{
public override bool HiddenQuestItemHue { get { return true; } }
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
private int m_CreatureDef;
public ClockworkCreatureDef CreatureDef
{
get { return ClockworkCreature.Definitions[m_CreatureDef]; }
}
[Constructable]
public ClockworkMechanism()
: base(0x1EAE)
{
m_CreatureDef = Utility.Random(ClockworkCreature.Definitions.Length);
Weight = 1.0;
Hue = 0x450;
}
public override void AddNameProperty(ObjectPropertyList list)
{
list.Add(1112858, String.Format("#{0}", ((int)CreatureDef.CreatureType).ToString())); // ~1_TYPE~ clockwork mechanism
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override bool DropToWorld(Mobile from, Point3D p)
{
return false;
}
public override bool DropToItem(Mobile from, Item target, Point3D p)
{
if (from.Backpack == target)
{
base.DropToItem(from, target, p);
return true;
}
return false;
}
public override bool DropToMobile(Mobile from, Mobile target, Point3D p)
{
if (from == target)
{
base.DropToMobile(from, target, p);
return true;
}
return false;
}
public override void OnDoubleClick(Mobile from)
{
if (MadScientistQuest.QuestStarted(from))
{
MadScientistQuest.BarkIngredient(from);
}
else
{
if (!from.HasGump(typeof(BeginQuestGump)))
{
from.SendGump(new BeginQuestGump(this));
}
}
}
public void OnCompleted(Mobile from)
{
Mobile creature = new ClockworkCreature(CreatureDef);
Point3D p = from.Location;
creature.MoveToWorld(p, from.Map);
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(delegate
{
from.PlaySound(0xFA);
from.PlaySound(0x5BC);
from.PlaySound(0x5C7);
Effects.SendLocationEffect(p, from.Map, 0x1FD4, 30, 16, 0x21, 4);
for (int j = 0; j < 5; j++)
{
Point3D loc = new Point3D(p.X, p.Y, 10 + p.Z + (j * 20));
Effects.SendLocationEffect(loc, from.Map, 0x1AA1, 17, 16, 0x481, 4);
Effects.SendLocationEffect(loc, from.Map, 0x1A9F, 10, 16, 0x481, 4);
Effects.SendLocationEffect(loc, from.Map, 0x1A8, 25, 16, 0x47E, 4);
}
from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1112987, from.NetState); // The training clockwork fails and the creature vanishes.
Timer.DelayCall(TimeSpan.FromSeconds(1.0), new TimerCallback(
delegate
{
creature.Delete();
}));
}));
}
public ClockworkMechanism(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)1); // version
writer.Write((int)m_CreatureDef);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (version > 0)
m_CreatureDef = reader.ReadInt();
}
public class BeginQuestGump : Gump
{
private ClockworkMechanism m_Mechanism;
public BeginQuestGump(ClockworkMechanism mechanism)
: base(340, 340)
{
m_Mechanism = mechanism;
AddPage(0);
AddBackground(0, 0, 291, 99, 0x13BE);
AddImageTiled(5, 6, 280, 20, 0xA40);
AddHtmlLocalized(9, 8, 280, 20, 1112855, 0x7FFF, false, false); // Begin Mad Scientist Quest
AddImageTiled(5, 31, 280, 40, 0xA40);
AddHtmlLocalized(9, 35, 272, 40, 1112856, 0x7FFF, false, false); // You have a limited amount of time to complete the recipe. Start now?
AddButton(215, 73, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(250, 75, 65, 20, 1006044, 0x7FFF, false, false); // OK
AddButton(5, 73, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
AddHtmlLocalized(40, 75, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL
}
public override void OnResponse(NetState sender, RelayInfo info)
{
Mobile from = sender.Mobile;
if (info.ButtonID == 1)
MadScientistQuest.StartQuest(from, m_Mechanism);
}
}
}
}
@@ -0,0 +1,35 @@
using System;
using Server;
namespace Server.Items
{
public class CompletedClockworkAssembly : BaseDecayingItem
{
public override int LabelNumber { get { return 1112879; } } // completed clockwork assembly
public override int Lifespan { get { return 600; } }
[Constructable]
public CompletedClockworkAssembly()
: base(0x1EAE)
{
Weight = 1.0;
}
public CompletedClockworkAssembly(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+60
View File
@@ -0,0 +1,60 @@
using System;
using Server;
using Server.Mobiles;
namespace Server.Items
{
public class MechanicalLifeManual : Item
{
public override int LabelNumber { get { return 1112874; } } // Mechanical Life Manual
[Constructable]
public MechanicalLifeManual()
: base(0xFF4)
{
Weight = 2.0;
}
public MechanicalLifeManual(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public override void OnDoubleClick(Mobile from)
{
PlayerMobile pm = from as PlayerMobile;
if (!IsChildOf(from.Backpack))
{
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
}
else if (pm == null || from.Skills[SkillName.Tinkering].Base < 100.0)
{
from.SendLocalizedMessage(1112255); // Only a Grandmaster Tinker can learn from this book.
}
else if (pm.MechanicalLife)
{
pm.SendLocalizedMessage(1080066); // You have already learned this information.
}
else
{
pm.MechanicalLife = true;
pm.SendLocalizedMessage(1112942); // You have learned how to build mechanical companions.
Delete();
}
}
}
}
+63
View File
@@ -0,0 +1,63 @@
using System;
using Server.Items.MusicBox;
namespace Server.Items
{
public class SuteksDirtyGear : Item
{
public override int LabelNumber { get { return 1115722; } } // Sutek's Dirty Gear
[Constructable]
public SuteksDirtyGear()
: this(1)
{
}
[Constructable]
public SuteksDirtyGear(int amount)
: base (0x1053)
{
Hue = 1102;
}
public SuteksDirtyGear(Serial serial)
: base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (Utility.RandomDouble() < 0.05)
{
from.AddToBackpack(MusicBoxGears.RandomMusixBoxGears(TrackRarity.Rare));
}
else
{
if (Utility.RandomBool())
{
from.AddToBackpack(MusicBoxGears.RandomMusixBoxGears(TrackRarity.Common));
}
else
{
from.AddToBackpack(MusicBoxGears.RandomMusixBoxGears(TrackRarity.UnCommon));
}
}
from.SendLocalizedMessage(1115723); // You have polished the dirty gear...
Delete();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+224
View File
@@ -0,0 +1,224 @@
using System;
using System.Collections.Generic;
using Server.Items;
using Server.Network;
using Server.Commands;
using Server.Mobiles;
using System.Linq;
namespace Server.Engines.Quests
{
public class MadScientistQuest
{
#region Generation
public static void Initialize()
{
CommandSystem.Register("GenSutek", AccessLevel.Developer, new CommandEventHandler(GenQuest_Command));
}
private static void GenQuest_Command(CommandEventArgs e)
{
e.Mobile.SendMessage("Creating Mad Scientist Quest...");
foreach (SutekIngredientInfo def in m_Ingredients)
{
WeakEntityCollection.Add("sa", new SutekIngredientItem(def));
}
XmlSpawner sp = new XmlSpawner("Sutek");
sp.SpawnRange = 5;
sp.HomeRange = 5;
sp.MoveToWorld(new Point3D(917, 594, -14), Map.TerMur);
sp.Respawn();
WeakEntityCollection.Add("sa", sp);
List<Item> toDelete = new List<Item>(World.Items.Values.Where(i => i is XmlSpawner && (i.Name == "PerfectTimingSpawner" || i.Name == "PerfectTimingSpawner2")));
foreach (var item in toDelete)
{
item.Delete();
}
e.Mobile.SendMessage("Generation completed, deleted {0} spawners!", toDelete.Count);
ColUtility.Free(toDelete);
}
#endregion
#region Definitions
public static readonly int NeededIngredients = 20;
public static readonly TimeSpan Timeout = TimeSpan.FromSeconds(15.0);
public static readonly SutekIngredientInfo[] m_Ingredients = new SutekIngredientInfo[]
{
new SutekIngredientInfo(SutekIngredient.Feathers, new Point3D(921, 598, -8), 0x1BD3, 1023578),
new SutekIngredientInfo(SutekIngredient.Shafts, new Point3D(918, 591, -14), 0x1BD6, 1027125),
new SutekIngredientInfo(SutekIngredient.PowerCrystal, new Point3D(917, 589, -5), 0x1F1C, 1112811),
new SutekIngredientInfo(SutekIngredient.PowerCrystal, new Point3D(926, 597, -4), 0x1F19, 1112811),
new SutekIngredientInfo(SutekIngredient.YellowPotion, new Point3D(926, 593, -8), 0x183B, 1023852),
new SutekIngredientInfo(SutekIngredient.BarrelHoops, new Point3D(931, 601, -14), 0x1DB7, 1011228),
new SutekIngredientInfo(SutekIngredient.BarrelHoops, new Point3D(931, 601, -12), 0x1DB7, 1011228),
new SutekIngredientInfo(SutekIngredient.BarrelStaves, new Point3D(932, 600, -14), 0x1EB2, 1027857),
new SutekIngredientInfo(SutekIngredient.BarrelStaves, new Point3D(933, 600, -14), 0x1EB3, 1027857),
new SutekIngredientInfo(SutekIngredient.Bones, new Point3D(925, 605, -14), 0x21FC, 1023786),
new SutekIngredientInfo(SutekIngredient.FetidEssence, new Point3D(926, 599, -5), 0x2D92, 1031066),
new SutekIngredientInfo(SutekIngredient.VoidEssence, new Point3D(926, 589, -3), 0x2D92, 1112327, 0x835),
new SutekIngredientInfo(SutekIngredient.SpiritEssence, new Point3D(916, 602, -4), 0x2D87, 1055029, 0x481),
new SutekIngredientInfo(SutekIngredient.Rope, new Point3D(911, 589, -13), 0x14F8, 1020934),
new SutekIngredientInfo(SutekIngredient.Rope, new Point3D(919, 581, -14), 0x14FA, 1020934),
new SutekIngredientInfo(SutekIngredient.WoodenLogs, new Point3D(910, 590, -13), 0x1BDF, 1021217),
new SutekIngredientInfo(SutekIngredient.WoodenLogs, new Point3D(916, 609, -14), 0x1BE1, 1021217),
new SutekIngredientInfo(SutekIngredient.WoodenLogs, new Point3D(939, 593, -14), 0x1BDE, 1021217),
new SutekIngredientInfo(SutekIngredient.WoodenLogs, new Point3D(911, 602, -14), 0x1BE2, 1021217),
new SutekIngredientInfo(SutekIngredient.PurplePotion, new Point3D(916, 601, -6), 0x1841, 1023853),
new SutekIngredientInfo(SutekIngredient.Scales, new Point3D(921, 588, -8), 0x26B5, 1029905),
new SutekIngredientInfo(SutekIngredient.Scales, new Point3D(923, 603, -6), 0x26B2, 1029905),
new SutekIngredientInfo(SutekIngredient.WhiteStone, new Point3D(927, 605, -14), 0x177A, 1112813),
new SutekIngredientInfo(SutekIngredient.DarkStone, new Point3D(931, 583, -14), 0x1776, 1112866),
new SutekIngredientInfo(SutekIngredient.Beeswax, new Point3D(926, 600, -6), 0x1425, 1025154),
new SutekIngredientInfo(SutekIngredient.Beeswax, new Point3D(925, 603, -8), 0x1426, 1025154),
new SutekIngredientInfo(SutekIngredient.Thorns, new Point3D(928, 595, -14), 0x3022, 1112818),
new SutekIngredientInfo(SutekIngredient.Thorns, new Point3D(928, 596, -14), 0x3022, 1112818),
new SutekIngredientInfo(SutekIngredient.WoodenBoards, new Point3D(939, 592, -14), 0x1BDB, 1021189),
new SutekIngredientInfo(SutekIngredient.WoodenBoards, new Point3D(928, 590, -14), 0x1BDC, 1021189),
new SutekIngredientInfo(SutekIngredient.WoodenBoards, new Point3D(911, 591, -14), 0x1BD8, 1021189),
new SutekIngredientInfo(SutekIngredient.WoodenBoards, new Point3D(916, 598, -14), 0x1BD9, 1021189),
new SutekIngredientInfo(SutekIngredient.BrownStone, new Point3D(922, 577, -14), 0x1772, 1112814),
new SutekIngredientInfo(SutekIngredient.RedPotion, new Point3D(925, 603, -8), 0x183E, 1023851),
new SutekIngredientInfo(SutekIngredient.PurplePotion, new Point3D(921, 597, -10), 0x1839, 1023853),
new SutekIngredientInfo(SutekIngredient.BluePotion, new Point3D(921, 596, -7), 0x1844, 1023848),
new SutekIngredientInfo(SutekIngredient.Gears, new Point3D(920, 597, -8), 0x1051, 1024177),
new SutekIngredientInfo(SutekIngredient.MeltedWax, new Point3D(916, 600, -6), 0x142B, 1025162),
new SutekIngredientInfo(SutekIngredient.MeltedWax, new Point3D(926, 595, -7), 0x142A, 1025162),
new SutekIngredientInfo(SutekIngredient.Leather, new Point3D(924, 588, -14), 0x1078, 1024216),
new SutekIngredientInfo(SutekIngredient.CopperWire, new Point3D(910, 589, -8), 0x1879, 1026265),
new SutekIngredientInfo(SutekIngredient.GoldWire, new Point3D(910, 589, -13), 0x1878, 1026264),
new SutekIngredientInfo(SutekIngredient.SilverWire, new Point3D(910, 589, -10), 0x1877, 1026263),
new SutekIngredientInfo(SutekIngredient.IronWire, new Point3D(910, 589, -6), 0x1876, 1026262),
new SutekIngredientInfo(SutekIngredient.SilverIngots, new Point3D(911, 588, -14), 0x1BFA, 1027158),
new SutekIngredientInfo(SutekIngredient.SilverIngots, new Point3D(928, 603, -14), 0x1BF7, 1027158),
new SutekIngredientInfo(SutekIngredient.GoldIngots, new Point3D(914, 581, -14), 0x1BEE, 1027146),
new SutekIngredientInfo(SutekIngredient.GoldIngots, new Point3D(922, 594, -14), 0x1BEB, 1027146),
new SutekIngredientInfo(SutekIngredient.CopperIngots, new Point3D(914, 580, -14), 0x1BE5, 1027140),
new SutekIngredientInfo(SutekIngredient.CopperIngots, new Point3D(916, 590, -11), 0x1BE8, 1027140),
new SutekIngredientInfo(SutekIngredient.IronIngots, new Point3D(915, 580, -14), 0x1BF1, 1027152),
new SutekIngredientInfo(SutekIngredient.IronIngots, new Point3D(912, 602, -15), 0x1BF4, 1027152),
new SutekIngredientInfo(SutekIngredient.OilOfVitriol, new Point3D(916, 601, -8), 0x098D, 1077482),
new SutekIngredientInfo(SutekIngredient.BlackPowder, new Point3D(920, 597, -6), 0x0B48, 1112815, 0x497),
new SutekIngredientInfo(SutekIngredient.WhitePowder, new Point3D(926, 602, -6), 0x241D, 1112816),
new SutekIngredientInfo(SutekIngredient.BluePowder, new Point3D(926, 594, -4), 0x241E, 1112817),
new SutekIngredientInfo(SutekIngredient.Nails, new Point3D(915, 589, -14), 0x102E, 1024142),
};
private static Dictionary<Mobile, QuestContext> m_Table = new Dictionary<Mobile, QuestContext>();
#endregion
public static bool QuestStarted(Mobile from)
{
return m_Table.ContainsKey(from);
}
public static void StartQuest(Mobile from, ClockworkMechanism mechanism)
{
if (QuestStarted(from))
return;
QuestContext context = m_Table[from] = new QuestContext(from, mechanism);
context.StartTimer();
}
public static void OnDoubleClickIngredient(Mobile from, SutekIngredient ingredient)
{
if (!QuestStarted(from))
return;
QuestContext context = m_Table[from];
if (ingredient == context.CurrentIngredient)
{
from.SendLocalizedMessage(1112819); // You've successfully added this ingredient.
context.OnIngredientAcquired();
}
else
{
from.SendLocalizedMessage(1112820); // That is not the right ingredient.
BarkIngredient(from);
}
}
public static void BarkIngredient(Mobile from)
{
if (!QuestStarted(from))
return;
QuestContext context = m_Table[from];
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1112821, String.Format("#{0}", (int)context.CurrentIngredient)); // I need to add some ~1_INGREDIENT~.
}
public class QuestContext
{
private Mobile m_Owner;
private int m_IngredientsLeft = NeededIngredients;
private SutekIngredient m_CurrentIngredient;
private Timer m_ExpireTimer;
private ClockworkMechanism m_Mechanism;
public Mobile Owner { get { return m_Owner; } }
public int IngredientsLeft { get { return m_IngredientsLeft; } }
public SutekIngredient CurrentIngredient { get { return m_CurrentIngredient; } }
public Timer ExpireTimer { get { return m_ExpireTimer; } }
public ClockworkMechanism Mechanism { get { return m_Mechanism; } }
public QuestContext(Mobile from, ClockworkMechanism mechanism)
{
m_Owner = from;
m_Mechanism = mechanism;
}
public void StartTimer()
{
if (m_ExpireTimer != null)
m_ExpireTimer.Stop();
m_ExpireTimer = Timer.DelayCall(Timeout, new TimerCallback(OnExpired));
SutekIngredient[] ingredients = (SutekIngredient[])Enum.GetValues(typeof(SutekIngredient));
m_CurrentIngredient = ingredients[Utility.Random(ingredients.Length)];
m_Owner.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1112821, String.Format("#{0}", (int)m_CurrentIngredient)); // I need to add some ~1_INGREDIENT~.
m_IngredientsLeft--;
}
public void OnExpired()
{
m_ExpireTimer.Stop();
m_Owner.SendLocalizedMessage(1112822); // You fail to find the next ingredient in time. Your clockwork assembly crumbles.
m_Mechanism.Delete();
m_Table.Remove(m_Owner);
}
public void OnIngredientAcquired()
{
if (m_IngredientsLeft == 0)
{
m_ExpireTimer.Stop();
m_Mechanism.OnCompleted(m_Owner);
m_Mechanism.Delete();
m_Owner.AddToBackpack(new CompletedClockworkAssembly());
m_Table.Remove(m_Owner);
}
else
{
StartTimer();
}
}
}
}
}
+140
View File
@@ -0,0 +1,140 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class PerfectTimingQuest : BaseQuest
{
/* Perfect Timing */
public override object Title { get { return 1112870; } }
/* Presumptuous, are we? You think i will just let you get your grubby hands on
* my clever inventions! I think not! If you want to learn how to create these
* wonders of mechanical life, you will have to prove yourself. Correctly combine
* the required ingredients to build one of my inventions in a timely manner and
* I might share my secrets with you. */
public override object Description { get { return 1112873; } }
/* I'm not surprised. *disdainful snort* People with both manual and mental
* dexterity come in short supply. Move along then. Science does not wait for
* anyone. */
public override object Refuse { get { return 1112875; } }
/* Give your assembly the material it requests. You'll find everything lying
* around here. Just use it. But be quick! */
public override object Uncomplete { get { return 1112877; } }
/* There's more to you than meets the eye after all! Well done! You should enjoy
* this copy of my manual. */
public override object Complete { get { return 1112878; } }
public PerfectTimingQuest()
{
AddObjective(new ObtainObjective(typeof(CompletedClockworkAssembly), "Completed Clockwork Assembly", 1));
AddReward(new BaseReward(typeof(MechanicalLifeManual), 1112874)); // Mechanical Life Manual
AddReward(new BaseReward(typeof(SuteksDirtyGear), 1115722)); // Sutek's Dirty Gear
}
public override void OnAccept()
{
base.OnAccept();
Owner.AddToBackpack(new ClockworkMechanism());
}
public override void OnResign(bool resignChain)
{
base.OnResign(resignChain);
Owner.DropHolding();
Item item = Owner.Backpack.FindItemByType(typeof(ClockworkMechanism));
if (item != null)
{
item.Delete();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Sutek : MondainQuester
{
private static Type[] m_Quests = new Type[] { typeof(PerfectTimingQuest) };
public override Type[] Quests { get { return m_Quests; } }
[Constructable]
public Sutek()
: base("Sutek", "the Mage")
{
TalkTimer();
}
public Sutek(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Race = Race.Human;
Hue = 0x840D;
HairItemID = 0x203C; // Long Hair
HairHue = 0x835;
FacialHairItemID = 0x2040; // goatee
FacialHairHue = 0x835;
}
public override void InitOutfit()
{
AddItem(new Sandals());
AddItem(new TattsukeHakama(0x528));
AddItem(new WizardsHat(0x528));
AddItem(new Tunic(0x528));
}
public void TalkTimer()
{
Timer.DelayCall(TimeSpan.Zero, TimeSpan.FromSeconds(15.0), new TimerCallback(
delegate
{
Say(1113224 + Utility.Random(15));
}
));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
TalkTimer();
}
}
}
+127
View File
@@ -0,0 +1,127 @@
using System;
using Server;
using Server.Engines.Quests;
namespace Server.Items
{
public enum SutekIngredient
{
Feathers = 1023578,
PowerCrystal = 1112811,
DarkStone = 1112866,
WhiteStone = 1112813,
BrownStone = 1112814,
IronWire = 1026262,
SilverWire = 1026263,
GoldWire = 1026264,
CopperWire = 1026265,
Leather = 1112812,
Thorns = 1112818,
GoldIngots = 1027146,
CopperIngots = 1027140,
IronIngots = 1027152,
SilverIngots = 1027158,
YellowPotion = 1023852,
PurplePotion = 1023853,
RedPotion = 1023851,
BluePotion = 1023848,
Scales = 1113463,
Bones = 1023786,
Shafts = 1027125,
Gears = 1011200,
BarrelHoops = 1011228,
BarrelStaves = 1027857,
SpiritEssence = 1055029,
VoidEssence = 1112327,
FetidEssence = 1031066,
WoodenLogs = 1021217,
Rope = 1020934,
Beeswax = 1025154,
WoodenBoards = 1021189,
MeltedWax = 1016492,
OilOfVitriol = 1077482,
BlackPowder = 1112815,
WhitePowder = 1112816,
BluePowder = 1112817,
Nails = 1024142
}
public class SutekIngredientInfo
{
private SutekIngredient m_Ingredient;
private int m_ItemId, m_TextId, m_Hue;
private Point3D m_Location;
public SutekIngredient Ingredient { get { return m_Ingredient; } }
public int ItemId { get { return m_ItemId; } }
public int TextId { get { return m_TextId; } }
public int Hue { get { return m_Hue; } }
public Point3D Location { get { return m_Location; } }
public SutekIngredientInfo(SutekIngredient ingredient, Point3D location, int itemId, int textId)
: this(ingredient, location, itemId, textId, 0)
{
}
public SutekIngredientInfo(SutekIngredient ingredient, Point3D location, int itemId, int textId, int hue)
{
m_Ingredient = ingredient;
m_Location = location;
m_ItemId = itemId;
m_TextId = textId;
m_Hue = hue;
}
}
public class SutekIngredientItem : Item
{
public override int LabelNumber { get { return m_TextId; } }
public override bool ForceShowProperties { get { return true; } }
private SutekIngredient m_Ingredient;
private int m_TextId;
[Constructable]
public SutekIngredientItem(SutekIngredientInfo info)
: base(info.ItemId)
{
Weight = 0.0;
Movable = false;
Hue = info.Hue;
m_TextId = info.TextId;
m_Ingredient = info.Ingredient;
MoveToWorld(info.Location, Map.TerMur);
}
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(this, 2))
MadScientistQuest.OnDoubleClickIngredient(from, m_Ingredient);
}
public SutekIngredientItem(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((int)m_Ingredient);
writer.Write((int)m_TextId);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Ingredient = (SutekIngredient)reader.ReadInt();
m_TextId = reader.ReadInt();
}
}
}
+315
View File
@@ -0,0 +1,315 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class MaraudersQuest : BaseQuest
{
public MaraudersQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Ogre), "ogres", 10, "Sanctuary"));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override QuestChain ChainID
{
get
{
return QuestChain.Marauders;
}
}
public override Type NextQuest
{
get
{
return typeof(TheBrainsOfTheOperationQuest);
}
}
/* Marauders */
public override object Title
{
get
{
return 1072374;
}
}
/* What a miserable place we live in. Look around you at the changes we've wrought. The trees
are sprouting leaves once more and the grass is reclaiming the blood-soaked soil. Who would
have imagined we'd find ourselves here? Our "neighbors" are anything but friendly and those
ogres are the worst of the lot. Maybe you'd be interested in helping our community by disposing
of some of our least amiable neighbors? */
public override object Description
{
get
{
return 1072686;
}
}
/* I quite understand your reluctance. If you reconsider, I'll be here. */
public override object Refuse
{
get
{
return 1072687;
}
}
/* You can't miss those ogres, they're huge and just outside the gates here. */
public override object Uncomplete
{
get
{
return 1072688;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheBrainsOfTheOperationQuest : BaseQuest
{
public TheBrainsOfTheOperationQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(OgreLord), "ogre lords", 10, "Sanctuary"));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override QuestChain ChainID
{
get
{
return QuestChain.Marauders;
}
}
public override Type NextQuest
{
get
{
return typeof(TheBrawnQuest);
}
}
/* The Brains of the Operation */
public override object Title
{
get
{
return 1072692;
}
}
/* *sigh* We have so much to do to clean this area up. Even the fine work you did on those ogres didn't
have much of an impact on the community. It's the ogre lords that direct the actions of the other ogres,
let's strike at the leaders and perhaps that will thwart the miserable curs. */
public override object Description
{
get
{
return 1072707;
}
}
/* Reluctance doesn't become a hero like you. But, as you wish. */
public override object Refuse
{
get
{
return 1072708;
}
}
/* Ogre Lords are pretty easy to recognize. They're the ones ordering the other ogres about in a lordly
manner. Striking down their leadership will throw the ogres into confusion and dismay! */
public override object Uncomplete
{
get
{
return 1072709;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheBrawnQuest : BaseQuest
{
public TheBrawnQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Cyclops), "cyclops", 6, "Sanctuary"));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override QuestChain ChainID
{
get
{
return QuestChain.Marauders;
}
}
public override Type NextQuest
{
get
{
return typeof(TheBiggerTheyAreQuest);
}
}
/* The Brawn */
public override object Title
{
get
{
return 1072693;
}
}
/* Inconceiveable! We've learned that the ogre leadership has recruited some heavy-duty guards to their
cause. I've never personally fought a cyclopian warrior, but I'm sure you could easily best a few and
report back how much trouble they'll cause to our growing community? */
public override object Description
{
get
{
return 1072710;
}
}
/* Oh, I see. *sigh* Perhaps I overestimated your abilities. */
public override object Refuse
{
get
{
return 1072711;
}
}
/* Make sure you fully assess all of the cyclopian tactical abilities! */
public override object Uncomplete
{
get
{
return 1072712;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TheBiggerTheyAreQuest : BaseQuest
{
public TheBiggerTheyAreQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Titan), "titans", 3, "Sanctuary"));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override QuestChain ChainID
{
get
{
return QuestChain.Marauders;
}
}
/* The Bigger They Are ... */
public override object Title
{
get
{
return 1072694;
}
}
/* The ogre insurgency has taken a turn for the worse! I've just been advised that the titans have concluded
their discussions with the ogres and they've allied. We have virtually no information about titans. Engage
them and appraise their mettle. */
public override object Description
{
get
{
return 1072713;
}
}
/* Certainly. You've done enough to merit a breather. When you're ready for more, report back to me. */
public override object Refuse
{
get
{
return 1072714;
}
}
/* Those titans don't skulk very well. You should be able to track them easily ... their footsteps are
easily the largest around. */
public override object Uncomplete
{
get
{
return 1072715;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class MasteringtheSoulforge : BaseQuest
{
public MasteringtheSoulforge()
: base()
{
this.AddObjective(new ObtainObjective(typeof(RelicFragment), "Relic Fragments", 50, 0x2DB3));
this.AddReward(new BaseReward(typeof(ScrollBox2), "Knowledge"));
}
public override object Title
{
get
{
return "Mastering the Soulforge";
}
}
public override object Description
{
get
{
return 1112529;
}
}
public override object Refuse
{
get
{
return 1112549;
}
}
public override object Uncomplete
{
get
{
return 1112550;
}
}
public override object Complete
{
get
{
return 1112551;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+85
View File
@@ -0,0 +1,85 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Missing : BaseQuest
{
public Missing()
: base()
{
this.AddObjective(new ObtainObjective(typeof(ArielHavenWritofMembership), "Ariel Haven Writ of Membership", 4, 0x2831));
this.AddReward(new BaseReward(typeof(CandlewoodTorch), "Candlewood Torch"));
}
public override Type NextQuest
{
get
{
return typeof(EndingtheThreat);
}
}
public override object Title
{
get
{
return 1094949;
}
}//Missing
public override object Description
{
get
{
return 1094951;
}
}
/*Very well, fare thee well traveler. I would not press our problems upon you if you are not willing.
I pray that my people are simply trying to secure some treasure they found.*/
public override object Refuse
{
get
{
return 1094952;
}
}
/*Greetings, have you any news of my people? I am encouraged to see you well!*/
public override object Uncomplete
{
get
{
return 1094953;
}
}
/*Oh, this is indeed sad news. It seems my worst fears have been realized!
These writs were given to Evan and Kevin Brightwhistle, Sergio Taylor, and Sarah Bootwell.
Based on your description of the ghastly scene, they have met a most untimely end!
This is a great setback to our society as they were each great friends to me and an asset to the society.
'Tis strange that there were only four bodies....
There was a fifth member of the party, Neville Brightwhistle, but he was the youngest and least experienced of the party so if his elder brothers are lost,
surely young Neville met a similar fate. ‘Tis a tragedy, surely.
Please take this torch with my thanks. It may not seem like much, but it is magic and will never burn out.
You will find that rotworms fear fire so it will protect you from them as you venture further into these cursed halls.
Tread carefully traveller, each member of the party had one of these so I suspect that the rotworms are not what ended their lives.*/
public override object Complete
{
get
{
return 1094956;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+258
View File
@@ -0,0 +1,258 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class MougGuurMustDieQuest : BaseQuest
{
public MougGuurMustDieQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(MougGuur), "moug-guur", 1, "Sanctuary"));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override QuestChain ChainID
{
get
{
return QuestChain.MiniBoss;
}
}
public override Type NextQuest
{
get
{
return typeof(LeaderOfThePackQuest);
}
}
/* Moug-Guur Must Die */
public override object Title
{
get
{
return 1072368;
}
}
/* You there! Yes, you. Kill Moug-Guur, the leader of the orcs in this depressing place, and I'll make
it worth your while. */
public override object Description
{
get
{
return 1072561;
}
}
/* Fine. It's no skin off my teeth. */
public override object Refuse
{
get
{
return 1072571;
}
}
/* Small words. Kill Moug-Guur. Go. Now! */
public override object Uncomplete
{
get
{
return 1072572;
}
}
/* You're better than I thought you'd be. Not particularly bad, but not entirely inept. */
public override object Complete
{
get
{
return 1072573;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class LeaderOfThePackQuest : BaseQuest
{
public LeaderOfThePackQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Chiikkaha), "chiikkaha", 1, "Sanctuary"));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override QuestChain ChainID
{
get
{
return QuestChain.MiniBoss;
}
}
public override Type NextQuest
{
get
{
return typeof(SayonaraSzavetraQuest);
}
}
/* Leader of the Pack */
public override object Title
{
get
{
return 1072560;
}
}
/* Well now that Moug-Guur is no more -- and I can't say I'm weeping for his demise -- it's time for the
ratmen to experience a similar loss of leadership. Slay Chiikkaha. In return, I'll satisfy your greed
temporarily. */
public override object Description
{
get
{
return 1072574;
}
}
/* Alright, if you'd rather not, then run along and do whatever worthless things you do when I'm not
giving you direction. */
public override object Refuse
{
get
{
return 1072575;
}
}
/* How difficult is this? The rats live in the tunnels. Go into the tunnels and find the biggest, meanest
rat and execute him. Loitering around here won't get the task done. */
public override object Uncomplete
{
get
{
return 1072576;
}
}
/* It's about time! Could you have taken longer? */
public override object Complete
{
get
{
return 1072577;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class SayonaraSzavetraQuest : BaseQuest
{
public SayonaraSzavetraQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Szavetra), "szavetra", 1, "Sanctuary"));
this.AddReward(new BaseReward(typeof(RewardBox), 1072584));
}
public override QuestChain ChainID
{
get
{
return QuestChain.MiniBoss;
}
}
/* Sayonara, Szavetra */
public override object Title
{
get
{
return 1072375;
}
}
/* Hmm, maybe you aren't entirely worthless. I suspect a demoness of Szavetra's calibre will tear you
apart ... We might as well find out. Kill the succubus, yada yada, and you'll be richly rewarded. */
public override object Description
{
get
{
return 1072578;
}
}
/* Hah! I knew you couldn't handle it. */
public override object Refuse
{
get
{
return 1072579;
}
}
/* Hahahaha! I can see the fear in your eyes. Pathetic. Szavetra is waiting for you. */
public override object Uncomplete
{
get
{
return 1072581;
}
}
/* Amazing! Simply astonishing ... you survived. Well, I supposed I should indulge your avarice
with a reward.*/
public override object Complete
{
get
{
return 1072582;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Sanctuary;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+133
View File
@@ -0,0 +1,133 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class MysticsJourneyQuest : BaseQuest
{
/* A Mystic's Journey */
public override object Title { get { return 1112561; } }
/* Obtain the following Mysticism reagents: Dragon's Blood and Daemon Bone - and give
* them to Ortlem for your reward.<br><center>------</center><br>I am called Ortlem.
* I am a Mystic. Mysticism is our way of magic. I need you to obtain the following
* Mysticism reagents: Dragon's Blood and Daemon Bone.<BR><BR>These reagents will
* allow our Mystics to cast powerful spells to protect Ter-Mur. You can gather
* Dragon's Blood and Daemon Bones in Ter-Mur. Dragon's Blood is gathered by skinning
* reptilian creatures. Daemon Bones will appear on the corpse of any void demons
* that you slay.<BR><BR>Return to me with these reagents, and I will reward you. */
public override object Description { get { return 1112563; } }
/* I understand your fear. I wish you no harm. If I must, I am willing to find
* another to help us. */
public override object Refuse { get { return 1112564; } }
/* Good to see you, again. I am glad no harm has come to you in collecting the four
* rare reagents of Mysticism. Please obtain them soon. They are important to the
* protection of Ter-Mur. */
public override object Uncomplete { get { return 1112565; } }
/* I appreciate your work in collecting these reagents. I am glad to be able to
* count on you. Be assured that these reagents will help continue the protection
* of Ter-Mur. As promised, here is your reward. */
public override object Complete { get { return 1112566; } }
public MysticsJourneyQuest()
{
AddObjective(new ObtainObjective(typeof(DragonBlood), "Dragon's Blood", 100, 0x4077));
AddObjective(new ObtainObjective(typeof(DaemonBone), "Daemon Bone", 100, 0xF80));
AddReward(new BaseReward(1112530));
}
public override void GiveRewards()
{
base.GiveRewards();
Owner.SendLocalizedMessage(1074360, "#1112568"); // You receive a reward: Crystal Ball of Knowledge
Owner.AddToBackpack(new CrystalBallOfKnowledge());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Ortlem : MondainQuester
{
private static Type[] m_Quests = new Type[] { typeof(MysticsJourneyQuest) };
public override Type[] Quests { get { return m_Quests; } }
public override bool IsActiveVendor { get { return true; } }
public override void InitSBInfo()
{
SBInfos.Add(new SBMystic());
}
[Constructable]
public Ortlem()
: base("Ortlem", "the Mystic")
{
SetSkill(SkillName.EvalInt, 65.0, 90.0);
SetSkill(SkillName.Meditation, 65.0, 90.0);
SetSkill(SkillName.MagicResist, 65.0, 90.0);
SetSkill(SkillName.Mysticism, 65.0, 90.0);
}
public Ortlem(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
Say(1112562); // Become adept in Mysticism. Help save Ter-Mur!
}
public override void InitBody()
{
Female = false;
CantWalk = true;
Race = Race.Gargoyle;
Hue = 0x86ED;
HairItemID = 0x4258;
HairHue = 0x38A;
}
public override void InitOutfit()
{
AddItem(new GlassStaff());
AddItem(new GargishClothChest(0x64F));
AddItem(new GargishClothArms(0x64F));
AddItem(new GargishClothKilt(0x643));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+132
View File
@@ -0,0 +1,132 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class PeptaQuest : BaseQuest
{
public PeptaQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(FreshGinger), "Fresh Ginger", 1, 0x2BE3));
this.AddObjective(new ObtainObjective(typeof(TribalBerry), "Tribal Berries", 2, 0x9D0));
this.AddReward(new BaseReward(typeof(SatietyCure), 1080542));
}
/* I Think I Overate */
public override object Title
{
get
{
return 1080543;
}
}
/* Arghhhh... *stomach gurgles* I think I ate too much... Oh no! I have to make sure the rest of the food is alright!
Ever since the Council was assassinated *gurgle* I've had to taste everything that comes through this kitchen.
Will you help me? I need to make some of my 'Satiety Cure.' If you find the ingredients I'll make you some too! */
public override object Description
{
get
{
return 1080544;
}
}
/* Well, okay. But if you decide you are up for it after all, c'mon back and see me. */
public override object Refuse
{
get
{
return 1072270;
}
}
/* You don't have the ingredients yet? Please, I need them soon! Fresh Ginger should be available from a farmer if you
ask and I hear that Tribal Berries are used by some of the savages for their ceremonies! *gurk* More food is on its
way, so hurry! */
public override object Uncomplete
{
get
{
return 1071183;
}
}
/* Thanks for helping me out. Here's the reward I promised you.*/
public override object Complete
{
get
{
return 1072272;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class Pepta : MondainQuester
{
[Constructable]
public Pepta()
: base("Pepta", "The Royal Tastetester")
{
}
public Pepta(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(PeptaQuest)
};
}
}
public override void InitBody()
{
this.Female = true;
this.Race = Race.Human;
this.Hue = 0x83F4;
this.HairItemID = 0x2049;
this.HairHue = 0x46A;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Shoes(0x346));
this.AddItem(new PlainDress(0x27B));
this.AddItem(new HalfApron());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
namespace Server.Items
{
public class PileofInspectedValoriteIngots : Item
{
[Constructable]
public PileofInspectedValoriteIngots()
: base(0x1BEA)
{
this.Name = "Pile of Inspected Valorite Ingots";
this.Hue = 2219;
}
public PileofInspectedValoriteIngots(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+35
View File
@@ -0,0 +1,35 @@
using System;
namespace Server.Items
{
public class PileofInspectedVeriteIngots : Item
{
[Constructable]
public PileofInspectedVeriteIngots()
: base(0x1BEA)
{
this.Name = "Pile of Inspected Agapite Ingots";
this.Hue = 2207;
}
public PileofInspectedVeriteIngots(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+166
View File
@@ -0,0 +1,166 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class SpringCleaningQuest : BaseQuest
{
/* Spring Cleaning */
public override object Title { get { return 1072373; } }
/*Mangy, lice encrusted furballs! Those filthy ratmen have been sneaking into camp again,
the signs are obvious. They've fouled the water stores again and stolen what they
couldn't eat. Are you up to cleaning up the rat warrens? */
public override object Description { get { return 1072674; } }
/* I understand. The stench in those tunnels is unbearable. */
public override object Refuse { get { return 1072684; } }
/* The ratmen have holes all over the place that lead to their warrens. Sometimes they're
loitering around on the surface too. Either way, they're not hard to find. */
public override object Uncomplete { get { return 1072685; } }
/* Excellent! That’s the old fighting spirit. */
public override object Complete { get { return 1075384; } }
public SpringCleaningQuest()
: base()
{
AddObjective(new SlayObjective(typeof(Ratman), "Ratmen", 15, "Sanctuary"));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class CowardsQuest : BaseQuest
{
/* Cowards! */
public override object Title { get { return 1072689; } }
/* When you were exterminating those untidy vermin, you must have noticed the archers amongst them?
Those cowardly rats have been peppering us with arrows and then running away before we can retaliate.
Can I count on you to handle this for me? */
public override object Description { get { return 1072697; } }
/* I understand. The stench in those tunnels is unbearable. */
public override object Refuse { get { return 1072684; } }
/* The ratmen have holes all over the place that lead to their warrens. Sometimes they're
loitering around on the surface too. Either way, they're not hard to find. */
public override object Uncomplete { get { return 1072685; } }
/* Hah! I knew you were up to the challenge. */
public override object Complete { get { return 1075409; } }
public CowardsQuest()
: base()
{
AddObjective(new SlayObjective(typeof(RatmanArcher), "Ratmen Archers", 10, "Sanctuary"));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class TokenOfLoveQuest : BaseQuest
{
public override bool DoneOnce { get { return true; } }
public TokenOfLoveQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(StolenRing), "A ring engraved: 'Beloved Ciala'", 1, 0x1F09));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Token of Love */
public override object Title
{
get
{
return 1072690;
}
}
/* Argh! I knew those ratmen were up to no good! They have stolen the ring I was making for my beloved Ciala.
The sparkle must have caught their greedy eyes. Find the ring please! I beg you. */
public override object Description
{
get
{
return 1072698;
}
}
/* Please, I beg of you, reconsider! */
public override object Refuse
{
get
{
return 1072699;
}
}
/* The stolen ring is easy enough to recognize. It has an inscription on it declaring my love for Ciala.
Please find this token of love for me! */
public override object Uncomplete
{
get
{
return 1072700;
}
}
/* Ah! You found my property. Thank you for your honesty in returning it to me.*/
public override object Complete
{
get
{
return 1074582;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+107
View File
@@ -0,0 +1,107 @@
using System;
using Server.Items;
using Server.Mobiles;
using System.Collections.Generic;
using Server.Gumps;
namespace Server.Engines.Quests
{
public class QuestOfSingularity : BaseQuest
{
public QuestOfSingularity() : base()
{
AddObjective(new QuestionAndAnswerObjective(4, m_EntryTable));
}
public override bool DoneOnce { get { return true; } }
public override bool ShowDescription { get { return false; } }
//La Insep Om
public override object Title { get { return 1112681; } }
/*Repeating the mantra, you gradually enter a state of enlightened meditation.<br><br>
* As you contemplate your worthiness, an image of the Book of Circles comes into focus.<br><br>
* Perhaps you are ready for La Insep Om?<br>
*/
public override object Description { get { return 1112682; } }
//You feel as if you should return when you are worthy.
public override object Refuse { get { return 1112683; } }
//Focusing more upon the Book of Circles, you realize that you must now show your mastery of its contents.<br>
public override object Uncomplete { get { return 1112684; } }
/*Answering the last question correctly, you feel a strange energy wash over you.<br><br>
* You don't understand how you know, but you are absolutely certain that the guardians will
* no longer bar you from entering the Stygian Abyss.<br><br>It seems you have proven yourself
* worthy of La Insep Om.
*/
public override object Complete { get { return 1112700; } }
/*
* You realize that is not the correct answer.<br><br>You vow to study the Book of Circles again
* so that you might understand all that is required of you. Perhaps meditating again soon will bring
* the wisdom that you seek.<br>
*/
public override object FailedMsg { get { return 1112680; } }
public override void OnAccept()
{
base.OnAccept();
Owner.SendGump(new QAndAGump(Owner, this));
}
public override void GiveRewards()
{
base.GiveRewards();
Owner.PlaySound(0x1E0);
Owner.FixedParticles(0x3709, 1, 30, 1153, 13, 3, EffectLayer.Head);
Owner.AbyssEntry = true;
}
public override void OnResign(bool chain)
{
base.OnResign(chain);
ShrineOfSingularity.AddToTable(Owner);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
public static void Configure()
{
m_EntryTable[0] = new QuestionAndAnswerEntry(1112601, new object[] { 1112656 /*Control*/ }, new object[] { 1112661 /*Persistence*/, 1112664 /*Precision*/, 1112660 /*Feeling*/ }); //Which of these is a Principle?
m_EntryTable[1] = new QuestionAndAnswerEntry(1112602, new object[] { 1112656 /*Control*/ }, new object[] { 1112662 /*Balance*/, 1112658 /*Diligence*/, 1112657 /*Passion*/ }); //From what Principle does Direction spring?
m_EntryTable[2] = new QuestionAndAnswerEntry(1112603, new object[] { 1112660 /*Feeling*/ }, new object[] { 1112663 /*Achievement*/, 1112661 /*Persistence*/, 1112656 /*Control*/ }); //From Passion springs which Virtue?
m_EntryTable[3] = new QuestionAndAnswerEntry(1112604, new object[] { 1112661 /*Persistence*/ }, new object[] { 1112667 /*Singularity*/, 1112656 /*Control*/, 1112666 /*Order*/ }); //From Diligence springs which Virtue?
m_EntryTable[4] = new QuestionAndAnswerEntry(1112605, new object[] { 1112669 /*No*/ }, new object[] { 1112652 /*Spirituality is the most important*/, 1112645 /*All but chaos are important*/, 1112644 /*Order is more important*/ }); //Is any Virtue more important than another?
m_EntryTable[5] = new QuestionAndAnswerEntry(1112606, new object[] { 1112649 /*All are equal*/ }, new object[] { 1112646 /*Singularity is more imporant than all others*/, 1112669 /*No*/, 1112644 /*Order is more important*/ }); //Are each of the Virtues considered to be equal?
m_EntryTable[6] = new QuestionAndAnswerEntry(1112607, new object[] { 1112668 /*Eight*/ }, new object[] { 1112653 /*Seven*/, 1112654 /*Ten*/, 1112655 /*Twelve*/ }); //Amongst all else, of how many Virtues does the Circle consist?
m_EntryTable[7] = new QuestionAndAnswerEntry(1112608, new object[] { 1112662 /*Balance*/ }, new object[] { 1112663 /*Achievement*/, 1112664 /*Precision*/, 1112665 /*Chaos*/ }); //Passion combined with Control yields which Virtue?
m_EntryTable[8] = new QuestionAndAnswerEntry(1112609, new object[] { 1112658, 1112657/*Diligence, Passion*/ }, new object[] { 1112656 /*Control*/, 1112661 /*Persistence*/ }); //Achievement is created in part by which Principle?
m_EntryTable[9] = new QuestionAndAnswerEntry(1112610, new object[] { 1112664 /*Precision*/ }, new object[] { 1112665 /*Chaos*/, 1112663 /*Achievement*/, 1112662 /*Balance*/ }); //If you join Diligence with Control, which Virtue is provided?
m_EntryTable[10] = new QuestionAndAnswerEntry(1112611, new object[] { 1112665 /*Chaos*/ }, new object[] { 1112666 /*Order*/, 1112663 /*Achievement*/, 1112664 /*Precision*/ }); //The absence of the Principles is called what?
m_EntryTable[11] = new QuestionAndAnswerEntry(1112612, new object[] { 1112666 /*Order*/ }, new object[] { 1112663 /*Achievement*/, 1112664 /*Precision*/, 1112662 /*Balance*/ }); //The existence of Chaos points to which Virtue?
m_EntryTable[12] = new QuestionAndAnswerEntry(1112613, new object[] { 1112667 /*Singularity*/ }, new object[] { 1112659 /*Direction*/, 1112661 /*Persistence*/, 1112656 /*Control*/ }); //Unifying the three Principles forms what?
m_EntryTable[13] = new QuestionAndAnswerEntry(1112614, new object[] { 1112667 /*Singularity*/ }, new object[] { 1112647 /*Nothing*/, 1112663 /*Achievement*/, 1112659 /*Direction*/ }); //Which is the eighth Virtue?
m_EntryTable[14] = new QuestionAndAnswerEntry(1112615, new object[] { 1112667 /*Singularity*/ }, new object[] { 1112663 /*Achievement*/, 1112659 /*Direction*/, 1112647 /*Nothing*/ }); //Which is the first Virtue?
m_EntryTable[15] = new QuestionAndAnswerEntry(1112616, new object[] { 1112667 /*Singularity*/ }, new object[] { 1112661 /*Persistence*/, 1112660 /*Feeling*/, 1112658 /*Diligence*/ }); //In what can you find all of the Principles, and thus all of the Virtues?
m_EntryTable[16] = new QuestionAndAnswerEntry(1112617, new object[] { 1112669 /*No*/ }, new object[] { 1112670 /*Yes*/ }); //Does the Circle have an end?
m_EntryTable[17] = new QuestionAndAnswerEntry(1112618, new object[] { 1112670 /*Yes*/ }, new object[] { 1112669 /*No*/ }); //Are each of the Principles considered equal?
m_EntryTable[18] = new QuestionAndAnswerEntry(1112619, new object[] { 1112671 /*Forever*/ }, new object[] { 1112672 /*As all things have a beginning, all things must have an end*/, 1112673 /*After the Great Breaking has come*/, 1112647 /*Nothing*/ }); //As with the Circle, how long does our society continue?
m_EntryTable[19] = new QuestionAndAnswerEntry(1112620, new object[] { 1112656 /*Control*/ }, new object[] { 1112665 /*Chaos*/, 1112666 /*Order*/, 1112664 /*Precision*/ }); //Which of these is one of the Virtues?
}
private static QuestionAndAnswerEntry[] m_EntryTable = new QuestionAndAnswerEntry[20];
public static QuestionAndAnswerEntry[] EntryTable { get { return m_EntryTable; } }
}
}
+143
View File
@@ -0,0 +1,143 @@
using System;
using Server.Gumps;
using Server.Mobiles;
using Server.Engines.Quests;
using System.Collections.Generic;
using Server.Network;
namespace Server.Items
{
public class ShrineOfSingularity : Item
{
private static readonly TimeSpan FailDelay = TimeSpan.FromHours(2);
[Constructable]
public ShrineOfSingularity() : base(0x48A8)
{
Movable = false;
Name = "Shrine Of Singularity";
}
public ShrineOfSingularity(Serial serial)
: base(serial)
{
}
public override bool HandlesOnSpeech
{
get
{
return true;
}
}
public override void OnSpeech(SpeechEventArgs e)
{
PlayerMobile pm = e.Mobile as PlayerMobile;
if (pm != null && !e.Handled && pm.InRange(Location, 2) && e.Speech.ToLower().Trim() == "unorus")
{
e.Handled = true;
e.Mobile.PlaySound(0xF9);
QuestOfSingularity quest = GetSingularityQuest(pm);
if (HasDelay(pm) && pm.AccessLevel == AccessLevel.Player)
pm.PublicOverheadMessage(MessageType.Regular, 0x47E, 1112685); // You need more time to contemplate the Book of Circles before trying again.
else if (pm.AbyssEntry)
pm.SendLocalizedMessage(1112697); //You enter a state of peaceful contemplation, focusing on the meaning of Singularity.
else if (quest == null)
{
quest = new QuestOfSingularity();
quest.Owner = pm;
quest.Quester = this;
pm.SendGump(new MondainQuestGump(quest));
}
else if (quest.Completed)
pm.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
else if (!pm.HasGump(typeof(QAndAGump)))
pm.SendGump(new QAndAGump(pm, quest));
}
}
private QuestOfSingularity GetSingularityQuest(PlayerMobile pm)
{
return QuestHelper.GetQuest(pm, typeof(QuestOfSingularity)) as QuestOfSingularity;
}
private static Dictionary<Mobile, DateTime> m_RestartTable = new Dictionary<Mobile, DateTime>();
public static void AddToTable(Mobile from)
{
m_RestartTable[from] = DateTime.UtcNow + FailDelay;
}
public static bool HasDelay(Mobile from)
{
if (m_RestartTable.ContainsKey(from))
{
if (m_RestartTable[from] < DateTime.UtcNow)
m_RestartTable.Remove(from);
}
return m_RestartTable.ContainsKey(from);
}
public static void DefragDelays_Callback()
{
List<Mobile> list = new List<Mobile>(m_RestartTable.Keys);
foreach (Mobile mob in list)
{
if (m_RestartTable[mob] < DateTime.UtcNow)
m_RestartTable.Remove(mob);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)2); // version
Timer.DelayCall(TimeSpan.FromSeconds(10), new TimerCallback(DefragDelays_Callback));
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
Instance = this;
if (version == 0)
{
Item book = new BookOfCircles();
book.Movable = false;
book.MoveToWorld(new Point3D(1000, 3991, -33), Map.TerMur);
book = new ShrineMantra();
book.Movable = false;
book.MoveToWorld(new Point3D(994, 3991, -33), Map.TerMur);
}
if (version == 1)
{
Timer.DelayCall(() => SpawnerPersistence.Delete("shrineofsingularity"));
}
}
public static ShrineOfSingularity Instance { get; set; }
public static void Initialize()
{
if (Core.SA && Instance == null)
{
Instance = new ShrineOfSingularity();
Instance.MoveToWorld(new Point3D(995, 3802, -19), Map.TerMur);
}
}
}
}
+65
View File
@@ -0,0 +1,65 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class SecretsoftheSoulforge : BaseQuest
{
public SecretsoftheSoulforge()
: base()
{
this.AddObjective(new ObtainObjective(typeof(MagicalResidue), "Magical Residue", 50, 0x2DB1));
this.AddReward(new BaseReward(typeof(ScrollBox3), 1, "Knowledge"));
}
public override object Title
{
get
{
return "Secrets of the Soulforge";
}
}
public override object Description
{
get
{
return 1112522;
}
}
public override object Refuse
{
get
{
return 1112523;
}
}
public override object Uncomplete
{
get
{
return 1112547;
}
}
public override object Complete
{
get
{
return 1112524;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}
+345
View File
@@ -0,0 +1,345 @@
using System;
namespace Server.Engines.Quests.Matriarch
{
public class DontOfferConversation : QuestConversation
{
private bool m_Friend;
public DontOfferConversation(bool friend)
{
this.m_Friend = friend;
}
public DontOfferConversation()
{
}
public override object Message
{
get
{
if (this.m_Friend)
{
/* <I>The Solen Matriarch smiles as you greet her.</I><BR><BR>
*
* It is good to see you again. I would offer to process some zoogi fungus for you,
* but you seem to be busy with another task at the moment. Perhaps you should
* finish whatever is occupying your attention at the moment and return to me once
* you're done.
*/
return 1054081;
}
else
{
/* <I>The Solen Matriarch smiles as she eats the seed you offered.</I><BR><BR>
*
* Thank you for that seed. It was quite delicious. <BR><BR>
*
* I would offer to make you a friend of my colony, but you seem to be busy with
* another task at the moment. Perhaps you should finish whatever is occupying
* your attention at the moment and return to me once you're done.
*/
return 1054079;
}
}
}
public override bool Logged
{
get
{
return false;
}
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Friend = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_Friend);
}
}
public class AcceptConversation : QuestConversation
{
public AcceptConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch looks pleased that you've accepted.</I><BR><BR>
*
* Very good. Please start by hunting some infiltrators from the other solen
* colony and eliminating them. Slay 7 of them and then return to me.<BR><BR>
*
* Farewell for now and good hunting.
*/
return 1054084;
}
}
public override void OnRead()
{
this.System.AddObjective(new KillInfiltratorsObjective());
}
}
public class DuringKillInfiltratorsConversation : QuestConversation
{
public DuringKillInfiltratorsConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch looks up as you approach.</I><BR><BR>
*
* You're back, but you have not yet eliminated 7 infiltrators from the enemy
* colony. Return when you have completed this task.<BR><BR>
*
* Carry on. I'll be waiting for your return.
*/
return 1054089;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class GatherWaterConversation : QuestConversation
{
public GatherWaterConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch nods favorably as you approach her.</I><BR><BR>
*
* Marvelous! I'm impressed at your ability to hunt and kill enemies for me.
* My colony is thankful.<BR><BR>
*
* Now I must ask that you gather some water for me. A standard pitcher of water
* holds approximately one gallon. Please decant 8 gallons of fresh water
* into our water vats.<BR><BR>
*
* Farewell for now.
*/
return 1054091;
}
}
public override void OnRead()
{
this.System.AddObjective(new GatherWaterObjective());
}
}
public class DuringWaterGatheringConversation : QuestConversation
{
public DuringWaterGatheringConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch looks up as you approach.</I><BR><BR>
*
* You're back, but you have not yet gathered 8 gallons of water. Return when
* you have completed this task.<BR><BR>
*
* Carry on. I'll be waiting for your return.
*/
return 1054094;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class ProcessFungiConversation : QuestConversation
{
private bool m_Friend;
public ProcessFungiConversation(bool friend)
{
this.m_Friend = friend;
}
public ProcessFungiConversation()
{
}
public override object Message
{
get
{
if (this.m_Friend)
{
/* <I>The Solen Matriarch listens as you report the completion of your
* tasks to her.</I><BR><BR>
*
* I give you my thanks for your help, and I will gladly process some zoogi
* fungus into powder of translocation for you. Two of the zoogi fungi are
* required for each measure of the powder. I will process up to 200 zoogi fungi
* into 100 measures of powder of translocation.<BR><BR>
*
* I will also give you some gold for assisting me and my colony, but first let's
* take care of your zoogi fungus.
*/
return 1054097;
}
else
{
/* <I>The Solen Matriarch listens as you report the completion of your
* tasks to her.</I><BR><BR>
*
* I give you my thanks for your help, and I will gladly make you a friend of my
* solen colony. My warriors, workers, and queens will not longer look at you
* as an intruder and attack you when you enter our lair.<BR><BR>
*
* I will also process some zoogi fungus into powder of translocation for you.
* Two of the zoogi fungi are required for each measure of the powder. I will
* process up to 200 zoogi fungi into 100 measures of powder of translocation.<BR><BR>
*
* I will also give you some gold for assisting me and my colony, but first let's
* take care of your zoogi fungus.
*/
return 1054096;
}
}
}
public override void OnRead()
{
this.System.AddObjective(new ProcessFungiObjective());
}
public override void ChildDeserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
this.m_Friend = reader.ReadBool();
}
public override void ChildSerialize(GenericWriter writer)
{
writer.WriteEncodedInt((int)0); // version
writer.Write((bool)this.m_Friend);
}
}
public class DuringFungiProcessConversation : QuestConversation
{
public DuringFungiProcessConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch smiles as you greet her.</I><BR><BR>
*
* I will gladly process some zoogi fungus into powder of translocation for you.
* Two of the zoogi fungi are required for each measure of the powder.
* I will process up to 200 zoogi fungi into 100 measures of powder of translocation.
*/
return 1054099;
}
}
public override bool Logged
{
get
{
return false;
}
}
}
public class FullBackpackConversation : QuestConversation
{
private readonly bool m_Logged;
public FullBackpackConversation(bool logged)
{
this.m_Logged = logged;
}
public FullBackpackConversation()
{
this.m_Logged = true;
}
public override object Message
{
get
{
/* <I>The Solen Matriarch looks at you with a smile.</I><BR><BR>
*
* While I'd like to finish conducting our business, it seems that you're a
* bit overloaded with equipment at the moment.<BR><BR>
*
* Perhaps you should free some room in your backpack before we proceed.
*/
return 1054102;
}
}
public override bool Logged
{
get
{
return this.m_Logged;
}
}
public override void OnRead()
{
if (this.m_Logged)
this.System.AddObjective(new GetRewardObjective());
}
}
public class EndConversation : QuestConversation
{
public EndConversation()
{
}
public override object Message
{
get
{
/* <I>The Solen Matriarch smiles as you greet her.</I><BR><BR>
*
* Ah good, you've returned. I will conclude our business by giving you
* gold I owe you for aiding me.
*/
return 1054101;
}
}
public override void OnRead()
{
this.System.Complete();
}
}
}

Some files were not shown because too many files have changed in this diff Show More