Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
490
Scripts/Quests/CloakOfHumility/CloakOfHumilityQuest.cs
Normal file
490
Scripts/Quests/CloakOfHumility/CloakOfHumilityQuest.cs
Normal 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<6E>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 <20> 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 <20> 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 <20>Virtue<75>, 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
Scripts/Quests/CloakOfHumility/CollectionsObjective.cs
Normal file
69
Scripts/Quests/CloakOfHumility/CollectionsObjective.cs
Normal 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
Scripts/Quests/CloakOfHumility/Gumps/GiveItemQuestGump.cs
Normal file
51
Scripts/Quests/CloakOfHumility/Gumps/GiveItemQuestGump.cs
Normal 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
Scripts/Quests/CloakOfHumility/Gumps/QuestInfoGump.cs
Normal file
50
Scripts/Quests/CloakOfHumility/Gumps/QuestInfoGump.cs
Normal 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
Scripts/Quests/CloakOfHumility/Items/GoldShield.cs
Normal file
37
Scripts/Quests/CloakOfHumility/Items/GoldShield.cs
Normal 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
Scripts/Quests/CloakOfHumility/Items/QuestItems.cs
Normal file
272
Scripts/Quests/CloakOfHumility/Items/QuestItems.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Dierdre.cs
Normal file
57
Scripts/Quests/CloakOfHumility/Mobiles/Dierdre.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Gareth.cs
Normal file
89
Scripts/Quests/CloakOfHumility/Mobiles/Gareth.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
256
Scripts/Quests/CloakOfHumility/Mobiles/HumilityQuestMobile.cs
Normal file
256
Scripts/Quests/CloakOfHumility/Mobiles/HumilityQuestMobile.cs
Normal file
@@ -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
Scripts/Quests/CloakOfHumility/Mobiles/Jason.cs
Normal file
74
Scripts/Quests/CloakOfHumility/Mobiles/Jason.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Kevin.cs
Normal file
66
Scripts/Quests/CloakOfHumility/Mobiles/Kevin.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Maribel.cs
Normal file
61
Scripts/Quests/CloakOfHumility/Mobiles/Maribel.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Nelson.cs
Normal file
57
Scripts/Quests/CloakOfHumility/Mobiles/Nelson.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Sean.cs
Normal file
72
Scripts/Quests/CloakOfHumility/Mobiles/Sean.cs
Normal 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
Scripts/Quests/CloakOfHumility/Mobiles/Walton.cs
Normal file
58
Scripts/Quests/CloakOfHumility/Mobiles/Walton.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user