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,80 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Abbein : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Abbein()
: base("the wise")
{
this.Name = "Elder Abbein";
}
public Abbein(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x824D;
this.HairItemID = 0x2FD1;
this.HairHue = 0x321;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x74B));
this.AddItem(new FemaleElvenRobe(0x8A8));
this.AddItem(new RoyalCirclet());
}
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();
}
}
}

View File

@@ -0,0 +1,571 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class OverpopulationQuest : BaseQuest
{
public OverpopulationQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Hind), "hinds", 10));
this.AddReward(new BaseReward(typeof(SmallTrinketBag), 1072268));
}
/* Overpopulation */
public override object Title
{
get
{
return 1072252;
}
}
/* I just can't bear it any longer. Sure, it's my job to thin the deer out so
they don't overeat the area and starve themselves come winter time. Sure, I
know we killed off the predators that would do this naturally so now we have
to make up for it. But they're so graceful and innocent. I just can't do it.
Will you? */
public override object Description
{
get
{
return 1072267;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 WildBoarCullQuest : BaseQuest
{
public WildBoarCullQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Boar), "boars", 10));
this.AddReward(new BaseReward(typeof(SmallTrinketBag), 1072268));
}
/* Wild Boar Cull */
public override object Title
{
get
{
return 1072245;
}
}
/* A pity really. With the balance of nature awry, we have no choice but to accept
the responsibility of making it all right. It's all a part of the circle of life,
after all. So, yes, the boars are running rampant. There are far too many in the
region. Will you shoulder your obligations as a higher life form? */
public override object Description
{
get
{
return 1072260;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 NewLeadershipQuest : BaseQuest
{
public NewLeadershipQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(SerpentsFangHighExecutioner), "serpent's fang high executioner", 1, "TheCitadel"));
this.AddObjective(new SlayObjective(typeof(TigersClawThief), "tiger's claw thief", 1, "TheCitadel"));
this.AddObjective(new SlayObjective(typeof(DragonsFlameGrandMage), "dragon's flame mage", 1, "TheCitadel"));
this.AddReward(new BaseReward(typeof(RewardBox), 1072584));
}
/* New Leadership */
public override object Title
{
get
{
return 1072905;
}
}
/* I have a task for you ... adventurer. Will you risk all to win great renown? The
Black Order is organized into three sects, each with their own speciality. The Dragon's
Flame serves the will of the Grand Mage, the Tiger's Claw answers to the Master Thief,
and the Serpent's Fang kills at the direction of the High Executioner. Slay all three
and you will strike the order a devastating blow! */
public override object Description
{
get
{
return 1072963;
}
}
/* I do not fault your decision. */
public override object Refuse
{
get
{
return 1072973;
}
}
/* Once you gain entrance into The Citadel, you will need to move cautiously to find
the sect leaders. */
public override object Uncomplete
{
get
{
return 1072974;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Citadel;
}
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 ExAssassinsQuest : BaseQuest
{
public ExAssassinsQuest()
: base()
{
this.AddObjective(new InternalObjective());
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Ex-Assassins */
public override object Title
{
get
{
return 1072917;
}
}
/* The Serpent's Fang sect members have gone too far! Express to them my displeasure by slaying
ten of them. But remember, I do not condone war on women, so I will only accept the deaths of
men, human and elf. */
public override object Description
{
get
{
return 1072969;
}
}
/* As you wish. */
public override object Refuse
{
get
{
return 1072979;
}
}
/* The Black Order's fortress home is well hidden. Legend has it that a humble fishing village
disguises the magical portal. */
public override object Uncomplete
{
get
{
return 1072980;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Citadel;
}
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 : SlayObjective
{
public InternalObjective()
: base(typeof(SerpentsFangAssassin), "male serpent's fang assassins", 10, "TheCitadel")
{
}
public override bool IsObjective(Mobile mob)
{
if (mob.Female)
return false;
return base.IsObjective(mob);
}
}
}
public class ExtinguishingTheFlameQuest : BaseQuest
{
public ExtinguishingTheFlameQuest()
: base()
{
this.AddObjective(new InternalObjective());
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Extinguishing the Flame */
public override object Title
{
get
{
return 1072911;
}
}
/* The Dragon's Flame sect members have gone too far! Express to them my displeasure by slaying ten
of them. But remember, I do not condone war on women, so I will only accept the deaths of men,
human or elf. Either race will do, I care not for the shape of their ears. Yes, this action will
properly make clear my disapproval and has a pleasing harmony. */
public override object Description
{
get
{
return 1072966;
}
}
/* As you wish. */
public override object Refuse
{
get
{
return 1072979;
}
}
/* The Black Order's fortress home is well hidden. Legend has it that a humble fishing village
disguises the magical portal. */
public override object Uncomplete
{
get
{
return 1072980;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Citadel;
}
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 : SlayObjective
{
public InternalObjective()
: base(typeof(DragonsFlameMage), "male dragon's flame mages", 10, "TheCitadel")
{
}
public override bool IsObjective(Mobile mob)
{
if (mob.Female)
return false;
return base.IsObjective(mob);
}
}
}
public class DeathToTheNinjaQuest : BaseQuest
{
public DeathToTheNinjaQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(EliteNinja), "elite ninjas", 10, "TheCitadel"));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Death to the Ninja! */
public override object Title
{
get
{
return 1072913;
}
}
/* I wish to make a statement of censure against the elite ninjas of the Black Order. Deliver, in
the strongest manner, my disdain. But do not make war on women, even those that take arms against
you. It is not ... fitting. */
public override object Description
{
get
{
return 1072967;
}
}
/* As you wish. */
public override object Refuse
{
get
{
return 1072979;
}
}
/* The Black Order's fortress home is well hidden. Legend has it that a humble fishing village
disguises the magical portal. */
public override object Uncomplete
{
get
{
return 1072980;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Citadel;
}
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 CrimeAndPunishmentQuest : BaseQuest
{
public CrimeAndPunishmentQuest()
: base()
{
this.AddObjective(new InternalObjective());
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Crime and Punishment */
public override object Title
{
get
{
return 1072914;
}
}
/* The Tiger's Claw sect members have gone too far! Express to them my displeasure by slaying
ten of them. But remember, I do not condone war on women, so I will only accept the deaths of
men, human and elf. */
public override object Description
{
get
{
return 1072968;
}
}
/* As you wish. */
public override object Refuse
{
get
{
return 1072979;
}
}
/* The Black Order's fortress home is well hidden. Legend has it that a humble fishing village
disguises the magical portal. */
public override object Uncomplete
{
get
{
return 1072980;
}
}
public override bool CanOffer()
{
return MondainsLegacy.Citadel;
}
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 : SlayObjective
{
public InternalObjective()
: base(typeof(TigersClawThief), "male tiger's claw thieves", 10, "TheCitadel")
{
}
public override bool IsObjective(Mobile mob)
{
if (mob.Female)
return false;
return base.IsObjective(mob);
}
}
}
public class Acob : MondainQuester
{
[Constructable]
public Acob()
: base("Elder Acob", "the wise")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Acob(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(OverpopulationQuest),
typeof(WildBoarCullQuest),
typeof(NewLeadershipQuest),
typeof(ExAssassinsQuest),
typeof(ExtinguishingTheFlameQuest),
typeof(DeathToTheNinjaQuest),
typeof(CrimeAndPunishmentQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x8389;
this.HairItemID = 0x2FCF;
this.HairHue = 0x389;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new ElvenBoots(0x73D));
this.AddItem(new HidePants());
this.AddItem(new ElvenShirt(0x71));
}
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();
}
}
}

View File

@@ -0,0 +1,73 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public class Actor : BaseCreature
{
[Constructable]
public Actor()
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
{
this.InitStats(31, 41, 51);
this.SpeechHue = Utility.RandomDyedHue();
this.Hue = Utility.RandomSkinHue();
if (this.Female = Utility.RandomBool())
{
this.Body = 0x191;
this.Name = NameList.RandomName("female");
this.AddItem(new FancyDress(Utility.RandomDyedHue()));
this.Title = "the actress";
}
else
{
this.Body = 0x190;
this.Name = NameList.RandomName("male");
this.AddItem(new LongPants(Utility.RandomNeutralHue()));
this.AddItem(new FancyShirt(Utility.RandomDyedHue()));
this.Title = "the actor";
}
this.AddItem(new Boots(Utility.RandomNeutralHue()));
Utility.AssignRandomHair(this);
Container pack = new Backpack();
pack.DropItem(new Gold(250, 300));
pack.Movable = false;
this.AddItem(pack);
}
public Actor(Serial serial)
: base(serial)
{
}
public override bool ClickTitle
{
get
{
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();
}
}
}

View File

@@ -0,0 +1,204 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class CleansingOldHavenQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Cleansing Old Haven */
public override object Title
{
get
{
return 1077719;
}
}
/* Head East out of town to Old Haven. Consecrate your weapon, cast Divine Fury, and battle monsters there until
you have raised your Chivalry skill to 50.<br><center>------</center><br>Hail, friend. The life of a Paladin is
a life of much sacrifice, humility, bravery, and righteousness. If you wish to pursue such a life, I have an
assignment for you. Adventure east to Old Haven, consecrate your weapon, and lay to rest the undead that inhabit
there.<br><br>Each ability a Paladin wishes to invoke will require a certain amount of "tithing points" to use.
A Paladin can earn these tithing points by donating gold at a shrine or holy place. You may tithe at this shrine.
<br><br>Return to me once you feel that you are worthy of the rank of Apprentice Paladin. */
public override object Description
{
get
{
return 1077722;
}
}
/* Farewell to you my friend. Return to me if you wish to live the life of a Paladin. */
public override object Refuse
{
get
{
return 1077723;
}
}
/* There are still more undead to lay to rest. You still have more to learn. Return to me once you have done so. */
public override object Uncomplete
{
get
{
return 1077724;
}
}
/* Well done, friend. While I know you understand Chivalry is its own reward, I would like to reward you with
something that will protect you in battle. It was passed down to me when I was a lad. Now, I am passing it on you.
It is called the Bulwark Leggings. Thank you for your service. */
public override object Complete
{
get
{
return 1077726;
}
}
public CleansingOldHavenQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Chivalry, 50, "Old Haven Training", 1077720, 1077721));
// 1077720 Your Chivalry potential is greatly enhanced while questing in this area.
// 1077721 You are not in the quest area for Apprentice Paladin. Your Chivalry potential is not enhanced here.
this.AddReward(new BaseReward(typeof(BulwarkLeggings), 1077727));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Chivalry.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077725, null, 0x23); // You have achieved the rank of Apprentice Paladin. Return to Aelorn in New Haven to report your progress.
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 Aelorn : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(CleansingOldHavenQuest)
};
}
}
public override bool IsActiveVendor
{
get
{
return true;
}
}
public override void InitSBInfo()
{
this.SBInfos.Add(new SBKeeperOfChivalry());
}
[Constructable]
public Aelorn()
: base("Aelorn", "The Chivalry Instructor")
{
this.SetSkill(SkillName.Anatomy, 120.0, 120.0);
this.SetSkill(SkillName.MagicResist, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Swords, 120.0, 120.0);
this.SetSkill(SkillName.Meditation, 120.0, 120.0);
this.SetSkill(SkillName.Focus, 120.0, 120.0);
this.SetSkill(SkillName.Chivalry, 120.0, 120.0);
}
public Aelorn(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078133); // Hail, friend. Want to live the life of a paladin?
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new VikingSword());
this.AddItem(new PlateChest());
this.AddItem(new PlateLegs());
this.AddItem(new PlateGloves());
this.AddItem(new PlateArms());
this.AddItem(new PlateGorget());
this.AddItem(new OrderShield());
}
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();
}
}
}

View File

@@ -0,0 +1,62 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Aeluva : MondainQuester
{
[Constructable]
public Aeluva()
: base("Aeluva", "the arcanist")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Aeluva(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(PatienceQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x8835;
this.HairItemID = 0x2FD0;
this.HairHue = 0x387;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots());
this.AddItem(new ElvenShirt());
this.AddItem(new Skirt());
this.AddItem(new Circlet());
}
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();
}
}
}

View File

@@ -0,0 +1,62 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Aernya : MondainQuester
{
[Constructable]
public Aernya()
: base("Aernya", "the mistress of admissions")
{
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Aernya(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(MistakenIdentityQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Human;
this.Hue = 0x8404;
this.HairItemID = 0x2047;
this.HairHue = 0x465;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Sandals(0x743));
this.AddItem(new FancyShirt(0x3B3));
this.AddItem(new Cloak(0x3));
this.AddItem(new Skirt());
}
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();
}
}
}

View File

@@ -0,0 +1,138 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class IntoTheVoidQuest : BaseQuest
{
public IntoTheVoidQuest()
: base()
{
AddObjective(new SlayObjective(typeof(BaseVoidCreature), "Void Daemons", 10));
AddReward(new BaseReward(typeof(AbyssReaver), 1112694)); // Abyss Reaver
}
public override bool DoneOnce
{
get
{
return true;
}
}
public override object Title
{
get
{
return 1112687;
}
}
public override object Description
{
get
{
return 1112690;
}
}
public override object Refuse
{
get
{
return 1112691;
}
}
public override object Uncomplete
{
get
{
return 1112692;
}
}
public override object Complete
{
get
{
return 1112693;
}
}
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 Agralem : MondainQuester
{
[Constructable]
public Agralem()
: base("Agralem", "the Bladeweaver")
{
SetSkill(SkillName.Anatomy, 65.0, 90.0);
SetSkill(SkillName.MagicResist, 65.0, 90.0);
SetSkill(SkillName.Tactics, 65.0, 90.0);
SetSkill(SkillName.Throwing, 65.0, 90.0);
}
public Agralem(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
Say(1112688); // Daemons from the void! They must be vanquished!
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(IntoTheVoidQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
CantWalk = true;
Race = Race.Gargoyle;
Hue = 34536;
HairItemID = 0x425D;
HairHue = 0x31D;
}
public override void InitOutfit()
{
AddItem(new Cyclone());
AddItem(new GargishLeatherKilt(2305));
AddItem(new GargishLeatherChest(2305));
AddItem(new GargishLeatherArms(2305));
}
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();
}
}
}

View File

@@ -0,0 +1,339 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class TheKingOfClothingQuest : BaseQuest
{
public TheKingOfClothingQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Kilt), "kilts", 10, 0x1537));
AddReward(new BaseReward(typeof(TailorsCraftsmanSatchel), 1074282));
}
/* The King of Clothing */
public override object Title
{
get
{
return 1073902;
}
}
/* I have heard noble tales of a fine and proud human garment. An article of clothing
fit for both man and god alike. It is called a "kilt" I believe? Could you fetch for
me some of these kilts so I that I might revel in their majesty and glory? */
public override object Description
{
get
{
return 1074092;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me kilts. */
public override object Uncomplete
{
get
{
return 1073948;
}
}
/* I say truly - that is a magnificent garment! You have more than earned a reward. */
public override object Complete
{
get
{
return 1073974;
}
}
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 ThePuffyShirtQuest : BaseQuest
{
public ThePuffyShirtQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(FancyShirt), "fancy shirts", 10, 0x1EFD));
AddReward(new BaseReward(typeof(TailorsCraftsmanSatchel), 1074282));
}
/* The Puffy Shirt */
public override object Title
{
get
{
return 1073903;
}
}
/* We elves believe that beauty is expressed in all things, including the garments we
wear. I wish to understand more about human aesthetics, so please kind traveler - could
you bring to me magnificent examples of human fancy shirts? For my thanks, I could teach
you more about the beauty of elven vestements. */
public override object Description
{
get
{
return 1074093;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me fancy shirts. */
public override object Uncomplete
{
get
{
return 1073949;
}
}
/* I appreciate your service. Now, see what elven hands can create. */
public override object Complete
{
get
{
return 1073973;
}
}
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 FromTheGaultierCollectionQuest : BaseQuest
{
public FromTheGaultierCollectionQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(StuddedBustierArms), "studded bustiers", 10, 0x1C0C));
AddReward(new BaseReward(typeof(TailorsCraftsmanSatchel), 1074282));
}
/* From the Gaultier Collection */
public override object Title
{
get
{
return 1073905;
}
}
/* It is my understanding, the females of humankind actually wear on certain occasions a
studded bustier? This is not simply a fanciful tale? Remarkable! It sounds hideously
uncomfortable as well as ludicrously impracticle. But perhaps, I simply do not understand
the nuances of human clothing. Perhaps, I need to see such a studded bustier for myself? */
public override object Description
{
get
{
return 1074095;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me studded bustiers. */
public override object Uncomplete
{
get
{
return 1073951;
}
}
/* Truly, it is worse than I feared. Still, I appreciate your efforts on my behalf. */
public override object Complete
{
get
{
return 1073976;
}
}
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 HuteCoutureQuest : BaseQuest
{
public HuteCoutureQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(FlowerGarland), "flower garlands", 10, 0x2306));
AddReward(new BaseReward(typeof(TailorsCraftsmanSatchel), 1074282));
}
/* H'ute Couture */
public override object Title
{
get
{
return 1073901;
}
}
/* Most human apparel is interesting to elven eyes. But there is one garment - the flower garland -
which sounds very elven indeed. Could I see how a human crafts such an object of beauty? In exchange,
I could share with you the wonders of elven garments. */
public override object Description
{
get
{
return 1074091;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me flower garlands. */
public override object Uncomplete
{
get
{
return 1073947;
}
}
/* I appreciate your service. Now, see what elven hands can create. */
public override object Complete
{
get
{
return 1073973;
}
}
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 Ahie : MondainQuester
{
[Constructable]
public Ahie()
: base("Ahie", "the cloth weaver")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Ahie(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TheKingOfClothingQuest),
typeof(ThePuffyShirtQuest),
typeof(FromTheGaultierCollectionQuest),
typeof(HuteCoutureQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Race = Race.Elf;
Hue = 0x853F;
HairItemID = 0x2FCD;
HairHue = 0x90;
}
public override void InitOutfit()
{
AddItem(new ThighBoots(0x901));
AddItem(new FancyShirt(0x72B));
AddItem(new Cloak(0x1C));
AddItem(new Skirt(0x62));
AddItem(new Circlet());
}
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();
}
}
}

View File

@@ -0,0 +1,94 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Collector
{
public class AlbertaGiacco : BaseQuester
{
[Constructable]
public AlbertaGiacco()
: base("the respected painter")
{
}
public AlbertaGiacco(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Hue = 0x83F2;
this.Female = true;
this.Body = 0x191;
this.Name = "Alberta Giacco";
}
public override void InitOutfit()
{
this.AddItem(new FancyShirt());
this.AddItem(new Skirt(0x59B));
this.AddItem(new Boots());
this.AddItem(new FeatheredHat(0x59B));
this.AddItem(new FullApron(0x59B));
this.HairItemID = 0x203D; // Pony Tail
this.HairHue = 0x457;
}
public override bool CanTalkTo(PlayerMobile to)
{
QuestSystem qs = to.Quest as CollectorQuest;
if (qs == null)
return false;
return (qs.IsObjectiveInProgress(typeof(FindAlbertaObjective)) ||
qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)) ||
qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective)));
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
QuestSystem qs = player.Quest;
if (qs is CollectorQuest)
{
this.Direction = this.GetDirectionTo(player);
QuestObjective obj = qs.FindObjective(typeof(FindAlbertaObjective));
if (obj != null && !obj.Completed)
{
obj.Complete();
}
else if (qs.IsObjectiveInProgress(typeof(SitOnTheStoolObjective)))
{
qs.AddConversation(new AlbertaStoolConversation());
}
else if (qs.IsObjectiveInProgress(typeof(ReturnPaintingObjective)))
{
qs.AddConversation(new AlbertaAfterPaintingConversation());
}
}
}
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();
}
}
}

View File

@@ -0,0 +1,91 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Alchemist : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Alchemist()
: base("the alchemist")
{
this.SetSkill(SkillName.Alchemy, 85.0, 100.0);
this.SetSkill(SkillName.TasteID, 65.0, 88.0);
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Alchemy; } }
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallAlchemyBOD || item is LargeAlchemyBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return BulkOrderSystem.NewSystemEnabled && from is PlayerMobile && from.Skills[SkillName.Alchemy].Base > 0;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (from is PlayerMobile)
((PlayerMobile)from).NextAlchemyBulkOrder = TimeSpan.Zero;
}
#endregion
public Alchemist(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.MagesGuild;
}
}
public override VendorShoeType ShoeType
{
get
{
return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBAlchemist(this));
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Server.Items.Robe(Utility.RandomPinkHue()));
}
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();
}
}
}

View File

@@ -0,0 +1,198 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class TheArtOfWarQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* The Art of War */
public override object Title
{
get
{
return 1077667;
}
}
/* Head East out of town to Old Haven. Battle monsters there until you have raised your Tactics skill
to 50.<br><center>------</center><br>Knowing how to hold a weapon is only half of the battle. The other
half is knowing how to use it against an opponent. It's one thing to kill a few bunnies now and then
for fun, but a true warrior knows that the right moves to use against a lich will pretty much get your
arse fried by a dragon.<br><br>I'll help teach you how to fight so that when you do come up against that
dragon, maybe you won't have to walk out of there "OooOOooOOOooOO'ing" and looking for a healer.<br><br>
There are some undead that need cleaning out in Old Haven towards the east. Why don't you head on over
there and practice killing things?<br><br>When you feel like you've got the basics down, come back to me
and I'll see if I can scrounge up an item to help you in your adventures later on. */
public override object Description
{
get
{
return 1077670;
}
}
/* That's too bad. I really thought you had it in you. Well, I'm sure those undead will still be there
later, so if you change your mind, feel free to stop on by and I'll help you the best I can. */
public override object Refuse
{
get
{
return 1077671;
}
}
/* You're making some progress, that i can tell, but you're not quite good enough to last for very long
out there by yourself. Head back to Old Haven, to the east, and kill some more undead. */
public override object Uncomplete
{
get
{
return 1077672;
}
}
/* Hey, good job killing those undead! Hopefully someone will come along and clean up the mess. All that
blood and guts tends to stink after a few days, and when the wind blows in from the east, it can raise a
mighty stink!<br><br>Since you performed valiantly, please take these arms and use them well. I've seen
a few too many harvests to be running around out there myself, so you might as well take it.<br><br>There
is a lot left for you to learn, but I think you'll do fine. Remember to keep your elbows in and stick'em
where it hurts the most! */
public override object Complete
{
get
{
return 1077674;
}
}
public TheArtOfWarQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Tactics, 50, "Old Haven Training", 1077668, 1077669));
// 1077668 You feel like practicing combat here would really help you learn to fight better. Your ability to raise your Tactics skill is enhanced in this area.
// 1077669 You feel less able to absorb the lessons of combat. Your Tactics learning potential is no longer enhanced.
this.AddReward(new BaseReward(typeof(ArmsOfArmstrong), 1077675));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Tactics.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077673, null, 0x23); // You have achieved the rank of Apprentice Warrior. Return to Alden Armstrong in New Haven to claim 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();
}
}
public class AldenArmstrong : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TheArtOfWarQuest)
};
}
}
[Constructable]
public AldenArmstrong()
: base("Alden Armstrong", "The Tactics Instructor")
{
this.SetSkill(SkillName.Anatomy, 120.0, 120.0);
this.SetSkill(SkillName.Parry, 120.0, 120.0);
this.SetSkill(SkillName.Healing, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Swords, 120.0, 120.0);
this.SetSkill(SkillName.Focus, 120.0, 120.0);
}
public AldenArmstrong(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078136); // There is an art to slaying your enemies swiftly. It's called tactics, and I can teach it to you.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Shoes());
this.AddItem(new StuddedLegs());
this.AddItem(new StuddedGloves());
this.AddItem(new StuddedGorget());
this.AddItem(new StuddedChest());
this.AddItem(new StuddedArms());
this.AddItem(new Katana());
}
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();
}
}
}

View File

@@ -0,0 +1,201 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class DefyingTheArcaneQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Defying the Arcane */
public override object Title
{
get
{
return 1077621;
}
}
/* Head East out of town and go to Old Haven. Battle spell casting monsters there until you have raised your
Resisting Spells skill to 50.<br><center>------</center><br>Hail and well met! To become a true master of
the arcane art of Magery, I suggest learning the complementary skill known as Resisting Spells. While the
name of this skill may suggest that it helps with resisting all spells, this is not the case. This skill
helps you lessen the severity of spells that lower your stats or ones that last for a specific duration of
time. It does not lessen damage from spells such as Energy Bolt or Flamestrike.<BR><BR>The Magery spells that
can be resisted are Clumsy, Curse, Feeblemind, Mana Drain, Mana Vampire, Paralyze, Paralyze Field, Poison,
Poison Field, and Weaken.<BR><BR>The Necromancy spells that can be resisted are Blood Oath, Corpse Skin, Mind
Rot, and Pain Spike.<BR><BR>At higher ranks, the Resisting Spells skill also benefits you by adding a bonus to
your minimum elemental resists. This bonus is only applied after all other resist modifications - such as from
equipment - has been calculated. It's also not cumulative. It compares the number of your minimum resists to
the calculated value of your modifications and uses the higher of the two values.<BR><BR>As you can see,
Resisting Spells is a difficult skill to understand, and even more difficult to master. This is because in
order to improve it, you will have to put yourself in harm's way - as in the path of one of the above spells.
<BR><BR>Undead have plagued the town of Old Haven. We need your assistance in cleansing the town of this evil
influence. Old Haven is located east of here. Battle the undead spell casters that inhabit there.<BR><BR>Come
back to me once you feel that you are worthy of the rank of Apprentice Mage and I will reward you with an
arcane prize. */
public override object Description
{
get
{
return 1077623;
}
}
/* The ability to resist powerful spells is a taxing experience. I understand your resistance in wanting to
pursue it. If you wish to reconsider, feel free to return to me for Resisting Spells training. Good journey
to you! */
public override object Refuse
{
get
{
return 1077624;
}
}
/* You have not achieved the rank of Apprentice Mage. Come back to me once you feel that you are worthy of the
rank of Apprentice Mage and I will reward you with an arcane prize. */
public override object Uncomplete
{
get
{
return 1077632;
}
}
/* You have successfully begun your journey in becoming a true master of Magery. On behalf of the New Haven Mage
Council I wish to present you with this bracelet. When worn, the Bracelet of Resilience will enhance your resistances
vs. the elements, physical, and poison harm. The Bracelet of Resilience also magically enhances your ability fend
off ranged and melee attacks. I hope it serves you well.*/
public override object Complete
{
get
{
return 1077626;
}
}
public DefyingTheArcaneQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.MagicResist, 50, "Old Haven Training", 1077494, 1077588));
// 1077494 Your Resisting Spells potential is greatly enhanced while questing in this area.
// 1077588 You are not in the quest area for Apprentice Mage. Your Resisting Spells potential is not enhanced here.
this.AddReward(new BaseReward(typeof(BraceletOfResilience), 1077627));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.MagicResist.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077625, null, 0x23); // You have achieved the rank of Apprentice Mage (for Resisting Spells). Return to Alefian in New Haven to receive your arcane prize.
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 Alefian : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(DefyingTheArcaneQuest)
};
}
}
[Constructable]
public Alefian()
: base("Alefian", "The Resisting Spells Instructor")
{
this.SetSkill(SkillName.EvalInt, 120.0, 120.0);
this.SetSkill(SkillName.Inscribe, 120.0, 120.0);
this.SetSkill(SkillName.Magery, 120.0, 120.0);
this.SetSkill(SkillName.MagicResist, 120.0, 120.0);
this.SetSkill(SkillName.Wrestling, 120.0, 120.0);
this.SetSkill(SkillName.Meditation, 120.0, 120.0);
}
public Alefian(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078130); // A mage should learn how to resist spells.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Robe());
this.AddItem(new 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();
}
}
}

View File

@@ -0,0 +1,127 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class ItsElementalQuest : BaseQuest
{
public ItsElementalQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(FireElemental), "fire elementals", 4));
this.AddObjective(new SlayObjective(typeof(WaterElemental), "water elementals", 4));
this.AddObjective(new SlayObjective(typeof(EarthElemental), "earth elementals", 4));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* It's Elemental */
public override object Title
{
get
{
return 1073089;
}
}
/* The universe is all about balance my friend. Tip one end, you must balance the other. That's
why I must ask you to kill not just one kind of elemental, but three kinds. Snuff out some Fire,
douse a few Water, and crush some Earth elementals and I'll pay you for your trouble. */
public override object Description
{
get
{
return 1073579;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Four of each, that's all I ask. Water, earth and fire. */
public override object Uncomplete
{
get
{
return 1073599;
}
}
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 Alejaha : MondainQuester
{
[Constructable]
public Alejaha()
: base("Elder Alejaha", "the wise")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Alejaha(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(ItsElementalQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x8361;
this.HairItemID = 0x2FCD;
this.HairHue = 0x852;
}
public override void InitOutfit()
{
this.AddItem(new Sandals(0x1BB));
this.AddItem(new Cloak(0x59));
this.AddItem(new Skirt(0x901));
this.AddItem(new GemmedCirclet());
}
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();
}
}
}

View File

@@ -0,0 +1,92 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Alelle : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Alelle()
: base("the aborist")
{
this.Name = "Alelle";
}
public Alelle(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x8374;
this.HairItemID = 0x2FCC;
this.HairHue = 0x238;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x1BB));
Item item;
item = new LeafGloves();
item.Hue = 0x1BB;
this.AddItem(item);
item = new LeafChest();
item.Hue = 0x37;
this.AddItem(item);
item = new LeafLegs();
item.Hue = 0x746;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,82 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Alethanian : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Alethanian()
: base("the wise")
{
this.Name = "Elder Alethanian";
}
public Alethanian(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x876C;
this.HairItemID = 0x2FC2;
this.HairHue = 0x368;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots());
this.AddItem(new GemmedCirclet());
this.AddItem(new HidePants());
this.AddItem(new HideFemaleChest());
this.AddItem(new HidePauldrons());
}
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();
}
}
}

View File

@@ -0,0 +1,232 @@
using System;
using Server.Items;
using Server.Targeting;
using Server.Mobiles;
using System.Collections;
using System.Collections.Generic;
namespace Server.Engines.Quests
{
public class TheExchangeQuest : BaseQuest
{
public TheExchangeQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(WhiteChocolate), "White Chocolates", 5, 0xF11));
this.AddObjective(new ObtainObjective(typeof(DarkSapphire), "Dark Sapphire", 1, 0x3192));
this.AddReward(new BaseReward(typeof(AverageImbuingBag), 1113768));//Average Imbuing Bag
this.AddReward(new BaseReward("Loyalty Rating"));
}
/*The Exchange*/
public override object Title
{
get
{
return 1113777;
}
}
//Hello there! Hail and well met, and all of that. I must apologize in advance for being
//so impatient, but you must help me! You see, my mother and my eldest sister are visiting
//soon, and I haven<65>t seen them in quite awhile, so I want to present them both with a
//surprise when they arrive.<br><br>My sister absolutely adores white chocolate, but
//gargoyles don<6F>t seem to care for it much, so I haven<65>t been able to find any here.
//It was recently my mother<65>s birthday, and I know that she would love some finely
//crafted gargish jewelry, but the jeweler hasn<73>t had her favorite jewel in stock for
//quite some time. If you could help me obtain five pieces of white chocolate and one
//dark sapphire, I will reward you with a bag of hard to obtain imbuing ingredients.
public override object Description
{
get
{
return 1113778;
}
}
//Oh, no, you must help me! Please say that you will!
public override object Refuse
{
get
{
return 1113779;
}
}
//Remember, I need five pieces of white chocolate, and one dark sapphire. Please do hurry!
public override object Uncomplete
{
get
{
return 1113780;
}
}
//Oh, thank you so very much! I cannot begin to thank you enough for helping me find
//these presents. Here is your reward. You<6F>ll have to excuse me while I set this dark
//sapphire in a setting that will best highlight the cut. Farewell!
public override object Complete
{
get
{
return 1113781;
}
}
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 AWorthyPropositionQuest : BaseQuest
{
public AWorthyPropositionQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(BambooFlute), "Bamboo Flutes", 10, 0x2805));
this.AddObjective(new ObtainObjective(typeof(ElvenFletching), "Elven Fletching", 1, 0x5737));
this.AddReward(new BaseReward(typeof(ValuableImbuingBag), 1113769));//Valuable Imbuing Bag
this.AddReward(new BaseReward("Loyalty Rating"));
}
/* A Worthy Proposition */
public override object Title
{
get
{
return 1113782;
}
}
//Hello, welcome to the shop. I don't own it, but the gargoyles here are as keen to
//learn from me as I am from them. They've been helping me with the work on my latest
//invention, but I am short some parts. Perhaps you could help me?<br><br>I have heard
//that the bamboo flutes of the Tokuno Islands are exceptionally strong for their weight,
//and nothing can beat elven fletching for strength in holding them together. If you
//would bring me, say, ten bamboo flutes and some elven fletching, I have some valuable
//imbuing ingredients I<>ll give you in exchange. What do you say?
public override object Description
{
get
{
return 1113783;
}
}
//Well, if you change your mind, I<>ll be here.
public override object Refuse
{
get
{
return 1113784;
}
}
//Hmm, what is that? Oh yes, I would like you to bring me ten bamboo flutes and some elven
//fletching for my fly<6C> er, my invention.
public override object Uncomplete
{
get
{
return 1113785;
}
}
//These are of fine quality! I think they will work just fine to reinforce the floor of the
//basket. What<61>s that? Did I say basket? I meant, bakery! Yes, I am inventing a, um, floor
//for a bakery. There is a great need for that, you know! Ok, now please leave so I can get
//back to work. Thank you, bye, bye!
public override object Complete
{
get
{
return 1113786;
}
}
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 Aliabeth : MondainQuester
{
public override void InitSBInfo()
{
this.SBInfos.Add(new SBTinker(this));
}
[Constructable]
public Aliabeth()
: base("Aliabeth", "the Tinker")
{
this.SetSkill(SkillName.Lockpicking, 60.0, 83.0);
this.SetSkill(SkillName.RemoveTrap, 75.0, 98.0);
this.SetSkill(SkillName.Tinkering, 64.0, 100.0);
}
public Aliabeth(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(AWorthyPropositionQuest),
typeof(TheExchangeQuest),
};
}
}
public override void InitBody()
{
this.Female = true;
//this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Kilt(Utility.RandomNeutralHue()));
this.AddItem(new Shirt(Utility.RandomNeutralHue()));
this.AddItem(new 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();
}
}
}

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Aluniol : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Aluniol()
: base("the healer")
{
this.Name = "Aluniol";
}
public Aluniol(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x8383;
this.HairItemID = 0x2FBF;
this.HairHue = 0x323;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x1BB));
this.AddItem(new MaleElvenRobe(0x47E));
this.AddItem(new WildStaff());
}
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();
}
}
}

View File

@@ -0,0 +1,241 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Ambitious
{
public abstract class BaseAmbitiousSolenQueen : BaseQuester
{
public BaseAmbitiousSolenQueen()
{
}
public BaseAmbitiousSolenQueen(Serial serial)
: base(serial)
{
}
public abstract bool RedSolen { get; }
public override bool DisallowAllMoves
{
get
{
return false;
}
}
public override void InitBody()
{
this.Name = "an ambitious solen queen";
this.Body = 0x30F;
if (!this.RedSolen)
this.Hue = 0x453;
this.SpeechHue = 0;
}
public override int GetIdleSound()
{
return 0x10D;
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
this.Direction = this.GetDirectionTo(player);
AmbitiousQueenQuest qs = player.Quest as AmbitiousQueenQuest;
if (qs != null && qs.RedSolen == this.RedSolen)
{
if (qs.IsObjectiveInProgress(typeof(KillQueensObjective)))
{
qs.AddConversation(new DuringKillQueensConversation());
}
else
{
QuestObjective obj = qs.FindObjective(typeof(ReturnAfterKillsObjective));
if (obj != null && !obj.Completed)
{
obj.Complete();
}
else if (qs.IsObjectiveInProgress(typeof(GatherFungiObjective)))
{
qs.AddConversation(new DuringFungiGatheringConversation());
}
else
{
GetRewardObjective lastObj = qs.FindObjective(typeof(GetRewardObjective)) as GetRewardObjective;
if (lastObj != null && !lastObj.Completed)
{
bool bagOfSending = lastObj.BagOfSending;
bool powderOfTranslocation = lastObj.PowderOfTranslocation;
bool gold = lastObj.Gold;
AmbitiousQueenQuest.GiveRewardTo(player, ref bagOfSending, ref powderOfTranslocation, ref gold);
lastObj.BagOfSending = bagOfSending;
lastObj.PowderOfTranslocation = powderOfTranslocation;
lastObj.Gold = gold;
if (!bagOfSending && !powderOfTranslocation && !gold)
{
lastObj.Complete();
}
else
{
qs.AddConversation(new FullBackpackConversation(false, lastObj.BagOfSending, lastObj.PowderOfTranslocation, lastObj.Gold));
}
}
}
}
}
else
{
QuestSystem newQuest = new AmbitiousQueenQuest(player, this.RedSolen);
if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(AmbitiousQueenQuest)))
{
newQuest.SendOffer();
}
else
{
newQuest.AddConversation(new DontOfferConversation());
}
}
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
this.Direction = this.GetDirectionTo(from);
PlayerMobile player = from as PlayerMobile;
if (player != null)
{
AmbitiousQueenQuest qs = player.Quest as AmbitiousQueenQuest;
if (qs != null && qs.RedSolen == this.RedSolen)
{
QuestObjective obj = qs.FindObjective(typeof(GatherFungiObjective));
if (obj != null && !obj.Completed)
{
if (dropped is ZoogiFungus)
{
ZoogiFungus fungi = (ZoogiFungus)dropped;
if (fungi.Amount >= 50)
{
obj.Complete();
fungi.Amount -= 50;
if (fungi.Amount == 0)
{
fungi.Delete();
return true;
}
else
{
return false;
}
}
else
{
this.SayTo(player, 1054072); // Our arrangement was for 50 of the zoogi fungus. Please return to me when you have that amount.
return false;
}
}
}
}
}
return base.OnDragDrop(from, dropped);
}
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();
}
}
public class RedAmbitiousSolenQueen : BaseAmbitiousSolenQueen
{
[Constructable]
public RedAmbitiousSolenQueen()
{
}
public RedAmbitiousSolenQueen(Serial serial)
: base(serial)
{
}
public override bool RedSolen
{
get
{
return true;
}
}
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();
}
}
public class BlackAmbitiousSolenQueen : BaseAmbitiousSolenQueen
{
[Constructable]
public BlackAmbitiousSolenQueen()
{
}
public BlackAmbitiousSolenQueen(Serial serial)
: base(serial)
{
}
public override bool RedSolen
{
get
{
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();
}
}
}

View File

@@ -0,0 +1,204 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class TheRightToolForTheJobQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* The Right Tool for the Job */
public override object Title
{
get
{
return 1077741;
}
}
/* Create new scissors and hammers while inside Amelia's workshop. Try making scissors up to 45 skill, the switch
to making hammers until 50 skill.<br><center>-----</center><br>Hello! I guess you're here to learn something about
Tinkering, eh? You've come to the right place, as Tinkering is what I've dedicated my life to. <br><br>You'll need
two things to get started: a supply of ingots and the right tools for the job. You can either buy ingots from the
market, or go mine them yourself. As for tools, you can try making your own set of Tinker's Tools, or if you'd prefer
to buy them, I have some for sale.<br><br>Working here in my shop will let me give you pointers as you go, so you'll
be able to learn faster than anywhere else. Start off making scissors until you reach 45 tinkering skill, then switch
to hammers until you've achieved 50. Once you've done that, come talk to me and I'll give you something for your hard
work. */
public override object Description
{
get
{
return 1077744;
}
}
/* I<>m disappointed that you aren<65>t interested in learning more about Tinkering. It<49>s really such a useful skill!<br><br>
*Amelia smiles*<br><br>At least you know where to find me if you change your mind, since I rarely spend time outside
of this shop. */
public override object Refuse
{
get
{
return 1077745;
}
}
/* Nice going! You're not quite at Apprentice Tinkering yet, though, so you better get back to work. Remember that the
quickest way to learn is to make scissors up until 45 skill, and then switch to hammers. Also, don't forget that working
here in my shop will let me give you tips so you can learn faster. */
public override object Uncomplete
{
get
{
return 1077746;
}
}
/* You've done it! Look at our brand new Apprentice Tinker! You've still got quite a lot to learn if you want to be a
Grandmaster Tinker, but I believe you can do it! Just keep in mind that if you're tinkering just to practice and improve
your skill, make items that are moderately difficult (60-80% success chance), and try to stick to ones that use less
ingots. <br><br>Come here, my brand new Apprentice Tinker, I want to give you something special. I created this just
for you, so I hope you like it. It's a set of Tinker's Tools that contains a bit of magic. These tools have more charges
than any Tinker's Tools a Tinker can make. You can even use them to make a normal set of tools, so that way you won't
ever find yourself stuck somewhere with no tools! */
public override object Complete
{
get
{
return 1077748;
}
}
public TheRightToolForTheJobQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Tinkering, 50, "Springs And Things Workshop", 1077742, 1077743));
// 1077742 By tinkering inside of Amelia<69>s workshop, she is able to give you advice. This helps you hone your Tinkering skill faster than normal.
// 1077743 Since you<6F>ve left Amelia<69>s workshop, she cannot give you advice. Your Tinkering learning potential is no longer enhanced.
this.AddReward(new BaseReward(typeof(AmeliasToolbox), 1077749));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Tinkering.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077747, null, 0x23); // You have achieved the rank of Apprentice Tinker. Talk to Amelia Youngstone in New Haven to see what kind of reward she has waiting for you.
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 Amelia : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TheRightToolForTheJobQuest)
};
}
}
public override void InitSBInfo()
{
this.SBInfos.Add(new SBTinker(this));
}
[Constructable]
public Amelia()
: base("Amelia Youngstone", "The Tinkering Instructor")
{
this.SetSkill(SkillName.ArmsLore, 120.0, 120.0);
this.SetSkill(SkillName.Blacksmith, 120.0, 120.0);
this.SetSkill(SkillName.Magery, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Swords, 120.0, 120.0);
this.SetSkill(SkillName.Tinkering, 120.0, 120.0);
this.SetSkill(SkillName.Mining, 120.0, 120.0);
}
public Amelia(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078123); // Tinkering is very useful for a blacksmith. You can make your own tools.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = true;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Sandals());
this.AddItem(new ShortPants());
this.AddItem(new HalfApron(0x8AB));
this.AddItem(new Doublet());
}
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();
}
}
}

View File

@@ -0,0 +1,69 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public class Aminia : BaseCreature
{
[Constructable]
public Aminia()
: base(AIType.AI_Melee, FightMode.None, 2, 1, 0.5, 2)
{
this.Name = "Aminia";
this.Title = "the master weaponsmith's wife";
this.Blessed = true;
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Human;
this.Hue = 0x83ED;
this.HairItemID = 0x203B;
this.HairHue = 0x454;
this.AddItem(new Backpack());
this.AddItem(new Sandals(0x75B));
this.AddItem(new Tunic(0x4BF));
this.AddItem(new Skirt(0x8FD));
}
public Aminia(Serial serial)
: base(serial)
{
}
public override void OnThink()
{
int hours = 0;
int minutes = 0;
Clock.GetTime(this.Map, this.Location.X, this.Location.Y, out hours, out minutes);
if (hours == 21)
{
this.Blessed = false;
this.Body = 0x17;
}
else
{
this.Blessed = true;
this.Body = 0x191;
}
}
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();
}
}
}

View File

@@ -0,0 +1,194 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class KnowThineEnemyQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Knowing Thine Enemy */
public override object Title
{
get
{
return 1077685;
}
}
/* Head East out of town to Old Haven. Battle monsters there, or heal yourself and other players, until you
have raised your Anatomy skill to 50.<br><center>------</center><br>Hail and well met. You must be here to
improve your knowledge of Anatomy. Well, you've come to the right place because I can teach you what you need
to know. At least all you'll need to know for now. Haha!<br><br>Knowing about how living things work inside
can be a very useful skill. Not only can you learn where to strike an opponent to hurt him the most, but you
can use what you learn to heal wounds better as well. Just walking around town, you can even tell if someone
is strong or weak or if they happen to be particularly dexterous or not.<BR><BR>If you're interested in learning
more, I'd advise you to head out to Old Haven, just to the east, and jump into the fray. You'll learn best by
engaging in combat while keeping you and your fellow adventurers healed, or you can even try sizing up your
opponents.<br><br>While you're gone, I'll dig up something you may find useful. */
public override object Description
{
get
{
return 1077688;
}
}
/* It's your choice, but I wouldn't head out there without knowing what makes those things tick inside! If you
change your mind, you can find me right here dissecting frogs, cats or even the occasional unlucky adventurer. */
public override object Refuse
{
get
{
return 1077689;
}
}
/* I'm surprised to see you back so soon. You've still got a ways to go if you want to really understand the
science of Anatomy. Head out to Old Haven and practice combat and healing yourself or other adventurers. */
public override object Uncomplete
{
get
{
return 1077690;
}
}
/* By the Virtues, you've done it! Congratulations mate! You still have quite a ways to go if you want to perfect
your knowledge of Anatomy, but I know you'll get there someday. Just keep at it.<br><br>In the meantime, here's a
piece of armor that you might find useful. It's not fancy, but it'll serve you well if you choose to wear it.<br>
<br>Happy adventuring, and remember to keep your cranium separate from your clavicle! */
public override object Complete
{
get
{
return 1077692;
}
}
public KnowThineEnemyQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Anatomy, 50, "Old Haven Training", 1077686, 1077687));
// 1077686 You feel very willing to learn more about the body. Your ability to hone your Anatomy skill is enhanced in this area.
// 1077687 You lose your ambition to learn about the body. Your Anatomy skill learning potential is no longer enhanced.
this.AddReward(new BaseReward(typeof(TunicOfGuarding), 1077693));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Anatomy.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077691, null, 0x23); // You have achieved the rank of Apprentice Healer (for Anatomy). Return to Andreas Vesalius in New Haven as soon as you can to claim 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();
}
}
public class AndreasVesalius : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(KnowThineEnemyQuest)
};
}
}
[Constructable]
public AndreasVesalius()
: base("Andreas Vesalius", "The Anatomy Instructor")
{
this.SetSkill(SkillName.Anatomy, 120.0, 120.0);
this.SetSkill(SkillName.Parry, 120.0, 120.0);
this.SetSkill(SkillName.Healing, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Swords, 120.0, 120.0);
this.SetSkill(SkillName.Focus, 120.0, 120.0);
}
public AndreasVesalius(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078138); // Learning of the body will allow you to excel in combat.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new BlackStaff());
this.AddItem(new Boots());
this.AddItem(new LongPants());
this.AddItem(new Tunic(0x66D));
}
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();
}
}
}

View File

@@ -0,0 +1,185 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class SplitEndsQuest : BaseQuest
{
public SplitEndsQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Arrow), "arrow", 20, 0xF3F));
this.AddReward(new BaseReward(typeof(FletchersSatchel), 1074282)); // Craftsman's Satchel
}
/* Split Ends */
public override object Title
{
get
{
return 1075506;
}
}
/* *sighs* I think bowcrafting is a might beyond my talents. Say there, you look a bit more confident with tools.
Can I persuade thee to make a few arrows? You could have my satchel in return... 'tis useless to me! You'll need a
fletching kit to start, some feathers, and a few arrow shafts. Just use the fletching kit while you have the other
things, and I'm sure you'll figure out the rest. */
public override object Description
{
get
{
return 1075507;
}
}
/* Oh. Well. I'll just keep trying alone, I suppose... */
public override object Refuse
{
get
{
return 1075508;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
/* 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 Andric : MondainQuester
{
[Constructable]
public Andric()
: base("Andric", "the archer trainer")
{
this.SetSkill(SkillName.Archery, 65.0, 88.0);
}
public Andric(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(SplitEndsQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x8407;
this.HairItemID = 0x2049;
this.HairHue = 0x6CE;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Boots(0x1BB));
Item item;
item = new LeatherLegs();
item.Hue = 0x6C8;
this.AddItem(item);
item = new LeatherGloves();
item.Hue = 0x1BB;
this.AddItem(item);
item = new LeatherChest();
item.Hue = 0x1BB;
this.AddItem(item);
item = new LeatherArms();
item.Hue = 0x4C7;
this.AddItem(item);
item = new CompositeBow();
item.Hue = 0x5DD;
this.AddItem(item);
}
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 FletchersSatchel : Backpack
{
[Constructable]
public FletchersSatchel()
: base()
{
this.Hue = BaseReward.SatchelHue();
this.AddItem(new Feather(10));
this.AddItem(new FletcherTools());
}
public FletchersSatchel(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();
}
}
}

View File

@@ -0,0 +1,64 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Andros : MondainQuester
{
[Constructable]
public Andros()
: base("Andros", "the blacksmith")
{
}
public Andros(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return null;
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Hue = 0x8409;
this.HairItemID = 0x2049;
this.HairHue = 0x45E;
this.FacialHairItemID = 0x2041;
this.FacialHairHue = 0x45E;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Boots(0x901));
this.AddItem(new LongPants(0x1BB));
this.AddItem(new FancyShirt(0x60B));
this.AddItem(new FullApron(0x901));
this.AddItem(new SmithHammer());
}
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();
}
}
}

View File

@@ -0,0 +1,80 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Aneen : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Aneen()
: base("the keeper of tradition")
{
this.Name = "Lorekeeper Aneen";
}
public Aneen(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x83E5;
this.HairItemID = 0x2FBF;
this.HairHue = 0x90;
}
public override void InitOutfit()
{
this.AddItem(new Sandals(0x1BB));
this.AddItem(new MaleElvenRobe(0x48F));
this.AddItem(new Item(0xDF2));
}
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();
}
}
}

View File

@@ -0,0 +1,255 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class CircleOfLifeQuest : BaseQuest
{
public CircleOfLifeQuest()
: base()
{
AddObjective(new SlayObjective(typeof(BogThing), "bog things", 8));
AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/* Circle of Life */
public override object Title
{
get
{
return 1073656;
}
}
/* There's been a bumper crop of evil with the Bog Things in these parts, my friend. Though they are
foul creatures, they are also most fecund. Slay one and you make the land more fertile. Even better,
slay several and I will give you whatever coin I can spare. */
public override object Description
{
get
{
return 1073695;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* Continue to seek and kill the Bog Things. */
public override object Uncomplete
{
get
{
return 1073736;
}
}
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 DustToDustQuest : BaseQuest
{
public DustToDustQuest()
: base()
{
AddObjective(new SlayObjective(typeof(EarthElemental), "earth elementals", 12));
AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Dust to Dust */
public override object Title
{
get
{
return 1073074;
}
}
/* You want to hear about trouble? I got trouble. How's angry piles of granite walking around for
trouble? Maybe they don't like the mining, maybe it's the farming. I don't know. All I know is
someone's got to turn them back to potting soil. And it'd be worth a pretty penny to the soul that
does it. */
public override object Description
{
get
{
return 1073564;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* You got rocks in your head? I said to kill 12 earth elementals, okay? */
public override object Uncomplete
{
get
{
return 1073584;
}
}
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 ArchSupportQuest : BaseQuest
{
public ArchSupportQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(FootStool), "foot stools", 10, 0xB5E));
AddReward(new BaseReward(typeof(CarpentersCraftsmanSatchel), 1074282));
}
/* Arch Support */
public override object Title
{
get
{
return 1073882;
}
}
/* How clever humans are - to understand the need of feet to rest from time to time! Imagine creating
a special stool just for weary toes. I would like to examine and learn the secret of their making.
Would you bring me some foot stools to examine? */
public override object Description
{
get
{
return 1074072;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me foot stools. */
public override object Uncomplete
{
get
{
return 1073928;
}
}
/* My thanks for your service. Now, I will show you something of elven carpentry. */
public override object Complete
{
get
{
return 1073969;
}
}
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 Aniel : MondainQuester
{
[Constructable]
public Aniel()
: base("Aniel", "the aborist")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Aniel(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(GlassyFoeQuest),
typeof(CircleOfLifeQuest),
typeof(DustToDustQuest),
typeof(ArchSupportQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Elf;
Hue = 0x8384;
HairItemID = 0x2FC2;
HairHue = 0x36;
}
public override void InitOutfit()
{
AddItem(new ElvenBoots(0x901));
AddItem(new HalfApron(0x759));
AddItem(new ElvenPants(0x901));
AddItem(new LeafChest());
}
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();
}
}
}

View File

@@ -0,0 +1,674 @@
#region References
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Gumps;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.Engines.Quests;
using System.Linq;
#endregion
namespace Server.Mobiles
{
public class AnimalTrainer : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public AnimalTrainer()
: base("the animal trainer")
{
SetSkill(SkillName.AnimalLore, 64.0, 100.0);
SetSkill(SkillName.AnimalTaming, 90.0, 100.0);
SetSkill(SkillName.Veterinary, 65.0, 88.0);
}
public AnimalTrainer(Serial serial)
: base(serial)
{ }
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public override VendorShoeType ShoeType { get { return Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } }
public override void InitSBInfo()
{
m_SBInfos.Add(new SBAnimalTrainer());
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem(Utility.RandomBool() ? new QuarterStaff() : (Item)new ShepherdsCrook());
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
if (from.Alive)
{
list.Add(new StableEntry(this, from));
if (from.Stabled.Count > 0)
{
list.Add(new ClaimAllEntry(this, from));
}
}
base.AddCustomContextEntries(from, list);
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (PetTrainingHelper.Enabled)
{
list.Add(1072269); // Quest Giver
}
}
private DateTime _NextTalk;
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (PetTrainingHelper.Enabled && m.Alive && !m.Hidden && m is PlayerMobile)
{
PlayerMobile pm = (PlayerMobile)m;
if (InLOS(m) && InRange(m, 8) && !InRange(oldLocation, 8) && DateTime.UtcNow >= _NextTalk)
{
if (Utility.Random(100) < 50)
Say(1157526); // Such an exciting time to be an Animal Trainer! New taming techniques have been discovered!
_NextTalk = DateTime.UtcNow + TimeSpan.FromSeconds(15);
}
}
}
private Type[] _Quests = { typeof(TamingPetQuest), typeof(UsingAnimalLoreQuest), typeof(LeadingIntoBattleQuest), typeof(TeachingSomethingNewQuest) };
public override void OnDoubleClick(Mobile m)
{
if (PetTrainingHelper.Enabled && m is PlayerMobile && m.InRange(Location, 5))
{
CheckQuest((PlayerMobile)m);
}
}
public bool CheckQuest(PlayerMobile player)
{
for (int i = 0; i < _Quests.Length; i++)
{
var quest = player.Quests.FirstOrDefault(q => q.GetType() == _Quests[i]);
if (quest != null)
{
if (quest.Completed)
{
if (quest.GetType() != typeof(TeachingSomethingNewQuest))
{
quest.GiveRewards();
}
else
{
player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.Complete, false, true));
}
return true;
}
else
{
player.SendGump(new MondainQuestGump(quest, MondainQuestGump.Section.InProgress, false));
quest.InProgress();
}
return false;
}
}
BaseQuest questt = new TamingPetQuest();
questt.Owner = player;
questt.Quester = this;
player.CloseGump(typeof(MondainQuestGump));
player.SendGump(new MondainQuestGump(questt));
return true;
}
public static int GetMaxStabled(Mobile from)
{
var taming = from.Skills[SkillName.AnimalTaming].Value;
var anlore = from.Skills[SkillName.AnimalLore].Value;
var vetern = from.Skills[SkillName.Veterinary].Value;
var sklsum = taming + anlore + vetern;
int max = from is PlayerMobile ? ((PlayerMobile)from).RewardStableSlots : 0;
if (sklsum >= 240.0)
{
max += 5;
}
else if (sklsum >= 200.0)
{
max += 4;
}
else if (sklsum >= 160.0)
{
max += 3;
}
else
{
max += 2;
}
// bonus SA stable slots
if (Core.SA)
{
max += 2;
}
//bonus ToL stable slots
if (Core.TOL)
{
max += 2;
}
if (taming >= 100.0)
{
max += (int)((taming - 90.0) / 10);
}
if (anlore >= 100.0)
{
max += (int)((anlore - 90.0) / 10);
}
if (vetern >= 100.0)
{
max += (int)((vetern - 90.0) / 10);
}
return max + Server.Spells.SkillMasteries.MasteryInfo.BoardingSlotIncrease(from);
}
private void CloseClaimList(Mobile from)
{
from.CloseGump(typeof(ClaimListGump));
}
public void BeginClaimList(Mobile from)
{
if (Deleted || !from.CheckAlive())
{
return;
}
var list = new List<BaseCreature>();
for (var i = 0; i < from.Stabled.Count; ++i)
{
var pet = from.Stabled[i] as BaseCreature;
if (pet == null || pet.Deleted)
{
if (pet != null)
{
pet.IsStabled = false;
pet.StabledBy = null;
}
from.Stabled.RemoveAt(i--);
continue;
}
list.Add(pet);
}
if (list.Count > 0)
{
from.SendGump(new ClaimListGump(this, from, list));
}
else
{
SayTo(from, 502671); // But I have no animals stabled with me at the moment!
}
}
public void EndClaimList(Mobile from, BaseCreature pet)
{
if (pet == null || pet.Deleted || from.Map != Map || !from.Stabled.Contains(pet) || !from.CheckAlive())
{
return;
}
if (!from.InRange(this, 14))
{
from.SendLocalizedMessage(500446); // That is too far away.
return;
}
if (CanClaim(from, pet))
{
DoClaim(from, pet);
from.Stabled.Remove(pet);
if (from is PlayerMobile)
{
((PlayerMobile)from).AutoStabled.Remove(pet);
}
}
else
{
SayTo(from, 1049612, pet.Name); // ~1_NAME~ remained in the stables because you have too many followers.
}
}
public void BeginStable(Mobile from)
{
if (Deleted || !from.CheckAlive())
{
return;
}
if ((from.Backpack == null || from.Backpack.GetAmount(typeof(Gold)) < 30) && Banker.GetBalance(from) < 30)
{
SayTo(from, 1042556); // Thou dost not have enough gold, not even in thy bank account.
return;
}
/*
* I charge 30 gold per pet for a real week's stable time.
* I will withdraw it from thy bank account.
* Which animal wouldst thou like to stable here?
*/
from.SendLocalizedMessage(1042558);
from.Target = new StableTarget(this);
}
public void EndStable(Mobile from, BaseCreature pet)
{
if (Deleted || !from.CheckAlive())
{
return;
}
if (pet.Body.IsHuman)
{
SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn.
}
else if (!pet.Controlled)
{
SayTo(from, 1048053); // You can't stable that!
}
else if (pet.ControlMaster != from)
{
SayTo(from, 1042562); // You do not own that pet!
}
else if (pet.IsDeadPet)
{
SayTo(from, 1049668); // Living pets only, please.
}
else if (pet.Summoned)
{
SayTo(from, 502673); // I can not stable summoned creatures.
}
else if (pet.Allured)
{
SayTo(from, 1048053); // You can't stable that!
}
else if ((pet is PackLlama || pet is PackHorse || pet is Beetle) &&
(pet.Backpack != null && pet.Backpack.Items.Count > 0))
{
SayTo(from, 1042563); // You need to unload your pet.
}
else if (pet.Combatant != null && pet.InRange(pet.Combatant, 12) && pet.Map == pet.Combatant.Map)
{
SayTo(from, 1042564); // I'm sorry. Your pet seems to be busy.
}
else if (from.Stabled.Count >= GetMaxStabled(from))
{
SayTo(from, 1042565); // You have too many pets in the stables!
}
else if ((from.Backpack != null && from.Backpack.ConsumeTotal(typeof(Gold), 30)) || Banker.Withdraw(from, 30))
{
pet.ControlTarget = null;
pet.ControlOrder = OrderType.Stay;
pet.Internalize();
pet.SetControlMaster(null);
pet.SummonMaster = null;
pet.IsStabled = true;
pet.StabledBy = from;
if (Core.SE)
{
pet.Loyalty = MaxLoyalty; // Wonderfully happy
}
from.Stabled.Add(pet);
SayTo(from, Core.AOS ? 1049677 : 502679);
// [AOS: Your pet has been stabled.] Very well, thy pet is stabled.
// Thou mayst recover it by saying 'claim' to me. In one real world week,
// I shall sell it off if it is not claimed!
}
else
{
SayTo(from, 502677); // But thou hast not the funds in thy bank account!
}
}
public void Claim(Mobile from)
{
Claim(from, null);
}
public void Claim(Mobile from, string petName)
{
if (Deleted || !from.CheckAlive())
{
return;
}
var claimed = false;
var stabled = 0;
var claimByName = (petName != null);
for (var i = 0; i < from.Stabled.Count; ++i)
{
var pet = from.Stabled[i] as BaseCreature;
if (pet == null || pet.Deleted)
{
if (pet != null)
{
pet.IsStabled = false;
pet.StabledBy = null;
}
from.Stabled.RemoveAt(i--);
continue;
}
++stabled;
if (claimByName && !Insensitive.Equals(pet.Name, petName))
{
continue;
}
if (CanClaim(from, pet))
{
DoClaim(from, pet);
from.Stabled.RemoveAt(i);
if (from is PlayerMobile)
{
((PlayerMobile)from).AutoStabled.Remove(pet);
}
--i;
claimed = true;
}
else
{
SayTo(from, 1049612, pet.Name); // ~1_NAME~ remained in the stables because you have too many followers.
}
}
if (claimed)
{
SayTo(from, 1042559); // Here you go... and good day to you!
}
else if (stabled == 0)
{
SayTo(from, 502671); // But I have no animals stabled with me at the moment!
}
else if (claimByName)
{
BeginClaimList(from);
}
}
public bool CanClaim(Mobile from, BaseCreature pet)
{
return ((from.Followers + pet.ControlSlots) <= from.FollowersMax);
}
private void DoClaim(Mobile from, BaseCreature pet)
{
pet.SetControlMaster(from);
if (pet.Summoned)
{
pet.SummonMaster = from;
}
pet.ControlTarget = from;
pet.ControlOrder = OrderType.Follow;
pet.MoveToWorld(from.Location, from.Map);
pet.IsStabled = false;
pet.StabledBy = null;
if (Core.SE)
{
pet.Loyalty = MaxLoyalty; // Wonderfully Happy
}
}
public override bool HandlesOnSpeech(Mobile from)
{
return true;
}
public override void OnSpeech(SpeechEventArgs e)
{
if (e.Mobile.Map.Rules != MapRules.FeluccaRules && !CheckVendorAccess(e.Mobile))
{
return;
}
if (!e.Handled && e.HasKeyword(0x0008)) // *stable*
{
e.Handled = true;
CloseClaimList(e.Mobile);
BeginStable(e.Mobile);
}
else if (!e.Handled && e.HasKeyword(0x0009)) // *claim*
{
e.Handled = true;
CloseClaimList(e.Mobile);
var index = e.Speech.IndexOf(' ');
if (index != -1)
{
Claim(e.Mobile, e.Speech.Substring(index).Trim());
}
else
{
Claim(e.Mobile);
}
}
else if (!e.Handled && e.Speech.ToLower().IndexOf("stablecount") >= 0)
{
IPooledEnumerable eable = e.Mobile.Map.GetMobilesInRange(e.Mobile.Location, 8);
e.Handled = true;
foreach (Mobile m in eable)
{
if (m is AnimalTrainer)
{
e.Mobile.SendLocalizedMessage(1071250, String.Format("{0}\t{1}", e.Mobile.Stabled.Count.ToString(), GetMaxStabled(e.Mobile).ToString())); // ~1_USED~/~2_MAX~ stable stalls used.
break;
}
}
eable.Free();
}
else
{
base.OnSpeech(e);
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
}
private class StableEntry : ContextMenuEntry
{
private readonly Mobile m_From;
private readonly AnimalTrainer m_Trainer;
public StableEntry(AnimalTrainer trainer, Mobile from)
: base(6126, 12)
{
m_Trainer = trainer;
m_From = from;
Enabled = from.Map.Rules == MapRules.FeluccaRules || trainer.CheckVendorAccess(from);
}
public override void OnClick()
{
m_Trainer.BeginStable(m_From);
}
}
private class ClaimListGump : Gump
{
private readonly Mobile m_From;
private readonly List<BaseCreature> m_List;
private readonly AnimalTrainer m_Trainer;
public ClaimListGump(AnimalTrainer trainer, Mobile from, List<BaseCreature> list)
: base(50, 50)
{
m_Trainer = trainer;
m_From = from;
m_List = list;
from.CloseGump(typeof(ClaimListGump));
AddPage(0);
AddBackground(0, 0, 325, 50 + (list.Count * 20), 9250);
AddAlphaRegion(5, 5, 315, 40 + (list.Count * 20));
AddHtml(
15,
15,
275,
20,
"<BASEFONT COLOR=#000008>Select a pet to retrieve from the stables:</BASEFONT>",
false,
false);
for (var i = 0; i < list.Count; ++i)
{
var pet = list[i];
if (pet == null || pet.Deleted)
{
continue;
}
AddButton(15, 39 + (i * 20), 10006, 10006, i + 1, GumpButtonType.Reply, 0);
AddHtml(
32,
35 + (i * 20),
275,
18,
String.Format("<BASEFONT COLOR=#C6C6EF>{0}</BASEFONT>", pet.Name),
false,
false);
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
var index = info.ButtonID - 1;
if (index >= 0 && index < m_List.Count)
{
m_Trainer.EndClaimList(m_From, m_List[index]);
}
}
}
private class ClaimAllEntry : ContextMenuEntry
{
private readonly Mobile m_From;
private readonly AnimalTrainer m_Trainer;
public ClaimAllEntry(AnimalTrainer trainer, Mobile from)
: base(6127, 12)
{
m_Trainer = trainer;
m_From = from;
Enabled = from.Map.Rules == MapRules.FeluccaRules || trainer.CheckVendorAccess(from);
}
public override void OnClick()
{
m_Trainer.Claim(m_From);
}
}
private class StableTarget : Target
{
private readonly AnimalTrainer m_Trainer;
public StableTarget(AnimalTrainer trainer)
: base(12, false, TargetFlags.None)
{
m_Trainer = trainer;
}
protected override void OnTarget(Mobile from, object targeted)
{
if (targeted is BaseCreature)
{
m_Trainer.EndStable(from, (BaseCreature)targeted);
}
else if (targeted == from)
{
m_Trainer.SayTo(from, 502672); // HA HA HA! Sorry, I am not an inn.
}
else
{
m_Trainer.SayTo(from, 1048053); // You can't stable that!
}
}
}
}
}

View File

@@ -0,0 +1,200 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class StopHarpingOnMeQuest : BaseQuest
{
public StopHarpingOnMeQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(LapHarp), "lap harp", 20, 0xEB2));
AddReward(new BaseReward(typeof(CarpentersCraftsmanSatchel), 1074282));
}
/* Stop Harping on Me */
public override object Title
{
get
{
return 1073881;
}
}
/* Humans artistry can be a remarkable thing. For instance, I have heard of a wonderful
instrument which creates the most melodious of music. A lap harp. I would be ever so
grateful if I could examine one in person. */
public override object Description
{
get
{
return 1074071;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me lap harp. */
public override object Uncomplete
{
get
{
return 1073927;
}
}
/* My thanks for your service. Now, I will show you something of elven carpentry. */
public override object Complete
{
get
{
return 1073969;
}
}
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 TheFarEyeQuest : BaseQuest
{
public TheFarEyeQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Spyglass), "spyglasses", 20, 0x14F5));
AddReward(new BaseReward(typeof(TinkersCraftsmanSatchel), 1074282));
}
/* The Far Eye */
public override object Title
{
get
{
return 1073908;
}
}
/* The wonders of human invention! Turning sand and metal into a far-seeing eye! This is
something I must experience for myself. Bring me some of these spyglasses friend human. */
public override object Description
{
get
{
return 1074098;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me spyglasses. */
public override object Uncomplete
{
get
{
return 1073954;
}
}
/* Enjoy my thanks for your service. */
public override object Complete
{
get
{
return 1073978;
}
}
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 Anolly : MondainQuester
{
[Constructable]
public Anolly()
: base("Anolly", "the bark weaver")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Anolly(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(StopHarpingOnMeQuest),
typeof(TheFarEyeQuest),
typeof(NothingFancyQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
Race = Race.Elf;
Hue = 0x8835;
HairItemID = 0x2FC0;
HairHue = 0x325;
}
public override void InitOutfit()
{
AddItem(new Sandals(0x901));
AddItem(new FullApron(0x1BB));
AddItem(new ShortPants(0x3B2));
AddItem(new SmithHammer());
}
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();
}
}
}

View File

@@ -0,0 +1,147 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Zento
{
public class AnsellaGryen : BaseQuester
{
[Constructable]
public AnsellaGryen()
{
}
public AnsellaGryen(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Hue = 0x83EA;
this.Female = true;
this.Body = 0x191;
this.Name = "Ansella Gryen";
}
public override void InitOutfit()
{
this.HairItemID = 0x203B;
this.HairHue = 0x1BB;
this.AddItem(new SamuraiTabi(0x8FD));
this.AddItem(new FemaleKimono(0x4B6));
this.AddItem(new Obi(0x526));
this.AddItem(new GoldBracelet());
}
public override int GetAutoTalkRange(PlayerMobile m)
{
if (m.Quest == null)
return 3;
else
return -1;
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
QuestSystem qs = player.Quest;
if (qs is TerribleHatchlingsQuest)
{
if (qs.IsObjectiveInProgress(typeof(FirstKillObjective)))
{
qs.AddConversation(new DirectionConversation());
}
else if (qs.IsObjectiveInProgress(typeof(SecondKillObjective)) ||
qs.IsObjectiveInProgress(typeof(ThirdKillObjective)))
{
qs.AddConversation(new TakeCareConversation());
}
else
{
QuestObjective obj = qs.FindObjective(typeof(ReturnObjective));
if (obj != null && !obj.Completed)
{
Container cont = GetNewContainer();
cont.DropItem(new Gold(Utility.RandomMinMax(100, 200)));
if (Utility.RandomBool())
{
BaseWeapon weapon = Loot.Construct(Loot.SEWeaponTypes) as BaseWeapon;
if (weapon != null)
{
BaseRunicTool.ApplyAttributesTo(weapon, 3, 10, 30);
cont.DropItem(weapon);
}
}
else
{
BaseArmor armor = Loot.Construct(Loot.SEArmorTypes) as BaseArmor;
if (armor != null)
{
BaseRunicTool.ApplyAttributesTo(armor, 1, 10, 20);
cont.DropItem(armor);
}
}
if (player.PlaceInBackpack(cont))
{
obj.Complete();
}
else
{
cont.Delete();
player.SendLocalizedMessage(1046260); // You need to clear some space in your inventory to continue with the quest. Come back here when you have more space in your inventory.
}
}
}
}
else
{
TerribleHatchlingsQuest newQuest = new TerribleHatchlingsQuest(player);
bool inRestartPeriod = false;
if (qs != null)
{
if (contextMenu)
this.SayTo(player, 1063322); // Before you can help me with the Terrible Hatchlings, you'll need to finish the quest you've already taken!
}
else if (QuestSystem.CanOfferQuest(player, typeof(TerribleHatchlingsQuest), out inRestartPeriod))
{
newQuest.SendOffer();
}
else if (inRestartPeriod && contextMenu)
{
this.SayTo(player, 1049357); // I have nothing more for you at this time.
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
public override void TurnToTokuno()
{
}
}
}

View File

@@ -0,0 +1,69 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Ansikart : MondainQuester
{
[Constructable]
public Ansikart()
: base("Ansikart", "the Artificer")
{
SetSkill(SkillName.ItemID, 60.0, 83.0);
SetSkill(SkillName.Imbuing, 60.0, 83.0);
}
public Ansikart(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(MasteringtheSoulforge),
typeof(ALittleSomething)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
CantWalk = true;
Race = Race.Gargoyle;
Hue = 0x86DF;
HairItemID = 0x425D;
HairHue = 0x321;
}
public override void InitOutfit()
{
AddItem(new SerpentStoneStaff());
AddItem(new GargishClothChest(1428));
AddItem(new GargishClothArms(1445));
AddItem(new GargishClothKilt(1443));
}
public override void Advertise()
{
this.Say(1112528); // Master the art of unraveling magic.
}
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();
}
}
}

View File

@@ -0,0 +1,144 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
public class FoldedSteel : BaseCollectionMobile
{
[Constructable]
public FoldedSteel()
: base("Arabella", "the samurai")
{
this.StartTier = 10000000;
this.DailyDecay = 100000;
this.DonationLabel = 1073448; // Folded Steel Section Donation Representative.
}
public FoldedSteel(Serial serial)
: base(serial)
{
}
public override Collection CollectionID
{
get
{
return Collection.FoldedSteel;
}
}
public override int MaxTier
{
get
{
return 1;
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x83EA;
this.HairItemID = 0x2048;
this.HairHue = 0x476;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new NoDachi());
this.AddItem(new SamuraiTabi(0x589));
this.AddItem(new LeatherSuneate());
this.AddItem(new LeatherJingasa());
this.AddItem(new LeatherDo());
this.AddItem(new LeatherHiroSode());
}
public override void Init()
{
base.Init();
this.Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(Bokuto), 0x27A8, 1074913, 0x0, 8));
this.Donations.Add(new CollectionItem(typeof(Daisho), 0x27A9, 1074914, 0x0, 22));
this.Donations.Add(new CollectionItem(typeof(NoDachi), 0x27A2, 1074915, 0x0, 27));
this.Donations.Add(new CollectionItem(typeof(BookOfBushido), 0x238C, 1070814, 0x0, 30));
int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor
hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
this.Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
this.Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
this.Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
this.Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
this.Rewards.Add(new CollectionItem(typeof(FoldedSteelGlasses), 0x2FB8, 1073380, 0x47E, 800000.0));
}
public override bool CanDonate(PlayerMobile player)
{
bool can = player.LibraryFriend;
if (!can)
player.SendLocalizedMessage(1074273); // You must speak with Librarian Verity before you can donate to this collection.
return can;
}
/*public override void IncreaseTier()
{
base.IncreaseTier();
List<object> list = new List<object>();
Item c;
switch ( Tier )
{
}
if ( list.Count > 0 )
Tiers.Add( list );
}*/
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();
}
}
}

View File

@@ -0,0 +1,416 @@
#region References
using System;
using Server.Items;
#endregion
namespace Server.Mobiles
{
public class ArcherGuard : BaseGuard
{
private Timer m_AttackTimer, m_IdleTimer;
private Mobile m_Focus;
[Constructable]
public ArcherGuard()
: this(null)
{ }
public ArcherGuard(Mobile target)
: base(target)
{
InitStats(100, 125, 25);
Title = "the guard";
SpeechHue = Utility.RandomDyedHue();
Hue = Utility.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 0x191;
Name = NameList.RandomName("female");
}
else
{
Body = 0x190;
Name = NameList.RandomName("male");
}
new Horse().Rider = this;
AddItem(new StuddedChest());
AddItem(new StuddedArms());
AddItem(new StuddedGloves());
AddItem(new StuddedGorget());
AddItem(new StuddedLegs());
AddItem(new Boots());
AddItem(new SkullCap());
Bow bow = new Bow();
bow.Movable = false;
bow.Crafter = this;
bow.Quality = ItemQuality.Exceptional;
AddItem(bow);
Container pack = new Backpack();
pack.Movable = false;
Arrow arrows = new Arrow(250);
arrows.LootType = LootType.Newbied;
pack.DropItem(arrows);
pack.DropItem(new Gold(10, 25));
AddItem(pack);
Skills[SkillName.Anatomy].Base = 120.0;
Skills[SkillName.Tactics].Base = 120.0;
Skills[SkillName.Archery].Base = 120.0;
Skills[SkillName.MagicResist].Base = 120.0;
Skills[SkillName.DetectHidden].Base = 100.0;
NextCombatTime = Core.TickCount + 500;
Focus = target;
}
public ArcherGuard(Serial serial)
: base(serial)
{ }
[CommandProperty(AccessLevel.GameMaster)]
public override Mobile Focus
{
get { return m_Focus; }
set
{
if (Deleted)
{
return;
}
Mobile oldFocus = m_Focus;
if (oldFocus != value)
{
m_Focus = value;
if (value != null)
{
AggressiveAction(value);
}
Combatant = value;
if (oldFocus != null && !oldFocus.Alive)
{
Say("Thou hast suffered thy punishment, scoundrel.");
}
if (value != null)
{
Say(500131); // Thou wilt regret thine actions, swine!
}
if (m_AttackTimer != null)
{
m_AttackTimer.Stop();
m_AttackTimer = null;
}
if (m_IdleTimer != null)
{
m_IdleTimer.Stop();
m_IdleTimer = null;
}
if (m_Focus != null)
{
m_AttackTimer = new AttackTimer(this);
m_AttackTimer.Start();
((AttackTimer)m_AttackTimer).DoOnTick();
}
else
{
m_IdleTimer = new IdleTimer(this);
m_IdleTimer.Start();
}
}
else if (m_Focus == null && m_IdleTimer == null)
{
m_IdleTimer = new IdleTimer(this);
m_IdleTimer.Start();
}
}
}
public override bool OnBeforeDeath()
{
if (m_Focus != null && m_Focus.Alive)
{
new AvengeTimer(m_Focus).Start(); // If a guard dies, three more guards will spawn
}
return base.OnBeforeDeath();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
writer.Write(m_Focus);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
switch (version)
{
case 0:
{
m_Focus = reader.ReadMobile();
if (m_Focus != null)
{
m_AttackTimer = new AttackTimer(this);
m_AttackTimer.Start();
}
else
{
m_IdleTimer = new IdleTimer(this);
m_IdleTimer.Start();
}
break;
}
}
}
public override void OnAfterDelete()
{
if (m_AttackTimer != null)
{
m_AttackTimer.Stop();
m_AttackTimer = null;
}
if (m_IdleTimer != null)
{
m_IdleTimer.Stop();
m_IdleTimer = null;
}
base.OnAfterDelete();
}
private class AvengeTimer : Timer
{
private readonly Mobile m_Focus;
public AvengeTimer(Mobile focus)
: base(TimeSpan.FromSeconds(2.5), TimeSpan.FromSeconds(1.0), 3)
// After 2.5 seconds, one guard will spawn every 1.0 second, three times
{
m_Focus = focus;
}
protected override void OnTick()
{
Spawn(m_Focus, m_Focus, 1, true);
}
}
private class AttackTimer : Timer
{
private readonly ArcherGuard m_Owner;
// private bool m_Shooting;
public AttackTimer(ArcherGuard owner)
: base(TimeSpan.FromSeconds(0.25), TimeSpan.FromSeconds(0.1))
{
m_Owner = owner;
}
public void DoOnTick()
{
OnTick();
}
protected override void OnTick()
{
if (m_Owner.Deleted)
{
Stop();
return;
}
m_Owner.Criminal = false;
m_Owner.Kills = 0;
m_Owner.Stam = m_Owner.StamMax;
Mobile target = m_Owner.Focus;
if (target != null && (target.Deleted || !target.Alive || !m_Owner.CanBeHarmful(target)))
{
m_Owner.Focus = null;
Stop();
return;
}
else if (m_Owner.Weapon is Fists)
{
m_Owner.Kill();
Stop();
return;
}
if (target != null && m_Owner.Combatant != target)
{
m_Owner.Combatant = target;
}
if (target == null)
{
Stop();
}
else
{
// <instakill>
TeleportTo(target);
target.BoltEffect(0);
if (target is BaseCreature)
{
((BaseCreature)target).NoKillAwards = true;
}
target.Damage(target.HitsMax, m_Owner);
target.Kill(); // just in case, maybe Damage is overriden on some shard
if (target.Corpse != null && !target.Player)
{
target.Corpse.Delete();
}
m_Owner.Focus = null;
Stop();
} // </instakill>
/*else if ( !m_Owner.InRange( target, 20 ) )
{
m_Shooting = false;
m_Owner.Focus = null;
}
else if ( !m_Owner.InLOS( target ) )
{
m_Shooting = false;
TeleportTo( target );
}
else if ( !m_Owner.CanSee( target ) )
{
m_Shooting = false;
if ( !m_Owner.InRange( target, 2 ) )
{
if ( !m_Owner.Move( m_Owner.GetDirectionTo( target ) | Direction.Running ) && OutOfMaxDistance( target ) )
TeleportTo( target );
}
else
{
if ( !m_Owner.UseSkill( SkillName.DetectHidden ) && Utility.Random( 50 ) == 0 )
m_Owner.Say( "Reveal!" );
}
}
else
{
if ( m_Shooting && (TimeToSpare() || OutOfMaxDistance( target )) )
m_Shooting = false;
else if ( !m_Shooting && InMinDistance( target ) )
m_Shooting = true;
if ( !m_Shooting )
{
if ( m_Owner.InRange( target, 1 ) )
{
if ( !m_Owner.Move( (Direction)(m_Owner.GetDirectionTo( target ) - 4) | Direction.Running ) && OutOfMaxDistance( target ) ) // Too close, move away
TeleportTo( target );
}
else if ( !m_Owner.InRange( target, 2 ) )
{
if ( !m_Owner.Move( m_Owner.GetDirectionTo( target ) | Direction.Running ) && OutOfMaxDistance( target ) )
TeleportTo( target );
}
}
}*/
}
private bool TimeToSpare()
{
return (m_Owner.NextCombatTime - Core.TickCount) > 1000;
}
private bool OutOfMaxDistance(Mobile target)
{
return !m_Owner.InRange(target, m_Owner.Weapon.MaxRange);
}
private bool InMinDistance(Mobile target)
{
return m_Owner.InRange(target, 4);
}
private void TeleportTo(Mobile target)
{
Point3D from = m_Owner.Location;
Point3D to = target.Location;
m_Owner.Location = to;
Effects.SendLocationParticles(
EffectItem.Create(from, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
Effects.SendLocationParticles(EffectItem.Create(to, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
m_Owner.PlaySound(0x1FE);
}
}
private class IdleTimer : Timer
{
private readonly ArcherGuard m_Owner;
private int m_Stage;
public IdleTimer(ArcherGuard owner)
: base(TimeSpan.FromSeconds(2.0), TimeSpan.FromSeconds(2.5))
{
m_Owner = owner;
}
protected override void OnTick()
{
if (m_Owner.Deleted)
{
Stop();
return;
}
if ((m_Stage++ % 4) == 0 || !m_Owner.Move(m_Owner.Direction))
{
m_Owner.Direction = (Direction)Utility.Random(8);
}
if (m_Stage > 16)
{
Effects.SendLocationParticles(
EffectItem.Create(m_Owner.Location, m_Owner.Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
m_Owner.PlaySound(0x1FE);
m_Owner.Delete();
}
}
}
}
}

View File

@@ -0,0 +1,56 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Architect : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Architect()
: base("the architect")
{
}
public Architect(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.TinkersGuild;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
if (!Core.AOS)
this.m_SBInfos.Add(new SBHouseDeed());
this.m_SBInfos.Add(new SBArchitect());
}
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();
}
}
}

View File

@@ -0,0 +1,53 @@
using System;
namespace Server.Engines.Quests
{
public class Arielle : MondainQuester
{
[Constructable]
public Arielle()
: base("Arielle")
{
this.BaseSoundID = 0x46F;
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Arielle(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TheJoysOfLifeQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Body = 128;
}
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();
}
}
}

View File

@@ -0,0 +1,41 @@
using System;
namespace Server.Items
{
public class AriellesBauble : Item
{
[Constructable]
public AriellesBauble()
: base(0x23B)
{
this.Weight = 2.0;
this.LootType = LootType.Blessed;
}
public AriellesBauble(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1073137;
}
}// A bauble
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();
}
}
}

View File

@@ -0,0 +1,165 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Armorer : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Armorer()
: base("the armourer")
{
SetSkill(SkillName.ArmsLore, 64.0, 100.0);
SetSkill(SkillName.Blacksmith, 60.0, 83.0);
}
public Armorer(Serial serial)
: base(serial)
{
}
public override VendorShoeType ShoeType
{
get
{
return VendorShoeType.Boots;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return m_SBInfos;
}
}
public override void InitSBInfo()
{
switch ( Utility.Random(4))
{
case 0:
{
m_SBInfos.Add(new SBLeatherArmor());
m_SBInfos.Add(new SBStuddedArmor());
m_SBInfos.Add(new SBMetalShields());
m_SBInfos.Add(new SBPlateArmor());
m_SBInfos.Add(new SBHelmetArmor());
m_SBInfos.Add(new SBChainmailArmor());
m_SBInfos.Add(new SBRingmailArmor());
break;
}
case 1:
{
m_SBInfos.Add(new SBStuddedArmor());
m_SBInfos.Add(new SBLeatherArmor());
m_SBInfos.Add(new SBMetalShields());
m_SBInfos.Add(new SBHelmetArmor());
break;
}
case 2:
{
m_SBInfos.Add(new SBMetalShields());
m_SBInfos.Add(new SBPlateArmor());
m_SBInfos.Add(new SBHelmetArmor());
m_SBInfos.Add(new SBChainmailArmor());
m_SBInfos.Add(new SBRingmailArmor());
break;
}
case 3:
{
m_SBInfos.Add(new SBMetalShields());
m_SBInfos.Add(new SBHelmetArmor());
break;
}
}
if (IsTokunoVendor)
{
m_SBInfos.Add(new SBSELeatherArmor());
m_SBInfos.Add(new SBSEArmor());
}
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Smith; } }
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
{
PlayerMobile pm = from as PlayerMobile;
if (pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
{
double theirSkill = pm.Skills[SkillName.Blacksmith].Base;
if (theirSkill >= 70.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
else if (theirSkill >= 50.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
else
pm.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
return new LargeSmithBOD();
return SmallSmithBOD.CreateRandomFor(from);
}
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallSmithBOD || item is LargeSmithBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return (from is PlayerMobile && from.Skills[SkillName.Blacksmith].Base > 0);
}
public override TimeSpan GetNextBulkOrder(Mobile from)
{
if (from is PlayerMobile)
return ((PlayerMobile)from).NextSmithBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (Core.SE && from is PlayerMobile)
((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
}
#endregion
public override void InitOutfit()
{
base.InitOutfit();
AddItem(new Server.Items.HalfApron(Utility.RandomYellowHue()));
AddItem(new Server.Items.Bascinet());
}
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)
{
Title = "the armourer";
}
}
}
}

View File

@@ -0,0 +1,79 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public class Artist : BaseCreature
{
[Constructable]
public Artist()
: base(AIType.AI_Animal, FightMode.None, 10, 1, 0.2, 0.4)
{
this.InitStats(31, 41, 51);
this.SetSkill(SkillName.Healing, 36, 68);
this.SpeechHue = Utility.RandomDyedHue();
this.Title = "the artist";
this.Hue = Utility.RandomSkinHue();
if (this.Female = Utility.RandomBool())
{
this.Body = 0x191;
this.Name = NameList.RandomName("female");
}
else
{
this.Body = 0x190;
this.Name = NameList.RandomName("male");
}
this.AddItem(new Doublet(Utility.RandomDyedHue()));
this.AddItem(new Sandals(Utility.RandomNeutralHue()));
this.AddItem(new ShortPants(Utility.RandomNeutralHue()));
this.AddItem(new HalfApron(Utility.RandomDyedHue()));
Utility.AssignRandomHair(this);
Container pack = new Backpack();
pack.DropItem(new Gold(250, 300));
pack.Movable = false;
this.AddItem(pack);
}
public Artist(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return true;
}
}
public override bool ClickTitle
{
get
{
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();
}
}
}

View File

@@ -0,0 +1,168 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class BakersDozenQuest : BaseQuest
{
public BakersDozenQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(CookieMix), "cookie mix", 5, 0x103F));
this.AddReward(new BaseReward(typeof(ChefsSatchel), 1074282)); // Craftsman's Satchel
}
/* Baker's Dozen */
public override object Title
{
get
{
return 1075478;
}
}
/* You there! Do you know much about the ways of cooking? If you help me out, I'll show you a thing or two about
how it's done. Bring me some cookie mix, about 5 batches will do it, and I will reward you. Although, I don't
think you can buy it, you can make some in a snap! First get a rolling pin or frying pan or even a flour sifter.
Then you mix one pinch of flour with some water and you've got some dough! Take that dough and add one dollop of
honey and you've got sweet dough. add one more drop of honey and you've got cookie mix. See? Nothing to it! Now
get to work! */
public override object Description
{
get
{
return 1075479;
}
}
/* Argh, I absolutely must have more of these 'cookies!' Come back if you change your mind. */
public override object Refuse
{
get
{
return 1075480;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
/* Thank you! I haven't been this excited about food in months! */
public override object Complete
{
get
{
return 1075481;
}
}
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 Asandos : MondainQuester
{
[Constructable]
public Asandos()
: base("Asandos", "the chef")
{
}
public Asandos(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(BakersDozenQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x83FF;
this.HairItemID = 0x2044;
this.HairHue = 0x1;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Boots(0x901));
this.AddItem(new ShortPants());
this.AddItem(new Shirt());
this.AddItem(new Cap());
this.AddItem(new HalfApron(0x28));
}
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 ChefsSatchel : Backpack
{
[Constructable]
public ChefsSatchel()
: base()
{
this.Hue = BaseReward.SatchelHue();
this.AddItem(new SackFlour());
this.AddItem(new Skillet());
}
public ChefsSatchel(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();
}
}
}

View File

@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Athialon : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Athialon()
: base("the expeditionist")
{
this.Name = "Athialon";
}
public Athialon(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x8382;
this.HairItemID = 0x2FC0;
this.HairHue = 0x35;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x901));
this.AddItem(new DiamondMace());
this.AddItem(new WoodlandBelt());
Item item;
item = new WoodlandLegs();
item.Hue = 0x3B2;
this.AddItem(item);
item = new WoodlandChest();
item.Hue = 0x3B2;
this.AddItem(item);
item = new WoodlandArms();
item.Hue = 0x3B2;
this.AddItem(item);
item = new WingedHelm();
item.Hue = 0x3B2;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,200 @@
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Gumps;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
public class AttendantFortuneTeller : PersonalAttendant
{
[Constructable]
public AttendantFortuneTeller()
: this(false)
{
}
[Constructable]
public AttendantFortuneTeller(bool female)
: base("the Fortune Teller")
{
this.Female = female;
}
public AttendantFortuneTeller(Serial serial)
: base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (from.Alive && this.IsOwner(from))
{
from.CloseGump(typeof(InternalGump));
from.SendGump(new InternalGump(this));
}
else
base.OnDoubleClick(from);
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
if (from.Alive && this.IsOwner(from))
list.Add(new AttendantUseEntry(this, 6245));
base.AddCustomContextEntries(from, list);
}
public override void InitBody()
{
this.SetStr(50, 60);
this.SetDex(20, 30);
this.SetInt(100, 110);
this.Name = NameList.RandomName("female");
this.Female = true;
this.Race = Race.Human;
this.Hue = this.Race.RandomSkinHue();
Utility.AssignRandomHair(this, Utility.RandomHairHue());
}
public override void InitOutfit()
{
this.AddItem(new Shoes(Utility.RandomPinkHue()));
this.AddItem(new Shirt(Utility.RandomPinkHue()));
this.AddItem(new SkullCap(Utility.RandomPinkHue()));
if (Utility.RandomBool())
this.AddItem(new Kilt(Utility.RandomPinkHue()));
else
this.AddItem(new Skirt(Utility.RandomPinkHue()));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
private class InternalGump : Gump
{
private readonly AttendantFortuneTeller m_Teller;
public InternalGump(AttendantFortuneTeller teller)
: base(200, 200)
{
this.m_Teller = teller;
this.AddPage(0);
this.AddBackground(0, 0, 291, 155, 0x13BE);
this.AddImageTiled(5, 6, 280, 20, 0xA40);
this.AddHtmlLocalized(9, 8, 280, 20, 1075994, 0x7FFF, false, false); // Fortune Teller
this.AddImageTiled(5, 31, 280, 91, 0xA40);
this.AddHtmlLocalized(9, 35, 280, 40, 1076025, 0x7FFF, false, false); // Ask your question
this.AddImageTiled(9, 55, 270, 20, 0xDB0);
this.AddImageTiled(10, 55, 270, 2, 0x23C5);
this.AddImageTiled(9, 55, 2, 20, 0x23C3);
this.AddImageTiled(9, 75, 270, 2, 0x23C5);
this.AddImageTiled(279, 55, 2, 22, 0x23C3);
this.AddTextEntry(12, 56, 263, 17, 0xA28, 15, "");
this.AddButton(5, 129, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(40, 131, 100, 20, 1060051, 0x7FFF, false, false); // CANCEL
this.AddButton(190, 129, 0xFB7, 0xFB8, 1, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(225, 131, 100, 20, 1006044, 0x7FFF, false, false); // OK
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (this.m_Teller == null || this.m_Teller.Deleted)
return;
if (info.ButtonID == 1)
{
TextRelay text = info.GetTextEntry(15);
if (text != null && !String.IsNullOrEmpty(text.Text))
{
sender.Mobile.CloseGump(typeof(FortuneGump));
sender.Mobile.SendGump(new FortuneGump(text.Text));
}
else
sender.Mobile.SendGump(this);
}
}
}
private class FortuneGump : Gump
{
public FortuneGump(string text)
: base(200, 200)
{
this.AddPage(0);
this.AddImage(0, 0, 0x7724);
int one, two, three;
one = Utility.RandomMinMax(1, 19);
two = Utility.RandomMinMax(one + 1, 20);
three = Utility.RandomMinMax(0, one - 1);
this.AddImageTiled(28, 140, 115, 180, 0x7725 + one);
this.AddTooltip(this.GetTooltip(one));
this.AddHtmlLocalized(28, 115, 125, 20, 1076079, 0x7FFF, false, false); // The Past
this.AddImageTiled(171, 140, 115, 180, 0x7725 + two);
this.AddTooltip(this.GetTooltip(two));
this.AddHtmlLocalized(171, 115, 125, 20, 1076081, 0x7FFF, false, false); // The Question
this.AddImageTiled(314, 140, 115, 180, 0x7725 + three);
this.AddTooltip(this.GetTooltip(three));
this.AddHtmlLocalized(314, 115, 125, 20, 1076080, 0x7FFF, false, false); // The Future
this.AddHtml(30, 32, 400, 25, text, true, false);
}
private int GetTooltip(int number)
{
if (number > 9)
return 1076015 + number - 10;
switch ( number )
{
case 0:
return 1076063;
case 1:
return 1076060;
case 2:
return 1076061;
case 3:
return 1076057;
case 4:
return 1076062;
case 5:
return 1076059;
case 6:
return 1076058;
case 7:
return 1076065;
case 8:
return 1076064;
case 9:
return 1076066;
}
return 1052009; // I have seen the error of my ways!
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,701 @@
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Multis;
using Server.Network;
namespace Server.Mobiles
{
public class AttendantHerald : PersonalAttendant
{
private static readonly HeraldEntry[] m_Announcements = new HeraldEntry[]
{
new HeraldEntry(1076044, "[OWNER TITLE]", "[OWNER NAME]"), // Attention, attention! All hail the arrival of the ~1_TITLE~ ~2_NAME~!
new HeraldEntry(1076045, "[OWNER TITLE]", "[OWNER NAME]"), // Make way ye unwashed hordes! Clear the road! For ~1_TITLE~ ~2_NAME~ has business more important than yours!
new HeraldEntry(1076046, "[OWNER TITLE]", "[OWNER NAME]"), // ~1_TITLE~ ~2_NAME~ approaches! Be ye prepared to kneel before their indomitable presence! And remember, tribute is to be only in gold!
new HeraldEntry(1076047, "[OWNER TITLE]", "[OWNER NAME]"), // Throw down your capes and kerchiefs! Let the petals be strewn! For the ~1_TITLE~ ~2_NAME~ approacheth!
new HeraldEntry(1076048, "[OWNER TITLE]", "[OWNER NAME]"), // ~1_TITLE~ ~2_NAME~ has arrived! Let the drinks flow! Let the festivities commence! And you there, with the pig, get that beast on a skewer!
new HeraldEntry(1076049, "[OWNER SEX P]", "[OWNER OPPOSITE SEX P]", "[OWNER TITLE]", "[OWNER NAME]")// Let the ~1_SAME_SEX~ cower and the ~2_OPPOSITE_SEX~ swoon, for now approaches the ~3_TITLE~ ~4_NAME~.
};
private static readonly HeraldEntry[] m_Greetings = new HeraldEntry[]
{
new HeraldEntry(1076038, "[OWNER NAME]"), // Welcome to the home of ~1_OWNER_NAME~. Please keep your shoes off the furniture.
new HeraldEntry(1076039, "[VISITOR TITLE]", "[VISITOR NAME]", "[OWNER SEX]"), // Announcing the arrival of the ~1_VISITOR_TITLE~ ~2_VISITOR_NAME~. The ~3_OWNER_SEX~ of the house bids you welcome.
new HeraldEntry(1076040, "[OWNER SEX]","[VISITOR TITLE]", "[VISITOR NAME]"), // My ~1_OWNER_SEX~, you have a visitor! ~2_VISITOR_TITLE~ ~3_VISITOR_NAME~ is awaiting your presence.
new HeraldEntry(1076041, "[OWNER TITLE]", "[OWNER NAME]"), // Welcome the the humble abode of ~1_OWNER_TITLE~ ~2_OWNER_NAME~, please remove your shoes, and have a seat where you may find one.
new HeraldEntry(1076042, "[VISITOR TITLE]", "[VISITOR NAME]"), // Ahh, greetings to ~1_VISITOR_TITLE~ ~2_VISITOR_NAME~. Your coming here was foreseen, and I alone know of your purpose.
new HeraldEntry(1076043), // *squints* Not you again! Fine, fine... whatever... come on in, I suppose. *sighs*
new HeraldEntry(1076074, "[OWNER TITLE]", "[OWNER NAME]"), // Welcome to this humble marketplace. If you need any assistance ~1_OWNER_TITLE~ ~2_OWNER_NAME~ will be glad to help you.
new HeraldEntry(1076075, "[OWNER TITLE]", "[OWNER NAME]"), // Come Friend! Enter ~1_OWNER_TITLE~ ~2_OWNER_NAME~'s wondrous shop of many things! If you can't find it here, I suggest you go somewhere else!
new HeraldEntry(1076076, "[VISITOR NAME]")// *Looks ~1_VISITOR_NAME~ over with narrowed eyes, scowling, and points to the sign on the wall* "Reagents for spell casting only, Please do not eat!"
};
private HeraldEntry m_Announcement;
private HeraldEntry m_Greeting;
private DateTime m_NextYell;
private BaseHouse m_House;
private Point3D m_Location;
public AttendantHerald()
: base("the Herald")
{
this.m_Announcement = m_Announcements[0];
this.m_Greeting = m_Greetings[0];
this.m_NextYell = DateTime.UtcNow;
this.m_House = null;
this.m_Location = Point3D.Zero;
}
public AttendantHerald(Serial serial)
: base(serial)
{
}
public virtual TimeSpan YellDelay
{
get
{
return TimeSpan.FromSeconds(15);
}
}
[CommandProperty(AccessLevel.GameMaster)]
public HeraldEntry Announcement
{
get
{
return this.m_Announcement;
}
set
{
this.m_Announcement = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public HeraldEntry Greeting
{
get
{
return this.m_Greeting;
}
set
{
this.m_Greeting = value;
}
}
public override void OnDoubleClick(Mobile from)
{
if (from.Alive && this.IsOwner(from))
{
from.CloseGump(typeof(OptionsGump));
from.SendGump(new OptionsGump(this));
}
else
base.OnDoubleClick(from);
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
if (from.Alive && this.IsOwner(from))
{
list.Add(new AttendantUseEntry(this, 6248));
list.Add(new HeraldSetAnnouncementTextEntry(this));
list.Add(new HeraldSetGreetingTextEntry(this));
list.Add(new AttendantDismissEntry(this));
}
}
public override void OnMovement(Mobile m, Point3D oldLocation)
{
base.OnMovement(m, oldLocation);
if (m != null && m.Player && !m.Hidden && m != this)
{
if (this.ControlOrder == OrderType.Follow && this.m_NextYell < DateTime.UtcNow && m != this.ControlMaster && this.m_Announcement != null)
{
this.m_Announcement.Say(this, m);
this.m_NextYell = DateTime.UtcNow + this.YellDelay + TimeSpan.FromSeconds(Utility.RandomMinMax(-2, 2));
}
else if (this.ControlOrder == OrderType.Stay && this.m_Greeting != null)
{
if (this.m_Location != this.Location)
{
this.m_House = BaseHouse.FindHouseAt(this);
this.m_Location = this.Location;
}
if (this.m_House != null && !this.m_House.IsInside(oldLocation, 16) && this.m_House.IsInside(m))
this.m_Greeting.Say(this, m);
}
}
}
public override bool InGreetingMode(Mobile owner)
{
if (this.m_Location != this.Location)
{
this.m_House = BaseHouse.FindHouseAt(this);
this.m_Location = this.Location;
}
return (this.m_House != null && this.m_House.IsOwner(owner) && this.ControlOrder == OrderType.Stay);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
writer.Write(this.m_Announcement != null);
if (this.m_Announcement != null)
this.m_Announcement.Serialize(writer);
writer.Write(this.m_Greeting != null);
if (this.m_Greeting != null)
this.m_Greeting.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
if (reader.ReadBool())
{
this.m_Announcement = new HeraldEntry();
this.m_Announcement.Deserialize(reader);
}
if (reader.ReadBool())
{
this.m_Greeting = new HeraldEntry();
this.m_Greeting.Deserialize(reader);
}
this.m_Location = Point3D.Zero;
}
public virtual void SetAnnouncementText(Mobile by)
{
by.SendGump(new SetTextGump(this, m_Announcements, true));
}
public virtual void SetGreetingText(Mobile by)
{
by.SendGump(new SetTextGump(this, m_Greetings, false));
}
[PropertyObject]
public class HeraldEntry
{
private TextDefinition m_Message;
private string[] m_Arguments;
public HeraldEntry()
: this(null, null)
{
}
public HeraldEntry(TextDefinition message)
: this(message, null)
{
}
public HeraldEntry(TextDefinition message, params string[] args)
{
this.m_Message = message;
this.m_Arguments = args;
}
[CommandProperty(AccessLevel.GameMaster)]
public TextDefinition Message
{
get
{
return this.m_Message;
}
set
{
this.m_Message = value;
}
}
[CommandProperty(AccessLevel.GameMaster)]
public string Arguments
{
get
{
string text = String.Empty;
foreach (string s in this.m_Arguments)
text += '|' + s;
return text + '|';
}
set
{
if (value != null)
this.m_Arguments = value.Split('|');
else
this.m_Arguments = null;
}
}
public override string ToString()
{
if (this.m_Message != null)
return this.m_Message.ToString();
return base.ToString();
}
public void Say(AttendantHerald herald, Mobile visitor)
{
if (this.m_Message.Number > 0)
{
herald.Say(this.m_Message.Number, this.ConstructNumber(herald, visitor));
}
else if (this.m_Message.String != null)
{
herald.Say(this.ConstructString(herald, visitor));
}
}
public GumpEntry Construct(AttendantHerald herald, int x, int y, int width, int height, int color)
{
if (this.m_Message.Number > 0)
{
string args = this.ConstructNumber(herald, null);
return new GumpHtmlLocalized(x, y, width, height, this.m_Message.Number, args, color, false, false);
}
else if (this.m_Message.String != null)
{
string message = String.Format("<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", color, this.ConstructString(herald, null));
return new GumpHtml(x, y, width, height, message, false, false);
}
return null;
}
public string ConstructNumber(AttendantHerald herald, Mobile visitor)
{
string args = String.Empty;
if (this.m_Arguments != null && this.m_Arguments.Length > 0)
{
args = this.Construct(herald, visitor, this.m_Arguments[0]);
for (int i = 1; i < this.m_Arguments.Length; i++)
args = String.Format("{0}\t{1}", args, this.Construct(herald, visitor, this.m_Arguments[i]));
}
return args;
}
public string ConstructString(AttendantHerald herald, Mobile visitor)
{
string message = this.m_Message.String;
if (this.m_Arguments != null && this.m_Arguments.Length > 0)
{
string[] args = new string[this.m_Arguments.Length];
for (int i = 0; i < args.Length; i++)
args[i] = this.Construct(herald, visitor, this.m_Arguments[i]);
message = String.Format(message, args);
}
return message;
}
public string Construct(AttendantHerald herald, Mobile visitor, string argument)
{
if (herald == null || herald.Deleted || herald.ControlMaster == null)
return String.Empty;
Mobile m = herald.ControlMaster;
switch ( argument )
{
case "[OWNER TITLE]":
return "Mighty";
case "[OWNER NAME]":
return m.Name;
case "[OWNER SEX]":
return m.Female ? "lady" : "lord";
case "[OWNER OPPOSITE SEX]":
return m.Female ? "lord" : "lady";
case "[OWNER SEX P]":
return m.Female ? "ladies" : "lords";
case "[OWNER OPPOSITE SEX P]":
return m.Female ? "lords" : "ladies";
case "[VISITOR TITLE]":
return visitor != null ? "Mighty" : argument;
case "[VISITOR NAME]":
return visitor != null ? visitor.Name : argument;
}
return String.Empty;
}
public void Serialize(GenericWriter writer)
{
writer.WriteEncodedInt(0); // version
if (this.m_Message.Number > 0)
{
writer.Write((byte)0x1);
writer.Write(this.m_Message.Number);
}
else if (this.m_Message.String != null)
{
writer.Write((byte)0x2);
writer.Write(this.m_Message.String);
}
else
writer.Write((byte)0x0);
if (this.m_Arguments != null)
{
writer.WriteEncodedInt(this.m_Arguments.Length);
foreach (string s in this.m_Arguments)
writer.Write(s);
}
else
writer.WriteEncodedInt(0);
}
public void Deserialize(GenericReader reader)
{
int version = reader.ReadEncodedInt();
byte type = reader.ReadByte();
switch ( type )
{
case 0x1:
this.m_Message = reader.ReadInt();
break;
case 0x2:
this.m_Message = reader.ReadString();
break;
}
this.m_Arguments = new string[reader.ReadEncodedInt()];
for (int i = 0; i < this.m_Arguments.Length; i++)
this.m_Arguments[i] = reader.ReadString();
}
}
private class OptionsGump : Gump
{
private readonly AttendantHerald m_Herald;
public OptionsGump(AttendantHerald herald)
: base(200, 200)
{
this.m_Herald = herald;
this.AddBackground(0, 0, 273, 324, 0x13BE);
this.AddImageTiled(10, 10, 253, 20, 0xA40);
this.AddImageTiled(10, 40, 253, 244, 0xA40);
this.AddImageTiled(10, 294, 253, 20, 0xA40);
this.AddAlphaRegion(10, 10, 253, 304);
this.AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false); // CANCEL
this.AddHtmlLocalized(14, 12, 273, 20, 1075996, 0x7FFF, false, false); // Herald
this.AddButton(15, 45, 0x845, 0x846, 3, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 43, 450, 20, 3006247, 0x7FFF, false, false); // Set Announcement Text
this.AddButton(15, 65, 0x845, 0x846, 4, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 63, 450, 20, 3006246, 0x7FFF, false, false); // Set Greeting Text
if (herald.ControlOrder == OrderType.Stay)
{
this.AddHtmlLocalized(45, 83, 450, 20, 1076138, 0x7D32, false, false); // Stay here and greet guests
this.AddButton(15, 105, 0x845, 0x846, 6, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 103, 450, 20, 1076139, 0x7FFF, false, false); // Follow me
}
else
{
this.AddButton(15, 85, 0x845, 0x846, 5, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 83, 450, 20, 1076138, 0x7FFF, false, false); // Stay here and greet guests
this.AddHtmlLocalized(45, 103, 450, 20, 1076139, 0x7D32, false, false); // Follow me
this.AddTooltip(1076141); // You can only issue this command when your herald is in greeting mode.
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (this.m_Herald == null || this.m_Herald.Deleted)
return;
Mobile m = sender.Mobile;
switch ( info.ButtonID )
{
case 3:
this.m_Herald.SetAnnouncementText(m);
break;
case 4:
this.m_Herald.SetGreetingText(m);
break;
case 5:
{
if (this.m_Herald.ControlOrder == OrderType.Follow)
{
BaseHouse house = BaseHouse.FindHouseAt(this.m_Herald);
if (house != null && house.IsOwner(m))
{
this.m_Herald.ControlOrder = OrderType.Stay;
this.m_Herald.ControlTarget = null;
}
else
m.SendLocalizedMessage(1076140); // You must be in a house you control to put your herald into greeting mode.
}
break;
}
case 6:
{
if (this.m_Herald.ControlOrder == OrderType.Stay)
{
this.m_Herald.ControlOrder = OrderType.Follow;
this.m_Herald.ControlTarget = m;
}
break;
}
}
}
}
private class SetTextGump : Gump
{
private readonly AttendantHerald m_Herald;
private readonly HeraldEntry[] m_Entries;
private readonly bool m_Announcement;
public SetTextGump(AttendantHerald herald, HeraldEntry[] entries, bool announcement)
: base(60, 36)
{
this.m_Herald = herald;
this.m_Entries = entries;
this.m_Announcement = announcement;
this.AddPage(0);
this.AddBackground(0, 0, 520, 324, 0x13BE);
this.AddImageTiled(10, 10, 500, 20, 0xA40);
this.AddImageTiled(10, 40, 500, 244, 0xA40);
this.AddImageTiled(10, 294, 500, 20, 0xA40);
this.AddAlphaRegion(10, 10, 500, 304);
this.AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 296, 450, 20, 1060051, 0x7FFF, false, false); // CANCEL
this.AddHtmlLocalized(14, 12, 520, 20, 3006246 + (announcement ? 1 : 0), 0x7FFF, false, false); // Set Announcement/Greeting Text
for (int i = 0; i < entries.Length; i++)
{
if (i % 5 == 0)
{
int page = i / 5 + 1;
if (page > 1)
{
this.AddButton(435, 294, 0xFA5, 0xFA7, 0, GumpButtonType.Page, page);
this.AddHtmlLocalized(475, 296, 60, 20, 1043353, 0x7FFF, false, false); // Next
}
this.AddPage(page);
if (page > 1)
{
this.AddButton(360, 294, 0xFAE, 0xFB0, 0, GumpButtonType.Page, page - 1);
this.AddHtmlLocalized(400, 296, 60, 20, 1011393, 0x7FFF, false, false); // Back
}
}
this.AddButton(19, 49 + (i % 5) * 48, 0x845, 0x846, 100 + i, GumpButtonType.Reply, 0);
this.Add(entries[i].Construct(herald, 44, 47 + (i % 5) * 48, 460, 40, 0x7FFF));
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (this.m_Herald == null || this.m_Herald.Deleted)
return;
int index = info.ButtonID - 100;
if (index >= 0 && index < this.m_Entries.Length)
{
HeraldEntry entry = this.m_Entries[index];
if (this.m_Announcement)
{
this.m_Herald.Announcement = entry;
sender.Mobile.SendLocalizedMessage(1076686); // Your herald's announcement has been changed.
}
else
{
this.m_Herald.Greeting = entry;
sender.Mobile.SendLocalizedMessage(1076687); // Your herald's greeting has been changed.
}
}
}
}
}
public class AttendantMaleHerald : AttendantHerald
{
[Constructable]
public AttendantMaleHerald()
: base()
{
}
public AttendantMaleHerald(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.SetStr(50, 60);
this.SetDex(20, 30);
this.SetInt(100, 110);
this.Name = NameList.RandomName("male");
this.Female = false;
this.Race = Race.Human;
this.Hue = this.Race.RandomSkinHue();
this.HairItemID = this.Race.RandomHair(this.Female);
this.HairHue = this.Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new FurBoots());
this.AddItem(new LongPants(0x901));
this.AddItem(new TricorneHat());
this.AddItem(new FormalShirt(Utility.RandomBlueHue()));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
public class AttendantFemaleHerald : AttendantHerald
{
[Constructable]
public AttendantFemaleHerald()
: base()
{
}
public AttendantFemaleHerald(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.SetStr(50, 60);
this.SetDex(20, 30);
this.SetInt(100, 110);
this.Name = NameList.RandomName("female");
this.Female = true;
this.Race = Race.Human;
this.Hue = this.Race.RandomSkinHue();
this.HairItemID = this.Race.RandomHair(this.Female);
this.HairHue = this.Race.RandomHairHue();
}
public override void InitOutfit()
{
Lantern lantern = new Lantern();
lantern.Ignite();
this.AddItem(lantern);
this.AddItem(new Shoes(Utility.RandomNeutralHue()));
this.AddItem(new Bonnet(Utility.RandomPinkHue()));
this.AddItem(new PlainDress(Utility.RandomPinkHue()));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}
namespace Server.ContextMenus
{
public class HeraldSetAnnouncementTextEntry : ContextMenuEntry
{
private readonly AttendantHerald m_Attendant;
public HeraldSetAnnouncementTextEntry(AttendantHerald attendant)
: base(6247)
{
this.m_Attendant = attendant;
}
public override void OnClick()
{
if (this.m_Attendant == null || this.m_Attendant.Deleted)
return;
this.m_Attendant.SetAnnouncementText(this.Owner.From);
}
}
public class HeraldSetGreetingTextEntry : ContextMenuEntry
{
private readonly AttendantHerald m_Attendant;
public HeraldSetGreetingTextEntry(AttendantHerald attendant)
: base(6246)
{
this.m_Attendant = attendant;
}
public override void OnClick()
{
if (this.m_Attendant == null || this.m_Attendant.Deleted)
return;
this.m_Attendant.SetGreetingText(this.Owner.From);
}
}
}

View File

@@ -0,0 +1,265 @@
using System;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Gumps;
using Server.Items;
using Server.Network;
namespace Server.Mobiles
{
public class AttendantLuckyDealer : PersonalAttendant
{
private DateTime m_NextUse;
private int m_Count;
public AttendantLuckyDealer()
: base("the Lucky Dealer")
{
}
public AttendantLuckyDealer(Serial serial)
: base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (from.Alive && this.IsOwner(from))
{
from.CloseGump(typeof(InternalGump));
from.SendGump(new InternalGump(this));
}
else
base.OnDoubleClick(from);
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
if (from.Alive && this.IsOwner(from))
list.Add(new AttendantUseEntry(this, 6244));
base.AddCustomContextEntries(from, list);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
private class InternalGump : Gump
{
private readonly AttendantLuckyDealer m_Dealer;
public InternalGump(AttendantLuckyDealer dealer)
: this(dealer, 1, 4)
{
}
public InternalGump(AttendantLuckyDealer dealer, int dice, int faces)
: base(60, 36)
{
this.m_Dealer = dealer;
this.AddHtmlLocalized(14, 12, 273, 20, 1075995, 0x7FFF, false, false); // Lucky Dealer
this.AddPage(0);
this.AddBackground(0, 0, 273, 324, 0x13BE);
this.AddImageTiled(10, 10, 253, 20, 0xA40);
this.AddImageTiled(10, 40, 253, 244, 0xA40);
this.AddImageTiled(10, 294, 253, 20, 0xA40);
this.AddAlphaRegion(10, 10, 253, 304);
this.AddButton(10, 294, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(45, 294, 80, 20, 1060051, 0x7FFF, false, false); // CANCEL
this.AddButton(130, 294, 0xFB7, 0xFB9, 1, GumpButtonType.Reply, 0);
this.AddHtmlLocalized(165, 294, 80, 20, 1076002, 0x7FFF, false, false); // Roll
this.AddHtmlLocalized(14, 50, 120, 20, 1076000, 0x7FFF, false, false); // Number of dice
this.AddGroup(0);
this.AddRadio(14, 70, 0xD2, 0xD3, dice == 1, 1001);
this.AddLabel(44, 70, 0x481, "1");
this.AddRadio(14, 100, 0xD2, 0xD3, dice == 2, 1002);
this.AddLabel(44, 100, 0x481, "2");
this.AddRadio(14, 130, 0xD2, 0xD3, dice == 3, 1003);
this.AddLabel(44, 130, 0x481, "3");
this.AddRadio(14, 160, 0xD2, 0xD3, dice == 4, 1004);
this.AddLabel(44, 160, 0x481, "4");
this.AddHtmlLocalized(130, 50, 120, 20, 1076001, 0x7FFF, false, false); // Number of faces
this.AddGroup(1);
this.AddRadio(130, 70, 0xD2, 0xD3, faces == 4, 4);
this.AddLabel(160, 70, 0x481, "4");
this.AddRadio(130, 100, 0xD2, 0xD3, faces == 6, 6);
this.AddLabel(160, 100, 0x481, "6");
this.AddRadio(130, 130, 0xD2, 0xD3, faces == 8, 8);
this.AddLabel(160, 130, 0x481, "8");
this.AddRadio(130, 160, 0xD2, 0xD3, faces == 10, 10);
this.AddLabel(160, 160, 0x481, "10");
this.AddRadio(130, 190, 0xD2, 0xD3, faces == 12, 12);
this.AddLabel(160, 190, 0x481, "12");
this.AddRadio(130, 220, 0xD2, 0xD3, faces == 20, 20);
this.AddLabel(160, 220, 0x481, "20");
this.AddRadio(130, 250, 0xD2, 0xD3, faces == 100, 100);
this.AddLabel(160, 250, 0x481, "100");
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (this.m_Dealer == null || this.m_Dealer.Deleted)
return;
if (info.ButtonID == 1)
{
int dice = 1;
int faces = 4;
if (info.Switches.Length == 2)
{
dice = info.Switches[0] - 1000;
faces = info.Switches[1];
}
if (this.m_Dealer.m_NextUse < DateTime.UtcNow)
{
if (dice > 0 && faces > 0)
{
int sum = 0;
string text = String.Empty;
for (int i = 0; i < dice; i++)
{
int roll = Utility.Random(faces) + 1;
text = String.Format("{0}{1}{2}", text, i > 0 ? " " : "", roll);
sum += roll;
}
this.m_Dealer.Say(1076071, String.Format("{0}\t{1}\t{2}\t{3}\t{4}", sender.Mobile.Name, dice, faces, text, sum)); // ~1_NAME~ rolls ~2_DICE~d~3_FACES~: ~4_ROLLS~ (Total: ~5_TOTAL~)
}
if (this.m_Dealer.m_Count > 0 && DateTime.UtcNow - this.m_Dealer.m_NextUse < TimeSpan.FromSeconds(this.m_Dealer.m_Count))
this.m_Dealer.m_NextUse = DateTime.UtcNow + TimeSpan.FromSeconds(3);
if (this.m_Dealer.m_Count++ == 5)
{
this.m_Dealer.m_NextUse = DateTime.UtcNow;
this.m_Dealer.m_Count = 0;
}
}
else
sender.Mobile.SendLocalizedMessage(501789); // You must wait before trying again.
sender.Mobile.SendGump(new InternalGump(this.m_Dealer, dice, faces));
}
}
}
}
public class AttendantMaleLuckyDealer : AttendantLuckyDealer
{
[Constructable]
public AttendantMaleLuckyDealer()
: base()
{
}
public AttendantMaleLuckyDealer(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.SetStr(50, 60);
this.SetDex(20, 30);
this.SetInt(100, 110);
this.Name = NameList.RandomName("male");
this.Female = false;
this.Race = Race.Human;
this.Hue = this.Race.RandomSkinHue();
this.HairItemID = this.Race.RandomHair(this.Female);
this.HairHue = this.Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new Boots());
this.AddItem(new ShortPants());
this.AddItem(new JesterHat());
this.AddItem(new JesterSuit());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
public class AttendantFemaleLuckyDealer : AttendantLuckyDealer
{
[Constructable]
public AttendantFemaleLuckyDealer()
: base()
{
}
public AttendantFemaleLuckyDealer(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.SetStr(50, 60);
this.SetDex(20, 30);
this.SetInt(100, 110);
this.Name = NameList.RandomName("female");
this.Female = true;
this.Race = Race.Elf;
this.Hue = this.Race.RandomSkinHue();
this.HairItemID = this.Race.RandomHair(this.Female);
this.HairHue = this.Race.RandomHairHue();
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots());
this.AddItem(new ElvenPants());
this.AddItem(new ElvenShirt());
this.AddItem(new JesterHat());
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.WriteEncodedInt(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadEncodedInt();
}
}
}

View File

@@ -0,0 +1,611 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class CreepyCrawliesQuest : BaseQuest
{
public CreepyCrawliesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(GiantSpider), "giant spiders", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Creepy Crawlies */
public override object Title
{
get
{
return 1072987;
}
}
/* Disgusting! The way they scuttle on those hairy legs just makes me want to gag. I hate
spiders! Rid the world of twelve and I'll find something nice to give you in thanks. */
public override object Description
{
get
{
return 1073016;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 VoraciousPlantsQuest : BaseQuest
{
public VoraciousPlantsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Corpser), "corpsers", 8));
this.AddObjective(new SlayObjective(typeof(SwampTentacle), "swamp tentacles", 2));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Voracious Plants */
public override object Title
{
get
{
return 1073001;
}
}
/* I bet you can't tangle with those nasty plants ... say eight corpsers and two swamp
tentacles! I bet they're too much for you. You may as well confess you can't ...*/
public override object Description
{
get
{
return 1073024;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 GibberJabberQuest : BaseQuest
{
public GibberJabberQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Gibberling), "gibberlings", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Gibber Jabber */
public override object Title
{
get
{
return 1073004;
}
}
/* I bet you can't kill ... ten gibberlings! I bet they're too much for you. You may as
well confess you can't ... */
public override object Description
{
get
{
return 1073023;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 AnimatedMonstrosityQuest : BaseQuest
{
public AnimatedMonstrosityQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(FleshGolem), "flesh golems", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Animated Monstrosity */
public override object Title
{
get
{
return 1072990;
}
}
/* I bet you can't kill ... say twelve ... flesh golems! I bet
they're too much for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073020;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 BirdsOfAFeatherQuest : BaseQuest
{
public BirdsOfAFeatherQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Harpy), "harpies", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Birds of a Feather */
public override object Title
{
get
{
return 1073007;
}
}
/* I bet you can't kill ... ten harpies! I bet they're too much
for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073022;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 FrightmaresQuest : BaseQuest
{
public FrightmaresQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(PlagueSpawn), "plague spawns", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Frightmares */
public override object Title
{
get
{
return 1073000;
}
}
/* I bet you can't handle ten plague spawns! I bet they're too
much for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073036;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 MoltenReptilesQuest : BaseQuest
{
public MoltenReptilesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(LavaLizard), "lava lizards", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Molten Reptiles */
public override object Title
{
get
{
return 1072989;
}
}
/* I bet you can't kill ... say ten ... lava lizards! I bet they're
too much for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073018;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 BloodyNuisanceQuest : BaseQuest
{
public BloodyNuisanceQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(GoreFiend), "gore fiends", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Bloody Nuisance */
public override object Title
{
get
{
return 1072992;
}
}
/* I bet you can't kill ... ten gore fiends! I bet they're too much
for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073021;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 BloodSuckersQuest : BaseQuest
{
public BloodSuckersQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(VampireBat), "vampire bats", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Blood Suckers */
public override object Title
{
get
{
return 1072997;
}
}
/* I bet you can't tangle with those bloodsuckers ... say around ten vampire bats! I bet
they're too much for you. You may as well confess you can't ... */
public override object Description
{
get
{
return 1073025;
}
}
/* Hahahaha! I knew it! */
public override object Refuse
{
get
{
return 1073019;
}
}
/* You're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 Aulan : MondainQuester
{
[Constructable]
public Aulan()
: base("Aulan", "the expeditionist")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Aulan(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(CreepyCrawliesQuest),
typeof(VoraciousPlantsQuest),
typeof(GibberJabberQuest),
typeof(AnimatedMonstrosityQuest),
typeof(BirdsOfAFeatherQuest),
typeof(FrightmaresQuest),
typeof(MoltenReptilesQuest),
typeof(BloodyNuisanceQuest),
typeof(BloodSuckersQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x847E;
this.HairItemID = 0x2FC1;
this.HairHue = 0x852;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x725));
this.AddItem(new ElvenPants(0x3B3));
this.AddItem(new Cloak(0x16A));
this.AddItem(new Circlet());
Item item;
item = new HideGloves();
item.Hue = 0x224;
this.AddItem(item);
item = new HideChest();
item.Hue = 0x224;
this.AddItem(item);
item = new HidePauldrons();
item.Hue = 0x224;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,60 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Aurelia : MondainQuester
{
[Constructable]
public Aurelia()
: base("Aurelia", "the architect's daughter")
{
}
public Aurelia(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(AemaethOneQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Human;
this.Hue = 0x83F7;
this.HairItemID = 0x2047;
this.HairHue = 0x457;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Sandals(0x4B7));
this.AddItem(new Skirt(0x4B4));
this.AddItem(new FancyShirt(0x659));
}
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();
}
}
}

View File

@@ -0,0 +1,68 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Aurvidlem : MondainQuester
{
[Constructable]
public Aurvidlem()
: base("Aurvidlem", "the Artificer")
{
SetSkill(SkillName.ItemID, 60.0, 83.0);
SetSkill(SkillName.Imbuing, 60.0, 83.0);
}
public Aurvidlem(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(KnowledgeoftheSoulforge)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
CantWalk = true;
Race = Race.Gargoyle;
Hue = 0x86DE;
HairItemID = 0x4259;
HairHue = 0x0;
}
public override void InitOutfit()
{
AddItem(new SerpentStoneStaff());
AddItem(new GargishClothChest(1307));
AddItem(new GargishClothArms(1330));
AddItem(new GargishClothKilt(1307));
}
public override void Advertise()
{
this.Say(1112525); // Come to be Artificer. I have a task for you.
}
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();
}
}
}

View File

@@ -0,0 +1,195 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class BruisesBandagesAndBloodQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Bruises, Bandages and Blood */
public override object Title
{
get
{
return 1077676;
}
}
/* Head East out of town and go to Old Haven. Heal yourself and other players until you have raised your
Healing skill to 50.<br><center>------</center><br>Ah, welcome to my humble practice. I am Avicenna, New
Haven's resident Healer. A lot of adventurers head out into the wild from here, so I keep rather busy when
they come back bruised, bleeding, or worse.<br><br>I can teach you how to bandage a wound, sure, but it's
not a job for the queasy! For some folks, the mere sight of blood is too much for them, but it's something
you'll get used to over time. It is one thing to cut open a living thing, but it's quite another to sew it
back up and save it from sure death. 'Tis noble work, healing.<br><br>Best way for you to practice fixing
up wounds is to head east out to Old Haven and either practice binding up your own wounds, or practice on
someone else. Surely they'll be grateful for the assistance.<br><br>Make sure to take enough bandages with
you! You don't want to run out in the middle of a tough fight. */
public override object Description
{
get
{
return 1077679;
}
}
/* No? Are you sure? Well, when you feel that you're ready to practice your healing, come back to me. I'll
be right here, fixing up adventurers and curing the occasional cold! */
public override object Refuse
{
get
{
return 1077680;
}
}
/*Hail! 'Tis good to see you again. Unfortunately, you're not quite ready to call yourself an Apprentice
Healer quite yet. Head back out to Old Haven, due east from here, and bandage up some wounds. Yours or
someone else's, it doesn't much matter.*/
public override object Uncomplete
{
get
{
return 1077681;
}
}
/*Hello there, friend. I see you've returned in one piece, and you're an Apprentice Healer to boot! You
should be proud of your accomplishment, as not everyone has "the touch" when it comes to healing.<br><br>
I can't stand to see such good work go unrewarded, so I have something I'd like you to have. It's not much,
but it'll help you heal just a little faster, and maybe keep you alive.<br><br>Good luck out there, friend,
and don't forget to help your fellow adventurer whenever possible!*/
public override object Complete
{
get
{
return 1077683;
}
}
public BruisesBandagesAndBloodQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Healing, 50, "Old Haven Training", 1077677, 1077678));
// 1077677 You feel fresh and are eager to heal wounds. Your ability to improve your Healing skill is enhanced in this area.
// 1077678 You feel as if you've seen enough blood to last a lifetime. Your Healing learning potential is no longer enhanced.
this.AddReward(new BaseReward(typeof(HealersTouch), 1077684));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Healing.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1077682, null, 0x23); // You have achieved the rank of Apprentice Healer. Return to Avicenna in New Haven as soon as you can to claim 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();
}
}
public class Avicenna : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(BruisesBandagesAndBloodQuest)
};
}
}
[Constructable]
public Avicenna()
: base("Avicenna", "The Healing Instructor")
{
this.SetSkill(SkillName.Anatomy, 120.0, 120.0);
this.SetSkill(SkillName.Parry, 120.0, 120.0);
this.SetSkill(SkillName.Healing, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Swords, 120.0, 120.0);
this.SetSkill(SkillName.Focus, 120.0, 120.0);
}
public Avicenna(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078137); // A warrior needs to learn how to apply bandages to wounds.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = true;
this.CantWalk = true;
this.Race = Race.Human;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Robe(0x66D));
this.AddItem(new Boots());
this.AddItem(new GnarledStaff());
}
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();
}
}
}

View File

@@ -0,0 +1,226 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class ABrokenVaseQuest : BaseQuest
{
public ABrokenVaseQuest()
{
AddObjective(new ObtainObjective(typeof (AncientPotteryFragments), "Ancient Pottery Fragments", 10, 0x223B, 0, 2108));
AddReward(new BaseReward(typeof (MeagerMuseumBag), 1112993));
AddReward(new BaseReward("Loyalty Rating"));
}
/*A Broken Vase */
public override object Title
{
get { return 1112795; }
}
public override object Description
{
get { return 1112917; }
}
public override object Refuse
{
get { return 1112918; }
}
public override object Uncomplete
{
get { return 1112919; }
}
public override object Complete
{
get { return 1112920; }
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
public class PuttingThePiecesTogetherQuest : BaseQuest
{
public PuttingThePiecesTogetherQuest()
{
AddObjective(new ObtainObjective(typeof(TatteredAncientScroll), "Tattered Ancient Scrolls", 5, 0x1437));
AddReward(new BaseReward(typeof (DustyMuseumBag), 1112994));
AddReward(new BaseReward("Loyalty Rating"));
}
/* Putting The Pieces Together */
public override object Title
{
get { return 1112796; }
}
public override object Description
{
get { return 1112921; }
}
public override object Refuse
{
get { return 1112922; }
}
public override object Uncomplete
{
get { return 1112923; }
}
public override object Complete
{
get { return 1112924; }
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
public class YeOldeGargishQuest : BaseQuest
{
public YeOldeGargishQuest()
{
AddObjective(new ObtainObjective(typeof(UntranslatedAncientTome), "Untranslated Ancient Tome", 1, 0xFF2, 0, 2405));
AddReward(new BaseReward(typeof (BulgingMuseumBag), 1112995));
AddReward(new BaseReward("Loyalty Rating"));
}
/* Ye Olde Gargish */
public override object Title
{
get { return 1112797; }
}
public override object Description
{
get { return 1112925; }
}
public override object Refuse
{
get { return 1112926; }
}
public override object Uncomplete
{
get { return 1112927; }
}
public override object Complete
{
get { return 1112928; }
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
public class Axem : MondainQuester
{
[Constructable]
public Axem()
: base("Axem", "the Curator")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Axem(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new[]
{
typeof (ABrokenVaseQuest),
typeof (PuttingThePiecesTogetherQuest),
typeof (YeOldeGargishQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = false;
CantWalk = true;
Body = 666;
HairItemID = 16987;
HairHue = 1801;
}
public override void InitOutfit()
{
AddItem(new Backpack());
AddItem(new GargishClothChest(Utility.RandomNeutralHue()));
AddItem(new GargishClothKilt(Utility.RandomNeutralHue()));
AddItem(new GargishClothLegs(Utility.RandomNeutralHue()));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
var version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Baker : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Baker()
: base("the baker")
{
this.SetSkill(SkillName.Cooking, 75.0, 98.0);
this.SetSkill(SkillName.TasteID, 36.0, 68.0);
}
public Baker(Serial serial)
: base(serial)
{
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBBaker());
}
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();
}
}
}

View File

@@ -0,0 +1,520 @@
#region References
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Accounting;
using Server.ContextMenus;
using Server.Items;
using Server.Network;
using Acc = Server.Accounting.Account;
#endregion
namespace Server.Mobiles
{
public class Banker : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Banker()
: base("the banker")
{ }
public Banker(Serial serial)
: base(serial)
{ }
public override NpcGuild NpcGuild { get { return NpcGuild.MerchantsGuild; } }
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public static int GetBalance(Mobile m)
{
double balance = 0;
if (AccountGold.Enabled && m.Account != null)
{
int goldStub;
m.Account.GetGoldBalance(out goldStub, out balance);
if (balance > Int32.MaxValue)
{
return Int32.MaxValue;
}
}
Container bank = m.Player ? m.BankBox : m.FindBankNoCreate();
if (bank != null)
{
var gold = bank.FindItemsByType<Gold>();
var checks = bank.FindItemsByType<BankCheck>();
balance += gold.Aggregate(0.0, (c, t) => c + t.Amount);
balance += checks.Aggregate(0.0, (c, t) => c + t.Worth);
}
return (int)Math.Max(0, Math.Min(Int32.MaxValue, balance));
}
public static int GetBalance(Mobile m, out Item[] gold, out Item[] checks)
{
double balance = 0;
if (AccountGold.Enabled && m.Account != null)
{
int goldStub;
m.Account.GetGoldBalance(out goldStub, out balance);
if (balance > Int32.MaxValue)
{
gold = checks = new Item[0];
return Int32.MaxValue;
}
}
Container bank = m.Player ? m.BankBox : m.FindBankNoCreate();
if (bank != null)
{
gold = bank.FindItemsByType(typeof(Gold));
checks = bank.FindItemsByType(typeof(BankCheck));
balance += gold.OfType<Gold>().Aggregate(0.0, (c, t) => c + t.Amount);
balance += checks.OfType<BankCheck>().Aggregate(0.0, (c, t) => c + t.Worth);
}
else
{
gold = checks = new Item[0];
}
return (int)Math.Max(0, Math.Min(Int32.MaxValue, balance));
}
public static bool Withdraw(Mobile from, int amount, bool message = false)
{
// If for whatever reason the TOL checks fail, we should still try old methods for withdrawing currency.
if (AccountGold.Enabled && from.Account != null && from.Account.WithdrawGold(amount))
{
if (message)
from.SendLocalizedMessage(1155856, amount.ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold has been removed from your bank box.
return true;
}
Item[] gold, checks;
var balance = GetBalance(from, out gold, out checks);
if (balance < amount)
{
return false;
}
for (var i = 0; amount > 0 && i < gold.Length; ++i)
{
if (gold[i].Amount <= amount)
{
amount -= gold[i].Amount;
gold[i].Delete();
}
else
{
gold[i].Amount -= amount;
amount = 0;
}
}
for (var i = 0; amount > 0 && i < checks.Length; ++i)
{
var check = (BankCheck)checks[i];
if (check.Worth <= amount)
{
amount -= check.Worth;
check.Delete();
}
else
{
check.Worth -= amount;
amount = 0;
}
}
if (message)
from.SendLocalizedMessage(1155856, amount.ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold has been removed from your bank box.
return true;
}
public static bool Deposit(Mobile from, int amount, bool message = false)
{
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
{
if (message)
from.SendLocalizedMessage(1042763, amount.ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold was deposited in your account.
return true;
}
var box = from.Player ? from.BankBox : from.FindBankNoCreate();
if (box == null)
{
return false;
}
var items = new List<Item>();
while (amount > 0)
{
Item item;
if (amount < 5000)
{
item = new Gold(amount);
amount = 0;
}
else if (amount <= 1000000)
{
item = new BankCheck(amount);
amount = 0;
}
else
{
item = new BankCheck(1000000);
amount -= 1000000;
}
if (box.TryDropItem(from, item, false))
{
items.Add(item);
}
else
{
item.Delete();
foreach (var curItem in items)
{
curItem.Delete();
}
return false;
}
}
if (message)
from.SendLocalizedMessage(1042763, amount.ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold was deposited in your account.
return true;
}
public static int DepositUpTo(Mobile from, int amount, bool message = false)
{
// If for whatever reason the TOL checks fail, we should still try old methods for depositing currency.
if (AccountGold.Enabled && from.Account != null && from.Account.DepositGold(amount))
{
if (message)
from.SendLocalizedMessage(1042763, amount.ToString("N0", System.Globalization.CultureInfo.GetCultureInfo("en-US"))); // ~1_AMOUNT~ gold was deposited in your account.
return amount;
}
var box = from.Player ? from.BankBox : from.FindBankNoCreate();
if (box == null)
{
return 0;
}
var amountLeft = amount;
while (amountLeft > 0)
{
Item item;
int amountGiven;
if (amountLeft < 5000)
{
item = new Gold(amountLeft);
amountGiven = amountLeft;
}
else if (amountLeft <= 1000000)
{
item = new BankCheck(amountLeft);
amountGiven = amountLeft;
}
else
{
item = new BankCheck(1000000);
amountGiven = 1000000;
}
if (box.TryDropItem(from, item, false))
{
amountLeft -= amountGiven;
}
else
{
item.Delete();
break;
}
}
return amount - amountLeft;
}
public static void Deposit(Container cont, int amount)
{
while (amount > 0)
{
Item item;
if (amount < 5000)
{
item = new Gold(amount);
amount = 0;
}
else if (amount <= 1000000)
{
item = new BankCheck(amount);
amount = 0;
}
else
{
item = new BankCheck(1000000);
amount -= 1000000;
}
cont.DropItem(item);
}
}
public override void InitSBInfo()
{
m_SBInfos.Add(new SBBanker());
}
public override bool HandlesOnSpeech(Mobile from)
{
if (from.InRange(Location, 12))
{
return true;
}
return base.HandlesOnSpeech(from);
}
public override void OnSpeech(SpeechEventArgs e)
{
HandleSpeech(this, e);
base.OnSpeech(e);
}
public static void HandleSpeech(Mobile vendor, SpeechEventArgs e)
{
if (!e.Handled && e.Mobile.InRange(vendor, 12))
{
if (e.Mobile.Map.Rules != MapRules.FeluccaRules && vendor is BaseVendor && !((BaseVendor)vendor).CheckVendorAccess(e.Mobile))
{
return;
}
foreach (var keyword in e.Keywords)
{
switch (keyword)
{
case 0x0000: // *withdraw*
{
e.Handled = true;
if (e.Mobile.Criminal)
{
// I will not do business with a criminal!
vendor.Say(500389);
break;
}
var split = e.Speech.Split(' ');
if (split.Length >= 2)
{
int amount;
var pack = e.Mobile.Backpack;
if (!int.TryParse(split[1], out amount))
{
break;
}
if ((!Core.ML && amount > 5000) || (Core.ML && amount > 60000))
{
// Thou canst not withdraw so much at one time!
vendor.Say(500381);
}
else if (pack == null || pack.Deleted || !(pack.TotalWeight < pack.MaxWeight) ||
!(pack.TotalItems < pack.MaxItems))
{
// Your backpack can't hold anything else.
vendor.Say(1048147);
}
else if (amount > 0)
{
var box = e.Mobile.Player ? e.Mobile.BankBox : e.Mobile.FindBankNoCreate();
if (box == null || !Withdraw(e.Mobile, amount))
{
// Ah, art thou trying to fool me? Thou hast not so much gold!
vendor.Say(500384);
}
else
{
pack.DropItem(new Gold(amount));
// Thou hast withdrawn gold from thy account.
vendor.Say(1010005);
}
}
}
}
break;
case 0x0001: // *balance*
{
e.Handled = true;
if (e.Mobile.Criminal)
{
// I will not do business with a criminal!
vendor.Say(500389);
break;
}
if (AccountGold.Enabled && e.Mobile.Account is Account)
{
vendor.Say(1155855, String.Format("{0:#,0}\t{1:#,0}",
e.Mobile.Account.TotalPlat,
e.Mobile.Account.TotalGold), 0x3BC);
vendor.Say(1155848, String.Format("{0:#,0}", ((Account)e.Mobile.Account).GetSecureAccountAmount(e.Mobile)), 0x3BC);
}
else
{
// Thy current bank balance is ~1_AMOUNT~ gold.
vendor.Say(1042759, GetBalance(e.Mobile).ToString("#,0"));
}
}
break;
case 0x0002: // *bank*
{
e.Handled = true;
if (e.Mobile.Criminal)
{
// Thou art a criminal and cannot access thy bank box.
vendor.Say(500378);
break;
}
e.Mobile.BankBox.Open();
}
break;
case 0x0003: // *check*
{
e.Handled = true;
if (e.Mobile.Criminal)
{
// I will not do business with a criminal!
vendor.Say(500389);
break;
}
if (AccountGold.Enabled && e.Mobile.Account != null)
{
vendor.Say("We no longer offer a checking service.");
break;
}
var split = e.Speech.Split(' ');
if (split.Length >= 2)
{
int amount;
if (!int.TryParse(split[1], out amount))
{
break;
}
if (amount < 5000)
{
// We cannot create checks for such a paltry amount of gold!
vendor.Say(1010006);
}
else if (amount > 1000000)
{
// Our policies prevent us from creating checks worth that much!
vendor.Say(1010007);
}
else
{
var check = new BankCheck(amount);
var box = e.Mobile.BankBox;
if (!box.TryDropItem(e.Mobile, check, false))
{
// There's not enough room in your bankbox for the check!
vendor.Say(500386);
check.Delete();
}
else if (!box.ConsumeTotal(typeof(Gold), amount))
{
// Ah, art thou trying to fool me? Thou hast not so much gold!
vendor.Say(500384);
check.Delete();
}
else
{
// Into your bank box I have placed a check in the amount of:
vendor.Say(1042673, AffixType.Append, amount.ToString("#,0"), "");
}
}
}
}
break;
}
}
}
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
if (from.Alive)
{
var entry = new OpenBankEntry(this);
entry.Enabled = from.Map.Rules == MapRules.FeluccaRules || CheckVendorAccess(from);
list.Add(entry);
}
base.AddCustomContextEntries(from, list);
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,59 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Bard : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Bard()
: base("the bard")
{
this.SetSkill(SkillName.Discordance, 64.0, 100.0);
this.SetSkill(SkillName.Musicianship, 64.0, 100.0);
this.SetSkill(SkillName.Peacemaking, 65.0, 88.0);
this.SetSkill(SkillName.Provocation, 60.0, 83.0);
this.SetSkill(SkillName.Archery, 36.0, 68.0);
this.SetSkill(SkillName.Swords, 36.0, 68.0);
}
public Bard(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.BardsGuild;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBBard());
}
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();
}
}
}

View File

@@ -0,0 +1,45 @@
using System;
namespace Server.Mobiles
{
public class BardGuildmaster : BaseGuildmaster
{
[Constructable]
public BardGuildmaster()
: base("bard")
{
this.SetSkill(SkillName.Archery, 80.0, 100.0);
this.SetSkill(SkillName.Discordance, 80.0, 100.0);
this.SetSkill(SkillName.Musicianship, 80.0, 100.0);
this.SetSkill(SkillName.Peacemaking, 80.0, 100.0);
this.SetSkill(SkillName.Provocation, 80.0, 100.0);
this.SetSkill(SkillName.Swords, 80.0, 100.0);
}
public BardGuildmaster(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.BardsGuild;
}
}
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();
}
}
}

View File

@@ -0,0 +1,51 @@
#region References
using System.Collections.Generic;
using Server.Items;
#endregion
namespace Server.Mobiles
{
public class Barkeeper : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Barkeeper()
: base("the barkeeper")
{ }
public Barkeeper(Serial serial)
: base(serial)
{ }
public override VendorShoeType ShoeType { get { return Utility.RandomBool() ? VendorShoeType.ThighBoots : VendorShoeType.Boots; } }
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public override void InitSBInfo()
{
m_SBInfos.Add(new SBBarkeeper());
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem(new HalfApron(Utility.RandomBrightHue()));
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,101 @@
using System;
using Server;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class SomethingFishy : BaseQuest
{
/* SomethingFishy */
public override object Title{ get{ return 1095059; } }
public override object Description{ get{ return 1095043; } }
public override object Refuse{ get{ return 1095044; } }
public override object Uncomplete{ get{ return 1095045; } }
public override object Complete { get { return 1095048; } }
public SomethingFishy() : base()
{
AddObjective(new ObtainObjective(typeof(RedHerring), "Red Herring", 1, 0x9cc));
AddReward( new BaseReward( typeof( BarreraaksRing ), 1095049 ) );
}
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 Barreraak : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof( SomethingFishy )
};
}
}
[Constructable]
public Barreraak()
: base()
{
Name = "Barreraak";
}
public override void InitBody()
{
HairItemID = 0x2044;//
HairHue = 1153;
FacialHairItemID = 0x204B;
FacialHairHue = 1153;
Body = 334;
Blessed = true;
}
public override void InitOutfit()
{
AddItem(new Backpack());
AddItem(new Boots());
AddItem(new LongPants(0x6C7));
AddItem(new FancyShirt(0x6BB));
AddItem(new Cloak(0x59));
}
public Barreraak(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();
}
}
}

View File

@@ -0,0 +1,632 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Items;
using Server.Services.Virtues;
using EDI = Server.Mobiles.EscortDestinationInfo;
namespace Server.Mobiles
{
public class BaseEscortable : BaseCreature
{
private static readonly string[] m_TownNames = new string[]
{
"Cove", "Britain", "Jhelom",
"Minoc", "Ocllo", "Trinsic",
"Vesper", "Yew", "Skara Brae", //Original List, will need to add it back for Pre-ML shards
"Nujel'm", "Moonglow", "Magincia"
};
private static readonly string[] m_MLTownNames = new string[]
{
"Cove", "Serpent's Hold", "Jhelom", //ML List
"Nujel'm"
};
private static readonly Hashtable m_EscortTable = new Hashtable();
private static readonly TimeSpan m_EscortDelay = TimeSpan.FromMinutes(5.0);
private EDI m_Destination;
private string m_DestinationString;
private DateTime m_DeleteTime;
private Timer m_DeleteTimer;
private DateTime m_LastSeenEscorter;
[Constructable]
public BaseEscortable()
: base(AIType.AI_Melee, FightMode.Aggressor, 22, 1, 0.2, 1.0)
{
InitBody();
InitOutfit();
}
public BaseEscortable(Serial serial)
: base(serial)
{
}
public static Hashtable EscortTable
{
get
{
return m_EscortTable;
}
}
public override bool UseSmartAI { get { return true; } }
public override bool CanAutoStable { get { return false; } }
public override bool Commandable
{
get
{
return false;
}
}// Our master cannot boss us around!
[CommandProperty(AccessLevel.GameMaster)]
public string Destination
{
get
{
return m_Destination == null ? null : m_Destination.Name;
}
set
{
m_DestinationString = value;
m_Destination = EDI.Find(value);
}
}
public virtual void InitBody()
{
SetStr(90, 100);
SetDex(90, 100);
SetInt(15, 25);
Hue = Utility.RandomSkinHue();
if (Female = Utility.RandomBool())
{
Body = 401;
Name = NameList.RandomName("female");
}
else
{
Body = 400;
Name = NameList.RandomName("male");
}
}
public virtual void InitOutfit()
{
AddItem(new FancyShirt(Utility.RandomNeutralHue()));
AddItem(new ShortPants(Utility.RandomNeutralHue()));
AddItem(new Boots(Utility.RandomNeutralHue()));
Utility.AssignRandomHair(this);
PackGold(200, 250);
}
public virtual bool SayDestinationTo(Mobile m)
{
EDI dest = GetDestination();
if (dest == null || !m.Alive)
return false;
Mobile escorter = GetEscorter();
if (escorter == null)
{
Say("I am looking to go to {0}, will you take me?", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
return true;
}
else if (escorter == m)
{
Say("Lead on! Payment will be made when we arrive in {0}.", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
return true;
}
return false;
}
public virtual bool AcceptEscorter(Mobile m)
{
EDI dest = GetDestination();
if (dest == null)
return false;
Mobile escorter = GetEscorter();
if (escorter != null || !m.Alive)
return false;
BaseEscortable escortable = (BaseEscortable)m_EscortTable[m];
if (escortable != null && !escortable.Deleted && escortable.GetEscorter() == m)
{
Say("I see you already have an escort.");
return false;
}
else if (m is PlayerMobile && (((PlayerMobile)m).LastEscortTime + m_EscortDelay) >= DateTime.UtcNow)
{
int minutes = (int)Math.Ceiling(((((PlayerMobile)m).LastEscortTime + m_EscortDelay) - DateTime.UtcNow).TotalMinutes);
Say("You must rest {0} minute{1} before we set out on this journey.", minutes, minutes == 1 ? "" : "s");
return false;
}
else if (SetControlMaster(m))
{
m_LastSeenEscorter = DateTime.UtcNow;
if (m is PlayerMobile)
((PlayerMobile)m).LastEscortTime = DateTime.UtcNow;
Say("Lead on! Payment will be made when we arrive in {0}.", (dest.Name == "Ocllo" && m.Map == Map.Trammel) ? "Haven" : dest.Name);
m_EscortTable[m] = this;
StartFollow();
return true;
}
return false;
}
public override bool HandlesOnSpeech(Mobile from)
{
if (from.InRange(Location, 3))
return true;
return base.HandlesOnSpeech(from);
}
public override void OnSpeech(SpeechEventArgs e)
{
base.OnSpeech(e);
EDI dest = GetDestination();
if (dest != null && !e.Handled && e.Mobile.InRange(Location, 3))
{
if (e.HasKeyword(0x1D)) // *destination*
e.Handled = SayDestinationTo(e.Mobile);
else if (e.HasKeyword(0x1E)) // *i will take thee*
e.Handled = AcceptEscorter(e.Mobile);
}
}
public override void OnAfterDelete()
{
if (m_DeleteTimer != null)
m_DeleteTimer.Stop();
m_DeleteTimer = null;
base.OnAfterDelete();
}
public override void OnThink()
{
base.OnThink();
CheckAtDestination();
}
public virtual void StartFollow()
{
StartFollow(GetEscorter());
}
public virtual void StartFollow(Mobile escorter)
{
if (escorter == null)
return;
ActiveSpeed = 0.1;
PassiveSpeed = 0.2;
ControlOrder = OrderType.Follow;
ControlTarget = escorter;
if (IsPrisoner && CantWalk)
{
CantWalk = false;
}
CurrentSpeed = 0.1;
}
public virtual void StopFollow()
{
ActiveSpeed = 0.2;
PassiveSpeed = 1.0;
ControlOrder = OrderType.None;
ControlTarget = null;
CurrentSpeed = 1.0;
}
public virtual Mobile GetEscorter()
{
if (!Controlled)
return null;
Mobile master = ControlMaster;
if (master == null)
return null;
if (master.Deleted || master.Map != Map || !master.InRange(Location, 30) || !master.Alive)
{
StopFollow();
TimeSpan lastSeenDelay = DateTime.UtcNow - m_LastSeenEscorter;
if (lastSeenDelay >= TimeSpan.FromMinutes(2.0))
{
master.SendLocalizedMessage(1042473); // You have lost the person you were escorting.
Say(1005653); // Hmmm. I seem to have lost my master.
SetControlMaster(null);
m_EscortTable.Remove(master);
Timer.DelayCall(TimeSpan.FromSeconds(5.0), new TimerCallback(Delete));
return null;
}
else
{
ControlOrder = OrderType.Stay;
return master;
}
}
if (ControlOrder != OrderType.Follow)
StartFollow(master);
m_LastSeenEscorter = DateTime.UtcNow;
return master;
}
public virtual void BeginDelete()
{
if (m_DeleteTimer != null)
m_DeleteTimer.Stop();
m_DeleteTime = DateTime.UtcNow + TimeSpan.FromSeconds(30.0);
m_DeleteTimer = new DeleteTimer(this, m_DeleteTime - DateTime.UtcNow);
m_DeleteTimer.Start();
}
public virtual bool CheckAtDestination()
{
EDI dest = GetDestination();
if (dest == null)
return false;
Mobile escorter = GetEscorter();
if (escorter == null)
return false;
if (dest.Contains(Location))
{
Say(1042809, escorter.Name); // We have arrived! I thank thee, ~1_PLAYER_NAME~! I have no further need of thy services. Here is thy pay.
// not going anywhere
m_Destination = null;
m_DestinationString = null;
Container cont = escorter.Backpack;
if (cont == null)
cont = escorter.BankBox;
Gold gold = new Gold(500, 1000);
if (!cont.TryDropItem(escorter, gold, false))
{
if (escorter.Map != null && escorter.Map != Map.Internal)
{
gold.MoveToWorld(escorter.Location, escorter.Map);
}
else
{
gold.Delete();
}
}
StopFollow();
SetControlMaster(null);
m_EscortTable.Remove(escorter);
BeginDelete();
Misc.Titles.AwardFame(escorter, 10, true);
bool gainedPath = false;
PlayerMobile pm = escorter as PlayerMobile;
if (pm != null)
{
if (pm.CompassionGains > 0 && DateTime.UtcNow > pm.NextCompassionDay)
{
pm.NextCompassionDay = DateTime.MinValue;
pm.CompassionGains = 0;
}
if (pm.CompassionGains >= 5) // have already gained 5 times in one day, can gain no more
{
pm.SendLocalizedMessage(1053004); // You must wait about a day before you can gain in compassion again.
}
else if (VirtueHelper.Award(pm, VirtueName.Compassion, IsPrisoner ? 400 : 200, ref gainedPath))
{
if (gainedPath)
pm.SendLocalizedMessage(1053005); // You have achieved a path in compassion!
else
pm.SendLocalizedMessage(1053002); // You have gained in compassion.
pm.NextCompassionDay = DateTime.UtcNow + TimeSpan.FromDays(1.0); // in one day CompassionGains gets reset to 0
++pm.CompassionGains;
}
else
{
pm.SendLocalizedMessage(1053003); // You have achieved the highest path of compassion and can no longer gain any further.
}
}
return true;
}
return false;
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
EDI dest = GetDestination();
writer.Write(dest != null);
if (dest != null)
writer.Write(dest.Name);
writer.Write(m_DeleteTimer != null);
if (m_DeleteTimer != null)
writer.WriteDeltaTime(m_DeleteTime);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
if (reader.ReadBool())
m_DestinationString = reader.ReadString(); // NOTE: We cannot EDI.Find here, regions have not yet been loaded :-(
if (reader.ReadBool())
{
m_DeleteTime = reader.ReadDeltaTime();
m_DeleteTimer = new DeleteTimer(this, m_DeleteTime - DateTime.UtcNow);
m_DeleteTimer.Start();
}
}
public override bool CanBeRenamedBy(Mobile from)
{
return (from.AccessLevel >= AccessLevel.GameMaster);
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
EDI dest = GetDestination();
if (dest != null && from.Alive)
{
Mobile escorter = GetEscorter();
if (escorter == null || escorter == from)
list.Add(new AskDestinationEntry(this, from));
if (escorter == null)
list.Add(new AcceptEscortEntry(this, from));
else if (escorter == from)
list.Add(new AbandonEscortEntry(this, from));
}
base.AddCustomContextEntries(from, list);
}
public virtual string[] GetPossibleDestinations()
{
if (!Core.ML)
return m_TownNames;
else
return m_MLTownNames;
}
public virtual string PickRandomDestination()
{
if (Map.Felucca.Regions.Count == 0 || Map == null || Map == Map.Internal || Location == Point3D.Zero)
return null; // Not yet fully initialized
string[] possible = GetPossibleDestinations();
string picked = null;
while (picked == null)
{
picked = possible[Utility.Random(possible.Length)];
EDI test = EDI.Find(picked);
if (test != null && test.Contains(Location))
picked = null;
}
return picked;
}
public EDI GetDestination()
{
if (m_DestinationString == null && m_DeleteTimer == null)
m_DestinationString = PickRandomDestination();
if (m_Destination != null && m_Destination.Name == m_DestinationString)
return m_Destination;
if (Map.Felucca.Regions.Count > 0)
return (m_Destination = EDI.Find(m_DestinationString));
return (m_Destination = null);
}
protected override bool OnMove(Direction d)
{
if (!base.OnMove(d))
return false;
CheckAtDestination();
return true;
}
private class DeleteTimer : Timer
{
private readonly Mobile m_Mobile;
public DeleteTimer(Mobile m, TimeSpan delay)
: base(delay)
{
m_Mobile = m;
Priority = TimerPriority.OneSecond;
}
protected override void OnTick()
{
m_Mobile.Delete();
}
}
}
public class EscortDestinationInfo
{
private static Hashtable m_Table;
private readonly string m_Name;
private readonly Region m_Region;
//private Rectangle2D[] m_Bounds;
public EscortDestinationInfo(string name, Region region)
{
m_Name = name;
m_Region = region;
}
public string Name
{
get
{
return m_Name;
}
}
public Region Region
{
get
{
return m_Region;
}
}
public static void LoadTable()
{
ICollection list = Map.Felucca.Regions.Values;
if (list.Count == 0)
return;
m_Table = new Hashtable();
foreach (Region r in list)
{
if (r.Name == null)
continue;
if (r is Regions.DungeonRegion || r is Regions.TownRegion)
m_Table[r.Name] = new EscortDestinationInfo(r.Name, r);
}
}
public static EDI Find(string name)
{
if (m_Table == null)
LoadTable();
if (name == null || m_Table == null)
return null;
return (EscortDestinationInfo)m_Table[name];
}
/*public Rectangle2D[] Bounds
{
get{ return m_Bounds; }
}*/
public bool Contains(Point3D p)
{
return m_Region.Contains(p);
}
}
public class AskDestinationEntry : ContextMenuEntry
{
private readonly BaseEscortable m_Mobile;
private readonly Mobile m_From;
public AskDestinationEntry(BaseEscortable m, Mobile from)
: base(6100, 3)
{
m_Mobile = m;
m_From = from;
}
public override void OnClick()
{
m_Mobile.SayDestinationTo(m_From);
}
}
public class AcceptEscortEntry : ContextMenuEntry
{
private readonly BaseEscortable m_Mobile;
private readonly Mobile m_From;
public AcceptEscortEntry(BaseEscortable m, Mobile from)
: base(6101, 3)
{
m_Mobile = m;
m_From = from;
}
public override void OnClick()
{
m_Mobile.AcceptEscorter(m_From);
}
}
public class AbandonEscortEntry : ContextMenuEntry
{
private readonly BaseEscortable m_Mobile;
private readonly Mobile m_From;
public AbandonEscortEntry(BaseEscortable m, Mobile from)
: base(6102, 3)
{
m_Mobile = m;
m_From = from;
}
public override void OnClick()
{
m_Mobile.Delete(); // OSI just seems to delete instantly
}
}
}

View File

@@ -0,0 +1,100 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public abstract class BaseGuard : Mobile
{
public BaseGuard(Mobile target)
{
GuardImmune = true;
if (target != null)
{
Location = target.Location;
Map = target.Map;
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
}
}
public BaseGuard(Serial serial)
: base(serial)
{
}
public abstract Mobile Focus { get; set; }
public override bool CanBeHarmful(IDamageable target, bool message, bool ignoreOurBlessedness)
{
if (target is Mobile && ((Mobile)target).GuardImmune)
{
return false;
}
return base.CanBeHarmful(target, message, ignoreOurBlessedness);
}
public static void Spawn(Mobile caller, Mobile target)
{
Spawn(caller, target, 1, false);
}
public static void Spawn(Mobile caller, Mobile target, int amount, bool onlyAdditional)
{
if (target == null || target.Deleted || target.GuardImmune)
return;
IPooledEnumerable eable = target.GetMobilesInRange(15);
foreach (Mobile m in eable)
{
if (m is BaseGuard)
{
BaseGuard g = (BaseGuard)m;
if (g.Focus == null) // idling
{
g.Focus = target;
--amount;
}
else if (g.Focus == target && !onlyAdditional)
{
--amount;
}
}
}
eable.Free();
while (amount-- > 0)
caller.Region.MakeGuard(target);
}
public override bool OnBeforeDeath()
{
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
PlaySound(0x1FE);
Delete();
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();
}
}
}

View File

@@ -0,0 +1,217 @@
using System;
using System.Collections.Generic;
using Server.Items;
using Server.Network;
using Server.ContextMenus;
namespace Server.Mobiles
{
public abstract class BaseGuildmaster : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
public BaseGuildmaster(string title)
: base(title)
{
this.Title = String.Format("the {0} {1}", title, this.Female ? "guildmistress" : "guildmaster");
}
public BaseGuildmaster(Serial serial)
: base(serial)
{
}
public override bool IsActiveVendor
{
get
{
return false;
}
}
public override bool ClickTitle
{
get
{
return false;
}
}
public virtual int JoinCost
{
get
{
return 500;
}
}
public virtual TimeSpan JoinAge
{
get
{
return TimeSpan.FromDays(0.0);
}
}
public virtual TimeSpan JoinGameAge
{
get
{
return TimeSpan.FromDays(2.0);
}
}
public virtual TimeSpan QuitAge
{
get
{
return TimeSpan.FromDays(7.0);
}
}
public virtual TimeSpan QuitGameAge
{
get
{
return TimeSpan.FromDays(4.0);
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public virtual bool CheckCustomReqs(PlayerMobile pm)
{
return true;
}
public virtual void SayGuildTo(Mobile m)
{
this.SayTo(m, 1008055 + (int)this.NpcGuild);
}
public virtual void SayWelcomeTo(Mobile m)
{
this.SayTo(m, 1008054); // Welcome to the guild! Thou shalt find that fellow members shall grant thee lower prices in shops.
}
public virtual void SayPriceTo(Mobile m)
{
m.Send(new MessageLocalizedAffix(m.NetState, this.Serial, this.Body, MessageType.Regular, this.SpeechHue, 3, 1008052, this.Name, AffixType.Append, this.JoinCost.ToString(), ""));
}
public virtual bool WasNamed(string speech)
{
string name = this.Name;
return (name != null && Insensitive.StartsWith(speech, name));
}
public override bool HandlesOnSpeech(Mobile from)
{
if (from.InRange(this.Location, 2))
return true;
return base.HandlesOnSpeech(from);
}
public override void OnSpeech(SpeechEventArgs e)
{
Mobile from = e.Mobile;
if (!e.Handled && from is PlayerMobile && from.InRange(this.Location, 2) && this.WasNamed(e.Speech))
{
PlayerMobile pm = (PlayerMobile)from;
if (e.HasKeyword(0x0004)) // *join* | *member*
{
if (pm.NpcGuild == this.NpcGuild)
this.SayTo(from, 501047); // Thou art already a member of our guild.
else if (pm.NpcGuild != NpcGuild.None)
this.SayTo(from, 501046); // Thou must resign from thy other guild first.
else if (pm.GameTime < this.JoinGameAge || (pm.CreationTime + this.JoinAge) > DateTime.UtcNow)
this.SayTo(from, 501048); // You are too young to join my guild...
else if (this.CheckCustomReqs(pm))
this.SayPriceTo(from);
e.Handled = true;
}
else if (e.HasKeyword(0x0005)) // *resign* | *quit*
{
if (pm.NpcGuild != this.NpcGuild)
{
this.SayTo(from, 501052); // Thou dost not belong to my guild!
}
else if ((pm.NpcGuildJoinTime + this.QuitAge) > DateTime.UtcNow || (pm.NpcGuildGameTime + this.QuitGameAge) > pm.GameTime)
{
this.SayTo(from, 501053); // You just joined my guild! You must wait a week to resign.
}
else
{
this.SayTo(from, 501054); // I accept thy resignation.
pm.NpcGuild = NpcGuild.None;
}
e.Handled = true;
}
}
base.OnSpeech(e);
}
public override bool OnGoldGiven(Mobile from, Gold dropped)
{
if (from is PlayerMobile && dropped.Amount == this.JoinCost)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.NpcGuild == this.NpcGuild)
{
this.SayTo(from, 501047); // Thou art already a member of our guild.
}
else if (pm.NpcGuild != NpcGuild.None)
{
this.SayTo(from, 501046); // Thou must resign from thy other guild first.
}
else if (pm.GameTime < this.JoinGameAge || (pm.CreationTime + this.JoinAge) > DateTime.UtcNow)
{
this.SayTo(from, 501048); // You are too young to join my guild...
}
else if (this.CheckCustomReqs(pm))
{
this.SayWelcomeTo(from);
pm.NpcGuild = this.NpcGuild;
pm.NpcGuildJoinTime = DateTime.UtcNow;
pm.NpcGuildGameTime = pm.GameTime;
dropped.Delete();
return true;
}
return false;
}
return base.OnGoldGiven(from, dropped);
}
public override void AddCustomContextEntries(Mobile from, List<ContextMenuEntry> list)
{
base.AddCustomContextEntries(from, list);
}
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();
}
}
}

View File

@@ -0,0 +1,190 @@
using System;
using System.Collections.Generic;
using Server.Gumps;
using Server.Items;
namespace Server.Mobiles
{
public abstract class BaseHealer : BaseVendor
{
private static readonly TimeSpan ResurrectDelay = TimeSpan.FromSeconds(2.0);
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
private DateTime m_NextResurrect;
public BaseHealer()
: base(null)
{
if (!this.IsInvulnerable)
{
this.AI = AIType.AI_Mage;
this.ActiveSpeed = 0.2;
this.PassiveSpeed = 0.8;
this.RangePerception = BaseCreature.DefaultRangePerception;
this.FightMode = FightMode.Aggressor;
}
this.SpeechHue = 0;
this.SetStr(304, 400);
this.SetDex(102, 150);
this.SetInt(204, 300);
this.SetDamage(10, 23);
this.SetDamageType(ResistanceType.Physical, 100);
this.SetResistance(ResistanceType.Physical, 40, 50);
this.SetResistance(ResistanceType.Fire, 40, 50);
this.SetResistance(ResistanceType.Cold, 40, 50);
this.SetResistance(ResistanceType.Poison, 40, 50);
this.SetResistance(ResistanceType.Energy, 40, 50);
this.SetSkill(SkillName.Anatomy, 75.0, 97.5);
this.SetSkill(SkillName.EvalInt, 82.0, 100.0);
this.SetSkill(SkillName.Healing, 75.0, 97.5);
this.SetSkill(SkillName.Magery, 82.0, 100.0);
this.SetSkill(SkillName.MagicResist, 82.0, 100.0);
this.SetSkill(SkillName.Tactics, 82.0, 100.0);
this.Fame = 1000;
this.Karma = 10000;
this.PackItem(new Bandage(Utility.RandomMinMax(5, 10)));
this.PackItem(new HealPotion());
this.PackItem(new CurePotion());
}
public BaseHealer(Serial serial)
: base(serial)
{
}
public override bool IsActiveVendor
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return false;
}
}
public override VendorShoeType ShoeType
{
get
{
return VendorShoeType.Sandals;
}
}
public virtual bool HealsYoungPlayers
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public virtual int GetRobeColor()
{
return Utility.RandomYellowHue();
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Robe(this.GetRobeColor()));
}
public virtual bool CheckResurrect(Mobile m)
{
return true;
}
public virtual void OfferResurrection(Mobile m)
{
this.Direction = this.GetDirectionTo(m);
m.PlaySound(0x1F2);
m.FixedEffect(0x376A, 10, 16);
m.CloseGump(typeof(ResurrectGump));
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
}
public virtual void OfferHeal(PlayerMobile m)
{
this.Direction = this.GetDirectionTo(m);
if (m.CheckYoungHealTime())
{
this.Say(501229); // You look like you need some healing my child.
m.PlaySound(0x1F2);
m.FixedEffect(0x376A, 9, 32);
m.Hits = m.HitsMax;
}
else
{
this.Say(501228); // I can do no more for you at this time.
}
}
public override void OnMovement(Mobile m, Point3D oldLocation)
{
if (!m.Frozen && DateTime.UtcNow >= this.m_NextResurrect && this.InRange(m, 2) && !this.InRange(oldLocation, 2) && this.InLOS(m))
{
if (!m.Alive)
{
this.m_NextResurrect = DateTime.UtcNow + ResurrectDelay;
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
{
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
}
else if (this.CheckResurrect(m))
{
this.OfferResurrection(m);
}
}
else if (this.HealsYoungPlayers && m.Hits < m.HitsMax && m is PlayerMobile && ((PlayerMobile)m).Young)
{
this.OfferHeal((PlayerMobile)m);
}
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
if (!this.IsInvulnerable)
{
this.AI = AIType.AI_Mage;
this.ActiveSpeed = 0.2;
this.PassiveSpeed = 0.8;
this.RangePerception = BaseCreature.DefaultRangePerception;
this.FightMode = FightMode.Aggressor;
}
}
}
}

View File

@@ -0,0 +1,345 @@
using System;
using System.Collections;
using System.Collections.Generic;
using Server.ContextMenus;
using Server.Items;
namespace Server.Mobiles
{
public class BaseHire : BaseCreature
{
private int m_Pay = 1;
private bool m_IsHired;
private int m_HoldGold = 8;
private Timer m_PayTimer;
public override bool IsBondable { get { return false; } }
public override bool CanAutoStable { get { return false; } }
public override bool CanDetectHidden { get { return false; } }
public BaseHire(AIType AI)
: base(AI, FightMode.Aggressor, 10, 1, 0.1, 4.0)
{
ControlSlots = 2;
}
public BaseHire()
: base(AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.1, 4.0)
{
ControlSlots = 2;
}
public BaseHire(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);// version
writer.Write((bool)m_IsHired);
writer.Write((int)m_HoldGold);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_IsHired = reader.ReadBool();
m_HoldGold = reader.ReadInt();
m_PayTimer = new PayTimer(this);
m_PayTimer.Start();
}
public override bool KeepsItemsOnDeath
{
get
{
return true;
}
}
private int m_GoldOnDeath = 0;
public override bool OnBeforeDeath()
{
// Stop the pay timer if its running
if (m_PayTimer != null)
m_PayTimer.Stop();
m_PayTimer = null;
// Get all of the gold on the hireling and add up the total amount
if (Backpack != null)
{
Item[] AllGold = Backpack.FindItemsByType(typeof(Gold), true);
if (AllGold != null)
{
foreach (Gold g in AllGold)
m_GoldOnDeath += g.Amount;
}
}
return base.OnBeforeDeath();
}
public override void OnDeath(Container c)
{
if (m_GoldOnDeath > 0)
c.DropItem(new Gold(m_GoldOnDeath));
base.OnDeath(c);
}
[CommandProperty(AccessLevel.Player)]
public bool IsHired
{
get
{
return m_IsHired;
}
set
{
if (m_IsHired == value)
return;
m_IsHired = value;
Delta(MobileDelta.Noto);
InvalidateProperties();
}
}
#region [ GetOwner ]
public virtual Mobile GetOwner()
{
if (!Controlled)
return null;
Mobile Owner = ControlMaster;
m_IsHired = true;
if (Owner == null)
return null;
if (Owner.Deleted)
{
this.Say(1005653, 0x3B2);// Hmmm. I seem to have lost my master.
SetControlMaster(null);
return null;
}
return Owner;
}
#endregion
#region [ AddHire ]
public virtual bool AddHire(Mobile m)
{
Mobile owner = GetOwner();
if (owner != null)
{
m.SendLocalizedMessage(1043283, owner.Name);// I am following ~1_NAME~.
return false;
}
if (SetControlMaster(m))
{
m_IsHired = true;
return true;
}
return false;
}
#endregion
#region [ Payday ]
public virtual bool Payday(BaseHire m)
{
m_Pay = (int)m.Skills[SkillName.Anatomy].Value + (int)m.Skills[SkillName.Tactics].Value;
m_Pay += (int)m.Skills[SkillName.Macing].Value + (int)m.Skills[SkillName.Swords].Value;
m_Pay += (int)m.Skills[SkillName.Fencing].Value + (int)m.Skills[SkillName.Archery].Value;
m_Pay += (int)m.Skills[SkillName.MagicResist].Value + (int)m.Skills[SkillName.Healing].Value;
m_Pay += (int)m.Skills[SkillName.Magery].Value + (int)m.Skills[SkillName.Parry].Value;
m_Pay /= 35;
m_Pay += 1;
return true;
}
#endregion
#region [ OnDragDrop ]
public override bool OnDragDrop(Mobile from, Item item)
{
if (m_Pay != 0)
{
// Is the creature already hired
if (Controlled == false)
{
// Is the item the payment in gold
if (item is Gold)
{
// Is the payment in gold sufficient
if (item.Amount >= m_Pay)
{
if (from.Followers + ControlSlots > from.FollowersMax)
{
this.SayTo(from, 500896, 0x3B2); // I see you already have an escort.
return false;
}
// Try to add the hireling as a follower
if (AddHire(from) == true)
{
this.SayTo(from, 1043258, string.Format("{0}", (int)item.Amount / m_Pay), 0x3B2);//"I thank thee for paying me. I will work for thee for ~1_NUMBER~ days.", (int)item.Amount / m_Pay );
m_HoldGold += item.Amount;
m_PayTimer = new PayTimer(this);
m_PayTimer.Start();
return true;
}
else
{
return false;
}
}
else
{
SayHireCost();
}
}
else
{
this.SayTo(from, 1043268, 0x3B2);// Tis crass of me, but I want gold
}
}
else
{
this.SayTo(from, 1042495, 0x3B2);// I have already been hired.
}
}
else
{
this.SayTo(from, 500200, 0x3B2);// I have no need for that.
}
return base.OnDragDrop(from, item);
}
#endregion
#region [ OnSpeech ]
internal void SayHireCost()
{
this.Say(1043256, string.Format("{0}", m_Pay), 0x3B2);// "I am available for hire for ~1_AMOUNT~ gold coins a day. If thou dost give me gold, I will work for thee."
}
public override void OnSpeech(SpeechEventArgs e)
{
if (!e.Handled && e.Mobile.InRange(this, 6))
{
int[] keywords = e.Keywords;
string speech = e.Speech;
// Check for a greeting, a 'hire', or a 'servant'
if ((e.HasKeyword(0x003B) == true) || (e.HasKeyword(0x0162) == true) || (e.HasKeyword(0x000C) == true))
{
if (Controlled == false)
{
e.Handled = Payday(this);
SayHireCost();
}
else
{
this.Say(1042495, 0x3B2);// I have already been hired.
}
}
}
base.OnSpeech(e);
}
#endregion
#region [ GetContextMenuEntries ]
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
if (Deleted)
return;
if (!Controlled)
{
if (CanPaperdollBeOpenedBy(from))
list.Add(new PaperdollEntry(this));
list.Add(new HireEntry(from, this));
}
else
{
base.GetContextMenuEntries(from, list);
}
}
#endregion
#region [ Class PayTimer ]
private class PayTimer : Timer
{
private readonly BaseHire m_Hire;
public PayTimer(BaseHire vend)
: base(TimeSpan.FromMinutes(30.0), TimeSpan.FromMinutes(30.0))
{
m_Hire = vend;
Priority = TimerPriority.OneMinute;
}
protected override void OnTick()
{
int m_Pay = m_Hire.m_Pay;
if (m_Hire.m_HoldGold <= m_Pay)
{
// Get the current owner, if any (updates HireTable)
Mobile owner = m_Hire.GetOwner();
m_Hire.Say(503235, 0x3B2);// I regret nothing!postal
m_Hire.Delete();
}
else
{
m_Hire.m_HoldGold -= m_Pay;
}
}
}
#endregion
#region [ Class HireEntry ]
public class HireEntry : ContextMenuEntry
{
private readonly Mobile m_Mobile;
private readonly BaseHire m_Hire;
public HireEntry(Mobile from, BaseHire hire)
: base(6120, 3)
{
m_Hire = hire;
m_Mobile = from;
}
public override void OnClick()
{
m_Hire.Payday(m_Hire);
m_Hire.SayHireCost();
}
}
#endregion
}
}

View File

@@ -0,0 +1,164 @@
using System;
using Server.Guilds;
using Server.Items;
namespace Server.Mobiles
{
public abstract class BaseShieldGuard : BaseCreature
{
public BaseShieldGuard()
: base(AIType.AI_Melee, FightMode.Aggressor, 14, 1, 0.8, 1.6)
{
this.InitStats(1000, 1000, 1000);
this.Title = "the guard";
this.SpeechHue = Utility.RandomDyedHue();
this.Hue = Utility.RandomSkinHue();
if (this.Female = Utility.RandomBool())
{
this.Body = 0x191;
this.Name = NameList.RandomName("female");
this.AddItem(new FemalePlateChest());
this.AddItem(new PlateArms());
this.AddItem(new PlateLegs());
switch( Utility.Random(2) )
{
case 0:
this.AddItem(new Doublet(Utility.RandomNondyedHue()));
break;
case 1:
this.AddItem(new BodySash(Utility.RandomNondyedHue()));
break;
}
switch( Utility.Random(2) )
{
case 0:
this.AddItem(new Skirt(Utility.RandomNondyedHue()));
break;
case 1:
this.AddItem(new Kilt(Utility.RandomNondyedHue()));
break;
}
}
else
{
this.Body = 0x190;
this.Name = NameList.RandomName("male");
this.AddItem(new PlateChest());
this.AddItem(new PlateArms());
this.AddItem(new PlateLegs());
switch( Utility.Random(3) )
{
case 0:
this.AddItem(new Doublet(Utility.RandomNondyedHue()));
break;
case 1:
this.AddItem(new Tunic(Utility.RandomNondyedHue()));
break;
case 2:
this.AddItem(new BodySash(Utility.RandomNondyedHue()));
break;
}
}
Utility.AssignRandomHair(this);
if (Utility.RandomBool())
Utility.AssignRandomFacialHair(this, this.HairHue);
VikingSword weapon = new VikingSword();
weapon.Movable = false;
this.AddItem(weapon);
BaseShield shield = this.Shield;
shield.Movable = false;
this.AddItem(shield);
this.PackGold(250, 500);
this.Skills[SkillName.Anatomy].Base = 120.0;
this.Skills[SkillName.Tactics].Base = 120.0;
this.Skills[SkillName.Swords].Base = 120.0;
this.Skills[SkillName.MagicResist].Base = 120.0;
this.Skills[SkillName.DetectHidden].Base = 100.0;
}
public BaseShieldGuard(Serial serial)
: base(serial)
{
}
public abstract int Keyword { get; }
public abstract BaseShield Shield { get; }
public abstract int SignupNumber { get; }
public abstract GuildType Type { get; }
public override bool HandlesOnSpeech(Mobile from)
{
if (from.InRange(this.Location, 2))
return true;
return base.HandlesOnSpeech(from);
}
public override void OnSpeech(SpeechEventArgs e)
{
if (!e.Handled && e.HasKeyword(this.Keyword) && e.Mobile.InRange(this.Location, 2))
{
e.Handled = true;
Mobile from = e.Mobile;
Guild g = from.Guild as Guild;
if (g == null || g.Type != this.Type)
{
this.Say(this.SignupNumber);
}
else
{
Container pack = from.Backpack;
BaseShield shield = this.Shield;
Item twoHanded = from.FindItemOnLayer(Layer.TwoHanded);
if ((pack != null && pack.FindItemByType(shield.GetType()) != null) || (twoHanded != null && shield.GetType().IsAssignableFrom(twoHanded.GetType())))
{
this.Say(1007110); // Why dost thou ask about virtue guards when thou art one?
shield.Delete();
}
else if (from.PlaceInBackpack(shield))
{
this.Say(Utility.Random(1007101, 5));
this.Say(1007139); // I see you are in need of our shield, Here you go.
from.AddToBackpack(shield);
}
else
{
from.SendLocalizedMessage(502868); // Your backpack is too full.
shield.Delete();
}
}
}
base.OnSpeech(e);
}
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();
}
}
}

View File

@@ -0,0 +1,186 @@
using System;
using Server;
using Server.Items;
using Server.Gumps;
using Server.ContextMenus;
using Server.Network;
using System.Collections.Generic;
using System.Linq;
namespace Server.Mobiles
{
public abstract class BaseTurnInMobile : ShrineHealer
{
public override bool IsInvulnerable { get { return true; } }
public override bool DisallowAllMoves { get { return true; } }
public override bool ClickTitle { get { return true; } }
public override bool CanTeach { get { return false; } }
public virtual int TitleLocalization { get { return 0; } }
public virtual int CancelLocalization { get { return 0; } }
public virtual int TurnInLocalization { get { return 0; } }
public virtual int ClaimLocalization { get { return 1155593; } } // Claim Rewards
public virtual bool IsShrineHealer { get { return true; } }
public virtual int TurnInPoints { get { return 1; } }
public BaseTurnInMobile(string title)
{
Title = title;
}
public virtual IEnumerable<ItemTileButtonInfo> FindRedeemableItems(Mobile m)
{
if (m == null || m.Backpack == null)
yield break;
foreach (var item in m.Backpack.Items)
{
if (IsRedeemableItem(item))
yield return new ItemTileButtonInfo(item);
}
}
public abstract bool IsRedeemableItem(Item item);
public abstract void SendRewardGump(Mobile m);
public virtual void AwardPoints(PlayerMobile pm, Item item, int points)
{
}
public override void GetContextMenuEntries(Mobile from, List<ContextMenuEntry> list)
{
if (IsShrineHealer)
{
base.GetContextMenuEntries(from, list);
}
else
{
list.Add(new PaperdollEntry(this));
}
if (from is PlayerMobile)
{
if (TurnInLocalization > 0)
{
list.Add(new TurnInEntry(from, this));
}
list.Add(new ClaimEntry(from, this));
}
}
private class TurnInEntry : ContextMenuEntry
{
private Mobile m_Mobile;
private BaseTurnInMobile m_Vendor;
private IEnumerable<ItemTileButtonInfo> m_Buttons;
public TurnInEntry(Mobile mobile, BaseTurnInMobile vendor)
: base(vendor.TurnInLocalization, 2)
{
m_Mobile = mobile;
m_Vendor = vendor;
m_Buttons = m_Vendor.FindRedeemableItems(m_Mobile);
if (m_Buttons.Count() > 0)
Enabled = true;
else
Enabled = false;
}
public override void OnClick()
{
m_Mobile.SendGump(new TurnInGump(m_Vendor, m_Buttons));
}
public override void OnClickDisabled()
{
if (m_Vendor != null && m_Vendor.CancelLocalization > 0)
{
m_Vendor.LocalOverheadMessage(MessageType.Regular, 0x3B2, m_Vendor.CancelLocalization);
}
}
}
private class ClaimEntry : ContextMenuEntry
{
private Mobile m_Mobile;
private BaseTurnInMobile m_Vendor;
public ClaimEntry(Mobile mobile, BaseTurnInMobile vendor)
: base(vendor.ClaimLocalization, 2)
{
m_Mobile = mobile;
m_Vendor = vendor;
}
public override void OnClick()
{
if (m_Mobile.CheckAlive())
m_Vendor.SendRewardGump(m_Mobile);
}
}
public override void OnDoubleClick(Mobile from)
{
if (from is PlayerMobile && from.InRange(Location, 5))
SendRewardGump(from);
}
public BaseTurnInMobile(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 TurnInGump : BaseImageTileButtonsGump
{
private BaseTurnInMobile m_Collector;
public BaseTurnInMobile Collector { get { return m_Collector; } }
public TurnInGump(BaseTurnInMobile collector, IEnumerable<ItemTileButtonInfo> buttons)
: base(collector.TitleLocalization, buttons.ToArray())
{
m_Collector = collector;
}
public override void HandleButtonResponse(NetState sender, int adjustedButton, ImageTileButtonInfo buttonInfo)
{
PlayerMobile pm = sender.Mobile as PlayerMobile;
Item item = ((ItemTileButtonInfo)buttonInfo).Item;
if (!(pm != null && item.IsChildOf(pm.Backpack) && pm.InRange(this.m_Collector.Location, 7)))
return;
m_Collector.AwardPoints(pm, item, m_Collector.TurnInPoints);
item.Delete();
IEnumerable<ItemTileButtonInfo> buttons = m_Collector.FindRedeemableItems(pm);
if (buttons != null && buttons.Count() > 0)
pm.SendGump(new TurnInGump(m_Collector, buttons));
}
public override void HandleCancel(NetState sender)
{
m_Collector.LocalOverheadMessage(MessageType.Regular, 0x3B2, m_Collector.CancelLocalization);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,53 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Beekeeper : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Beekeeper()
: base("the beekeeper")
{
}
public Beekeeper(Serial serial)
: base(serial)
{
}
public override VendorShoeType ShoeType
{
get
{
return VendorShoeType.Boots;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBBeekeeper());
}
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();
}
}
}

View File

@@ -0,0 +1,62 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Belulah : MondainQuester
{
[Constructable]
public Belulah()
: base("Belulah", "The Scorned")
{
}
public Belulah(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(AllSeasonAdventurerQuest)
};
}
}
public override void InitBody()
{
this.Female = true;
this.Race = Race.Human;
this.Hue = 0x83F7;
this.HairItemID = 0x2046;
this.HairHue = 0x463;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Boots());
this.AddItem(new LongPants(0x6C7));
this.AddItem(new FancyShirt(0x6BB));
this.AddItem(new Cloak(0x59));
}
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();
}
}
}

View File

@@ -0,0 +1,62 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Ben : MondainQuester
{
[Constructable]
public Ben()
: base("Ben", "the apprentice necromancer")
{
}
public Ben(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(GhostOfCovetousQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Hue = 0x83FD;
this.HairItemID = 0x2048;
this.HairHue = 0x463;
this.FacialHairItemID = 0x204C;
this.FacialHairHue = 0x463;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Shoes(0x901));
this.AddItem(new LongPants(0x1BB));
this.AddItem(new FancyShirt(0x756));
}
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();
}
}
}

View File

@@ -0,0 +1,68 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Beninort : MondainQuester
{
[Constructable]
public Beninort()
: base("Beninort", "the Artificer")
{
SetSkill(SkillName.ItemID, 60.0, 83.0);
SetSkill(SkillName.Imbuing, 60.0, 83.0);
}
public Beninort(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(SecretsoftheSoulforge)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
CantWalk = true;
Race = Race.Gargoyle;
Hue = 0x86E8;
HairItemID = 0x4258;
HairHue = 0x31D;
}
public override void InitOutfit()
{
AddItem(new SerpentStoneStaff());
AddItem(new GargishClothChest(1609));
AddItem(new GargishClothArms(1651));
AddItem(new GargishClothKilt(1649));
}
public override void Advertise()
{
Say(1112521); // Know the secrets. Learn of the soulforge.
}
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();
}
}
}

View File

@@ -0,0 +1,408 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class BrokenShaftQuest : BaseQuest
{
public BrokenShaftQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Arrow), "arrows", 10, 0xF3F));
this.AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Broken Shaft */
public override object Title
{
get
{
return 1074018;
}
}
/* What do humans know of archery? Humans can barely shoot straight. Why, your efforts are
absurd. In fact, I will make a wager - if these so called human arrows I've heard about are
really as effective and innovative as human braggarts would have me believe, then I'll trade
you something useful. I might even teach you something of elven craftsmanship. */
public override object Description
{
get
{
return 1074112;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Hurry up! I don't have all day to wait for you to bring what I desire! */
public override object Uncomplete
{
get
{
return 1074064;
}
}
/* These human made goods are laughable! It offends so -- I must show you what elven skill is capable of! */
public override object Complete
{
get
{
return 1074065;
}
}
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 BendingTheBowQuest : BaseQuest
{
public BendingTheBowQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Bow), "bows", 10, 0x13B2));
this.AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Bending the Bow */
public override object Title
{
get
{
return 1074019;
}
}
/* Human craftsmanship! Ha! Why, take an elven bow. It will last for a lifetime, never break and
always shoot an arrow straight and true. Can't say the same for a human, can you? Bring me some
of these human made bows, and I will show you. */
public override object Description
{
get
{
return 1074113;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Hurry up! I don't have all day to wait for you to bring what I desire! */
public override object Uncomplete
{
get
{
return 1074064;
}
}
/* These human made goods are laughable! It offends so -- I must show you what elven skill is capable of! */
public override object Complete
{
get
{
return 1074065;
}
}
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 ArmsRaceQuest : BaseQuest
{
public ArmsRaceQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(Crossbow), "crossbows", 10, 0xF50));
this.AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Arms Race */
public override object Title
{
get
{
return 1074020;
}
}
/* Leave it to a human to try and improve upon perfection. To take a bow and turn it into a mechanical
contraption like a crossbow. I wish to see more of this sort of "invention". Fetch for me a crossbow,
human. */
public override object Description
{
get
{
return 1074114;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Hurry up! I don't have all day to wait for you to bring what I desire! */
public override object Uncomplete
{
get
{
return 1074064;
}
}
/* These human made goods are laughable! It offends so -- I must show you what elven skill is capable of! */
public override object Complete
{
get
{
return 1074065;
}
}
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 ImprovedCrossbowsQuest : BaseQuest
{
public ImprovedCrossbowsQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(HeavyCrossbow), "heavy crossbows", 10, 0x13FD));
this.AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Improved Crossbows */
public override object Title
{
get
{
return 1074021;
}
}
/* How lazy is man! You cannot even be bothered to pull your own drawstring and hold an arrow ready? You
must invent a device to do it for you? I cannot understand, but perhaps if I examine a heavy crossbow for
myself, I will see their appeal. Go and bring me such a device and I will repay your meager favor. */
public override object Description
{
get
{
return 1074115;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Hurry up! I don't have all day to wait for you to bring what I desire! */
public override object Uncomplete
{
get
{
return 1074064;
}
}
/* These human made goods are laughable! It offends so -- I must show you what elven skill is capable of! */
public override object Complete
{
get
{
return 1074065;
}
}
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 BuildingTheBetterCrossbowQuest : BaseQuest
{
public BuildingTheBetterCrossbowQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(RepeatingCrossbow), "repeating crossbow", 10, 0x26C3));
this.AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Building the Better Crossbow */
public override object Title
{
get
{
return 1074022;
}
}
/* More is always better for a human, eh? Take these repeating crossbows. What sort of mind invents such a thing?
I must look at it more closely. Bring such a contraption to me and you'll receive a token for your efforts. */
public override object Description
{
get
{
return 1074116;
}
}
/* Fine then, I'm shall find another to run my errands then. */
public override object Refuse
{
get
{
return 1074063;
}
}
/* Hurry up! I don't have all day to wait for you to bring what I desire! */
public override object Uncomplete
{
get
{
return 1074064;
}
}
/* These human made goods are laughable! It offends so -- I must show you what elven skill is capable of! */
public override object Complete
{
get
{
return 1074065;
}
}
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 Beotham : MondainQuester
{
[Constructable]
public Beotham()
: base("Beotham", "the bowcrafter")
{
}
public Beotham(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(BrokenShaftQuest),
typeof(BendingTheBowQuest),
typeof(ArmsRaceQuest),
typeof(ImprovedCrossbowsQuest),
typeof(BuildingTheBetterCrossbowQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.CantWalk = true;
this.Race = Race.Elf;
this.Hue = 0x876C;
this.HairItemID = 0x2FC0;
this.HairHue = 0x238;
}
public override void InitOutfit()
{
this.AddItem(new Sandals(0x901));
this.AddItem(new LongPants(0x52C));
this.AddItem(new FancyShirt(0x546));
Item item;
item = new LeafGloves();
item.Hue = 0x901;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,120 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests.Hag
{
public class Blackheart : BaseQuester
{
[Constructable]
public Blackheart()
: base("the Drunken Pirate")
{
}
public Blackheart(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Hue = 0x83EF;
this.Female = false;
this.Body = 0x190;
this.Name = "Captain Blackheart";
}
public override void InitOutfit()
{
this.AddItem(new FancyShirt());
this.AddItem(new LongPants(0x66D));
this.AddItem(new ThighBoots());
this.AddItem(new TricorneHat(0x1));
this.AddItem(new BodySash(0x66D));
LeatherGloves gloves = new LeatherGloves();
gloves.Hue = 0x66D;
this.AddItem(gloves);
this.FacialHairItemID = 0x203E; // Long Beard
this.FacialHairHue = 0x455;
Item sword = new Cutlass();
sword.Movable = false;
this.AddItem(sword);
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
this.Direction = this.GetDirectionTo(player);
this.Animate(33, 20, 1, true, false, 0);
QuestSystem qs = player.Quest;
if (qs is WitchApprenticeQuest)
{
FindIngredientObjective obj = qs.FindObjective(typeof(FindIngredientObjective)) as FindIngredientObjective;
if (obj != null && !obj.Completed && obj.Ingredient == Ingredient.Whiskey)
{
this.PlaySound(Utility.RandomBool() ? 0x42E : 0x43F);
Item hat = player.FindItemOnLayer(Layer.Helm);
bool tricorne = hat is TricorneHat;
if (tricorne && player.BAC >= 20)
{
obj.Complete();
if (obj.BlackheartMet)
qs.AddConversation(new BlackheartPirateConversation(false));
else
qs.AddConversation(new BlackheartPirateConversation(true));
}
else if (!obj.BlackheartMet)
{
obj.Complete();
qs.AddConversation(new BlackheartFirstConversation());
}
else
{
qs.AddConversation(new BlackheartNoPirateConversation(tricorne, player.BAC > 0));
}
return;
}
}
this.PlaySound(0x42C);
this.SayTo(player, 1055041); // The drunken pirate shakes his fist at you and goes back to drinking.
}
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();
this.Heave();
}
private void Heave()
{
this.PublicOverheadMessage(Network.MessageType.Regular, 0x3B2, 500849); // *hic*
Timer.DelayCall(TimeSpan.FromSeconds(Utility.RandomMinMax(60, 180)), new TimerCallback(Heave));
}
}
}

View File

@@ -0,0 +1,172 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Blacksmith : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
protected override List<SBInfo> SBInfos
{
get
{
return m_SBInfos;
}
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.BlacksmithsGuild;
}
}
[Constructable]
public Blacksmith()
: base("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()
{
/*m_SBInfos.Add( new SBSmithTools() );
m_SBInfos.Add( new SBMetalShields() );
m_SBInfos.Add( new SBWoodenShields() );
m_SBInfos.Add( new SBPlateArmor() );
m_SBInfos.Add( new SBHelmetArmor() );
m_SBInfos.Add( new SBChainmailArmor() );
m_SBInfos.Add( new SBRingmailArmor() );
m_SBInfos.Add( new SBAxeWeapon() );
m_SBInfos.Add( new SBPoleArmWeapon() );
m_SBInfos.Add( new SBRangedWeapon() );
m_SBInfos.Add( new SBKnifeWeapon() );
m_SBInfos.Add( new SBMaceWeapon() );
m_SBInfos.Add( new SBSpearForkWeapon() );
m_SBInfos.Add( new SBSwordWeapon() );*/
if (!IsStygianVendor)
{
m_SBInfos.Add(new SBBlacksmith());
if (IsTokunoVendor)
{
m_SBInfos.Add(new SBSEArmor());
m_SBInfos.Add(new SBSEWeapons());
}
}
else
{
m_SBInfos.Add(new SBSABlacksmith());
m_SBInfos.Add(new SBSAArmor());
m_SBInfos.Add(new SBSAWeapons());
}
}
public override VendorShoeType ShoeType
{
get
{
return VendorShoeType.None;
}
}
public override void InitOutfit()
{
Item item = (Utility.RandomBool() ? null : new Server.Items.RingmailChest());
if (item != null && !EquipItem(item))
{
item.Delete();
item = null;
}
if (item == null)
AddItem(new Server.Items.FullApron());
AddItem(new Server.Items.Bascinet());
AddItem(new Server.Items.SmithHammer());
base.InitOutfit();
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Smith; } }
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
{
PlayerMobile pm = from as PlayerMobile;
if (pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
{
double theirSkill = pm.Skills[SkillName.Blacksmith].Base;
if (theirSkill >= 70.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
else if (theirSkill >= 50.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
else
pm.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
return new LargeSmithBOD();
return SmallSmithBOD.CreateRandomFor(from);
}
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallSmithBOD || item is LargeSmithBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return (from is PlayerMobile && from.Skills[SkillName.Blacksmith].Base > 0);
}
public override TimeSpan GetNextBulkOrder(Mobile from)
{
if (from is PlayerMobile)
return ((PlayerMobile)from).NextSmithBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (Core.SE && from is PlayerMobile)
((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
}
#endregion
public Blacksmith(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();
}
}
}

View File

@@ -0,0 +1,139 @@
using System;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class BlacksmithGuildmaster : BaseGuildmaster
{
[Constructable]
public BlacksmithGuildmaster()
: base("blacksmith")
{
SetSkill(SkillName.ArmsLore, 65.0, 88.0);
SetSkill(SkillName.Blacksmith, 90.0, 100.0);
SetSkill(SkillName.Macing, 36.0, 68.0);
SetSkill(SkillName.Parry, 36.0, 68.0);
}
public BlacksmithGuildmaster(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.BlacksmithsGuild;
}
}
public override bool IsActiveVendor
{
get
{
return true;
}
}
public override bool ClickTitle
{
get
{
return true;
}
}
public override VendorShoeType ShoeType
{
get
{
return VendorShoeType.ThighBoots;
}
}
public override void InitSBInfo()
{
SBInfos.Add(new SBBlacksmith());
}
public override void InitOutfit()
{
Item item = (Utility.RandomBool() ? null : new Server.Items.RingmailChest());
if (item != null && !EquipItem(item))
{
item.Delete();
item = null;
}
if (item == null)
AddItem(new Server.Items.FullApron());
AddItem(new Server.Items.Bascinet());
AddItem(new Server.Items.SmithHammer());
base.InitOutfit();
}
#region Bulk Orders
public override Item CreateBulkOrder(Mobile from, bool fromContextMenu)
{
PlayerMobile pm = from as PlayerMobile;
if (pm != null && pm.NextSmithBulkOrder == TimeSpan.Zero && (fromContextMenu || 0.2 > Utility.RandomDouble()))
{
double theirSkill = pm.Skills[SkillName.Blacksmith].Base;
if (theirSkill >= 70.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(6.0);
else if (theirSkill >= 50.1)
pm.NextSmithBulkOrder = TimeSpan.FromHours(2.0);
else
pm.NextSmithBulkOrder = TimeSpan.FromHours(1.0);
if (theirSkill >= 70.1 && ((theirSkill - 40.0) / 300.0) > Utility.RandomDouble())
return new LargeSmithBOD();
return SmallSmithBOD.CreateRandomFor(from);
}
return null;
}
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallSmithBOD || item is LargeSmithBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return (from is PlayerMobile && from.Skills[SkillName.Blacksmith].Base > 0);
}
public override TimeSpan GetNextBulkOrder(Mobile from)
{
if (from is PlayerMobile)
return ((PlayerMobile)from).NextSmithBulkOrder;
return TimeSpan.Zero;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (Core.SE && from is PlayerMobile)
((PlayerMobile)from).NextSmithBulkOrder = TimeSpan.Zero;
}
#endregion
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();
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using Server.Items;
namespace Server.Mobiles
{
public class Bolaevin : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Bolaevin()
: base("the arcanist")
{
this.Name = "Bolaevin";
}
public Bolaevin(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return false;
}
}
public override bool IsInvulnerable
{
get
{
return true;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x84DE;
this.HairItemID = 0x2FC0;
this.HairHue = 0x36;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x3B3));
this.AddItem(new RoyalCirclet());
this.AddItem(new LeafChest());
this.AddItem(new LeafArms());
Item item;
item = new LeafLegs();
item.Hue = 0x1BB;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,199 @@
using System;
using System.Collections.Generic;
using Server.Mobiles;
namespace Server.Items
{
public class Trades : BaseCollectionMobile
{
[Constructable]
public Trades()
: base("Bonnie", "the master of trades")
{
this.StartTier = 10000000;
this.DailyDecay = 100000;
this.DonationLabel = 1073438; // Trades Section Donation Representative.
}
public Trades(Serial serial)
: base(serial)
{
}
public override Collection CollectionID
{
get
{
return Collection.Trades;
}
}
public override int MaxTier
{
get
{
return 1;
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x83ED;
this.HairItemID = 0x203B;
this.HairHue = 0x479;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Boots());
this.AddItem(new HalfApron(0x65F));
this.AddItem(new Doublet(0x3B3));
this.AddItem(new Kilt(0x724));
this.AddItem(new LeatherDo());
this.AddItem(new LeatherHiroSode());
}
public override void Init()
{
base.Init();
this.Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(IronIngot), 0x1BF2, 1074904, 0x0, 1));
this.Donations.Add(new CollectionItem(typeof(DullCopperIngot), 0x1BF2, 1074916, 0x973, 2));
this.Donations.Add(new CollectionItem(typeof(ShadowIronIngot), 0x1BF2, 1074917, 0x966, 4));
this.Donations.Add(new CollectionItem(typeof(CopperIngot), 0x1BF2, 1074918, 0x96D, 8));
this.Donations.Add(new CollectionItem(typeof(BronzeIngot), 0x1BF2, 1074919, 0x972, 12));
this.Donations.Add(new CollectionItem(typeof(GoldIngot), 0x1BF2, 1074920, 0x8A5, 18));
this.Donations.Add(new CollectionItem(typeof(AgapiteIngot), 0x1BF2, 1074921, 0x979, 24));
this.Donations.Add(new CollectionItem(typeof(VeriteIngot), 0x1BF2, 1074922, 0x89F, 31));
this.Donations.Add(new CollectionItem(typeof(ValoriteIngot), 0x1BF2, 1074923, 0x8AB, 39));
this.Donations.Add(new CollectionItem(typeof(Leather), 0x1081, 1074929, 0x0, 2));
this.Donations.Add(new CollectionItem(typeof(SpinedLeather), 0x1081, 1074930, 0x8AC, 5));
this.Donations.Add(new CollectionItem(typeof(HornedLeather), 0x1081, 1074931, 0x845, 10));
this.Donations.Add(new CollectionItem(typeof(BarbedLeather), 0x1081, 1074932, 0x851, 15));
this.Donations.Add(new CollectionItem(typeof(Hides), 0x1079, 1074924, 0x0, 2));
this.Donations.Add(new CollectionItem(typeof(SpinedLeather), 0x1079, 1074925, 0x8AC, 5));
this.Donations.Add(new CollectionItem(typeof(HornedLeather), 0x1079, 1074926, 0x845, 10));
this.Donations.Add(new CollectionItem(typeof(BarbedLeather), 0x1079, 1074927, 0x851, 15));
int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor
hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
this.Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
this.Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
this.Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
this.Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
this.Rewards.Add(new CollectionItem(typeof(TradesGlasses), 0x2FB8, 1073362, 0x0, 800000.0));
}
public override bool CanDonate(PlayerMobile player)
{
bool can = player.LibraryFriend;
if (!can)
player.SendLocalizedMessage(1074273); // You must speak with Librarian Verity before you can donate to this collection.
return can;
}
public override void IncreaseTier()
{
base.IncreaseTier();
List<object> list = new List<object>();
Item c;
switch ( this.Tier )
{
case 1:
// dishing stump
c = new Static(0x1865);
c.MoveToWorld(new Point3D(1417, 1590, 30), this.Map);
list.Add(c);
// pickaxe
c = new Pickaxe();
c.MoveToWorld(new Point3D(1414, 1588, 47), this.Map);
c.Movable = false;
list.Add(c);
// sewing kit
c = new SewingKit();
c.MoveToWorld(new Point3D(1414, 1592, 42), this.Map);
c.Movable = false;
list.Add(c);
// empty tool box
c = new Static(0x1EB7);
c.MoveToWorld(new Point3D(1415, 1588, 47), this.Map);
list.Add(c);
// silver wire
c = new Static(0x1EB7);
c.Weight = 5.0;
c.MoveToWorld(new Point3D(1417, 1592, 46), this.Map);
list.Add(c);
// gold wire
c = new Static(0x1EB7);
c.Weight = 5.0;
c.MoveToWorld(new Point3D(1417, 1592, 47), this.Map);
list.Add(c);
// silver ingots
c = new Static(0x1BF6);
c.MoveToWorld(new Point3D(1416, 1592, 44), this.Map);
list.Add(c);
break;
}
if (list.Count > 0)
this.Tiers.Add(list);
}
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();
}
}
}

View File

@@ -0,0 +1,95 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
[TypeAlias("Server.Mobiles.Bower")]
public class Bowyer : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Bowyer()
: base("the bowyer")
{
this.SetSkill(SkillName.Fletching, 80.0, 100.0);
this.SetSkill(SkillName.Archery, 80.0, 100.0);
}
public Bowyer(Serial serial)
: base(serial)
{
}
public override VendorShoeType ShoeType
{
get
{
return this.Female ? VendorShoeType.ThighBoots : VendorShoeType.Boots;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override int GetShoeHue()
{
return 0;
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Server.Items.Bow());
this.AddItem(new Server.Items.LeatherGorget());
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBBowyer());
this.m_SBInfos.Add(new SBRangedWeapon());
if (this.IsTokunoVendor)
this.m_SBInfos.Add(new SBSEBowyer());
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Fletching; } }
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallFletchingBOD || item is LargeFletchingBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return BulkOrderSystem.NewSystemEnabled && from is PlayerMobile && from.Skills[SkillName.Fletching].Base > 0;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (from is PlayerMobile)
((PlayerMobile)from).NextFletchingBulkOrder = TimeSpan.Zero;
}
#endregion
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();
}
}
}

View File

@@ -0,0 +1,63 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Brae : MondainQuester
{
[Constructable]
public Brae()
: base("Elder Brae", "the wise")
{
}
public Brae(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(AllThatGlittersIsNotGoodQuest),
typeof(FiendishFriendsQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x80BF;
this.HairItemID = 0x2FC2;
this.HairHue = 0x8E;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x901));
this.AddItem(new GemmedCirclet());
this.AddItem(new FemaleElvenRobe(0x44));
}
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();
}
}
}

View File

@@ -0,0 +1,115 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class UnholyConstructQuest : BaseQuest
{
public UnholyConstructQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Golem), "golems", 10));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706)); // A large bag of treasure.
}
/* Unholy Construct */
public override object Title
{
get
{
return 1073666;
}
}
/* They're unholy, I say. Golems, a walking mockery of all life, born of
blackest magic. They're not truly alive, so destroying them isn't a crime,
it's a service. A service I will gladly pay for. */
public override object Description
{
get
{
return 1073705;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* The unholy brutes, the Golems, must be smited! */
public override object Uncomplete
{
get
{
return 1073746;
}
}
/* Reduced those Golems to component parts? Good, then -- you deserve this reward! */
public override object Complete
{
get
{
return 1073787;
}
}
}
public class Braen : MondainQuester
{
[Constructable]
public Braen()
: base("Braen", "the thaumaturgist")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Braen(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(UnholyConstructQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x876C;
this.HairItemID = 0x2FBF;
this.HairHue = 0x2C2;
}
public override void InitOutfit()
{
this.AddItem(new Sandals(0x722));
this.AddItem(RandomWand.CreateWand());
}
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();
}
}
}

View File

@@ -0,0 +1,73 @@
using System;
namespace Server.Engines.Quests
{
public class Bravehorn : BaseEscort
{
public override Type[] Quests { get { return new Type[] { typeof(DefendingTheHerdQuest) }; } }
[Constructable]
public Bravehorn()
: base()
{
Name = "Bravehorn";
}
public Bravehorn(Serial serial)
: base(serial)
{
}
public override void InitBody()
{
InitStats(100, 100, 25);
Blessed = false;
Female = false;
Body = 0xEA;
}
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();
}
}
}
namespace Server.Mobiles
{
public class BravehornsMate : Hind
{
[Constructable]
public BravehornsMate()
: base()
{
Name = "bravehorn's mate";
Tamable = false;
}
public BravehornsMate(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();
}
}
}

View File

@@ -0,0 +1,97 @@
using System;
using Server.Items;
namespace Server.Mobiles
{
public class BrideGroom : BaseEscortable
{
[Constructable]
public BrideGroom()
{
if (this.Female)
this.Title = "the bride";
else
this.Title = "the groom";
}
public BrideGroom(Serial serial)
: base(serial)
{
}
public override bool CanTeach
{
get
{
return true;
}
}
public override bool ClickTitle
{
get
{
return false;
}
}// Do not display 'the groom' when single-clicking
public override void InitOutfit()
{
if (this.Female)
this.AddItem(new FancyDress());
else
this.AddItem(new FancyShirt());
int lowHue = GetRandomHue();
this.AddItem(new LongPants(lowHue));
if (this.Female)
this.AddItem(new Shoes(lowHue));
else
this.AddItem(new Boots(lowHue));
if (Utility.RandomBool())
this.HairItemID = 0x203B;
else
this.HairItemID = 0x203C;
this.HairHue = this.Race.RandomHairHue();
this.PackGold(200, 250);
}
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 static int GetRandomHue()
{
switch ( Utility.Random(6) )
{
default:
case 0:
return 0;
case 1:
return Utility.RandomBlueHue();
case 2:
return Utility.RandomGreenHue();
case 3:
return Utility.RandomRedHue();
case 4:
return Utility.RandomYellowHue();
case 5:
return Utility.RandomNeutralHue();
}
}
}
}

View File

@@ -0,0 +1,692 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class EvilEyeQuest : BaseQuest
{
public EvilEyeQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Gazer), "gazers", 12));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Evil Eye */
public override object Title
{
get
{
return 1073084;
}
}
/* Kind traveler, hear my plea. You know of the evil orbs? The wrathful eyes? Some call
them gazers? They must be a nest nearby, for they are tormenting us poor folk. We need
to drive back their numbers. But we are not strong enough to face such horrors ourselves,
we need a true hero. */
public override object Description
{
get
{
return 1073574;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Have you annihilated a dozen Gazers yet, kind traveler? */
public override object Uncomplete
{
get
{
return 1073594;
}
}
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 ImpishDelightsQuest : BaseQuest
{
public ImpishDelightsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Imp), "imps", 12));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Impish Delights */
public override object Title
{
get
{
return 1073077;
}
}
/* Imps! Do you hear me? Imps! They're everywhere! They're in everything! Oh, don't be fooled
by their size - they vicious little devils! Half-sized evil incarnate, they are! Somebody
needs to send them back to where they came from, if you know what I mean. */
public override object Description
{
get
{
return 1073567;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Don't let the little devils scare you! You kill 12 imps - then we'll talk reward. */
public override object Uncomplete
{
get
{
return 1073587;
}
}
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 StirringTheNestQuest : BaseQuest
{
public StirringTheNestQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(RedSolenQueen), "red solen queens", 3));
this.AddObjective(new SlayObjective(typeof(BlackSolenQueen), "black solen queens", 3));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Stirring the Nest */
public override object Title
{
get
{
return 1073087;
}
}
/* Were you the sort of child that enjoyed knocking over anthills? Well, perhaps you'd like
to try something a little bigger? There's a Solen nest nearby and I bet if you killed a queen
or two, it would be quite the sight to behold. I'd even pay to see that - what do you say? */
public override object Description
{
get
{
return 1073577;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Dead Solen Queens isn't too much to ask, is it? */
public override object Uncomplete
{
get
{
return 1073597;
}
}
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 UndeadMagesQuest : BaseQuest
{
public UndeadMagesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(BoneMagi), "bone mages", 10));
this.AddObjective(new SlayObjective(typeof(SkeletalMage), "skeletal mages", 10));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Undead Mages */
public override object Title
{
get
{
return 1073080;
}
}
/* Why must the dead plague the living? With their foul necromancy and dark sorceries, the undead
menace the countryside. I fear what will happen if no one is strong enough to face these nightmare
sorcerers and thin their numbers. */
public override object Description
{
get
{
return 1073570;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Surely, a brave soul like yourself can kill 10 Bone Magi and Skeletal Mages? */
public override object Uncomplete
{
get
{
return 1073590;
}
}
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 TheAfterlifeQuest : BaseQuest
{
public TheAfterlifeQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Mummy), "mummies", 15));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* The Afterlife */
public override object Title
{
get
{
return 1073073;
}
}
/* Nobody told me about the Mummy's Curse. How was I supposed to know you shouldn't disturb the tombs?
Oh, sure, now all I hear about is the curse of the vengeful dead. I'll tell you what - make a few of
these mummies go away and we'll keep this between you and me. */
public override object Description
{
get
{
return 1073563;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Uh, I don't think you're quite done killing Mummies yet. */
public override object Uncomplete
{
get
{
return 1073583;
}
}
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 FriendlyNeighborhoodSpiderkillerQuest : BaseQuest
{
public FriendlyNeighborhoodSpiderkillerQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(DreadSpider), "dread spiders", 8));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/* Friendly Neighborhood Spider-killer */
public override object Title
{
get
{
return 1073662;
}
}
/* They aren't called Dread Spiders because they're fluffy and cuddly now, are they? No, there's nothing
appealing about those wretches so I sure wouldn't lose any sleep if you were to exterminate a few. I'd
even part with a generous amount of gold, I would. */
public override object Description
{
get
{
return 1073701;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* Dread Spiders? I say keep exterminating the arachnid vermin. */
public override object Uncomplete
{
get
{
return 1073742;
}
}
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 GargoylesWrathQuest : BaseQuest
{
public GargoylesWrathQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(GargoyleEnforcer), "gargoyle enforcers", 6));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/* Gargoyle's Wrath */
public override object Title
{
get
{
return 1073658;
}
}
/* It is regretable that the Gargoyles insist upon warring with us. Their Enforcers attack men on sight, despite
all efforts at reason. To help maintain order in this region, I have been authorized to encourage bounty hunters
to reduce their numbers. Eradicate their number and I will reward you handsomely. */
public override object Description
{
get
{
return 1073697;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* I won't be able to pay you until you've gotten enough Gargoyle Enforcers. */
public override object Uncomplete
{
get
{
return 1073738;
}
}
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 ThreeWishesQuest : BaseQuest
{
public ThreeWishesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Efreet), "efreets", 8));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/* Three Wishes */
public override object Title
{
get
{
return 1073660;
}
}
/* If I had but one wish, it would be to rid myself of these dread Efreet! Fire and ash, they are cunning and
deadly! You look a brave soul - would you be interested in earning a rich reward for slaughtering a few of the
smoky devils? */
public override object Description
{
get
{
return 1073699;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* Those smoky devils, the Efreets, are still about. */
public override object Uncomplete
{
get
{
return 1073740;
}
}
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 ForkedTongueQuest : BaseQuest
{
public ForkedTongueQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(OphidianKnight), "ophidian knight-errants", 10));
this.AddObjective(new SlayObjective(typeof(OphidianMage), "ophidian mages", 10));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Forked Tongue */
public override object Title
{
get
{
return 1073655;
}
}
/* I must implore you, brave traveler, to do battle with the vile reptiles which haunt these parts. Those hideous
abominations, the Ophidians, are a blight across the land. If you were able to put down a host of the scaly
warriors, the Knights or the Avengers, I would forever be in your debt. */
public override object Description
{
get
{
return 1073694;
}
}
/* Perhaps you'll change your mind and return at some point. */
public override object Refuse
{
get
{
return 1073733;
}
}
/* Have you killed the Ophidian Knights or Avengers? */
public override object Uncomplete
{
get
{
return 1073735;
}
}
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 MongbatMenaceQuest : BaseQuest
{
public MongbatMenaceQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Mongbat), "mongbats", 10));
this.AddObjective(new SlayObjective(typeof(GreaterMongbat), "greater mongbats", 4));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Mongbat Menace! */
public override object Title
{
get
{
return 1073003;
}
}
/* I imagine you don't know about the mongbats. Well, you may think you do, but I know more than just about anyone.
You see they come in two varieties ... the stronger and the weaker. Either way, they're a menace. Exterminate ten
of the weaker ones and four of the stronger and I'll pay you an honest wage. */
public override object Description
{
get
{
return 1073033;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 Brinnae : MondainQuester
{
[Constructable]
public Brinnae()
: base("Brinnae", "the wise")
{
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Brinnae(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(EvilEyeQuest),
typeof(ImpishDelightsQuest),
typeof(StirringTheNestQuest),
typeof(UndeadMagesQuest),
typeof(TheAfterlifeQuest),
typeof(FriendlyNeighborhoodSpiderkillerQuest),
typeof(GargoylesWrathQuest),
typeof(ThreeWishesQuest),
typeof(ForkedTongueQuest),
typeof(CircleOfLifeQuest),
typeof(MongbatMenaceQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x8382;
this.HairItemID = 0x2FD0;
this.HairHue = 0x852;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x1BB));
this.AddItem(new LeafArms());
this.AddItem(new FemaleLeafChest());
this.AddItem(new HidePants());
this.AddItem(new ElvenCompositeLongbow());
}
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();
}
}
}

View File

@@ -0,0 +1,61 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Broolol : MondainQuester
{
[Constructable]
public Broolol()
: base("Lorekeeper Broolol", "the keeper of tradition")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Broolol(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[] { typeof(TheAncientWorldQuest) };
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x851D;
this.HairItemID = 0x2FCF;
this.HairHue = 0x323;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x71B));
this.AddItem(new MaleElvenRobe(0x1C));
this.AddItem(new WildStaff());
}
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();
}
}
}

View File

@@ -0,0 +1,55 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Butcher : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Butcher()
: base("the butcher")
{
this.SetSkill(SkillName.Anatomy, 45.0, 68.0);
}
public Butcher(Serial serial)
: base(serial)
{
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBButcher());
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Server.Items.HalfApron());
this.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();
}
}
}

View File

@@ -0,0 +1,246 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class WarriorCasteQuest : BaseQuest
{
public WarriorCasteQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(TerathanWarrior), "terathan warriors", 10));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Warrior Caste */
public override object Title
{
get
{
return 1073078;
}
}
/* The Terathan are an aggressive species. Left unchecked, they will swarm across our lands.
And where will that leave us? Compost in the hive, that's what! Stop them, stop them cold my
friend. Kill their warriors and you'll check their movement, that is certain. */
public override object Description
{
get
{
return 1073568;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Unless you kill at least 10 Terathan Warriors, you won't have any impact on their hive. */
public override object Uncomplete
{
get
{
return 1073588;
}
}
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 BigWormsQuest : BaseQuest
{
public BigWormsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(IceSerpent), "giant ice serpents", 10));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Big Worms */
public override object Title
{
get
{
return 1073088;
}
}
/* It makes no sense! Cold blooded serpents cannot live in the ice! It's a biological impossibility!
They are an abomination against reason! Please, I beg you - kill them! Make them disappear for me! Do
this and I will reward you. */
public override object Description
{
get
{
return 1073578;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* You wouldn't try and just pretend you murdered 10 Giant Ice Worms, would you? */
public override object Uncomplete
{
get
{
return 1073598;
}
}
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 OrcishEliteQuest : BaseQuest
{
public OrcishEliteQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(OrcBomber), "orc bombers", 6));
this.AddObjective(new SlayObjective(typeof(OrcCaptain), "orc captain", 4));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* Orcish Elite */
public override object Title
{
get
{
return 1073081;
}
}
/* Foul brutes! No one loves an orc, but some of them are worse than the rest. Their Captains and their
Bombers, for instance, they're the worst of the lot. Kill a few of those, and the rest are just a rabble.
Exterminate a few of them and you'll make the world a sunnier place, don't you know. */
public override object Description
{
get
{
return 1073571;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* The only good orc is a dead orc - and 4 dead Captains and 6 dead Bombers is even better! */
public override object Uncomplete
{
get
{
return 1073591;
}
}
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 Caelas : MondainQuester
{
[Constructable]
public Caelas()
: base("Elder Caelas", "the wise")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Caelas(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(WarriorCasteQuest),
typeof(BigWormsQuest),
typeof(ItsElementalQuest),
typeof(OrcishEliteQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x8381;
this.HairItemID = 0x2FC0;
this.HairHue = 0x2C8;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x1BB));
this.AddItem(new Cloak(0x71B));
this.AddItem(new RoyalCirclet());
}
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();
}
}
}

View File

@@ -0,0 +1,811 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class KingOfBearsQuest : BaseQuest
{
public KingOfBearsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(GrizzlyBear), "grizzly bears", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* King of Bears */
public override object Title
{
get
{
return 1072996;
}
}
/* A pity really. With the balance of nature awry, we have no choice but to accept the responsibility
of making it all right. It's all a part of the circle of life, after all. So, yes, the grizzly bears
are running rampant. There are far too many in the region. Will you shoulder your obligations as a
higher life form? */
public override object Description
{
get
{
return 1073030;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 SpecimensQuest : BaseQuest
{
public SpecimensQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(RedSolenWorker), "red solen workers", 12));
this.AddObjective(new SlayObjective(typeof(BlackSolenWorker), "black solen workers", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Specimens */
public override object Title
{
get
{
return 1072999;
}
}
/* I admire them, you know. The solen have their place -- regimented, organized. They're fascinating
to watch with their constant strife between red and black. I can't help but want to stir things up from
time to time. And that's where you come in. Kill either twelve red or twelve black solen workers and
let's see what happens next! */
public override object Description
{
get
{
return 1073032;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 DeadManWalkingQuest : BaseQuest
{
public DeadManWalkingQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Zombie), "zombies", 5));
this.AddObjective(new SlayObjective(typeof(Skeleton), "skeletons", 5));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Dead Man Walking */
public override object Title
{
get
{
return 1072983;
}
}
/* Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways.
Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill five zombies
and five skeletons. */
public override object Description
{
get
{
return 1073009;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 SpiritsQuest : BaseQuest
{
public SpiritsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Spectre), "spectres", 15));
this.AddObjective(new SlayObjective(typeof(Shade), "shades", 15));
this.AddObjective(new SlayObjective(typeof(Wraith), "wraiths", 15));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Spirits */
public override object Title
{
get
{
return 1073076;
}
}
/* It is a piteous thing when the dead continue to walk the earth. Restless spirits are known to inhabit these
parts, taking the lives of unwary travelers. It is about time a hero put the dead back in their graves. I'm sure
such a hero would be justly rewarded. */
public override object Description
{
get
{
return 1073566;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* The restless spirts still walk -- you must kill 15 of them. */
public override object Uncomplete
{
get
{
return 1073586;
}
}
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 RollTheBonesQuest : BaseQuest
{
public RollTheBonesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(PatchworkSkeleton), "patchwork skeletons", 8));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Roll the Bones */
public override object Title
{
get
{
return 1073002;
}
}
/* Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways.
Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill eight patchwork
skeletons. */
public override object Description
{
get
{
return 1073011;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 ItsGhastlyJobQuest : BaseQuest
{
public ItsGhastlyJobQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Ghoul), "ghouls", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* It's a Ghastly Job */
public override object Title
{
get
{
return 1073008;
}
}
/* Why? I ask you why? They walk around after they're put in the ground. It's just wrong in so many ways.
Put them to proper rest, I beg you. I'll find some way to pay you for the kindness. Just kill twelve ghouls. */
public override object Description
{
get
{
return 1073012;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 TroglodytesQuest : BaseQuest
{
public TroglodytesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Troglodyte), "troglodytes", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Troglodytes! */
public override object Title
{
get
{
return 1074688;
}
}
/* Oh nevermind, you don't look capable of my task afterall. Haha! What was I thinking - you could never handle
killing troglodytes. It'd be suicide. What? I don't know, I don't want to be responsible ... well okay if
you're really sure? */
public override object Description
{
get
{
return 1074689;
}
}
/* Probably the wiser course of action. */
public override object Refuse
{
get
{
return 1074690;
}
}
/* You still need to kill those troglodytes, remember? */
public override object Uncomplete
{
get
{
return 1074691;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PaintedCaves;
}
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 UnholyKnightsQuest : BaseQuest
{
public UnholyKnightsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(BoneKnight), "bone knights", 16));
this.AddObjective(new SlayObjective(typeof(SkeletalKnight), "skeletal knights", 16));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
public override bool AllObjectives
{
get
{
return false;
}
}
/* Unholy Knights */
public override object Title
{
get
{
return 1073075;
}
}
/* Please, hear me kind traveler. You know when a knight falls, sometimes they are cursed to roam the earth as
undead mockeries of their former glory? That is too grim a fate for even any knight to suffer! Please, put them
out of their misery. I will offer you what payment I can if you will end the torment of these undead wretches. */
public override object Description
{
get
{
return 1073565;
}
}
/* I hope you'll reconsider. Until then, farwell. */
public override object Refuse
{
get
{
return 1073580;
}
}
/* Your task is not done. Continue putting the Skeleton and Bone Knights to rest. */
public override object Uncomplete
{
get
{
return 1073585;
}
}
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 FeatherInYerCapQuest : BaseQuest
{
public FeatherInYerCapQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(SalivasFeather), "saliva's feather", 1));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* A Feather in Yer Cap */
public override object Title
{
get
{
return 1074738;
}
}
/* I've seen how you strut about, as if you were something special. I have some news for you, you don't impress
me at all. It's not enough to have a fancy hat you know. That may impress people in the big city, but not here.
If you want a reputation you have to climb a mountain, slay some great beast, and then write about it. Trust me,
it's a long process. The first step is doing a great feat. If I were you, I'd go pluck a feather from the harpy
Saliva, that would give you a good start. */
public override object Description
{
get
{
return 1074737;
}
}
/* The path to greatness isn't for everyone obviously. */
public override object Refuse
{
get
{
return 1074736;
}
}
/* If you're going to get anywhere in the adventuring game, you have to take some risks. A harpy, well, it's
bad, but it's not a dragon. */
public override object Uncomplete
{
get
{
return 1074735;
}
}
/* The hero returns from the glorious battle and - oh, such a small feather? */
public override object Complete
{
get
{
return 1074734;
}
}
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 TaleOfTailQuest : BaseQuest
{
public TaleOfTailQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(AbscessTail), "abscess' tail", 1));
this.AddReward(new BaseReward(typeof(TreasureBag), 1072583));
}
/* A Tale of Tail */
public override object Title
{
get
{
return 1074726;
}
}
/* I've heard of you, adventurer. Your reputation is impressive, and now I'll put it to the test. This is not
something I ask lightly, for this task is fraught with danger, but it is vital. Seek out the vile hydra Abscess,
slay it, and return to me with it's tail. */
public override object Description
{
get
{
return 1074727;
}
}
/* Well, the beast will still be there when you are ready I suppose. */
public override object Refuse
{
get
{
return 1074728;
}
}
/* Em, I thought I had explained already. Abscess, the hydra, you know? Lots of heads but just the one tail.
I need the tail. I have my reasons. Go go go. */
public override object Uncomplete
{
get
{
return 1074729;
}
}
/* Ah, the tail. You did it! You know the rumours about dried ground hydra tail powder are all true?
Thank you so much! */
public override object Complete
{
get
{
return 1074730;
}
}
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 TrogAndHisDogQuest : BaseQuest
{
public TrogAndHisDogQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Lurg), "lurg", 1));
this.AddObjective(new SlayObjective(typeof(Grobu), "grobu", 1));
this.AddReward(new BaseReward(typeof(LargeTreasureBag), 1072706));
}
/* A Trog and His Dog */
public override object Title
{
get
{
return 1074681;
}
}
/* I don't know if you can handle it, but I'll give you a go at it. Troglodyte chief - name of Lurg and his mangy
wolf pet need killing. Do the deed and I'll reward you. */
public override object Description
{
get
{
return 1074680;
}
}
/* Perhaps I thought too highly of you. */
public override object Refuse
{
get
{
return 1074655;
}
}
/* The trog chief and his mutt should be easy enough to find. Just kill them and report back. Easy enough. */
public override object Uncomplete
{
get
{
return 1074682;
}
}
/* Not half bad. Here's your prize. */
public override object Complete
{
get
{
return 1074683;
}
}
public override bool CanOffer()
{
return MondainsLegacy.PaintedCaves;
}
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 Cailla : MondainQuester
{
[Constructable]
public Cailla()
: base("Cailla", "the guard")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Cailla(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(KingOfBearsQuest),
typeof(SpecimensQuest),
typeof(DeadManWalkingQuest),
typeof(SpiritsQuest),
typeof(RollTheBonesQuest),
typeof(ItsGhastlyJobQuest),
typeof(TroglodytesQuest),
typeof(UnholyKnightsQuest),
typeof(FriendlyNeighborhoodSpiderkillerQuest),
typeof(FeatherInYerCapQuest),
typeof(TaleOfTailQuest),
typeof(TrogAndHisDogQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x876B;
this.HairItemID = 0x2FCE;
this.HairHue = 0x2C8;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots());
this.AddItem(new MagicalShortbow());
this.AddItem(new HidePants());
this.AddItem(new HidePauldrons());
this.AddItem(new HideGloves());
this.AddItem(new HideFemaleChest());
this.AddItem(new WoodlandBelt());
Item item;
item = new RavenHelm();
item.Hue = 0x1BB;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,142 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class DreadhornQuest : BaseQuest
{
public DreadhornQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(DreadHorn), "dread horn", 1));
this.AddReward(new BaseReward(typeof(RewardBox), 1072584));
}
/* Dreadhorn */
public override object Title
{
get
{
return 1074645;
}
}
/* Can you comprehend it? I cannot, I confess. The most pristine and perfect Lord of Sosaria
has fallen prey to the blight. From the depths of my heart I mourn his corruption; my thoughts
are filled with pity for this glorious creature now tainted. And my blood boils with fury at
those responsible for the innocent creature's undoing. Will you find Dread Horn, as he is now
called, and free him from this misery? */
public override object Description
{
get
{
return 1074646;
}
}
/* How can you not feel as I do? */
public override object Refuse
{
get
{
return 1074647;
}
}
/* The lush and fertile land where Dread Horn now lives is twisted and tainted, a result of his
corruption. The fey folk have sealed the land off through their magics, but you can enter through
an enchanted mushroom fairy circle. */
public override object Uncomplete
{
get
{
return 1074648;
}
}
/* Thank you. I haven't the words to express my gratitude. */
public override object Complete
{
get
{
return 1074649;
}
}
public override bool CanOffer()
{
return MondainsLegacy.TwistedWeald;
}
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 Calendor : MondainQuester
{
[Constructable]
public Calendor()
: base("Lorekeeper Calendor", "the keeper of tradition")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Calendor(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(DreadhornQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x847E;
this.HairItemID = 0x2FD0;
this.HairHue = 0x1F2;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x65A));
this.AddItem(new ElvenShirt(0x728));
this.AddItem(new Kilt(0x1BB));
this.AddItem(new RoyalCirclet());
}
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();
}
}
}

View File

@@ -0,0 +1,66 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Canir : MondainQuester
{
[Constructable]
public Canir()
: base("Canir", "the thaumaturgist")
{
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Canir(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(TroglodytesQuest),
typeof(TrogAndHisDogQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.CantWalk = true;
this.Race = Race.Elf;
this.Hue = 0x876C;
this.HairItemID = 0x2FD0;
this.HairHue = 0x33;
}
public override void InitOutfit()
{
this.AddItem(new Sandals(0x1BB));
this.AddItem(new MaleElvenRobe(0x5A5));
this.AddItem(new GemmedCirclet());
this.AddItem(RandomWand.CreateWand());
}
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();
}
}
}

View File

@@ -0,0 +1,89 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Carpenter : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Carpenter()
: base("the carpenter")
{
this.SetSkill(SkillName.Carpentry, 85.0, 100.0);
this.SetSkill(SkillName.Lumberjacking, 60.0, 83.0);
}
public Carpenter(Serial serial)
: base(serial)
{
}
public override NpcGuild NpcGuild
{
get
{
return NpcGuild.TinkersGuild;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBStavesWeapon());
this.m_SBInfos.Add(new SBCarpenter());
this.m_SBInfos.Add(new SBWoodenShields());
if (this.IsTokunoVendor)
this.m_SBInfos.Add(new SBSECarpenter());
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Server.Items.HalfApron());
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Carpentry; } }
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallCarpentryBOD || item is LargeCarpentryBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return BulkOrderSystem.NewSystemEnabled && from is PlayerMobile && from.Skills[SkillName.Carpentry].Base > 0;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (from is PlayerMobile)
((PlayerMobile)from).NextCarpentryBulkOrder = TimeSpan.Zero;
}
#endregion
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();
}
}
}

View File

@@ -0,0 +1,68 @@
using System;
using Server.Guilds;
using Server.Items;
namespace Server.Mobiles
{
public class ChaosGuard : BaseShieldGuard
{
[Constructable]
public ChaosGuard()
{
}
public ChaosGuard(Serial serial)
: base(serial)
{
}
public override int Keyword
{
get
{
return 0x22;
}
}// *chaos shield*
public override BaseShield Shield
{
get
{
return new ChaosShield();
}
}
public override int SignupNumber
{
get
{
return 1007140;
}
}// Sign up with a guild of chaos if thou art interested.
public override GuildType Type
{
get
{
return GuildType.Chaos;
}
}
public override bool BardImmune
{
get
{
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();
}
}
}

View File

@@ -0,0 +1,183 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class BecomingOneWithTheShadowsQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Becoming One With The Shadows */
public override object Title
{
get
{
return 1078164;
}
}
/* Practice hiding in the Ninja Dojo until you reach 50 Hiding skill.<br><center>------</center><br>Come closer.
Don't be afraid. The shadows will not harm you. To be a successful Ninja, you must learn to become one with the
shadows. The Ninja Dojo is the ideal place to learn the art of concealment. Practice hiding here.<br><br>Talk to
me once you have achieved the rank of Apprentice Rogue (for Hiding), and I shall reward you. */
public override object Description
{
get
{
return 1078168;
}
}
/* If you wish to become one with the shadows, come back and talk to me. */
public override object Refuse
{
get
{
return 1078169;
}
}
/* You have not achieved the rank of Apprentice Rogue (for Hiding). Talk to me when you feel you have accomplished
this. */
public override object Uncomplete
{
get
{
return 10778170;
}
}
/* Not bad at all. You have learned to control your fear of the dark and you are becoming one with the shadows. If
you haven't already talked to Jun, I advise you do so. Jun can teach you how to stealth undetected. Hiding and
Stealth are essential skills to master when becoming a Ninja.<br><br>As promised, I have a reward for you. Here are
some smokebombs. As long as you are an Apprentice Ninja and have mana available you will be able to use them. They
will allow you to hide while in the middle of combat. I hope these serve you well. */
public override object Complete
{
get
{
return 1078172;
}
}
public BecomingOneWithTheShadowsQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Hiding, 50, "Haven Dojo", 1078166, 1078167));
// 1078166 You feel you can easily slip into the shadows here. Your ability to hide is enhanced in this area.
// 1078167 You feel it is more difficult to hide here. Your ability to hide is no longer enhanced.
this.AddReward(new BaseReward(typeof(BagOfSmokeBombs), 1078173));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Hiding.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1078171, null, 0x23); // You have achieved the rank of Apprentice Rogue (for Hiding). Return to Chiyo in New Haven to claim 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();
}
}
public class Chiyo : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(BecomingOneWithTheShadowsQuest)
};
}
}
[Constructable]
public Chiyo()
: base("Chiyo", "The Hiding Instructor")
{
this.SetSkill(SkillName.Hiding, 120.0, 120.0);
this.SetSkill(SkillName.Tracking, 120.0, 120.0);
this.SetSkill(SkillName.Healing, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Fencing, 120.0, 120.0);
this.SetSkill(SkillName.Stealth, 120.0, 120.0);
this.SetSkill(SkillName.Ninjitsu, 120.0, 120.0);
}
public Chiyo(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078165); // To be undetected means you cannot be harmed.
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Body = 247;
}
public override void InitOutfit()
{
this.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();
}
}
}

View File

@@ -0,0 +1,213 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class CrushingBonesAndTakingNamesQuest : BaseQuest
{
public override bool DoneOnce
{
get
{
return true;
}
}
/* Crushing Bones and Taking Names */
public override object Title
{
get
{
return 1078070;
}
}
/* Head East out of town and go to Old Haven. While wielding your mace,battle monster there until you have
raised your Mace Fighting skill to 50. I see you want to learn a real weapon skill and not that toothpick
training Jockles hasto offer. Real warriors are called Armsmen, and they wield mace weapons. No doubt about
it. Nothing is more satisfying than knocking the wind out of your enemies, smashing there armor, crushing
their bones, and taking there names. Want to learn how to wield a mace? Well i have an assignment for you.
Head East out of town and go to Old Haven. Undead have plagued the town, so there are plenty of bones for
you to smash there. Come back to me after you have ahcived the rank of Apprentice Armsman, and i will
reward you with a real weapon.*/
public override object Description
{
get
{
return 1078065;
}
}
/* I thought you wanted to be an Armsman and really make something of yourself. You have potential, kid,
but if you want to play with toothpicks, run to Jockles and he will teach you how to clean your teeth
with a sword. If you change your mind, come back to me, and i will show you how to wield a real weapon. */
public override object Refuse
{
get
{
return 1078068;
}
}
/* Listen kid. There are a lot of undead in Old Haven, and you haven't smashed enough of them yet. So get
back there and do some more cleansing. */
public override object Uncomplete
{
get
{
return 1078067;
}
}
/* Now that's what I'm talking about! Well done! Don't you like crushing bones and taking names? As i promised,
here is a war mace for you. It hits hard. It swings fast. It hits often. What more do you need? Now get out of
here and crush some more enemies! */
public override object Complete
{
get
{
return 1078069;
}
}
public CrushingBonesAndTakingNamesQuest()
: base()
{
this.AddObjective(new ApprenticeObjective(SkillName.Macing, 50, "Old Haven Training", 1078063, 1078064));
// 1078063 You feel much more attuned to your mace. Your ability to hone your Mace Fighting skill is enhanced in this area.
// 1078064 You feel less attuned to your mace. Your Mace Fighting learning potential is no longer enhanced.
this.AddReward(new BaseReward(typeof(ChurchillsWarMace), 1078062));
}
public override bool CanOffer()
{
#region Scroll of Alacrity
PlayerMobile pm = this.Owner as PlayerMobile;
if (pm.AcceleratedStart > DateTime.UtcNow)
{
this.Owner.SendLocalizedMessage(1077951); // You are already under the effect of an accelerated skillgain scroll.
return false;
}
#endregion
else
return this.Owner.Skills.Macing.Base < 50;
}
public override void OnCompleted()
{
this.Owner.SendLocalizedMessage(1078068, null, 0x23); // You have achieved the rank of Apprentice Armsman. Return to Churchill in New Haven to claim 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();
}
}
public class Churchill : MondainQuester
{
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(CrushingBonesAndTakingNamesQuest)
};
}
}
[Constructable]
public Churchill()
: base("Churchill", "The Mace Fighting Instructor")
{
this.SetSkill(SkillName.Anatomy, 120.0, 120.0);
this.SetSkill(SkillName.Parry, 120.0, 120.0);
this.SetSkill(SkillName.Healing, 120.0, 120.0);
this.SetSkill(SkillName.Tactics, 120.0, 120.0);
this.SetSkill(SkillName.Macing, 120.0, 120.0);
this.SetSkill(SkillName.Focus, 120.0, 120.0);
}
public Churchill(Serial serial)
: base(serial)
{
}
public override void Advertise()
{
this.Say(1078141); // Don't listen to Jockles. Real warriors wield mace weapons!
}
public override void OnOfferFailed()
{
this.Say(1077772); // I cannot teach you, for you know all I can teach!
}
public override void InitBody()
{
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
this.Direction = Direction.South;
base.InitBody();
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new OrderShield());
this.AddItem(new WarMace());
Item item;
item = new PlateLegs();
item.Hue = 0x966;
this.AddItem(item);
item = new PlateGloves();
item.Hue = 0x966;
this.AddItem(item);
item = new PlateGorget();
item.Hue = 0x966;
this.AddItem(item);
item = new PlateChest();
item.Hue = 0x966;
this.AddItem(item);
item = new PlateArms();
item.Hue = 0x966;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,330 @@
using System;
using Server.Engines.PartySystem;
using Server.Gumps;
using Server.Items;
using Server.Mobiles;
using Server.Network;
namespace Server.Engines.Quests.Doom
{
public class Chyloth : BaseQuester
{
private static readonly int[] m_Offsets = new int[]
{
-1, -1,
-1, 0,
-1, 1,
0, -1,
0, 1,
1, -1,
1, 0,
1, 1
};
private Mobile m_AngryAt;
private BellOfTheDead m_Bell;
[Constructable]
public Chyloth()
: base("the Ferryman")
{
}
public Chyloth(Serial serial)
: base(serial)
{
}
public BellOfTheDead Bell
{
get
{
return m_Bell;
}
set
{
m_Bell = value;
}
}
public Mobile AngryAt
{
get
{
return m_AngryAt;
}
set
{
m_AngryAt = value;
}
}
public static void TeleportToFerry(Mobile from)
{
Point3D loc = new Point3D(408, 251, 2);
Map map = Map.Malas;
Effects.SendLocationParticles(EffectItem.Create(loc, map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0, 0, 2023, 0);
Effects.PlaySound(loc, map, 0x1FE);
BaseCreature.TeleportPets(from, loc, map);
from.MoveToWorld(loc, map);
}
public override void InitBody()
{
InitStats(100, 100, 25);
Hue = 0x8455;
Body = 0x190;
Name = "Chyloth";
}
public override void InitOutfit()
{
EquipItem(new ChylothShroud());
EquipItem(new ChylothStaff());
}
public virtual void BeginGiveWarning()
{
if (Deleted || m_AngryAt == null)
return;
Timer.DelayCall(TimeSpan.FromSeconds(4.0), new TimerCallback(EndGiveWarning));
}
public virtual void EndGiveWarning()
{
if (Deleted || m_AngryAt == null)
return;
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1050013, m_AngryAt.Name); // You have summoned me in vain ~1_NAME~! Only the dead may cross!
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1050014); // Why have you disturbed me, mortal?!?
BeginSummonDragon();
}
public virtual void BeginSummonDragon()
{
if (Deleted || m_AngryAt == null)
return;
Timer.DelayCall(TimeSpan.FromSeconds(30.0), new TimerCallback(EndSummonDragon));
}
public virtual void BeginRemove(TimeSpan delay)
{
Timer.DelayCall(delay, new TimerCallback(EndRemove));
}
public virtual void EndRemove()
{
if (Deleted)
return;
Point3D loc = Location;
Map map = Map;
Effects.SendLocationParticles(EffectItem.Create(loc, map, EffectItem.DefaultDuration), 0x3728, 10, 10, 0, 0, 2023, 0);
Effects.PlaySound(loc, map, 0x1FE);
Delete();
}
public virtual void EndSummonDragon()
{
if (Deleted || m_AngryAt == null)
return;
Map map = m_AngryAt.Map;
if (map == null)
return;
if (!m_AngryAt.Region.IsPartOf("Doom"))
return;
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1050015); // Feel the wrath of my legions!!!
PublicOverheadMessage(MessageType.Regular, 0x3B2, false, "MUHAHAHAHA HAHAH HAHA"); // A wee bit crazy, aren't we?
SkeletalDragon dragon = new SkeletalDragon();
int offset = Utility.Random(8) * 2;
bool foundLoc = false;
for (int i = 0; i < m_Offsets.Length; i += 2)
{
int x = m_AngryAt.X + m_Offsets[(offset + i) % m_Offsets.Length];
int y = m_AngryAt.Y + m_Offsets[(offset + i + 1) % m_Offsets.Length];
if (map.CanSpawnMobile(x, y, m_AngryAt.Z))
{
dragon.MoveToWorld(new Point3D(x, y, m_AngryAt.Z), map);
foundLoc = true;
break;
}
else
{
int z = map.GetAverageZ(x, y);
if (map.CanSpawnMobile(x, y, z))
{
dragon.MoveToWorld(new Point3D(x, y, z), map);
foundLoc = true;
break;
}
}
}
if (!foundLoc)
dragon.MoveToWorld(m_AngryAt.Location, map);
dragon.Combatant = m_AngryAt;
if (m_Bell != null)
m_Bell.Dragon = dragon;
}
public override bool OnDragDrop(Mobile from, Item dropped)
{
if (dropped is GoldenSkull)
{
dropped.Delete();
PublicOverheadMessage(MessageType.Regular, 0x3B2, 1050046, from.Name); // Very well, ~1_NAME~, I accept your token. You may cross.
BeginRemove(TimeSpan.FromSeconds(4.0));
Party p = PartySystem.Party.Get(from);
if (p != null)
{
for (int i = 0; i < p.Members.Count; ++i)
{
PartyMemberInfo pmi = (PartyMemberInfo)p.Members[i];
Mobile member = pmi.Mobile;
if (member != from && member.Map == Map.Malas && member.Region.IsPartOf("Doom"))
{
if (m_AngryAt == member)
m_AngryAt = null;
member.CloseGump(typeof(ChylothPartyGump));
member.SendGump(new ChylothPartyGump(from, member));
}
}
}
if (m_AngryAt == from)
m_AngryAt = null;
TeleportToFerry(from);
return false;
}
return base.OnDragDrop(from, dropped);
}
public override bool CanTalkTo(PlayerMobile to)
{
return false;
}
public override void OnTalk(PlayerMobile player, bool contextMenu)
{
}
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 ChylothPartyGump : Gump
{
private readonly Mobile m_Leader;
private readonly Mobile m_Member;
public ChylothPartyGump(Mobile leader, Mobile member)
: base(150, 50)
{
m_Leader = leader;
m_Member = member;
Closable = false;
AddPage(0);
AddImage(0, 0, 3600);
AddImageTiled(0, 14, 15, 200, 3603);
AddImageTiled(380, 14, 14, 200, 3605);
AddImage(0, 201, 3606);
AddImageTiled(15, 201, 370, 16, 3607);
AddImageTiled(15, 0, 370, 16, 3601);
AddImage(380, 0, 3602);
AddImage(380, 201, 3608);
AddImageTiled(15, 15, 365, 190, 2624);
AddRadio(30, 140, 9727, 9730, true, 1);
AddHtmlLocalized(65, 145, 300, 25, 1050050, 0x7FFF, false, false); // Yes, let's go!
AddRadio(30, 175, 9727, 9730, false, 0);
AddHtmlLocalized(65, 178, 300, 25, 1050049, 0x7FFF, false, false); // No thanks, I'd rather stay here.
AddHtmlLocalized(30, 20, 360, 35, 1050047, 0x7FFF, false, false); // Another player has paid Chyloth for your passage across lake Mortis:
AddHtmlLocalized(30, 105, 345, 40, 1050048, 0x5B2D, false, false); // Do you wish to accept their invitation at this time?
AddImage(65, 72, 5605);
AddImageTiled(80, 90, 200, 1, 9107);
AddImageTiled(95, 92, 200, 1, 9157);
AddLabel(90, 70, 1645, leader.Name);
AddButton(290, 175, 247, 248, 2, GumpButtonType.Reply, 0);
AddImageTiled(15, 14, 365, 1, 9107);
AddImageTiled(380, 14, 1, 190, 9105);
AddImageTiled(15, 205, 365, 1, 9107);
AddImageTiled(15, 14, 1, 190, 9105);
AddImageTiled(0, 0, 395, 1, 9157);
AddImageTiled(394, 0, 1, 217, 9155);
AddImageTiled(0, 216, 395, 1, 9157);
AddImageTiled(0, 0, 1, 217, 9155);
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (info.ButtonID == 2 && info.IsSwitched(1))
{
if (m_Member.Region.IsPartOf("Doom"))
{
m_Leader.SendLocalizedMessage(1050054, m_Member.Name); // ~1_NAME~ has accepted your invitation to cross lake Mortis.
Chyloth.TeleportToFerry(m_Member);
}
else
{
m_Member.SendLocalizedMessage(1050051); // The invitation has been revoked.
}
}
else
{
m_Member.SendLocalizedMessage(1050052); // You have declined their invitation.
m_Leader.SendLocalizedMessage(1050053, m_Member.Name); // ~1_NAME~ has declined your invitation to cross lake Mortis.
}
}
}
}

View File

@@ -0,0 +1,68 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class Ciala : MondainQuester
{
[Constructable]
public Ciala()
: base("Ciala", "the aborist")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Ciala(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(GlassyFoeQuest),
typeof(CircleOfLifeQuest),
typeof(DustToDustQuest),
typeof(ArchSupportQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Race = Race.Elf;
Hue = 0x8374;
HairItemID = 0x2FD0;
HairHue = 0x31D;
}
public override void InitOutfit()
{
AddItem(new Boots(0x1BB));
AddItem(new ElvenShirt(0x737));
AddItem(new Skirt(0x21));
AddItem(new RoyalCirclet());
}
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();
}
}
}

View File

@@ -0,0 +1,410 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class LethalDartsQuest : BaseQuest
{
public LethalDartsQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Bolt), "crossbow bolts", 10, 0x1BFB));
AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.FromMinutes(2);
}
}
/* Lethal Darts */
public override object Title
{
get
{
return 1073876;
}
}
/* We elves are no strangers to archery but I would be interested in learning whether there
is anything to learn from the human approach. I would gladly trade you something I have if
you could teach me of the deadly crossbow bolt. */
public override object Description
{
get
{
return 1074066;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me crossbow bolts. */
public override object Uncomplete
{
get
{
return 1073922;
}
}
/* My thanks for your service. Now, I shall teach you of elven archery. */
public override object Complete
{
get
{
return 1073968;
}
}
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 SimpleBowQuest : BaseQuest
{
public SimpleBowQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Bow), "bows", 10, 0x13B2));
AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* A Simple Bow */
public override object Title
{
get
{
return 1073877;
}
}
/* I wish to try a bow crafted in the human style. Is it possible for you to bring me
such a weapon? I would be happy to return this favor. */
public override object Description
{
get
{
return 1074067;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me bows. */
public override object Uncomplete
{
get
{
return 1073923;
}
}
/* My thanks for your service. Now, I shall teach you of elven archery. */
public override object Complete
{
get
{
return 1073968;
}
}
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 IngeniousArcheryPartOneQuest : BaseQuest
{
public IngeniousArcheryPartOneQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(Crossbow), "crossbows", 10, 0xF50));
AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Ingenious Archery, Part I */
public override object Title
{
get
{
return 1073878;
}
}
/* I have heard of a curious type of bow, you call it a "crossbow". It sounds fascinating and I would
very much like to examine one closely. Would you be able to obtain such an instrument for me? */
public override object Description
{
get
{
return 1074068;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me crossbows. */
public override object Uncomplete
{
get
{
return 1073924;
}
}
/* My thanks for your service. Now, I shall teach you of elven archery. */
public override object Complete
{
get
{
return 1073968;
}
}
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 IngeniousArcheryPartTwoQuest : BaseQuest
{
public IngeniousArcheryPartTwoQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(HeavyCrossbow), "heavy crossbows", 8, 0x13FD));
AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Ingenious Archery, Part II */
public override object Title
{
get
{
return 1073879;
}
}
/* These human "crossbows" are complex and clever. The "heavy crossbow" is a remarkable
instrument of war. I am interested in seeing one up close, if you could arrange for one
to make its way to my hands. */
public override object Description
{
get
{
return 1074069;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me heavy crossbows. */
public override object Uncomplete
{
get
{
return 1073925;
}
}
/* My thanks for your service. Now, I shall teach you of elven archery. */
public override object Complete
{
get
{
return 1073968;
}
}
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 IngeniousArcheryPartThreeQuest : BaseQuest
{
public IngeniousArcheryPartThreeQuest()
: base()
{
AddObjective(new ObtainObjective(typeof(RepeatingCrossbow), "repeating crossbows", 10, 0x26C3));
AddReward(new BaseReward(typeof(FletcherCraftsmanSatchel), 1074282));
}
/* Ingenious Archery, Part III */
public override object Title
{
get
{
return 1073880;
}
}
/* My friend, I am in search of a device, a instrument of remarkable human ingenuity. It is a
repeating crossbow. If you were to obtain such a device, I would gladly reveal to you some of
the secrets of elven craftsmanship. */
public override object Description
{
get
{
return 1074070;
}
}
/* I will patiently await your reconsideration. */
public override object Refuse
{
get
{
return 1073921;
}
}
/* I will be in your debt if you bring me repeating crossbows. */
public override object Uncomplete
{
get
{
return 1073926;
}
}
/* My thanks for your service. Now, I shall teach you of elven archery. */
public override object Complete
{
get
{
return 1073968;
}
}
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 Cillitha : MondainQuester
{
[Constructable]
public Cillitha()
: base("Cillitha", "the bowcrafter")
{
SetSkill(SkillName.Meditation, 60.0, 83.0);
SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Cillitha(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(LethalDartsQuest),
typeof(SimpleBowQuest),
typeof(IngeniousArcheryPartOneQuest),
typeof(IngeniousArcheryPartTwoQuest),
typeof(IngeniousArcheryPartThreeQuest),
typeof(StopHarpingOnMeQuest)
};
}
}
public override void InitBody()
{
InitStats(100, 100, 25);
Female = true;
Race = Race.Elf;
Hue = 0x83E6;
HairItemID = 0x2FC2;
HairHue = 0x8E;
}
public override void InitOutfit()
{
AddItem(new ElvenBoots(0x901));
AddItem(new ElvenShirt(0x714));
AddItem(new LeafLegs());
}
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();
}
}
}

View File

@@ -0,0 +1,213 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class StitchInTimeQuest : BaseQuest
{
public StitchInTimeQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(FancyDress), "fancy dress", 1, 0x1EFF));
this.AddReward(new BaseReward(typeof(OldRing), 1075524)); // an old ring
this.AddReward(new BaseReward(typeof(OldNecklace), 1075525)); // an old necklace
}
public override TimeSpan RestartDelay
{
get
{
return TimeSpan.FromMinutes(2);
}
}
/* A Stitch in Time */
public override object Title
{
get
{
return 1075523;
}
}
/* Oh how I wish I had a fancy dress like the noble ladies of Castle British! I don't have much... but I
have a few trinkets I might trade for it. It would mean the world to me to go to a fancy ball and dance
the night away. Oh, and I could tell you how to make one! You just need to use your sewing kit on enough
cut cloth, that's all. */
public override object Description
{
get
{
return 1075522;
}
}
/* Won't you reconsider? It'd mean the world to me, it would! */
public override object Refuse
{
get
{
return 1075526;
}
}
/* Hello again! Do you need anything? You may want to visit the tailor's shop for cloth and a sewing kit,
if you don't already have them. */
public override object Uncomplete
{
get
{
return 1075527;
}
}
/* It's gorgeous! I only have a few things to give you in return, but I can't thank you enough! Maybe I'll
even catch Uzeraan's eye at the, er, *blushes* I mean, I can't wait to wear it to the next town dance! */
public override object Complete
{
get
{
return 1075528;
}
}
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 Clairesse : MondainQuester
{
[Constructable]
public Clairesse()
: base("Clairesse", "the servant")
{
}
public Clairesse(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(StitchInTimeQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x840B;
this.HairItemID = 0x203D;
this.HairHue = 0x458;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new PlainDress(0x3C9));
this.AddItem(new Shoes(0x740));
}
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 OldRing : GoldRing
{
[Constructable]
public OldRing()
: base()
{
this.Hue = 0x222;
}
public OldRing(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1075524;
}
}// an old ring
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 OldNecklace : Necklace
{
[Constructable]
public OldNecklace()
: base()
{
this.Hue = 0x222;
}
public OldNecklace(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1075525;
}
}// an old necklace
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();
}
}
}

View File

@@ -0,0 +1,128 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class ThinningTheHerdQuest : BaseQuest
{
public ThinningTheHerdQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Goat), "goats", 10));
this.AddReward(new BaseReward(typeof(SmallTrinketBag), 1072268));
}
/* Thinning the Herd */
public override object Title
{
get
{
return 1072249;
}
}
/* Psst! Hey ... psst! Listen, I need some help here but it's gotta be hush hush. I
don't want THEM to know I'm onto them. They watch me. I've seen them, but they don't
know that I know what I know. You know? Anyway, I need you to scare them off by killing
a few of them. That'll send a clear message that I won't suffer goats watching me! */
public override object Description
{
get
{
return 1072263;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 Clehin : MondainQuester
{
[Constructable]
public Clehin()
: base("Clehin", "the soil nurturer")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Clehin(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(CreepyCrawliesQuest),
typeof(MongbatMenaceQuest),
typeof(SpecimensQuest),
typeof(ThinningTheHerdQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = true;
this.Race = Race.Elf;
this.Hue = 0x8362;
this.HairItemID = 0x2FC2;
this.HairHue = 0x324;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots());
this.AddItem(new LeafTonlet());
this.AddItem(new ElvenShirt());
}
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();
}
}
}

View File

@@ -0,0 +1,438 @@
using System;
using Server.Items;
using Server.Mobiles;
namespace Server.Engines.Quests
{
public class SquishyQuest : BaseQuest
{
public SquishyQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Slime), "slimes", 12));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Squishy */
public override object Title
{
get
{
return 1072998;
}
}
/* Have you ever seen what a slime can do to good gear? Well, it's not pretty, let me tell
you! If you take on my task to destroy twelve of them, bear that in mind. They'll corrode
your equipment faster than anything. */
public override object Description
{
get
{
return 1073031;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 BigJobQuest : BaseQuest
{
public BigJobQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Ogre), "ogres", 5));
this.AddObjective(new SlayObjective(typeof(Ettin), "ettins", 5));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* A Big Job */
public override object Title
{
get
{
return 1072988;
}
}
/* It's a big job but you look to be just the adventurer to do it! I'm so glad you came by ...
I'm paying well for the death of five ogres and five ettins. Hop to it, if you're so inclined. */
public override object Description
{
get
{
return 1073017;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 TrollingForTrollsQuest : BaseQuest
{
public TrollingForTrollsQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Troll), "trolls", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Trolling for Trolls */
public override object Title
{
get
{
return 1072985;
}
}
/* They may not be bright, but they're incredibly destructive. Kill off ten trolls and I'll
consider it a favor done for me. */
public override object Description
{
get
{
return 1073014;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 OrcSlayingQuest : BaseQuest
{
public OrcSlayingQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Orc), "orcs", 8));
this.AddObjective(new SlayObjective(typeof(OrcCaptain), "orc captains", 4));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Orc Slaying */
public override object Title
{
get
{
return 1072986;
}
}
/* Those green-skinned freaks have run off with more of my livestock. I want an orc scout
killed for each sheep I lost and an orc for each chicken. So that's four orc scouts and
eight orcs I'll pay you to slay. */
public override object Description
{
get
{
return 1073015;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 ColdHeartedQuest : BaseQuest
{
public ColdHeartedQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(IceSerpent), "giant ice serpents", 6));
this.AddObjective(new SlayObjective(typeof(FrostSpider), "frost spiders", 6));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Cold Hearted */
public override object Title
{
get
{
return 1072991;
}
}
/* It's a big job but you look to be just the adventurer to do it! I'm so glad you came by ... I'm paying
well for the death of six giant ice serpents and six frost spiders. Hop to it, if you're so inclined. */
public override object Description
{
get
{
return 1073027;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 ForkedTonguesQuest : BaseQuest
{
public ForkedTonguesQuest()
: base()
{
this.AddObjective(new SlayObjective(typeof(Lizardman), "lizardmen", 10));
this.AddReward(new BaseReward(typeof(TrinketBag), 1072341));
}
/* Forked Tongues */
public override object Title
{
get
{
return 1072984;
}
}
/* You can't trust them, you know. Lizardmen I mean. They have forked tongues ... and you know
what that means. Exterminate ten of them and I'll reward you. */
public override object Description
{
get
{
return 1073013;
}
}
/* 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're not quite done yet. Get back to work! */
public override object Uncomplete
{
get
{
return 1072271;
}
}
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 Cloorne : MondainQuester
{
[Constructable]
public Cloorne()
: base("Cloorne", "the expeditionist")
{
this.SetSkill(SkillName.Meditation, 60.0, 83.0);
this.SetSkill(SkillName.Focus, 60.0, 83.0);
}
public Cloorne(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(SquishyQuest),
typeof(BigJobQuest),
typeof(TrollingForTrollsQuest),
typeof(OrcSlayingQuest),
typeof(ColdHeartedQuest),
typeof(CreepyCrawliesQuest),
typeof(ForkedTonguesQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Elf;
this.Hue = 0x8376;
this.HairItemID = 0x2FBF;
this.HairHue = 0x386;
}
public override void InitOutfit()
{
this.AddItem(new ElvenBoots(0x3B3));
this.AddItem(new WingedHelm());
this.AddItem(new RadiantScimitar());
Item item;
item = new WoodlandLegs();
item.Hue = 0x732;
this.AddItem(item);
item = new HideChest();
item.Hue = 0x727;
this.AddItem(item);
item = new LeafArms();
item.Hue = 0x749;
this.AddItem(item);
}
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();
}
}
}

View File

@@ -0,0 +1,54 @@
using System;
using System.Collections.Generic;
namespace Server.Mobiles
{
public class Cobbler : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Cobbler()
: base("the cobbler")
{
this.SetSkill(SkillName.Tailoring, 60.0, 83.0);
}
public Cobbler(Serial serial)
: base(serial)
{
}
public override VendorShoeType ShoeType
{
get
{
return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBCobbler());
}
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();
}
}
}

View File

@@ -0,0 +1,136 @@
using System;
using Server.Items;
namespace Server.Engines.Quests
{
public class MisplacedQuest : BaseQuest
{
public MisplacedQuest()
: base()
{
this.AddObjective(new ObtainObjective(typeof(DisintegratingThesisNotes), "disintegrating thesis notes", 5, 0xEF5));
this.AddReward(new BaseReward(typeof(LibrariansKey), 1074347));
}
/* Misplaced */
public override object Title
{
get
{
return 1074438;
}
}
/* Shhh! *nervous chuckle* Oh, sorry about that. I forget that I'm not in the library any longer -- and instead that
THING has taken over. If that wasn't distressing enough, I've misplaced my thesis pages and they've been gathered up
by the shambling dead. Could you retrieve them for me? */
public override object Description
{
get
{
return 1074439;
}
}
/* *tense sigh* Of course, I understand. If you change your mind, I'll be waiting. */
public override object Refuse
{
get
{
return 1074441;
}
}
/* Most of the creatures here wouldn't be interested in my thesis. *nervous chuckle* Master Gnosos would argue that
no one is -- not even the undead. Still, I'd wager that the more powerful undead have my pages. */
public override object Uncomplete
{
get
{
return 1074442;
}
}
/* Ah! You've got my pages? Oh no ... they've been damaged. Here, take this key. Perhaps you can find the podium
and gain access to the library. My poor books are being ravaged by that horror and you'd do well to put things right. */
public override object Complete
{
get
{
return 1074443;
}
}
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 Cohenn : MondainQuester
{
[Constructable]
public Cohenn()
: base("Master Cohenn", "the librarian")
{
}
public Cohenn(Serial serial)
: base(serial)
{
}
public override Type[] Quests
{
get
{
return new Type[]
{
typeof(MisplacedQuest)
};
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.Race = Race.Human;
this.Hue = 0x840C;
this.HairItemID = 0x2045;
this.HairHue = 0x453;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Sandals(0x74A));
this.AddItem(new Robe(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();
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using Server.Multis;
namespace Server.Mobiles
{
public class CommissionPlayerVendor : PlayerVendor
{
public override bool IsCommission { get { return true; } }
public CommissionPlayerVendor(Mobile owner, BaseHouse house)
: base(owner, house)
{
}
public CommissionPlayerVendor(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();
}
}
}

View File

@@ -0,0 +1,87 @@
using System;
using System.Collections.Generic;
using Server.Engines.BulkOrders;
namespace Server.Mobiles
{
public class Cook : BaseVendor
{
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public Cook()
: base("the cook")
{
this.SetSkill(SkillName.Cooking, 90.0, 100.0);
this.SetSkill(SkillName.TasteID, 75.0, 98.0);
}
public Cook(Serial serial)
: base(serial)
{
}
public override VendorShoeType ShoeType
{
get
{
return Utility.RandomBool() ? VendorShoeType.Sandals : VendorShoeType.Shoes;
}
}
protected override List<SBInfo> SBInfos
{
get
{
return this.m_SBInfos;
}
}
public override void InitSBInfo()
{
this.m_SBInfos.Add(new SBCook());
if (this.IsTokunoVendor)
this.m_SBInfos.Add(new SBSECook());
}
public override void InitOutfit()
{
base.InitOutfit();
this.AddItem(new Server.Items.HalfApron());
}
#region Bulk Orders
public override BODType BODType { get { return BODType.Cooking; } }
public override bool IsValidBulkOrder(Item item)
{
return (item is SmallCookingBOD || item is LargeCookingBOD);
}
public override bool SupportsBulkOrders(Mobile from)
{
return BulkOrderSystem.NewSystemEnabled && from is PlayerMobile && from.Skills[SkillName.Cooking].Base > 0;
}
public override void OnSuccessfulBulkOrderReceive(Mobile from)
{
if (from is PlayerMobile)
((PlayerMobile)from).NextCookingBulkOrder = TimeSpan.Zero;
}
#endregion
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();
}
}
}

View File

@@ -0,0 +1,161 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
public class LightAndMight : BaseCollectionMobile
{
[Constructable]
public LightAndMight()
: base("Corey", "the paladin")
{
this.StartTier = 10000000;
this.DailyDecay = 100000;
this.DonationLabel = 1073446; // Light and Might Section Donation Representative.
}
public LightAndMight(Serial serial)
: base(serial)
{
}
public override Collection CollectionID
{
get
{
return Collection.LightAndMight;
}
}
public override int MaxTier
{
get
{
return 1;
}
}
public override void InitBody()
{
this.InitStats(100, 100, 25);
this.Female = false;
this.CantWalk = true;
this.Race = Race.Human;
this.Hue = 0x8405;
}
public override void InitOutfit()
{
this.AddItem(new Backpack());
this.AddItem(new Halberd());
this.AddItem(new Cloak(0x4E6));
Item item;
item = new PlateLegs();
item.Hue = 0x8A6;
this.AddItem(item);
item = new PlateArms();
item.Hue = 0x8A6;
this.AddItem(item);
item = new PlateChest();
item.Hue = 0x8A6;
this.AddItem(item);
item = new PlateGloves();
item.Hue = 0x8A6;
this.AddItem(item);
item = new PlateHelm();
item.Hue = 0x8A6;
this.AddItem(item);
item = new PlateGorget();
item.Hue = 0x8A6;
this.AddItem(item);
}
public override void Init()
{
base.Init();
this.Donations.Add(new CollectionItem(typeof(Gold), 0xEEF, 1073116, 0x0, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BankCheck), 0x14F0, 1075013, 0x34, 0.06666));
this.Donations.Add(new CollectionItem(typeof(BrownBook), 0xFEF, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(TanBook), 0xFF0, 1074906, 0x0, 3));
this.Donations.Add(new CollectionItem(typeof(BookOfChivalry), 0x2252, 1061666, 0x0, 12));
int[] hues = new int[] { 0x1E0, 0x190, 0x151 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendBodySash), 0x1541, 1073346, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendFeatheredHat), 0x171A, 1073347, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSurcoat), 0x1FFD, 1073348, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendPants), 0x1539, 1073349, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendCloak), 0x1515, 1073350, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendDoublet), 0x1F7B, 1073351, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendSkirt), 0x1537, 1073352, 0x190, 100000.0, hues));
this.Rewards.Add(new CollectionTitle(1073341, 1073859, 100000.0)); // Britain Public Library Contributor
hues = new int[] { 0x0, 0x1C2, 0x320, 0x190, 0x1E0 };
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendLantern), 0xA25, 1073339, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(LibraryFriendReadingChair), 0x2DEB, 1073340, 0x1C2, 200000.0, hues));
this.Rewards.Add(new CollectionTitle(1073342, 1073860, 200000.0)); // Distinguished Library Contributor
this.Rewards.Add(new CollectionHuedItem(typeof(SherryTheMouseQuotes), 0xFBD, 1073300, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(WyrdBeastmasterQuotes), 0xFBD, 1073310, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(MercenaryJustinQuotes), 0xFBD, 1073317, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(HeigelOfMoonglowQuotes), 0xFBD, 1073327, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionHuedItem(typeof(TraderHoraceQuotes), 0xFBD, 1073338, 0x1C2, 350000.0, hues));
this.Rewards.Add(new CollectionTitle(1073343, 1073861, 350000.0)); // Honored Library Contributor
this.Rewards.Add(new CollectionItem(typeof(TreatiseonAlchemyTalisman), 0x2F58, 1073353, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(PrimerOnArmsTalisman), 0x2F59, 1073354, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(MyBookTalisman), 0x2F5A, 1073355, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TalkingtoWispsTalisman), 0x2F5B, 1073356, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(GrammarOfOrchishTalisman), 0x2F59, 1073358, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(BirdsofBritanniaTalisman), 0x2F5A, 1073359, 0x0, 550000.0));
this.Rewards.Add(new CollectionItem(typeof(TheLifeOfTravelingMinstrelTalisman), 0x2F5A, 1073360, 0x0, 550000.0));
this.Rewards.Add(new CollectionTitle(1073344, 1073862, 550000.0)); // Prominent Library Contributor
this.Rewards.Add(new CollectionTitle(1073345, 1073863, 800000.0)); // Eminent Library Contributor
this.Rewards.Add(new CollectionItem(typeof(LightOfWayGlasses), 0x2FB8, 1073378, 0x256, 800000.0));
}
public override bool CanDonate(PlayerMobile player)
{
bool can = player.LibraryFriend;
if (!can)
player.SendLocalizedMessage(1074273); // You must speak with Librarian Verity before you can donate to this collection.
return can;
}
/*public override void IncreaseTier()
{
base.IncreaseTier();
List<object> list = new List<object>();
Item c;
switch ( Tier )
{
}
if ( list.Count > 0 )
Tiers.Add( list );
}*/
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();
}
}
}

View File

@@ -0,0 +1,41 @@
using System;
namespace Server.Items
{
public class CrateForSledge : Item
{
[Constructable]
public CrateForSledge()
: base(0x1FFF)
{
this.Weight = 5.0;
this.LootType = LootType.Blessed;
}
public CrateForSledge(Serial serial)
: base(serial)
{
}
public override int LabelNumber
{
get
{
return 1074520;
}
}// Crate for Sledge
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();
}
}
}

View File

@@ -0,0 +1,822 @@
#region References
using System;
using System.Collections.Generic;
using Server.Gumps;
using Server.Items;
using Server.Network;
#endregion
namespace Server.Mobiles
{
public class CustomHairstylist : BaseVendor
{
public static readonly object From = new object();
public static readonly object Vendor = new object();
public static readonly object Price = new object();
private static readonly HairstylistBuyInfo[] m_SellList = new[]
{
new HairstylistBuyInfo(
1018357,
50000,
false,
typeof(ChangeHairstyleGump),
new[] {From, Vendor, Price, false, ChangeHairstyleEntry.HairEntries}),
new HairstylistBuyInfo(
1018358,
50000,
true,
typeof(ChangeHairstyleGump),
new[] {From, Vendor, Price, true, ChangeHairstyleEntry.BeardEntries}),
new HairstylistBuyInfo(
1018359,
50,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, true, ChangeHairHueEntry.RegularEntries}),
new HairstylistBuyInfo(
1018360,
500000,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, true, ChangeHairHueEntry.BrightEntries}),
new HairstylistBuyInfo(
1018361,
30000,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, false, ChangeHairHueEntry.RegularEntries}),
new HairstylistBuyInfo(
1018362,
30000,
true,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, false, true, ChangeHairHueEntry.RegularEntries}),
new HairstylistBuyInfo(
1018363,
500000,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, false, ChangeHairHueEntry.BrightEntries}),
new HairstylistBuyInfo(
1018364,
500000,
true,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, false, true, ChangeHairHueEntry.BrightEntries})
};
private static readonly HairstylistBuyInfo[] m_SellListElf = new[]
{
new HairstylistBuyInfo(
1018357,
50000,
false,
typeof(ChangeHairstyleGump),
new[] {From, Vendor, Price, false, ChangeHairstyleEntry.HairEntriesElf}),
new HairstylistBuyInfo(
1018359,
50,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, true, ChangeHairHueEntry.RegularEntries}),
new HairstylistBuyInfo(
1018360,
500000,
false,
typeof(ChangeHairHueGump),
new[] {From, Vendor, Price, true, true, ChangeHairHueEntry.BrightEntries})
};
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
[Constructable]
public CustomHairstylist()
: base("the hairstylist")
{ }
public CustomHairstylist(Serial serial)
: base(serial)
{ }
public override bool ClickTitle { get { return false; } }
public override bool IsActiveBuyer { get { return false; } }
public override bool IsActiveSeller { get { return true; } }
public override VendorShoeType ShoeType { get { return Utility.RandomBool() ? VendorShoeType.Shoes : VendorShoeType.Sandals; } }
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
public override bool OnBuyItems(Mobile buyer, List<BuyItemResponse> list)
{
return false;
}
public override void VendorBuy(Mobile from)
{
if (from.Race == Race.Human)
{
from.SendGump(new HairstylistBuyGump(from, this, m_SellList));
}
else if (from.Race == Race.Elf)
{
from.SendGump(new HairstylistBuyGump(from, this, m_SellListElf));
}
}
public override int GetHairHue()
{
return Utility.RandomBrightHue();
}
public override void InitOutfit()
{
base.InitOutfit();
AddItem(new Robe(Utility.RandomPinkHue()));
}
public override bool CheckVendorAccess(Mobile from)
{
if (from.Race == Race.Gargoyle)
return false;
return base.CheckVendorAccess(from);
}
public override void InitSBInfo()
{ }
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write(0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class HairstylistBuyInfo
{
private readonly int m_Title;
private readonly string m_TitleString;
private readonly int m_Price;
private readonly bool m_FacialHair;
private readonly Type m_GumpType;
private readonly object[] m_GumpArgs;
public HairstylistBuyInfo(int title, int price, bool facialHair, Type gumpType, object[] args)
{
m_Title = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
}
public HairstylistBuyInfo(string title, int price, bool facialHair, Type gumpType, object[] args)
{
m_TitleString = title;
m_Price = price;
m_FacialHair = facialHair;
m_GumpType = gumpType;
m_GumpArgs = args;
}
public int Title { get { return m_Title; } }
public string TitleString { get { return m_TitleString; } }
public int Price { get { return m_Price; } }
public bool FacialHair { get { return m_FacialHair; } }
public Type GumpType { get { return m_GumpType; } }
public object[] GumpArgs { get { return m_GumpArgs; } }
}
public class HairstylistBuyGump : Gump
{
private readonly Mobile m_From;
private readonly Mobile m_Vendor;
private readonly HairstylistBuyInfo[] m_SellList;
public HairstylistBuyGump(Mobile from, Mobile vendor, HairstylistBuyInfo[] sellList)
: base(50, 50)
{
m_From = from;
m_Vendor = vendor;
m_SellList = sellList;
from.CloseGump(typeof(HairstylistBuyGump));
from.CloseGump(typeof(ChangeHairHueGump));
from.CloseGump(typeof(ChangeHairstyleGump));
bool isFemale = (from.Female || from.Body.IsFemale);
int balance = Banker.GetBalance(from);
int canAfford = 0;
for (int i = 0; i < sellList.Length; ++i)
{
if (balance >= sellList[i].Price && (!sellList[i].FacialHair || !isFemale))
{
++canAfford;
}
}
AddPage(0);
AddBackground(50, 10, 450, 100 + (canAfford * 25), 2600);
AddHtmlLocalized(100, 40, 350, 20, 1018356, false, false); // Choose your hairstyle change:
int index = 0;
for (int i = 0; i < sellList.Length; ++i)
{
if (balance >= sellList[i].Price && (!sellList[i].FacialHair || !isFemale))
{
if (sellList[i].TitleString != null)
{
AddHtml(140, 75 + (index * 25), 300, 20, sellList[i].TitleString, false, false);
}
else
{
AddHtmlLocalized(140, 75 + (index * 25), 300, 20, sellList[i].Title, false, false);
}
AddButton(100, 75 + (index++ * 25), 4005, 4007, 1 + i, GumpButtonType.Reply, 0);
}
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
int index = info.ButtonID - 1;
if (index >= 0 && index < m_SellList.Length)
{
HairstylistBuyInfo buyInfo = m_SellList[index];
int balance = Banker.GetBalance(m_From);
bool isFemale = (m_From.Female || m_From.Body.IsFemale);
if (buyInfo.FacialHair && isFemale)
{
// You cannot place facial hair on a woman!
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1010639, m_From.NetState);
}
else if (balance >= buyInfo.Price)
{
try
{
var origArgs = buyInfo.GumpArgs;
var args = new object[origArgs.Length];
for (int i = 0; i < args.Length; ++i)
{
if (origArgs[i] == CustomHairstylist.Price)
{
args[i] = m_SellList[index].Price;
}
else if (origArgs[i] == CustomHairstylist.From)
{
args[i] = m_From;
}
else if (origArgs[i] == CustomHairstylist.Vendor)
{
args[i] = m_Vendor;
}
else
{
args[i] = origArgs[i];
}
}
Gump g = Activator.CreateInstance(buyInfo.GumpType, args) as Gump;
m_From.SendGump(g);
}
catch
{ }
}
else
{
// You cannot afford my services for that style.
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState);
}
}
}
}
public class ChangeHairHueEntry
{
public static readonly ChangeHairHueEntry[] BrightEntries = new[]
{
new ChangeHairHueEntry("*****", 12, 10), new ChangeHairHueEntry("*****", 32, 5),
new ChangeHairHueEntry("*****", 38, 8), new ChangeHairHueEntry("*****", 54, 3),
new ChangeHairHueEntry("*****", 62, 10), new ChangeHairHueEntry("*****", 81, 2),
new ChangeHairHueEntry("*****", 89, 2), new ChangeHairHueEntry("*****", 1153, 2)
};
public static readonly ChangeHairHueEntry[] RegularEntries = new[]
{
new ChangeHairHueEntry("*****", 1602, 26), new ChangeHairHueEntry("*****", 1628, 27),
new ChangeHairHueEntry("*****", 1502, 32), new ChangeHairHueEntry("*****", 1302, 32),
new ChangeHairHueEntry("*****", 1402, 32), new ChangeHairHueEntry("*****", 1202, 24),
new ChangeHairHueEntry("*****", 2402, 29), new ChangeHairHueEntry("*****", 2213, 6),
new ChangeHairHueEntry("*****", 1102, 8), new ChangeHairHueEntry("*****", 1110, 8),
new ChangeHairHueEntry("*****", 1118, 16), new ChangeHairHueEntry("*****", 1134, 16)
};
private readonly string m_Name;
private readonly int[] m_Hues;
public ChangeHairHueEntry(string name, int[] hues)
{
m_Name = name;
m_Hues = hues;
}
public ChangeHairHueEntry(string name, int start, int count)
{
m_Name = name;
m_Hues = new int[count];
for (int i = 0; i < count; ++i)
{
m_Hues[i] = start + i;
}
}
public string Name { get { return m_Name; } }
public int[] Hues { get { return m_Hues; } }
}
public class ChangeHairHueGump : Gump
{
private readonly Mobile m_From;
private readonly Mobile m_Vendor;
private readonly int m_Price;
private readonly bool m_Hair;
private readonly bool m_FacialHair;
private readonly ChangeHairHueEntry[] m_Entries;
public ChangeHairHueGump(
Mobile from, Mobile vendor, int price, bool hair, bool facialHair, ChangeHairHueEntry[] entries)
: base(50, 50)
{
m_From = from;
m_Vendor = vendor;
m_Price = price;
m_Hair = hair;
m_FacialHair = facialHair;
m_Entries = entries;
from.CloseGump(typeof(HairstylistBuyGump));
from.CloseGump(typeof(ChangeHairHueGump));
from.CloseGump(typeof(ChangeHairstyleGump));
AddPage(0);
AddBackground(100, 10, 350, 370, 2600);
AddBackground(120, 54, 110, 270, 5100);
AddHtmlLocalized(155, 25, 240, 30, 1011013, false, false); // <center>Hair Color Selection Menu</center>
AddHtmlLocalized(150, 330, 220, 35, 1011014, false, false); // Dye my hair this color!
AddButton(380, 330, 4005, 4007, 1, GumpButtonType.Reply, 0);
for (int i = 0; i < entries.Length; ++i)
{
ChangeHairHueEntry entry = entries[i];
AddLabel(130, 59 + (i * 22), entry.Hues[0] - 1, entry.Name);
AddButton(207, 60 + (i * 22), 5224, 5224, 0, GumpButtonType.Page, 1 + i);
}
for (int i = 0; i < entries.Length; ++i)
{
ChangeHairHueEntry entry = entries[i];
var hues = entry.Hues;
string name = entry.Name;
AddPage(1 + i);
for (int j = 0; j < hues.Length; ++j)
{
AddLabel(278 + ((j / 16) * 80), 52 + ((j % 16) * 17), hues[j] - 1, name);
AddRadio(260 + ((j / 16) * 80), 52 + ((j % 16) * 17), 210, 211, false, (j * entries.Length) + i);
}
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (info.ButtonID == 1)
{
var switches = info.Switches;
if (switches.Length > 0)
{
int index = switches[0] % m_Entries.Length;
int offset = switches[0] / m_Entries.Length;
if (index >= 0 && index < m_Entries.Length)
{
if (offset >= 0 && offset < m_Entries[index].Hues.Length)
{
if (m_Hair && m_From.HairItemID > 0 || m_FacialHair && m_From.FacialHairItemID > 0)
{
if (m_Price > 0 && !Banker.Withdraw(m_From, m_Price))
{
if(m_Vendor != null)
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState);
// You cannot afford my services for that style.
return;
}
int hue = m_Entries[index].Hues[offset];
if (m_Hair)
{
m_From.HairHue = hue;
}
if (m_FacialHair)
{
m_From.FacialHairHue = hue;
}
}
else
{
if (m_Vendor != null)
{
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 502623, m_From.NetState); // You have no hair to dye and you cannot use this.
}
else
{
m_From.SendLocalizedMessage(502623);
}
}
}
}
}
else
{
if (m_Vendor != null)
{
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState); // You decide not to change your hairstyle.
}
else
{
m_From.SendLocalizedMessage(1013009);
}
}
}
else
{
// You decide not to change your hairstyle.
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
}
}
}
public class ChangeHairstyleEntry
{
public static readonly ChangeHairstyleEntry[] HairEntries = new[]
{
new ChangeHairstyleEntry(50700, 70 - 137, 20 - 60, 0x203B),
new ChangeHairstyleEntry(60710, 193 - 260, 18 - 60, 0x2045),
new ChangeHairstyleEntry(50703, 316 - 383, 25 - 60, 0x2044),
new ChangeHairstyleEntry(60701, 70 - 137, 75 - 125, 0x203C),
new ChangeHairstyleEntry(60900, 193 - 260, 85 - 125, 0x2047),
new ChangeHairstyleEntry(60713, 320 - 383, 85 - 125, 0x204A),
new ChangeHairstyleEntry(60702, 70 - 137, 140 - 190, 0x203D),
new ChangeHairstyleEntry(1836, 173 - 260, 128 - 190, 0x2049),
new ChangeHairstyleEntry(1841, 60901, 315 - 383, 150 - 190, 0x2046, 0x2048),
new ChangeHairstyleEntry(0, 0, 0, 0)
};
public static readonly ChangeHairstyleEntry[] BeardEntries = new[]
{
new ChangeHairstyleEntry(50800, 120 - 187, 30 - 80, 0x2040),
new ChangeHairstyleEntry(50904, 243 - 310, 33 - 80, 0x204B),
new ChangeHairstyleEntry(50906, 120 - 187, 100 - 150, 0x204D),
new ChangeHairstyleEntry(50801, 243 - 310, 95 - 150, 0x203E),
new ChangeHairstyleEntry(50802, 120 - 187, 173 - 220, 0x203F),
new ChangeHairstyleEntry(50905, 243 - 310, 165 - 220, 0x204C),
new ChangeHairstyleEntry(50808, 120 - 187, 242 - 290, 0x2041), new ChangeHairstyleEntry(0, 0, 0, 0)
};
public static readonly ChangeHairstyleEntry[] HairEntriesElf = new ChangeHairstyleEntry[]
{
new ChangeHairstyleEntry( 0xEDF5, 0xC6E5, 70 - 137, 20 - 60, 0x2FC0, 0x2FC0 ),
new ChangeHairstyleEntry( 0xEDF6, 0xC6E6, 198 - 260, 18 - 60, 0x2FC1, 0x2FC1 ),
new ChangeHairstyleEntry( 0xEDF7, 0xC6E7, 316 - 383, 20 - 60, 0x2FC2, 0x2FC2 ),
new ChangeHairstyleEntry( 0xEDDC, 0xC6CC, 70 - 137, 80 - 125, 0x2FCE, 0x2FCE ),
new ChangeHairstyleEntry( 0xEDDD, 0xC6CD, 193 - 260, 85 - 125, 0x2FCF, 0x2FCF ),
new ChangeHairstyleEntry( 0xEDDF, 0xC6CF, 320 - 383, 85 - 125, 0x2FD1, 0x2FD1 ),
new ChangeHairstyleEntry( 0xEDDA, 0xC6E4, 70 - 137, 147 - 190, 0x2FCC, 0x2FBF ),
new ChangeHairstyleEntry( 0xEDDE, 0xC6CB, 196 - 260, 142 - 190, 0x2FD0, 0x2FCD ),
new ChangeHairstyleEntry( -1, -1, -1, -1 ),
new ChangeHairstyleEntry( 0, 0, 0, 0 )
};
public static readonly ChangeHairstyleEntry[] HairEntriesGargoyle = new ChangeHairstyleEntry[]
{
new ChangeHairstyleEntry( 0x7A0, 0x76C, 47 - 137, 12 - 60, 0x4261, 0x4258 ),
new ChangeHairstyleEntry( 0x7A1, 0x76D, 170 - 260, 12 - 60, 0x4262, 0x4259 ),
new ChangeHairstyleEntry( 0x79E, 0x773, 295 - 383, 12 - 60, 0x4273, 0x425A ),
new ChangeHairstyleEntry( 0x7A2, 0x76E, 50 - 137, 68 - 125, 0x4274, 0x425B ),
new ChangeHairstyleEntry( 0x79F, 0x774, 172 - 260, 70 - 125, 0x4275, 0x425C ),
new ChangeHairstyleEntry( 0x77C, 0x775, 295 - 383, 81 - 125, 0x42AA, 0x425D ),
new ChangeHairstyleEntry( 0x77D, 0x776, 47 - 137, 142 - 190, 0x42AB, 0x425E ),
new ChangeHairstyleEntry( 0x77E, 0x777, 172 - 260, 142 - 190, 0x42B1, 0x425F ),
new ChangeHairstyleEntry( -1, -1, -1, -1 ),
new ChangeHairstyleEntry( 0, 0, 0, 0 )
};
public static readonly ChangeHairstyleEntry[] BeardEntriesGargoyle = new ChangeHairstyleEntry[]
{
new ChangeHairstyleEntry( 0xC5E9, 120 - 187, 30 - 80, 0x42AD ),
new ChangeHairstyleEntry( 0x770, 220 - 310, 23 - 80, 0x42AE ),
new ChangeHairstyleEntry( 0xC5DA, 120 - 187, 100 - 150, 0x42AF ),
new ChangeHairstyleEntry( 0xC5D7, 243 - 310, 95 - 150, 0x42B0 ),
new ChangeHairstyleEntry( 0, 0, 0, 0 )
};
private int m_ItemID_Male;
private int m_ItemID_Female;
private int m_GumpID_Male;
private int m_GumpID_Female;
private int m_X, m_Y;
public int ItemID_Male { get { return m_ItemID_Male; } }
public int ItemID_Female { get { return m_ItemID_Female; } }
public int GumpID_Male { get { return m_GumpID_Male; } }
public int GumpID_Female { get { return m_GumpID_Female; } }
public int X { get { return m_X; } }
public int Y { get { return m_Y; } }
public ChangeHairstyleEntry(int gumpID, int x, int y, int itemID)
: this(gumpID, gumpID, x, y, itemID, itemID)
{
}
public ChangeHairstyleEntry(int gumpID_Female, int gumpID_Male, int x, int y, int itemID_Female, int itemID_Male)
{
m_GumpID_Male = gumpID_Male;
m_GumpID_Female = gumpID_Female;
m_X = x;
m_Y = y;
m_ItemID_Male = itemID_Male;
m_ItemID_Female = itemID_Female;
}
}
public class ChangeHairstyleGump : Gump
{
private readonly Mobile m_From;
private readonly Mobile m_Vendor;
private readonly int m_Price;
private readonly bool m_FacialHair;
private readonly ChangeHairstyleEntry[] m_Entries;
public bool m_Female;
public GenderChangeToken m_Token;
public ChangeHairstyleGump(Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries)
: this(from, vendor, price, facialHair, entries, null)
{
}
public ChangeHairstyleGump(Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries, GenderChangeToken token)
: this(from.Female, from, vendor, price, facialHair, entries, token)
{
}
public ChangeHairstyleGump(bool female, Mobile from, Mobile vendor, int price, bool facialHair, ChangeHairstyleEntry[] entries, GenderChangeToken token)
: base(50, 50)
{
m_From = from;
m_Vendor = vendor;
m_Price = price;
m_FacialHair = facialHair;
m_Entries = entries;
m_Female = female;
m_Token = token;
from.CloseGump(typeof(HairstylistBuyGump));
from.CloseGump(typeof(ChangeHairHueGump));
from.CloseGump(typeof(ChangeHairstyleGump));
int tableWidth = (m_FacialHair ? 2 : 3);
int tableHeight = ((entries.Length + tableWidth - (m_FacialHair ? 1 : 2)) / tableWidth);
int offsetWidth = 123;
int offsetHeight = (m_FacialHair ? 70 : 65);
AddPage(0);
AddBackground(0, 0, 81 + (tableWidth * offsetWidth), 145 + (tableHeight * offsetHeight), 2600);
AddButton(45, 90 + (tableHeight * offsetHeight), 4005, 4007, 1, GumpButtonType.Reply, 0);
AddHtmlLocalized(77, 90 + (tableHeight * offsetHeight), 90, 35, 1006044, false, false); // Ok
AddButton(
90 + (tableWidth * offsetWidth) - 180, 85 + (tableHeight * offsetHeight), 4005, 4007, 0, GumpButtonType.Reply, 0);
AddHtmlLocalized(
90 + (tableWidth * offsetWidth) - 148, 85 + (tableHeight * offsetHeight), 90, 35, 1006045, false, false); // Cancel
if (!facialHair)
{
AddHtmlLocalized(50, 15, 350, 20, 1018353, false, false); // <center>New Hairstyle</center>
}
else
{
AddHtmlLocalized(55, 15, 200, 20, 1018354, false, false); // <center>New Beard</center>
}
for (int i = 0; i < entries.Length; ++i)
{
int xTable = i % tableWidth;
int yTable = i / tableWidth;
int gumpID = female ? entries[i].GumpID_Female : entries[i].GumpID_Male;
if (gumpID == -1)
continue;
if (gumpID != 0)
{
AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i);
AddBackground(87 + (xTable * offsetWidth), 50 + (yTable * offsetHeight), 50, 50, 2620);
int x = entries[i].X;
int y = entries[i].Y;
if (gumpID == 1841)
{
x -= 17;
y -= 17;
}
AddImage(87 + (xTable * offsetWidth) + x, 50 + (yTable * offsetHeight) + y, gumpID);
}
else if (!facialHair)
{
AddRadio(40 + ((xTable) * offsetWidth), 240, 208, 209, false, i);
AddHtmlLocalized(60 + ((xTable) * offsetWidth), 240, 200, 40, 1011064, false, false); // Bald
}
else
{
AddRadio(40 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 208, 209, false, i);
//AddHtmlLocalized(60 + (xTable * offsetWidth), 70 + (yTable * offsetHeight), 85, 35, 1011064, false, false); // Bald
}
}
}
public override void OnResponse(NetState sender, RelayInfo info)
{
if (!m_FacialHair || !m_Female)
{
if (info.ButtonID == 1)
{
var switches = info.Switches;
if (switches.Length > 0)
{
int index = switches[0];
bool female = m_Female;
if (index >= 0 && index < m_Entries.Length)
{
ChangeHairstyleEntry entry = m_Entries[index];
if (m_From is PlayerMobile)
{
((PlayerMobile)m_From).SetHairMods(-1, -1);
}
int hairID = m_From.HairItemID;
int facialHairID = m_From.FacialHairItemID;
int itemID = female ? entry.ItemID_Female : entry.ItemID_Male;
if (itemID == 0)
{
bool invalid = m_FacialHair ? (facialHairID == 0) : (hairID == 0);
if (!invalid)
{
if (m_Token != null)
{
m_Token.OnChangeHairstyle(m_From, m_FacialHair, 0);
return;
}
if (Banker.Withdraw(m_From, m_Price, true))
{
if (m_FacialHair)
{
m_From.FacialHairItemID = 0;
}
else
{
m_From.HairItemID = 0;
}
}
else
{
if (m_Vendor != null)
{
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState);
// You cannot afford my services for that style.
}
else
{
m_From.SendLocalizedMessage(1042293);
}
}
}
}
else
{
bool invalid = m_FacialHair ? facialHairID > 0 && facialHairID == itemID : hairID > 0 && hairID == itemID;
if (!invalid)
{
if (m_Price <= 0 || Banker.Withdraw(m_From, m_Price))
{
if (m_Token != null)
{
m_Token.OnChangeHairstyle(m_From, m_FacialHair, itemID);
return;
}
if (m_FacialHair)
{
m_From.FacialHairItemID = itemID;
if (itemID != 0)
{
m_From.FacialHairHue = m_From.HairHue;
}
}
else
{
m_From.HairItemID = itemID;
}
}
else
{
if (m_Vendor != null)
{
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1042293, m_From.NetState);
// You cannot afford my services for that style.
}
else
{
m_From.SendLocalizedMessage(1042293);
}
}
}
}
}
}
else
{
if (m_Vendor != null)
{
// You decide not to change your hairstyle.
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
}
else
{
m_From.SendLocalizedMessage(1013009); // You decide not to change your hairstyle.
}
}
}
else
{
if (m_Vendor != null)
{
// You decide not to change your hairstyle.
m_Vendor.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1013009, m_From.NetState);
}
else
{
m_From.SendLocalizedMessage(1013009); // You decide not to change your hairstyle.
}
}
}
if (m_Token != null)
m_Token.OnFailedHairstyle(m_From, m_FacialHair);
}
}
}

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