Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

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());
}
}
}

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();
}
}
}

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);
}
}
}