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,50 @@
using System;
using Server.Network;
namespace Server.Items
{
public class AquaGem : BaseDecayingItem
{
public override int LabelNumber { get { return 1154244; } } // Aqua Gem
[Constructable]
public AquaGem() : base(0x4B48)
{
this.Stackable = false;
this.Weight = 1.0;
this.Hue = 1916;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154245); // *You hold the gem and admire its brilliance as it radiates blue beams of light*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public AquaGem(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,48 @@
using System;
using Server.Network;
namespace Server.Items
{
public class AquaPendant : GoldNecklace
{
public override int LabelNumber { get { return 1154246; } } // Aqua Pendant
[Constructable]
public AquaPendant()
{
this.Hue = 1916;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154247); // *As you hold the pendant in your hands you suddenly feel as though you no longer need to breathe. The pendant pulses with magical energy!*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public AquaPendant(Serial serial)
: base(serial)
{
}
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,45 @@
using System;
namespace Server.Items
{
public class BearingAssembly : BaseDecayingItem
{
public override int LabelNumber { get { return 1154430; } } // Bearing Assembly
[Constructable]
public BearingAssembly()
: base(0xE74)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 18000; } }
public BearingAssembly(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,51 @@
using System;
using Server.Network;
namespace Server.Items
{
public class BootsOfBallast : Boots
{
public override int LabelNumber { get { return 1154242; } } // Boots of Ballast
public override bool CanBeWornByGargoyles { get { return true; } }
[Constructable]
public BootsOfBallast()
: base()
{
this.Hue = 2969;
this.LootType = LootType.Blessed;
this.StrRequirement = 10;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154243); // *You struggle to lift the heavy boots for examination! You determine anyone venturing into the sea wearing such a thing would quickly sink to the bottom*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public BootsOfBallast(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,54 @@
using Server.Network;
using System;
namespace Server.Items
{
public class BrokenShipwreckRemains : BaseDecayingItem
{
public override int LabelNumber { get { return 1154216; } } // Broken Remains of a Shipwreck
[Constructable]
public BrokenShipwreckRemains() : this(1)
{
}
[Constructable]
public BrokenShipwreckRemains(int amount) : base(0xC2D)
{
this.Hue = 2969;
this.Weight = 25.0;
this.Amount = amount;
this.LootType = LootType.Blessed;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override void OnDoubleClick(Mobile from)
{
from.PublicOverheadMessage(MessageType.Regular, 0x559, 1154217); // *You carefully examine the sodden remains of the wooden ship. You discern the ship was recently foundered. You decide to show it to the Salvage Master*
}
public BrokenShipwreckRemains(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,51 @@
using System;
using Server.Network;
namespace Server.Items
{
public class CanvassRobe : Robe
{
public override int LabelNumber { get { return 1154238; } } // A Canvass Robe
public override bool CanBeWornByGargoyles { get { return true; } }
[Constructable]
public CanvassRobe()
: base()
{
this.Hue = 2720;
this.LootType = LootType.Blessed;
this.StrRequirement = 10;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154239); // *It is a thick canvass robe with specially sewn seals around the wrists and ankles. It appears as though it would protect its wearer from the harsh conditions of a deep aquatic environment.*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public CanvassRobe(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,46 @@
using System;
namespace Server.Items
{
public class FlyWheel : BaseDecayingItem
{
public override int LabelNumber { get { return 1154427; } } // Flywheel
[Constructable]
public FlyWheel()
: base(0x46FE)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
this.Hue = 1901;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 18000; } }
public FlyWheel(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,52 @@
using System;
using Server.Network;
namespace Server.Items
{
public class IceWyrmScale : BaseDecayingItem
{
public override int LabelNumber { get { return 1154224; } } // Ice Wyrm Scale
[Constructable]
public IceWyrmScale()
: base(0x26B2)
{
this.LootType = LootType.Blessed;
this.Hue = 2729;
this.Weight = 20.0;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154225); // *You run your hand across the scale, it is cold to the touch and smooth like glass. You decide to take it to the Master Tinker*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public IceWyrmScale(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,123 @@
using Server.Network;
using Server.Targeting;
using System;
namespace Server.Items
{
public class LockerKey : BaseDecayingItem
{
public override int LabelNumber { get { return 1154227; } } // Strongbox Key
private Parts m_Type;
[CommandProperty(AccessLevel.GameMaster)]
public Parts Type
{
get
{
return this.m_Type;
}
set
{
this.m_Type = value;
this.InvalidateProperties();
}
}
[Constructable]
public LockerKey(Parts type)
: base(0x410B)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
this.Hue = 1359;
this.m_Type = type;
}
public override int Lifespan { get { return 300; } }
public override void OnDoubleClick(Mobile from)
{
if (!this.IsChildOf(from.Backpack))
{
from.SendLocalizedMessage(501661); // That key is unreachable.
return;
}
from.SendLocalizedMessage(501662); // What shall I use this key on?
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154228); // *You insert the key into the mechanism and turn it. To your delight the lock opens with a click and you remove the contents*
from.Target = new UnlockTarget(this);
}
private class UnlockTarget : Target
{
private readonly LockerKey m_Key;
public UnlockTarget(LockerKey key)
: base(1, false, TargetFlags.None)
{
this.m_Key = key;
}
protected override void OnTarget(Mobile from, object targeted)
{
if (this.m_Key.Deleted || !this.m_Key.IsChildOf(from.Backpack))
{
from.SendLocalizedMessage(501661); // That key is unreachable.
return;
}
if (targeted is StorageLocker)
{
StorageLocker sl = (StorageLocker)targeted;
if (sl.Type == this.m_Key.Type)
{
sl.Locked = false;
if (sl.Type == Parts.Flywheel)
sl.DropItem(new FlyWheel());
else if (sl.Type == Parts.BearingAssembly)
sl.DropItem(new BearingAssembly());
else if (sl.Type == Parts.PowerCore)
sl.DropItem(new PowerCore());
else if (sl.Type == Parts.WireSpool)
sl.DropItem(new WireSpool());
sl.BeginRestart(TimeSpan.FromMinutes(10.0));
m_Key.Delete();
}
}
else
{
from.SendLocalizedMessage(501666); // You can't unlock that!
}
}
}
public LockerKey(Serial serial)
: base(serial)
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1154445, String.Format("#{0}", 1154427 + (int)m_Type)); // A Key to the Spare ~1_PART~ Parts Locker
list.Add(1072351); // Quest 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,140 @@
using System;
using Server.Network;
namespace Server.Items
{
public class MercutiosCutlass : Cutlass
{
public override int LabelNumber { get { return 1154240; } } // Mercutio's Cutlass
private int m_Lifespan;
private Timer m_Timer;
[Constructable]
public MercutiosCutlass()
{
Hue = 2595;
LootType = LootType.Blessed;
if (Lifespan > 0)
{
m_Lifespan = Lifespan;
StartTimer();
}
}
public virtual int Lifespan { get { return 18000; } }
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154241); // *It is a beautifully and masterfully crafted blade. The hilt bears the family crest of the former owner*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
if (Lifespan > 0)
{
TimeSpan t = TimeSpan.FromSeconds(m_Lifespan);
int weeks = (int)t.Days / 7;
int days = t.Days;
int hours = t.Hours;
int minutes = t.Minutes;
if (weeks > 0)
list.Add(string.Format("Lifespan: {0} {1}", weeks, weeks == 1 ? "week" : "weeks"));
else if (days > 0)
list.Add(string.Format("Lifespan: {0} {1}", days, days == 1 ? "day" : "days"));
else if (hours > 0)
list.Add(string.Format("Lifespan: {0} {1}", hours, hours == 1 ? "hour" : "hours"));
else if (minutes > 0)
list.Add(string.Format("Lifespan: {0} {1}", minutes, minutes == 1 ? "minute" : "minutes"));
else
list.Add(1072517, m_Lifespan.ToString()); // Lifespan: ~1_val~ seconds
}
}
public virtual void StartTimer()
{
if (m_Timer != null)
return;
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), new TimerCallback(Slice));
m_Timer.Priority = TimerPriority.OneSecond;
}
public virtual void StopTimer()
{
if (m_Timer != null)
m_Timer.Stop();
m_Timer = null;
}
public virtual void Slice()
{
m_Lifespan -= 10;
InvalidateProperties();
if (m_Lifespan <= 0)
Decay();
}
public virtual void Decay()
{
if (RootParent is Mobile)
{
Mobile parent = (Mobile)RootParent;
if (Name == null)
parent.SendLocalizedMessage(1072515, "#" + LabelNumber); // The ~1_name~ expired...
else
parent.SendLocalizedMessage(1072515, Name); // The ~1_name~ expired...
Effects.SendLocationParticles(EffectItem.Create(parent.Location, parent.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
Effects.PlaySound(parent.Location, parent.Map, 0x201);
}
else
{
Effects.SendLocationParticles(EffectItem.Create(Location, Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
Effects.PlaySound(Location, Map, 0x201);
}
StopTimer();
Delete();
}
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
{
cold = fire = chaos = pois = nrgy = direct = 0;
phys = 100;
}
public MercutiosCutlass(Serial serial) : base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((int)m_Lifespan);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Lifespan = reader.ReadInt();
StartTimer();
}
}
}

View File

@@ -0,0 +1,112 @@
using System;
using Server.Network;
namespace Server.Items
{
public class NictitatingLens : ElvenGlasses
{
public override int LabelNumber { get { return 1154234; } } // Nictitating Lens
[Constructable]
public NictitatingLens()
: base()
{
this.Hue = 1916;
this.Weight = 2.0;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154235); // *Finely crafted lenses for use in allowing the wearer to maintain visual acuity while navigating an aquatic environment*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int BasePhysicalResistance { get { return 2; } }
public override int BaseFireResistance { get { return 4; } }
public override int BaseColdResistance { get { return 4; } }
public override int BasePoisonResistance { get { return 3; } }
public override int BaseEnergyResistance { get { return 2; } }
public override int InitMinHits { get { return 50; } }
public override int InitMaxHits { get { return 60; } }
public NictitatingLens(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class GargishNictitatingLens : GargishGlasses
{
public override int LabelNumber { get { return 1154234; } } // Nictitating Lens
[Constructable]
public GargishNictitatingLens()
: base()
{
this.Hue = 1916;
this.Weight = 2.0;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154235); // *Finely crafted lenses for use in allowing the wearer to maintain visual acuity while navigating an aquatic environment*
}
public override int BasePhysicalResistance { get { return 2; } }
public override int BaseFireResistance { get { return 4; } }
public override int BaseColdResistance { get { return 4; } }
public override int BasePoisonResistance { get { return 3; } }
public override int BaseEnergyResistance { get { return 2; } }
public override int InitMinHits { get { return 50; } }
public override int InitMaxHits { get { return 60; } }
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public GargishNictitatingLens(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,51 @@
using System;
using Server.Network;
namespace Server.Items
{
public class OrcishSchematics : BaseDecayingItem
{
public override int LabelNumber { get { return 1154232; } } // Schematic for an Orcish Drilling Machine
[Constructable]
public OrcishSchematics() : base(0x2258)
{
this.Hue = 1945;
this.Weight = 1.0;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154233); // *It appears to be the crude schematic to a drilling machine of Orcish origin. It is poorly devised and looks as if one were to build it the machine would explode*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public OrcishSchematics(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,46 @@
using System;
namespace Server.Items
{
public class PowerCore : BaseDecayingItem
{
public override int LabelNumber { get { return 1154429; } } // Power Core
[Constructable]
public PowerCore()
: base(0x47E6)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
this.Hue = 1967;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 18000; } }
public PowerCore(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,58 @@
using System;
using Server.Network;
namespace Server.Items
{
public class SalvagerSuitPlans : BaseDecayingItem
{
public override int LabelNumber { get { return 1154229; } } // Plans to A Salvager Suit
[Constructable]
public SalvagerSuitPlans() : this(1)
{
}
[Constructable]
public SalvagerSuitPlans(int amount) : base(0x2258)
{
this.Hue = 92;
this.Stackable = false;
this.Weight = 1.0;
this.Amount = amount;
this.LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154230); // *You examine the document carefully. It appears to be the detailed schematic of some kind of suit. It is beyond your understanding. You decide to take it back to the Master Tinker*
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 18000; } }
public override bool UseSeconds { get { return false; } }
public SalvagerSuitPlans(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,516 @@
using System;
using Server.Network;
using Server.Mobiles;
using Server.Engines.Quests;
namespace Server.Items
{
public class PerfectBlackPearlDecor : Item
{
public override int LabelNumber { get { return 1154257; } } // Perfect Black Pearl
[Constructable]
public PerfectBlackPearlDecor()
: base(0xF7A)
{
this.Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (!from.InRange(this, 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
Item reg = from.Backpack.FindItemByType(typeof(PerfectBlackPearl));
if (reg == null)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
{
Container pack = from.Backpack;
pack.TryDropItem(from, new PerfectBlackPearl(), false);
from.SendLocalizedMessage(1154489); // You received a Quest Item!
}
else
{
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
}
}
else
{
from.SendLocalizedMessage(1154331); // You already have one of these. You don't need another.
}
}
public PerfectBlackPearlDecor(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class PerfectBlackPearl : BaseDecayingItem
{
public override int LabelNumber { get { return 1154257; } } // Perfect Black Pearl
[Constructable]
public PerfectBlackPearl()
: base(0xF7A)
{
this.Stackable = false;
this.LootType = LootType.Blessed;
this.Weight = 1;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public PerfectBlackPearl(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BurstingBrimstoneDecor : Item
{
public override int LabelNumber { get { return 1154258; } } // Bursting Brimstone
[Constructable]
public BurstingBrimstoneDecor()
: base(0xF7F)
{
this.Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (!from.InRange(this, 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
Item reg = from.Backpack.FindItemByType(typeof(BurstingBrimstone));
if (reg == null)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
{
Container pack = from.Backpack;
pack.TryDropItem(from, new BurstingBrimstone(), false);
from.SendLocalizedMessage(1154489); // You received a Quest Item!
}
else
{
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
}
}
else
{
from.SendLocalizedMessage(1154331); // You already have one of these. You don't need another.
}
}
public BurstingBrimstoneDecor(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BurstingBrimstone : BaseDecayingItem
{
public override int LabelNumber { get { return 1154258; } } // Bursting Brimstone
[Constructable]
public BurstingBrimstone()
: base(0xF7F)
{
this.Stackable = false;
this.LootType = LootType.Blessed;
this.Weight = 1;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public BurstingBrimstone(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BrightDaemonBloodDecor : Item
{
public override int LabelNumber { get { return 1154259; } } // Bright Daemon Blood
[Constructable]
public BrightDaemonBloodDecor()
: base(0xF7D)
{
this.Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (!from.InRange(this, 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
Item reg = from.Backpack.FindItemByType(typeof(BrightDaemonBlood));
if (reg == null)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
{
Container pack = from.Backpack;
pack.TryDropItem(from, new BrightDaemonBlood(), false);
from.SendLocalizedMessage(1154489); // You received a Quest Item!
}
else
{
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
}
}
else
{
from.SendLocalizedMessage(1154331); // You already have one of these. You don't need another.
}
}
public BrightDaemonBloodDecor(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BrightDaemonBlood : BaseDecayingItem
{
public override int LabelNumber { get { return 1154259; } } // Bright Daemon Blood
[Constructable]
public BrightDaemonBlood()
: base(0xF7D)
{
this.Stackable = false;
this.LootType = LootType.Blessed;
this.Weight = 1;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public BrightDaemonBlood(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class MightyMandrakeDecor : Item
{
public override int LabelNumber { get { return 1154260; } } // Mighty Mandrake
[Constructable]
public MightyMandrakeDecor()
: base(0xF86)
{
this.Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (!from.InRange(this, 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
Item reg = from.Backpack.FindItemByType(typeof(MightyMandrake));
if (reg == null)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
{
Container pack = from.Backpack;
pack.TryDropItem(from, new MightyMandrake(), false);
from.SendLocalizedMessage(1154489); // You received a Quest Item!
}
else
{
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
}
}
else
{
from.SendLocalizedMessage(1154331); // You already have one of these. You don't need another.
}
}
public MightyMandrakeDecor(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class MightyMandrake : BaseDecayingItem
{
public override int LabelNumber { get { return 1154260; } } // Mighty Mandrake
[Constructable]
public MightyMandrake()
: base(0xF86)
{
this.Stackable = false;
this.LootType = LootType.Blessed;
this.Weight = 1;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public MightyMandrake(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BurlyBoneDecor : Item
{
public override int LabelNumber { get { return 1154261; } } // Burly Bone
[Constructable]
public BurlyBoneDecor()
: base(0xF7E)
{
this.Movable = false;
}
public override void OnDoubleClick(Mobile from)
{
if (!from.InRange(this, 2))
{
from.SendLocalizedMessage(500446); // That is too far away.
}
Item reg = from.Backpack.FindItemByType(typeof(BurlyBone));
if (reg == null)
{
PlayerMobile pm = (PlayerMobile)from;
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
{
Container pack = from.Backpack;
pack.TryDropItem(from, new BurlyBone(), false);
from.SendLocalizedMessage(1154489); // You received a Quest Item!
}
else
{
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
}
}
else
{
from.SendLocalizedMessage(1154331); // You already have one of these. You don't need another.
}
}
public BurlyBoneDecor(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
public class BurlyBone : BaseDecayingItem
{
public override int LabelNumber { get { return 1154261; } } // Burly Bone
[Constructable]
public BurlyBone()
: base(0xF7E)
{
this.Stackable = false;
this.LootType = LootType.Blessed;
this.Weight = 1;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public override bool UseSeconds { get { return false; } }
public BurlyBone(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,289 @@
using Server.Commands;
using System;
using System.Collections.Generic;
namespace Server.Items
{
public enum Parts
{
None = -1,
Flywheel,
WireSpool,
PowerCore,
BearingAssembly,
};
[Furniture]
[Flipable(0x285D, 0x285E)]
public class StorageLocker : FillableContainer
{
public override int LabelNumber { get { return 1154431; } } // Storage Locker
private bool m_Active;
private Parts m_Type;
private List<Item> m_Barrels;
private Timer m_RestartTimer;
private DateTime m_RestartTime;
public List<Item> Barrels
{
get { return m_Barrels; }
set { m_Barrels = value; }
}
[CommandProperty(AccessLevel.GameMaster)]
public bool Active
{
get
{
return m_Active;
}
set
{
if (value)
Start();
else
Stop();
InvalidateProperties();
}
}
[CommandProperty(AccessLevel.GameMaster)]
public DateTime RestartTime
{
get
{
return m_RestartTime;
}
}
public override bool IsDecoContainer { get { return false; } }
[CommandProperty(AccessLevel.GameMaster)]
public Parts Type
{
get
{
return m_Type;
}
set
{
m_Type = value;
InvalidateProperties();
}
}
[Constructable]
public StorageLocker(Parts type)
: base(0x285E)
{
m_Barrels = new List<Item>();
Locked = true;
Hue = 2301;
Movable = false;
m_Type = type;
}
public StorageLocker(Serial serial)
: base(serial)
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1154425, String.Format("#{0}", 1154427 + (int)m_Type)); // *You barely make out some words on a rusted nameplate*<BR>REPLACEMENT PARTS: ~1_PART~
}
public static int[][] WoodenToMetalBarrelCoordinate =
{
new int[] { 0, 1 },
new int[] { 1, 1 },
new int[] { 1, 0 },
new int[] { 1, -1 },
new int[] { 0, -1 },
new int[] { -1, -1 },
new int[] { -1, 0 },
new int[] { -1, 1 }
};
private Parts key;
public void Start()
{
if (m_Active || Deleted)
return;
m_Active = true;
if (m_RestartTimer != null)
m_RestartTimer.Stop();
m_RestartTimer = null;
int index = Utility.Random(0, 8);
int randomkey = Utility.Random(-4, 4);
bool loot = false;
Item barrel = null;
for (int k = 0; k < 8; k++)
{
int itemx = Location.X + WoodenToMetalBarrelCoordinate[k][0];
int itemy = Location.Y + WoodenToMetalBarrelCoordinate[k][1];
int z = Map.GetAverageZ(itemx, itemy);
if (index == k)
{
barrel = new WoodenKeyBarrel(Parts.None);
m_Barrels.Add(barrel);
}
else
{
barrel = new WoodenToMetalBarrel(this);
m_Barrels.Add(barrel);
}
barrel.MoveToWorld(new Point3D(itemx, itemy, z), Map);
}
for (int x = -4; x < 5; x++)
{
for (int y = 4; y > -5; y--)
{
if ((x >= -1 && x <= 1) && (y >= -1 && y <= 1))
continue;
int itemx = Location.X + x;
int itemy = Location.Y + y;
int z = Map.GetAverageZ(itemx, itemy);
if (!loot)
{
if (x == randomkey)
{
key = m_Type;
loot = true;
barrel = new WoodenKeyBarrel(key);
((WoodenKeyBarrel)barrel).StorageLocker = this;
}
else
{
key = Parts.None;
barrel = new WoodenKeyBarrel(key);
}
}
else
{
key = Parts.None;
barrel = new WoodenKeyBarrel(key);
}
m_Barrels.Add(barrel);
barrel.MoveToWorld(new Point3D(itemx, itemy, z), Map);
}
}
}
public void Stop()
{
if (!m_Active || Deleted)
return;
m_Active = false;
if (m_RestartTimer != null)
m_RestartTimer.Stop();
m_RestartTimer = null;
if (m_Barrels != null)
{
for (int i = 0; i < m_Barrels.Count; ++i)
{
if (m_Barrels[i] != null)
m_Barrels[i].Delete();
}
m_Barrels.Clear();
}
for (int i = Items.Count - 1; i >= 0; --i)
{
if (i < Items.Count)
Items[i].Delete();
}
}
public void BeginRestart(TimeSpan ts)
{
if (m_RestartTimer != null)
m_RestartTimer.Stop();
m_RestartTime = DateTime.UtcNow + ts;
m_RestartTimer = new RestartTimer(this, ts);
m_RestartTimer.Start();
}
public override void OnDelete()
{
Stop();
base.OnDelete();
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((bool)m_Active);
writer.Write((int)m_Type);
writer.Write(m_Barrels, true);
writer.Write(m_RestartTimer != null);
if (m_RestartTimer != null)
writer.WriteDeltaTime(m_RestartTime);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Active = reader.ReadBool();
m_Type = (Parts)reader.ReadInt();
m_Barrels = reader.ReadStrongItemList();
if (reader.ReadBool())
{
m_RestartTime = reader.ReadDeltaTime();
}
BeginRestart(TimeSpan.FromSeconds(10.0));
}
}
public class RestartTimer : Timer
{
private readonly StorageLocker m_Storage;
public RestartTimer(StorageLocker storage, TimeSpan delay)
: base(delay)
{
m_Storage = storage;
Priority = TimerPriority.FiveSeconds;
}
protected override void OnTick()
{
m_Storage.Stop();
m_Storage.Start();
}
}
}

View File

@@ -0,0 +1,53 @@
using System;
using Server.Network;
namespace Server.Items
{
public class UnknownShipwreck : BaseDecayingItem
{
public override int LabelNumber { get { return 1154269; } } // Map to an Unknown Shipwreck
[Constructable]
public UnknownShipwreck() : base(0x14ED)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 3600; } }
public UnknownShipwreck(Serial serial) : base(serial)
{
}
public override void OnDoubleClick(Mobile from)
{
if (from.InRange(GetWorldLocation(), 2))
{
from.PublicOverheadMessage(MessageType.Regular, 0x22, 1154270); // *You unfurl the map and study it carefully. You recognize Gravewater Lake. In the center of the lake is a large X*
}
else
from.SendLocalizedMessage(500446); // That is too far away.
}
public override void 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,158 @@
using System;
using Server.Network;
namespace Server.Items
{
public class WillemHartesHat : FeatheredHat
{
private int m_Lifespan;
private Timer m_Timer;
public override int LabelNumber { get { return 1154236; } } // Willem Harte's Hat
[Constructable]
public WillemHartesHat()
: base(0x171A)
{
this.Hue = 72;
this.StrRequirement = 10;
if (this.Lifespan > 0)
{
this.m_Lifespan = this.Lifespan;
this.StartTimer();
}
}
public override void OnDoubleClick(Mobile from)
{
base.OnDoubleClick(from);
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154237); // *The hat emits a sour smelling odor indicative of spending a significant period of time in the belly of a dragon.*
}
public virtual int Lifespan { get { return 3600; } }
[CommandProperty(AccessLevel.GameMaster)]
public int TimeLeft
{
get
{
return this.m_Lifespan;
}
set
{
this.m_Lifespan = value;
this.InvalidateProperties();
}
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (this.Lifespan > 0)
{
TimeSpan t = TimeSpan.FromSeconds(this.m_Lifespan);
int weeks = (int)t.Days / 7;
int days = t.Days;
int hours = t.Hours;
int minutes = t.Minutes;
if (weeks > 1)
list.Add(1153092, weeks.ToString()); // Lifespan: ~1_val~ weeks
else if (days > 1)
list.Add(1153091, days.ToString()); // Lifespan: ~1_val~ days
else if (hours > 1)
list.Add(1153090, hours.ToString()); // Lifespan: ~1_val~ hours
else if (minutes > 1)
list.Add(1153089, minutes.ToString()); // Lifespan: ~1_val~ minutes
else
list.Add(1072517, this.m_Lifespan.ToString()); // Lifespan: ~1_val~ seconds
}
list.Add(1072351); // Quest Item
}
public virtual void StartTimer()
{
if (this.m_Timer != null)
return;
this.m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(10), TimeSpan.FromSeconds(10), new TimerCallback(Slice));
this.m_Timer.Priority = TimerPriority.OneSecond;
}
public virtual void StopTimer()
{
if (this.m_Timer != null)
this.m_Timer.Stop();
this.m_Timer = null;
}
public virtual void Slice()
{
this.m_Lifespan -= 10;
this.InvalidateProperties();
if (this.m_Lifespan <= 0)
this.Decay();
}
public virtual void Decay()
{
if (this.RootParent is Mobile)
{
Mobile parent = (Mobile)this.RootParent;
if (this.Name == null)
parent.SendLocalizedMessage(1072515, "#" + this.LabelNumber); // The ~1_name~ expired...
else
parent.SendLocalizedMessage(1072515, this.Name); // The ~1_name~ expired...
Effects.SendLocationParticles(EffectItem.Create(parent.Location, parent.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
Effects.PlaySound(parent.Location, parent.Map, 0x201);
}
else
{
Effects.SendLocationParticles(EffectItem.Create(this.Location, this.Map, EffectItem.DefaultDuration), 0x3728, 8, 20, 5042);
Effects.PlaySound(this.Location, this.Map, 0x201);
}
this.StopTimer();
this.Delete();
}
public override int BaseFireResistance { get { return 5; } }
public override int BaseColdResistance { get { return 9; } }
public override int BasePoisonResistance { get { return 5; } }
public override int BaseEnergyResistance { get { return 5; } }
public override int InitMinHits { get { return 20; } }
public override int InitMaxHits { get { return 30; } }
public WillemHartesHat(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write((int)this.m_Lifespan);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
this.m_Lifespan = reader.ReadInt();
this.StartTimer();
}
}
}

View File

@@ -0,0 +1,46 @@
using System;
namespace Server.Items
{
public class WireSpool : BaseDecayingItem
{
public override int LabelNumber { get { return 1154428; } } // Wire Spool
[Constructable]
public WireSpool()
: base(0x4CDB)
{
this.Weight = 1.0;
this.LootType = LootType.Blessed;
this.Hue = 2315;
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1072351); // Quest Item
}
public override int Lifespan { get { return 18000; } }
public WireSpool(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();
}
}
}