Reorganizes Project (#41)
This commit is contained in:
parent
08bf44af9a
commit
3614a66aee
3499 changed files with 79 additions and 55 deletions
185
Projects/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs
Normal file
185
Projects/Scripts/Engines/Quests/Uzeraan Turmoil/Mobiles/Dryad.cs
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Dryad : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Dryad() : base("the Dryad")
|
||||
{
|
||||
SetSkill(SkillName.Peacemaking, 80.0, 100.0);
|
||||
SetSkill(SkillName.Cooking, 80.0, 100.0);
|
||||
SetSkill(SkillName.Provocation, 80.0, 100.0);
|
||||
SetSkill(SkillName.Musicianship, 80.0, 100.0);
|
||||
SetSkill(SkillName.Poisoning, 80.0, 100.0);
|
||||
SetSkill(SkillName.Archery, 80.0, 100.0);
|
||||
SetSkill(SkillName.Tailoring, 80.0, 100.0);
|
||||
}
|
||||
|
||||
public Dryad(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsActiveVendor => true;
|
||||
public override bool DisallowAllMoves => false;
|
||||
public override bool ClickTitle => true;
|
||||
public override bool CanTeach => true;
|
||||
public override string DefaultName => "Anwin Brenna";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x85A7;
|
||||
|
||||
Female = true;
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Kilt(0x301));
|
||||
AddItem(new FancyShirt(0x300));
|
||||
|
||||
HairItemID = 0x203D; // Pony Tail
|
||||
HairHue = 0x22;
|
||||
|
||||
Bow bow = new Bow();
|
||||
bow.Movable = false;
|
||||
AddItem(bow);
|
||||
}
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBDryad());
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 4;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective<FindDryadObjective>() != null;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostFertileDirt(player))
|
||||
{
|
||||
FocusTo(player);
|
||||
qs.AddConversation(new LostFertileDirtConversation(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindDryadObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
fertileDirt.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
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
if (player.Quest is UzeraanTurmoilQuest qs && dropped is Apple &&
|
||||
UzeraanTurmoilQuest.HasLostFertileDirt(from))
|
||||
{
|
||||
FocusTo(from);
|
||||
|
||||
Item fertileDirt = new QuestFertileDirt();
|
||||
|
||||
if (!player.PlaceInBackpack(fertileDirt))
|
||||
{
|
||||
fertileDirt.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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Consume();
|
||||
qs.AddConversation(new DryadAppleConversation());
|
||||
return dropped.Deleted;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
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 SBDryad : SBInfo
|
||||
{
|
||||
public override IShopSellInfo SellInfo{ get; } = new InternalSellInfo();
|
||||
|
||||
public override List<GenericBuyInfo> BuyInfo{ get; } = new InternalBuyInfo();
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
Add(new GenericBuyInfo(typeof(Bandage), 5, 20, 0xE21, 0));
|
||||
Add(new GenericBuyInfo(typeof(Ginseng), 3, 20, 0xF85, 0));
|
||||
Add(new GenericBuyInfo(typeof(Garlic), 3, 20, 0xF84, 0));
|
||||
Add(new GenericBuyInfo(typeof(Bloodmoss), 5, 20, 0xF7B, 0));
|
||||
Add(new GenericBuyInfo(typeof(Nightshade), 3, 20, 0xF88, 0));
|
||||
Add(new GenericBuyInfo(typeof(SpidersSilk), 3, 20, 0xF8D, 0));
|
||||
Add(new GenericBuyInfo(typeof(MandrakeRoot), 3, 20, 0xF86, 0));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
Add(typeof(Bandage), 2);
|
||||
Add(typeof(Garlic), 2);
|
||||
Add(typeof(Ginseng), 2);
|
||||
Add(typeof(Bloodmoss), 3);
|
||||
Add(typeof(Nightshade), 2);
|
||||
Add(typeof(SpidersSilk), 2);
|
||||
Add(typeof(MandrakeRoot), 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,77 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MansionGuard : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public MansionGuard() : base("the Mansion Guard")
|
||||
{
|
||||
}
|
||||
|
||||
public MansionGuard(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
Bardiche weapon = new Bardiche();
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest == null && QuestSystem.CanOfferQuest(to, typeof(UzeraanTurmoilQuest));
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
if (player.Quest == null && QuestSystem.CanOfferQuest(player, typeof(UzeraanTurmoilQuest)))
|
||||
{
|
||||
Direction = GetDirectionTo(player);
|
||||
|
||||
new UzeraanTurmoilQuest(player).SendOffer();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,102 @@
|
|||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MilitiaCanoneer : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public MilitiaCanoneer() : base("the Militia Canoneer")
|
||||
{
|
||||
Active = true;
|
||||
}
|
||||
|
||||
public MilitiaCanoneer(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Active{ get; set; }
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 125, 25);
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
AddItem(new PlateChest());
|
||||
AddItem(new PlateArms());
|
||||
AddItem(new PlateGloves());
|
||||
AddItem(new PlateLegs());
|
||||
|
||||
Torch torch = new Torch();
|
||||
torch.Movable = false;
|
||||
AddItem(torch);
|
||||
torch.Ignite();
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m.Player || m is BaseVendor)
|
||||
return false;
|
||||
|
||||
if (m is BaseCreature bc)
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if (master != null)
|
||||
return IsEnemy(master);
|
||||
}
|
||||
|
||||
return m.Karma < 0;
|
||||
}
|
||||
|
||||
public bool WillFire(Cannon cannon, Mobile target)
|
||||
{
|
||||
if (Active && IsEnemy(target))
|
||||
{
|
||||
Direction = GetDirectionTo(target);
|
||||
Say(Utility.RandomList(500651, 1049098, 1049320, 1043149));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(0); // version
|
||||
|
||||
writer.Write(Active);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Active = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Misc;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class MilitiaFighter : BaseCreature
|
||||
{
|
||||
[Constructible]
|
||||
public MilitiaFighter() : base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
InitStats(40, 30, 5);
|
||||
Title = "the Militia Fighter";
|
||||
|
||||
SpeechHue = Utility.RandomDyedHue();
|
||||
|
||||
Hue = Race.Human.RandomSkinHue();
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
Name = NameList.RandomName("male");
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
Utility.AssignRandomFacialHair(this, HairHue);
|
||||
|
||||
AddItem(new ThighBoots(0x1BB));
|
||||
AddItem(new LeatherChest());
|
||||
AddItem(new LeatherArms());
|
||||
AddItem(new LeatherLegs());
|
||||
AddItem(new LeatherCap());
|
||||
AddItem(new LeatherGloves());
|
||||
AddItem(new LeatherGorget());
|
||||
|
||||
Item weapon;
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
case 0:
|
||||
weapon = new Broadsword();
|
||||
break;
|
||||
case 1:
|
||||
weapon = new Cutlass();
|
||||
break;
|
||||
case 2:
|
||||
weapon = new Katana();
|
||||
break;
|
||||
case 3:
|
||||
weapon = new Longsword();
|
||||
break;
|
||||
case 4:
|
||||
weapon = new Scimitar();
|
||||
break;
|
||||
default:
|
||||
weapon = new VikingSword();
|
||||
break;
|
||||
}
|
||||
|
||||
weapon.Movable = false;
|
||||
AddItem(weapon);
|
||||
|
||||
Item shield = new BronzeShield();
|
||||
shield.Movable = false;
|
||||
AddItem(shield);
|
||||
|
||||
SetSkill(SkillName.Swords, 20.0);
|
||||
}
|
||||
|
||||
public MilitiaFighter(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool ClickTitle => false;
|
||||
|
||||
public override bool IsEnemy(Mobile m)
|
||||
{
|
||||
if (m.Player || m is BaseVendor)
|
||||
return false;
|
||||
|
||||
if (m is BaseCreature bc)
|
||||
{
|
||||
Mobile master = bc.GetMaster();
|
||||
if (master != null)
|
||||
return IsEnemy(master);
|
||||
}
|
||||
|
||||
return m.Karma < 0;
|
||||
}
|
||||
|
||||
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 MilitiaFighterCorpse : Corpse
|
||||
{
|
||||
public MilitiaFighterCorpse(Mobile owner, HairInfo hair, FacialHairInfo facialhair, List<Item> equipItems) : base(
|
||||
owner, hair, facialhair, equipItems)
|
||||
{
|
||||
}
|
||||
|
||||
public MilitiaFighterCorpse(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
{
|
||||
list.Add("a human corpse");
|
||||
list.Add(1049318, Name); // the remains of ~1_NAME~ the militia fighter
|
||||
}
|
||||
else
|
||||
{
|
||||
list.Add(1049319); // the remains of a militia fighter
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int hue = Notoriety.GetHue(NotorietyHandlers.CorpseNotoriety(from, this));
|
||||
|
||||
if (ItemID == 0x2006) // Corpse form
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049318, "",
|
||||
Name)); // the remains of ~1_NAME~ the militia fighter
|
||||
else
|
||||
from.Send(new MessageLocalized(Serial, ItemID, MessageType.Label, hue, 3, 1049319, "",
|
||||
"")); // the remains of a militia fighter
|
||||
}
|
||||
|
||||
public override void Open(Mobile from, bool checkSelfLoot)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 2))
|
||||
from.SendLocalizedMessage(1049661, "",
|
||||
0x22); // Thinking about his sacrifice, you can't bring yourself to loot the body of this militia fighter.
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,152 @@
|
|||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Schmendrick : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Schmendrick() : base("the High Mage")
|
||||
{
|
||||
}
|
||||
|
||||
public Schmendrick(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Schmendrick";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F3;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Robe(0x4DD));
|
||||
AddItem(new WizardsHat(0x482));
|
||||
AddItem(new Shoes(0x482));
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
|
||||
GlacialStaff staff = new GlacialStaff();
|
||||
staff.Movable = false;
|
||||
AddItem(staff);
|
||||
|
||||
Backpack pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 7;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest qs && qs.FindObjective<FindSchmendrickObjective>() != null;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostScrollOfPower(player))
|
||||
{
|
||||
FocusTo(player);
|
||||
qs.AddConversation(new LostScrollOfPowerConversation(false));
|
||||
}
|
||||
else
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<FindSchmendrickObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
obj.Complete();
|
||||
}
|
||||
else if (contextMenu)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is BlankScroll && UzeraanTurmoilQuest.HasLostScrollOfPower(from))
|
||||
{
|
||||
FocusTo(from);
|
||||
|
||||
Item scroll = new SchmendrickScrollOfPower();
|
||||
|
||||
if (!from.PlaceInBackpack(scroll))
|
||||
{
|
||||
scroll.Delete();
|
||||
from.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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Consume();
|
||||
from.SendLocalizedMessage(
|
||||
1049346); // Schmendrick scribbles on the scroll for a few moments and hands you the finished product.
|
||||
return dropped.Deleted;
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,432 @@
|
|||
using Server.Gumps;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.Quests.Haven
|
||||
{
|
||||
public class Uzeraan : BaseQuester
|
||||
{
|
||||
[Constructible]
|
||||
public Uzeraan() : base("the Conjurer")
|
||||
{
|
||||
}
|
||||
|
||||
public Uzeraan(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override string DefaultName => "Uzeraan";
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
InitStats(100, 100, 25);
|
||||
|
||||
Hue = 0x83F3;
|
||||
|
||||
Female = false;
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Robe(0x4DD));
|
||||
AddItem(new WizardsHat(0x8A5));
|
||||
AddItem(new Shoes(0x8A5));
|
||||
|
||||
HairItemID = 0x203C;
|
||||
HairHue = 0x455;
|
||||
|
||||
FacialHairItemID = 0x203E;
|
||||
FacialHairHue = 0x455;
|
||||
|
||||
BlackStaff staff = new BlackStaff();
|
||||
staff.Movable = false;
|
||||
AddItem(staff);
|
||||
}
|
||||
|
||||
public override int GetAutoTalkRange(PlayerMobile pm)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
public override bool CanTalkTo(PlayerMobile to)
|
||||
{
|
||||
return to.Quest is UzeraanTurmoilQuest;
|
||||
}
|
||||
|
||||
public override void OnTalk(PlayerMobile player, bool contextMenu)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (UzeraanTurmoilQuest.HasLostScrollOfPower(player))
|
||||
{
|
||||
qs.AddConversation(new LostScrollOfPowerConversation(true));
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostFertileDirt(player))
|
||||
{
|
||||
qs.AddConversation(new LostFertileDirtConversation(true));
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostDaemonBlood(player))
|
||||
{
|
||||
qs.AddConversation(new LostDaemonBloodConversation());
|
||||
}
|
||||
else if (UzeraanTurmoilQuest.HasLostDaemonBone(player))
|
||||
{
|
||||
qs.AddConversation(new LostDaemonBoneConversation());
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
Container backpack = player.Backpack;
|
||||
|
||||
if (backpack == null
|
||||
|| backpack.GetAmount(typeof(BlackPearl)) < 30
|
||||
|| backpack.GetAmount(typeof(Bloodmoss)) < 30
|
||||
|| backpack.GetAmount(typeof(Garlic)) < 30
|
||||
|| backpack.GetAmount(typeof(Ginseng)) < 30
|
||||
|| backpack.GetAmount(typeof(MandrakeRoot)) < 30
|
||||
|| backpack.GetAmount(typeof(Nightshade)) < 30
|
||||
|| backpack.GetAmount(typeof(SulfurousAsh)) < 30
|
||||
|| backpack.GetAmount(typeof(SpidersSilk)) < 30)
|
||||
qs.AddConversation(new FewReagentsConversation());
|
||||
}
|
||||
|
||||
QuestObjective obj = qs.FindObjective<FindUzeraanBeginObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindUzeraanFirstTaskObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<FindUzeraanAboutReportObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
cont.DropItem(new MarkScroll(5));
|
||||
cont.DropItem(new RecallScroll(5));
|
||||
for (int i = 0; i < 5; i++) cont.DropItem(new RecallRune());
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem(new Gold(300));
|
||||
for (int i = 0; i < 6; i++)
|
||||
{
|
||||
cont.DropItem(new NightSightPotion());
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
}
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
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
|
||||
{
|
||||
obj.Complete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnScrollOfPowerObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049378); // Hand me the scroll, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnFertileDirtObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049381); // Hand me the Fertile Dirt, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnDaemonBloodObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049379); // Hand me the Vial of Blood, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
obj = qs.FindObjective<ReturnDaemonBoneObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
FocusTo(player);
|
||||
SayTo(player, 1049380); // Hand me the Daemon Bone, if you have it.
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(player, 1049357); // I have nothing more for you at this time.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (from is PlayerMobile player)
|
||||
{
|
||||
QuestSystem qs = player.Quest;
|
||||
|
||||
if (qs is UzeraanTurmoilQuest)
|
||||
{
|
||||
if (dropped is UzeraanTurmoilHorn horn)
|
||||
{
|
||||
if (player.Young)
|
||||
{
|
||||
if (horn.Charges < 10)
|
||||
{
|
||||
SayTo(from, 1049384); // I have recharged the item for you.
|
||||
horn.Charges = 10;
|
||||
}
|
||||
else
|
||||
{
|
||||
SayTo(from, 1049385); // That doesn't need recharging yet.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.SendLocalizedMessage(1114333); //You must be young to have this item recharged.
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (dropped is SchmendrickScrollOfPower)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnScrollOfPowerObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new TreasureMap(player.Young ? 0 : 1, Map.Trammel));
|
||||
cont.DropItem(new Shovel());
|
||||
cont.DropItem(new UzeraanTurmoilHorn());
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestFertileDirt)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnFertileDirtObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
cont.DropItem(new BlackPearl(20));
|
||||
cont.DropItem(new Bloodmoss(20));
|
||||
cont.DropItem(new Garlic(20));
|
||||
cont.DropItem(new Ginseng(20));
|
||||
cont.DropItem(new MandrakeRoot(20));
|
||||
cont.DropItem(new Nightshade(20));
|
||||
cont.DropItem(new SulfurousAsh(20));
|
||||
cont.DropItem(new SpidersSilk(20));
|
||||
|
||||
for (int i = 0; i < 3; i++)
|
||||
cont.DropItem(Loot.RandomScroll(0, 23, SpellbookType.Regular));
|
||||
}
|
||||
else
|
||||
{
|
||||
cont.DropItem(new Gold(300));
|
||||
cont.DropItem(new Bandage(25));
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
cont.DropItem(new LesserHealPotion());
|
||||
}
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestDaemonBlood)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnDaemonBloodObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Item reward;
|
||||
|
||||
if (player.Profession == 2) // magician
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
|
||||
cont.DropItem(new ExplosionScroll(4));
|
||||
cont.DropItem(new MagicWizardsHat());
|
||||
|
||||
reward = cont;
|
||||
}
|
||||
else
|
||||
{
|
||||
BaseWeapon weapon;
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
case 0:
|
||||
weapon = new Broadsword();
|
||||
break;
|
||||
case 1:
|
||||
weapon = new Cutlass();
|
||||
break;
|
||||
case 2:
|
||||
weapon = new Katana();
|
||||
break;
|
||||
case 3:
|
||||
weapon = new Longsword();
|
||||
break;
|
||||
case 4:
|
||||
weapon = new Scimitar();
|
||||
break;
|
||||
default:
|
||||
weapon = new VikingSword();
|
||||
break;
|
||||
}
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
BaseRunicTool.ApplyAttributesTo(weapon, 3, 20, 40);
|
||||
}
|
||||
else
|
||||
{
|
||||
weapon.DamageLevel = (WeaponDamageLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.AccuracyLevel = (WeaponAccuracyLevel)RandomMinMaxScaled(2, 4);
|
||||
weapon.DurabilityLevel = (WeaponDurabilityLevel)RandomMinMaxScaled(2, 4);
|
||||
}
|
||||
|
||||
weapon.Slayer = SlayerName.Silver;
|
||||
|
||||
reward = weapon;
|
||||
}
|
||||
|
||||
if (!player.PlaceInBackpack(reward))
|
||||
{
|
||||
reward.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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (dropped is QuestDaemonBone)
|
||||
{
|
||||
QuestObjective obj = qs.FindObjective<ReturnDaemonBoneObjective>();
|
||||
|
||||
if (obj?.Completed == false)
|
||||
{
|
||||
Container cont = GetNewContainer();
|
||||
cont.DropItem(new BankCheck(2000));
|
||||
cont.DropItem(new EnchantedSextant());
|
||||
|
||||
if (!player.PlaceInBackpack(cont))
|
||||
{
|
||||
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.
|
||||
return false;
|
||||
}
|
||||
|
||||
dropped.Delete();
|
||||
obj.Complete();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return base.OnDragDrop(from, dropped);
|
||||
}
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (m is PlayerMobile && !m.Frozen && !m.Alive && InRange(m, 4) && !InRange(oldLocation, 4) && InLOS(m))
|
||||
{
|
||||
if (m.Map == null || !m.Map.CanFit(m.Location, 16, false, false))
|
||||
{
|
||||
m.SendLocalizedMessage(502391); // Thou can not be resurrected there!
|
||||
}
|
||||
else
|
||||
{
|
||||
Direction = GetDirectionTo(m);
|
||||
|
||||
m.PlaySound(0x214);
|
||||
m.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
m.CloseGump<ResurrectGump>();
|
||||
m.SendGump(new ResurrectGump(m, ResurrectMessage.Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue