Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
using System;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CusteauPerronHouseDoor : DarkWoodDoor
|
||||
{
|
||||
[Constructable]
|
||||
public CusteauPerronHouseDoor() : base(DoorFacing.WestCCW)
|
||||
{
|
||||
}
|
||||
|
||||
public CusteauPerronHouseDoor(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from is PlayerMobile)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.HeplerPaulsonComplete || from.Region.Name == "Custeau Perron House")
|
||||
{
|
||||
base.OnDoubleClick(from);
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1154223); // *You knock on the door but there is no answer. You decide to let yourself in...*
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 502503); // That is locked.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer) // Default Serialize method
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader) // Default Deserialize method
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class IceCrystals : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1028710; } } // crystal
|
||||
|
||||
private static readonly int[] m_ItemIDs = new int[]
|
||||
{
|
||||
0x2208, 0x221D, 0x2FDC, 0x2228, 0x2209, 0x2FDD, 0x2FDC
|
||||
};
|
||||
|
||||
[Constructable]
|
||||
public IceCrystals()
|
||||
: base(Utility.RandomList(m_ItemIDs))
|
||||
{
|
||||
this.Hue = 2729;
|
||||
this.Movable = false;
|
||||
}
|
||||
|
||||
public IceCrystals(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Commands;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum DecorType
|
||||
{
|
||||
Tunic,
|
||||
Pant,
|
||||
Book
|
||||
};
|
||||
|
||||
public class MasterThinkerContoller : Item
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("GenMasterThinker", AccessLevel.Developer, new CommandEventHandler(GenMasterThinker_Command));
|
||||
}
|
||||
|
||||
[Usage("GenMasterThinker")]
|
||||
private static void GenMasterThinker_Command(CommandEventArgs e)
|
||||
{
|
||||
if (Check())
|
||||
{
|
||||
e.Mobile.SendMessage("Sorcerers Plate is already present.");
|
||||
}
|
||||
else
|
||||
{
|
||||
e.Mobile.SendMessage("Creating Sorcerers Plate...");
|
||||
|
||||
MasterThinkerContoller controller = new MasterThinkerContoller();
|
||||
controller.MoveToWorld(new Point3D(1652, 1547, 45), Map.Trammel);
|
||||
|
||||
e.Mobile.SendMessage("Generation completed!");
|
||||
}
|
||||
}
|
||||
|
||||
private static bool Check()
|
||||
{
|
||||
foreach (Item item in World.Items.Values)
|
||||
if (item is MasterThinkerContoller && !item.Deleted)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public class MasterThinkerArray
|
||||
{
|
||||
public Mobile Mobile { get; set; }
|
||||
|
||||
public bool Book { get; set; }
|
||||
|
||||
public bool Pant { get; set; }
|
||||
|
||||
public bool Tunic { get; set; }
|
||||
}
|
||||
|
||||
private MasterThinkerDecor m_Book, m_Pant, m_Tunic;
|
||||
|
||||
public static List<MasterThinkerArray> m_Array;
|
||||
|
||||
public List<MasterThinkerArray> Array { get { return m_Array; } }
|
||||
|
||||
|
||||
public MasterThinkerContoller()
|
||||
: base(0x1F13)
|
||||
{
|
||||
Name = "Master Thinker Controller - Do not remove !!";
|
||||
Visible = false;
|
||||
Movable = false;
|
||||
|
||||
m_Array = new List<MasterThinkerArray>();
|
||||
|
||||
m_Book = new MasterThinkerDecor(0x42BF, 0, DecorType.Book, this);
|
||||
m_Book.MoveToWorld(new Point3D(1651, 1549, 49), Map.Trammel);
|
||||
|
||||
m_Pant = new MasterThinkerDecor(0x1539, 2017, DecorType.Pant, this);
|
||||
m_Pant.MoveToWorld(new Point3D(1651, 1545, 47), Map.Trammel);
|
||||
|
||||
m_Tunic = new MasterThinkerDecor(0x1FA2, 398, DecorType.Tunic, this);
|
||||
m_Tunic.MoveToWorld(new Point3D(1653, 1549, 47), Map.Trammel);
|
||||
}
|
||||
|
||||
public MasterThinkerContoller(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();
|
||||
|
||||
m_Array = new List<MasterThinkerArray>();
|
||||
}
|
||||
}
|
||||
|
||||
public class MasterThinkerDecor : Item
|
||||
{
|
||||
private MasterThinkerContoller m_Controller;
|
||||
private DecorType m_Type;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DecorType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Type = value;
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MasterThinkerDecor(int id, int hue, DecorType type, MasterThinkerContoller controller)
|
||||
: base()
|
||||
{
|
||||
this.ItemID = id;
|
||||
this.m_Controller = controller;
|
||||
this.m_Type = type;
|
||||
this.Hue = hue;
|
||||
this.Movable = false;
|
||||
}
|
||||
|
||||
public MasterThinkerDecor(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (this.m_Controller != null)
|
||||
{
|
||||
if (this.m_Controller.Array.Where(s => s.Mobile == from).Count() == 0)
|
||||
{
|
||||
this.m_Controller.Array.Add(new MasterThinkerContoller.MasterThinkerArray { Mobile = from, Book = false, Pant = false, Tunic = false });
|
||||
}
|
||||
|
||||
if (this.m_Type == DecorType.Book)
|
||||
{
|
||||
this.m_Controller.Array.Find(s => s.Mobile == from).Book = true;
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154222); // *You thumb through the pages of the book, it seems to describe the anatomy of a variety of frost creatures*
|
||||
}
|
||||
else if (this.m_Type == DecorType.Pant)
|
||||
{
|
||||
this.m_Controller.Array.Find(s => s.Mobile == from).Pant = true;
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154221); // *You carefully examine the garment and take note of it's superior quality. You surmise it would be useful in keeping you warm in a cold environment*
|
||||
}
|
||||
else if (this.m_Type == DecorType.Tunic)
|
||||
{
|
||||
this.m_Controller.Array.Find(s => s.Mobile == from).Tunic = true;
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154221); // *You carefully examine the garment and take note of it's superior quality. You surmise it would be useful in keeping you warm in a cold environment*
|
||||
}
|
||||
|
||||
if (ClickCheck(from) == 1)
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.HeplerPaulsonComplete)
|
||||
{
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.CusteauPerronHouse;
|
||||
this.m_Controller.Array.RemoveAll(s => s.Mobile == from);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public int ClickCheck(Mobile from)
|
||||
{
|
||||
return this.m_Controller.Array.Where(s => s.Mobile == from && s.Pant == true && s.Book == true && s.Tunic == true).Count();
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_Controller);
|
||||
writer.Write((int)m_Type);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
this.m_Controller = reader.ReadItem() as MasterThinkerContoller;
|
||||
this.m_Type = (DecorType)reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
123
Scripts/Services/ExploringTheDeep/Items/QuestItems/LockerKey.cs
Normal file
123
Scripts/Services/ExploringTheDeep/Items/QuestItems/LockerKey.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CalculationsScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public CalculationsScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(CalculationsGump)))
|
||||
{
|
||||
from.SendGump(new CalculationsGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public CalculationsScroll(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 CalculationsGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CalculationsLetter", AccessLevel.GameMaster, new CommandEventHandler(CalculationsGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CalculationsGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CalculationsGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CalculationsGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(164, 61, 250, 24, 1154400, 1062086, false, false); // Calculations
|
||||
AddHtmlLocalized(147, 90, 250, 24, 1154419, 1062086, false, false); // Champ Huthwait
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154401, 1, false, true); // 1259<BR>-300<BR>-324<BR>-569<BR>-1290<BR>245<BR>867<BR>-3250<BR>9230<BR>-12348<BR>-23398<BR>860<BR>-2407<BR><I>*There appears to be a lot of scratches of the pen all over this paper, as if it were calculated while under duress.*</I>
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CaptainsLogScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public CaptainsLogScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(CaptainsLogGump)))
|
||||
{
|
||||
from.SendGump(new CaptainsLogGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public CaptainsLogScroll(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 CaptainsLogGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CaptainsLogLetter", AccessLevel.GameMaster, new CommandEventHandler(CaptainsLogGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CaptainsLogGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CaptainsLogGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CaptainsLogGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(164, 61, 250, 24, 1154469, 1062086, false, false); // Captain's Log
|
||||
AddHtmlLocalized(180, 90, 250, 24, 1154470, 1062086, false, false); // Johne
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154490, 1, false, true); // What have I done...what...I cannot...these vile creatures...I have managed to lock them away within the central cargo hold and I have destroyed the winch assembly needed to remove the cargo hold's cover. I can only hope my efforts to lock away the repair parts will deter any foolish enough to start smashing the supply barrels in an attempt to recover the locker keys...they're all gone now...it is only I now, forever damned to this watery grave....
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CousteauPerronScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public CousteauPerronScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(CousteauPerronInformationGump)))
|
||||
{
|
||||
from.SendGump(new CousteauPerronInformationGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public CousteauPerronScroll(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 CousteauPerronInformationGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CousteauPerronScroll", AccessLevel.GameMaster, new CommandEventHandler(CousteauPerronInformationGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CousteauPerronInformationGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CousteauPerronInformationGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CousteauPerronInformationGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(130, 61, 250, 24, 1154392, 1062086, false, false); // Request for Information
|
||||
AddHtmlLocalized(150, 90, 250, 24, 1154415, 1062086, false, false); // Cousteau Perron
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154393, 1, false, true); // <I>*A hastily composed note seems scratched out on a shred of a scroll, with a few abstract equations and drawings near the periphery.*</I><BR>Close to breakthrough, require reforged shadow iron ringmail suit(10), power crystal (5), miniaturized clockwork assembly (20), valorite keg (20), and six more verite toolkits of the usual kind. Expect delivery in three days. Usual payment protocol.<BR><I>*At the end, there seems to be a note added on as if in afterthought.*</I><BR>Have reconsidered previous offer and will pay 95% asking price for withheld schematics.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CusteauPerronNote : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public CusteauPerronNote() : base(0x46B2)
|
||||
{
|
||||
this.LootType = LootType.Blessed;
|
||||
this.Weight = 1;
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1154262); // A Note from Cousteau Perron...
|
||||
list.Add(1072351); // Quest Item
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile mobile = (PlayerMobile)from;
|
||||
|
||||
if (!from.HasGump(typeof(CusteauPerronNoteGump)))
|
||||
{
|
||||
from.SendGump(new CusteauPerronNoteGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public CusteauPerronNote(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class CusteauPerronNoteGump : Gump
|
||||
{
|
||||
public CusteauPerronNoteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(104, 61, 250, 24, 1154262, 1062086, false, false); // A Note from Cousteau Perron...
|
||||
AddHtmlLocalized(42, 90, 330, 174, 1154263, 1, false, true); // Now that you have done what I asked, I shall do what you ask of me. Before you may continue your adventure you'll need to collect the components of the suit. I have listed the components and whom you might seek to acquire them from below. Return to see Hepler Paulson in the City of Trinsic when you've got everything!<BR><BR>Nictitating Lenses - Josef Skimmons, the Master Blacksmith at the Cutlass Smithing in Bucaneer's Den will surely know how to craft such a thing.<BR><BR>Canvass Robe - Madeline Harte, Seamstress at the Adventurer's Needle in Jhelom is well known for her prowess with a needle. If anyone can craft this for you, it is her.<BR><BR>Aqua Pendant - Zalia the Gemologist, in her craft few are better. She will surely be able to supply the pendant. She can be found at the Gypsy camp in Northeastern Ilshenar.<BR><BR>Boots of Ballast - Champ Huthwait, a seedy man to say the least but a fine cobbler. Seek him at the Adventurer's Supply in Vesper.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EliseTrentScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public EliseTrentScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(EliseTrentGump)))
|
||||
{
|
||||
from.SendGump(new EliseTrentGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public EliseTrentScroll(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 EliseTrentGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("EliseTrentScroll", AccessLevel.GameMaster, new CommandEventHandler(EliseTrentGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void EliseTrentGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new EliseTrentGump(e.Mobile));
|
||||
}
|
||||
|
||||
public EliseTrentGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(130, 61, 250, 24, 1154388, 1062086, false, false); // Trinsic Tribune #189
|
||||
AddHtmlLocalized(150, 90, 250, 24, 1154376, 1062086, false, false); // Elise Trent
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154389, 1, false, true); // <I>*The article left out of this paper is entitled 'Terror on the Seas'.*</I>There have long been pirates along the waterways of Britannia, but none were as prevalent as Captain Silver John. His boat and his men were as feared for their piracy as for their innovation, and the intelligent captain kept a highly skilled crew to assist in his raids. Amidst them were a talented alchemist, an incredibly skilled blacksmith, a once renowned mage, and several former Rangers. Despite the attempts of Admiral Duarte of the Royal Navy, their preying upon the merchant vessels of the lands was not stopped until one of Silver's own crew sold them out. An unnamed member of his crew led Royal Guardsman to a hideout that they had utilized in the city of Skara Brae, and they laid in wait for the return of the crew. The informant was slain in the fight, as was Captain Silver John himself, and most of his crew is now safely behind bars, though some seem to have escaped. All those captured are refusing to talk, so it seems that those who escaped will continue to remain at large...though it remains to be seen whether they will join a new crew or form their own.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JosefSkimmonsScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public JosefSkimmonsScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(JosefSkimmonsPrivateGump)))
|
||||
{
|
||||
from.SendGump(new JosefSkimmonsPrivateGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public JosefSkimmonsScroll(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 JosefSkimmonsPrivateGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("JosefSkimmonsScroll", AccessLevel.GameMaster, new CommandEventHandler(JosefSkimmonsPrivateGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void JosefSkimmonsPrivateGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new JosefSkimmonsPrivateGump(e.Mobile));
|
||||
}
|
||||
|
||||
public JosefSkimmonsPrivateGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(150, 61, 250, 24, 1154390, 1062086, false, false); // Private Journal
|
||||
AddHtmlLocalized(150, 90, 250, 24, 1154416, 1062086, false, false); // Josef Skimmons
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154391, 1, false, true); // <I>*This appears to be private journal of Skimmons Josef.*</I>Bloody old Cousteau keeps on coming around and asking me about things I'd much sooner forget. I never bloody wanted to work for that crazed wench on her blasted clockwork abominations, but there weren't much else I could manage after the mess that got made in Skara. Least I got out of both with my skin intact. Still, she's trying to go even further then we did back then...Lass is still trying to make that dead sister of hers proud I reckon. If we'd had the kinda things she's trying to make back then, nobody could've touched us. Makes the little goggles I used to make look like a kid's toy.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JournalScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public JournalScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(JournalGump)))
|
||||
{
|
||||
from.SendGump(new JournalGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public JournalScroll(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 JournalGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("JournalLetter", AccessLevel.GameMaster, new CommandEventHandler(JournalGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void JournalGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new JournalGump(e.Mobile));
|
||||
}
|
||||
|
||||
public JournalGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(165, 61, 250, 24, 1094837, 1062086, false, false); // a journal
|
||||
AddHtmlLocalized(170, 90, 250, 24, 1154420, 1062086, false, false); // Mercutio
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154409, 1, false, true); // The idiots constantly think there's some kind of cheating going on here, but nothing could be further from the truth. We don't need to have any kind of cheat to deal with these idiots. They all think they have some kind of special system that'll work here, but the simple fact is that the odds are always on our side. We win because that's how it's always been meant to work...doesn't stop the bloody saps from trying though. Not that we discourage the practices of fools who think they found a way to win.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LedgerScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public LedgerScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(LedgerGump)))
|
||||
{
|
||||
from.SendGump(new LedgerGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public LedgerScroll(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 LedgerGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("LedgerLetter", AccessLevel.GameMaster, new CommandEventHandler(LedgerGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void LedgerGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new LedgerGump(e.Mobile));
|
||||
}
|
||||
|
||||
public LedgerGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(178, 61, 250, 24, 1154407, 1062086, false, false); // Ledger
|
||||
AddHtmlLocalized(170, 90, 250, 24, 1154420, 1062086, false, false); // Mercutio
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154408, 1, false, true); // Collected from Amos, Leto, and Kas. Sent the husks to Nick. 7/21<BR>Collected from Mathias. Sent the husks to Gaff and Bawdewyn. 7/24<BR>Collected from Nick and Bawdewyn. Set the dogs to Gaff. 7/27<BR>Partial collection from Champ. Sent the husks to Reann and Triston. 8/3<BR>Sent the husks to Irvine, Lora, and Visko. 8/5<BR>Collected from Triston. Set the dogs on Reann. 8/6<BR>Collected from Irvine and Lora. Visko fled. Set a warning if they return. 8/8<BR>
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LiamDeFoeScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public LiamDeFoeScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(LiamDeFoeGump)))
|
||||
{
|
||||
from.SendGump(new LiamDeFoeGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public LiamDeFoeScroll(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 LiamDeFoeGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("LiamDeFoe", AccessLevel.GameMaster, new CommandEventHandler(LiamDeFoeGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void LiamDeFoeGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new LiamDeFoeGump(e.Mobile));
|
||||
}
|
||||
|
||||
public LiamDeFoeGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(150, 61, 250, 24, 1154396, 1062086, false, false); // It Is With Regret...
|
||||
AddHtmlLocalized(160, 90, 250, 24, 1154418, 1062086, false, false); // Liam DeFoe
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154397, 1, false, true); // Mrs. Madeline Hart,<BR>It is with our utmost regret that we must inform you of the death of your son, Willem Hart, who accompanied us on our mission into Destard. Despite our best efforts, we were attacked by a horde of dragons...your son fought valiantly and held to the highest pillars of Valor and Sacrifice in doing so. He acquitted himself incredibly so against them, and we thought the day was won, until an Ancient wyrm sprung from the depths of the dungeon. Willem showed some trepidation, but his manner was in the highest dealings of Courage as he assisted us in holding it off until the miners could escape. Unfortunately, this cost him his life, and no manner of magic could coax him back. As such, we have appended all of his commission for his aid, as well as a sizeable fund donated by the miners whose lives he saved. I am sorry for your loss, and will assist in any arrangements that are necessary.<BR>With Regards,<BR>Liam DeFoe.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MadelineHarteScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public MadelineHarteScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(MadelineHarteGump)))
|
||||
{
|
||||
from.SendGump(new MadelineHarteGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public MadelineHarteScroll(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 MadelineHarteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("MadelineHarteScroll", AccessLevel.GameMaster, new CommandEventHandler(MadelineHarteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void MadelineHarteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new MadelineHarteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public MadelineHarteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(170, 61, 250, 24, 1154394, 1062086, false, false); // Letter
|
||||
AddHtmlLocalized(150, 90, 250, 24, 1154466, 1062086, false, false); // Madeline Harte
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154399, 1, false, true); // I've been successful in business, in training, in innovation, in invention...in every aspect of my life save for the one I really care about, the relationship with my children. I have lost one to the earth and the other I've effectively lost to the sea. Willem...if only you hadn't been so eager to try and prove yourself to your father. We had enough money to get by, and I would rather live in the street with you than to have had my baby boy die in such a manner. Love is not a commodity worth trading for any amount of gold in the world.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MasterThinkerSchematics : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public MasterThinkerSchematics() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(MTSchematicsGump)))
|
||||
{
|
||||
from.SendGump(new MTSchematicsGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public MasterThinkerSchematics(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 MTSchematicsGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("MTSchematics", AccessLevel.GameMaster, new CommandEventHandler(MTSchematicsGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void MTSchematicsGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new MTSchematicsGump(e.Mobile));
|
||||
}
|
||||
|
||||
public MTSchematicsGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(164, 61, 250, 24, 1154384, 1062086, false, false); // Schematics
|
||||
AddHtmlLocalized(147, 90, 250, 24, 1154415, 1062086, false, false); // Cousteau Perron
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154385, 1, false, true); // <I>*There are dozens of extremely detailed schematic drawings along the edges of the paper, and mixed throughout the notes. The writing seems somewhat disjointed, and the hand it's written in is a very jagged and harsh one.*</I> Pressure differential needs to be overcome to ensure test subject survival. Initial attempts resulted in implosion twice, leaks and catastrophic failure five times. Cold Temperature survival gear. Research suitable material. Homogenous distribution necessitated to maximize survival...supply carrying object? Possibly some sort of air elemental hybrid magic utilizing clockwork principles...
|
||||
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SealedLettersScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public SealedLettersScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(SealedLettersEntryGump)))
|
||||
{
|
||||
from.SendGump(new SealedLettersEntryGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public SealedLettersScroll(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 SealedLettersEntryGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("SealedLettersEntry", AccessLevel.GameMaster, new CommandEventHandler(SealedLettersEntryGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void SealedLettersEntryGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new SealedLettersEntryGump(e.Mobile));
|
||||
}
|
||||
|
||||
public SealedLettersEntryGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(160, 61, 250, 24, 1154404, 1062086, false, false); // Sealed Letters
|
||||
AddHtmlLocalized(155, 90, 250, 24, 1154419, 1062086, false, false); // Champ Huthwait
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154406, 1, false, true); // <I>*The letters are sealed in tubes capped with wax to make them waterproof and hidden away. Written on the outside is “Open only on the occasion of the death of Champ Huthwait, to be delivered to the Britain Bugle, the Trinsic Tribune, and the Sosarian Scout.”*</I>
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using System;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SorcerersScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public SorcerersScroll()
|
||||
:base(0x46B2)
|
||||
{
|
||||
this.Hue = 33;
|
||||
this.Movable = false;
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1154330); // A Lesson Plan
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile mobile = (PlayerMobile)from;
|
||||
|
||||
if (!from.HasGump(typeof(SorcerersScrollGump)))
|
||||
{
|
||||
from.SendGump(new SorcerersScrollGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public SorcerersScroll(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
}
|
||||
|
||||
public class SorcerersScrollGump : Gump
|
||||
{
|
||||
public SorcerersScrollGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(60, 60, 350, 24, 1154328, 1062086, false, false); // Magical Reagents: Identification & Applications
|
||||
AddHtmlLocalized(147, 90, 250, 24, 1154415, 1062086, false, false); // Cousteau Perron
|
||||
AddHtmlLocalized(42, 120, 323, 174, 1154329, 1, false, true); // <I>*The scroll appears to be a lesson plan for some sort of magical study*</I><BR><BR>The identification and application of magical reagents is an important skill for any studying apprentice of the Arcane Arts. Reagents can easily be identified occurring naturally within the world, and as such, being able to identify them as useful is an important skill. Just as a house of cards relies on each individual to support the greater structure, so do reagents support the wider application of magics. Each reagent has well known properties and documented uses that when combined with one another can produce hugely varying results. A keen understanding of those properties as well as the result of any combination thereof is essential to any apprentice wishing to advance beyond their current level. Test your knowledge of reagent identification by placing the correctly identified reagent on the plates. When each plate has the correct reagent placed on it, the Master Instructor will check your work.
|
||||
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
from.Frozen = false;
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SuspicionsScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public SuspicionsScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(SuspicionsGump)))
|
||||
{
|
||||
from.SendGump(new SuspicionsGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public SuspicionsScroll(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 SuspicionsGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("SuspicionsLetters", AccessLevel.GameMaster, new CommandEventHandler(SuspicionsGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void SuspicionsGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new SuspicionsGump(e.Mobile));
|
||||
}
|
||||
|
||||
public SuspicionsGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(164, 61, 250, 24, 1154402, 1062086, false, false); // Suspicions
|
||||
AddHtmlLocalized(147, 90, 250, 24, 1154419, 1062086, false, false); // Champ Huthwait
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154403, 1, false, true); // I'm sure the bastards are cheating, but I can't find out what their system is or why they always win when it's a larger bet. I can't seem to figure out their system, and it's better than mine! If only I didn't have all those distractions with how loud it is in there from the other tables. People talking about how their piddling little days went, how happy they are to meet someone, even that once renowned thief getting hired by someone. It doesn't mean anything, and it's throwing me off my game! Mercutio's breathing down my neck as it is...at least I still have those hidden documents so he doesn't dare kill me outright...but it won't be long before his patience runs out and even that threat won't be enough.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WillemHarteScroll : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023637; } } // scroll
|
||||
|
||||
[Constructable]
|
||||
public WillemHarteScroll() : base(0x46AF)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.HasGump(typeof(WillemHarteGump)))
|
||||
{
|
||||
from.SendGump(new WillemHarteGump(from));
|
||||
}
|
||||
}
|
||||
|
||||
public WillemHarteScroll(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 WillemHarteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("WillemHarte", AccessLevel.GameMaster, new CommandEventHandler(WillemHarteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void WillemHarteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new WillemHarteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public WillemHarteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = true;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
|
||||
AddPage(0);
|
||||
AddBackground(6, 11, 390, 324, 9380);
|
||||
AddHtmlLocalized(175, 61, 250, 24, 1154394, 1062086, false, false); // Letter
|
||||
AddHtmlLocalized(155, 90, 250, 24, 1154417, 1062086, false, false); // Willem Hart
|
||||
AddHtmlLocalized(42, 121, 323, 174, 1154395, 1, false, true); // <I>*The letter seems to have been read many times and has areas where the ink has run from tears.*</I><BR>Mother, it's time for me to go out and make my own way. Isaiah's long since left and though I know how it has hurt you that he has sent fewer and fewer letters, but I can no longer stay here while my destiny lies out there. I've joined a group of skilled fighters who are planning to earn their keep escorting a group of miners attempting to gather some sort of special ore from Destard. It will be dangerous, but we're being led by an experienced guardsman from Skara Brae.<BR><BR>Virtues be with you, Mother.
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
344
Scripts/Services/ExploringTheDeep/Items/SorcerersPlates.cs
Normal file
344
Scripts/Services/ExploringTheDeep/Items/SorcerersPlates.cs
Normal file
@@ -0,0 +1,344 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SorcerersPlateController : Item
|
||||
{
|
||||
public static readonly string EntityName = "sorcerersplate";
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("GenSorcerersPlate", AccessLevel.Developer, new CommandEventHandler(GenSorcerersPlate_Command));
|
||||
CommandSystem.Register("DelSorcerersPlate", AccessLevel.Developer, new CommandEventHandler(DelSorcerersPlate_Command));
|
||||
}
|
||||
|
||||
[Usage("GenSorcerersPlate")]
|
||||
private static void GenSorcerersPlate_Command(CommandEventArgs e)
|
||||
{
|
||||
DeletePlates();
|
||||
e.Mobile.SendMessage("Creating Sorcerers Plate...");
|
||||
|
||||
SorcerersPlateController controller = new SorcerersPlateController();
|
||||
WeakEntityCollection.Add(EntityName, controller);
|
||||
|
||||
e.Mobile.SendMessage("Sorcerers Plate Generation Completed!");
|
||||
}
|
||||
|
||||
[Usage("DelSorcerersPlate")]
|
||||
private static void DelSorcerersPlate_Command(CommandEventArgs e)
|
||||
{
|
||||
DeletePlates();
|
||||
}
|
||||
|
||||
private static void DeletePlates()
|
||||
{
|
||||
WeakEntityCollection.Delete(EntityName);
|
||||
}
|
||||
|
||||
private SorcerersPlate m_PerfectBlackPearl, m_BurstingBrimstone, m_BrightDaemonBlood, m_MightyMandrake, m_BurlyBone;
|
||||
|
||||
public SorcerersPlateController()
|
||||
: base(0x1F13)
|
||||
{
|
||||
Name = "Sorcerers Plate Controller - Do not remove !!";
|
||||
Visible = false;
|
||||
Movable = false;
|
||||
|
||||
MoveToWorld(new Point3D(100, 49, -22), Map.Ilshenar);
|
||||
|
||||
CreateSorcerersPlates();
|
||||
|
||||
Item decor;
|
||||
|
||||
decor = new BrightDaemonBloodDecor();
|
||||
decor.MoveToWorld(new Point3D(149, 26, -28), Map.Ilshenar);
|
||||
|
||||
decor = new BurlyBoneDecor();
|
||||
decor.MoveToWorld(new Point3D(159, 7, -23), Map.Ilshenar);
|
||||
|
||||
decor = new BurstingBrimstoneDecor();
|
||||
decor.MoveToWorld(new Point3D(125, 9, -28), Map.Ilshenar);
|
||||
|
||||
decor = new MightyMandrakeDecor();
|
||||
decor.MoveToWorld(new Point3D(98, 36, -18), Map.Ilshenar);
|
||||
|
||||
decor = new PerfectBlackPearlDecor();
|
||||
decor.MoveToWorld(new Point3D(161, 63, -21), Map.Ilshenar);
|
||||
|
||||
decor = new SorcerersRewardChest();
|
||||
decor.MoveToWorld(new Point3D(100, 41, -22), Map.Ilshenar);
|
||||
}
|
||||
|
||||
public SorcerersPlateController(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public void CreateSorcerersPlates()
|
||||
{
|
||||
m_BrightDaemonBlood = new SorcerersPlate(this, SorcerersPlate.RegsType.BrightDaemonBlood);
|
||||
m_BrightDaemonBlood.MoveToWorld(new Point3D(101, 45, -22), Map.Ilshenar);
|
||||
|
||||
m_BurlyBone = new SorcerersPlate(this, SorcerersPlate.RegsType.BurlyBone);
|
||||
m_BurlyBone.MoveToWorld(new Point3D(101, 43, -22), Map.Ilshenar);
|
||||
|
||||
m_BurstingBrimstone = new SorcerersPlate(this, SorcerersPlate.RegsType.BurstingBrimstone);
|
||||
m_BurstingBrimstone.MoveToWorld(new Point3D(101, 46, -22), Map.Ilshenar);
|
||||
|
||||
m_MightyMandrake = new SorcerersPlate(this, SorcerersPlate.RegsType.MightyMandrake);
|
||||
m_MightyMandrake.MoveToWorld(new Point3D(101, 44, -22), Map.Ilshenar);
|
||||
|
||||
m_PerfectBlackPearl = new SorcerersPlate(this, SorcerersPlate.RegsType.PerfectBlackPearl);
|
||||
m_PerfectBlackPearl.MoveToWorld(new Point3D(101, 47, -22), Map.Ilshenar);
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
if (this.Validate(this.m_PerfectBlackPearl) && this.Validate(this.m_BurstingBrimstone) && this.Validate(this.m_BrightDaemonBlood) && this.Validate(this.m_MightyMandrake) && this.Validate(this.m_BurlyBone))
|
||||
{
|
||||
Mobile creature = TheMasterInstructor.Spawn(new Point3D(105, 38, -28), Map.Ilshenar, this);
|
||||
|
||||
if (creature == null)
|
||||
return;
|
||||
|
||||
this.Clear(this.m_PerfectBlackPearl);
|
||||
this.Clear(this.m_BurstingBrimstone);
|
||||
this.Clear(this.m_BrightDaemonBlood);
|
||||
this.Clear(this.m_MightyMandrake);
|
||||
this.Clear(this.m_BurlyBone);
|
||||
}
|
||||
}
|
||||
|
||||
public void Clear(SorcerersPlate plate)
|
||||
{
|
||||
if (plate != null)
|
||||
{
|
||||
Effects.SendBoltEffect(plate);
|
||||
|
||||
if (plate.Reg != null)
|
||||
plate.Reg.Delete();
|
||||
|
||||
plate.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public bool Validate(SorcerersPlate plate)
|
||||
{
|
||||
return (plate != null && plate.Reg != null && !plate.Reg.Deleted);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(this.m_PerfectBlackPearl);
|
||||
writer.Write(this.m_BurstingBrimstone);
|
||||
writer.Write(this.m_BrightDaemonBlood);
|
||||
writer.Write(this.m_MightyMandrake);
|
||||
writer.Write(this.m_BurlyBone);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
this.m_PerfectBlackPearl = reader.ReadItem() as SorcerersPlate;
|
||||
this.m_BurstingBrimstone = reader.ReadItem() as SorcerersPlate;
|
||||
this.m_BrightDaemonBlood = reader.ReadItem() as SorcerersPlate;
|
||||
this.m_MightyMandrake = reader.ReadItem() as SorcerersPlate;
|
||||
this.m_BurlyBone = reader.ReadItem() as SorcerersPlate;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SorcerersPlate : Item
|
||||
{
|
||||
private SorcerersPlateController m_Controller;
|
||||
private RegsType m_Type;
|
||||
private Item m_Reg;
|
||||
|
||||
public enum RegsType
|
||||
{
|
||||
PerfectBlackPearl,
|
||||
BurstingBrimstone,
|
||||
BrightDaemonBlood,
|
||||
MightyMandrake,
|
||||
BurlyBone
|
||||
};
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SorcerersPlateController Controller
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Controller;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public RegsType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Type = value;
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Item Reg
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Reg;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Reg = value;
|
||||
if (this.m_Controller != null)
|
||||
this.m_Controller.Validate();
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber { get { return 1011199; } } // Plate
|
||||
|
||||
[Constructable]
|
||||
public SorcerersPlate(SorcerersPlateController controller, RegsType type)
|
||||
: base(0x9D7)
|
||||
{
|
||||
this.m_Type = type;
|
||||
this.Movable = false;
|
||||
this.Hue = 2406;
|
||||
this.m_Controller = controller;
|
||||
}
|
||||
|
||||
public SorcerersPlate(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1154248, "#{0}", 1154249 + (int)m_Type); // The Plate is Inscribed: ~1_CLUE~
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile))
|
||||
return;
|
||||
|
||||
from.Target = new RegsTarget(from, this);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write((int)this.m_Type);
|
||||
writer.Write(this.m_Controller);
|
||||
writer.Write(this.m_Reg);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
this.m_Type = (RegsType)reader.ReadInt();
|
||||
this.m_Controller = reader.ReadItem() as SorcerersPlateController;
|
||||
this.m_Reg = reader.ReadItem();
|
||||
|
||||
if (this.m_Controller == null)
|
||||
this.Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class RegsTarget : Target
|
||||
{
|
||||
private static Mobile m_from;
|
||||
private static SorcerersPlate m_Plate;
|
||||
|
||||
public RegsTarget(Mobile from, SorcerersPlate plate) : base(2, false, TargetFlags.None)
|
||||
{
|
||||
from.SendLocalizedMessage(1154254); // What do you wish to put on the plate?
|
||||
m_from = from;
|
||||
m_Plate = plate;
|
||||
}
|
||||
|
||||
private bool CheckRegs(Item item)
|
||||
{
|
||||
return item is PerfectBlackPearl || item is BurstingBrimstone || item is BrightDaemonBlood || item is MightyMandrake || item is BurlyBone;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is Item)
|
||||
{
|
||||
Item item = (Item)o;
|
||||
|
||||
if (!item.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1054107); // This item must be in your backpack.
|
||||
return;
|
||||
}
|
||||
|
||||
if (!CheckRegs(item))
|
||||
{
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154255); // *You place the item on the plate but it simply melts away. You had better search for a more pure reagent*
|
||||
return;
|
||||
}
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)from;
|
||||
|
||||
if (pm.ExploringTheDeepQuest != ExploringTheDeepQuestChain.Sorcerers)
|
||||
{
|
||||
from.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.GetType().Name == m_Plate.Type.ToString())
|
||||
{
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154256); // *You place the reagent on the plate and hear an ominous click in the background...*
|
||||
item.MoveToWorld(m_Plate.GetWorldTop(), m_Plate.Map);
|
||||
item.Movable = false;
|
||||
m_Plate.Reg = item;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500309); // Nothing Happens.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
129
Scripts/Services/ExploringTheDeep/Items/SorcerersRewardChest.cs
Normal file
129
Scripts/Services/ExploringTheDeep/Items/SorcerersRewardChest.cs
Normal file
@@ -0,0 +1,129 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SorcerersRewardChest : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023712; } } // strong box
|
||||
|
||||
[Constructable]
|
||||
public SorcerersRewardChest() : base(0x9AA)
|
||||
{
|
||||
this.Movable = false;
|
||||
this.Hue = 1912;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154226); // *It's an unassuming strong box. You examine the lock more closely and determine there is no way to pick it. You'll need to find a key.*
|
||||
|
||||
base.OnDoubleClick(from);
|
||||
}
|
||||
|
||||
public SorcerersRewardChest(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 StrongboxKey : BaseDecayingItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1154227; } } // Strongbox Key
|
||||
|
||||
[Constructable]
|
||||
public StrongboxKey() : base(0x410A)
|
||||
{
|
||||
Stackable = false;
|
||||
Weight = 0.01;
|
||||
Hue = 2721;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override int Lifespan { get { return 3600; } }
|
||||
public override bool UseSeconds { get { return false; } }
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1072351); // Quest Item
|
||||
}
|
||||
|
||||
public StrongboxKey(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!(from is PlayerMobile))
|
||||
return;
|
||||
|
||||
if (!this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1054107); // This item must be in your backpack.
|
||||
return;
|
||||
}
|
||||
|
||||
from.Target = new ChestTarget(from, this);
|
||||
from.SendLocalizedMessage(1010086); // What do you want to use this on?
|
||||
}
|
||||
|
||||
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 ChestTarget : Target
|
||||
{
|
||||
private static Mobile m_From;
|
||||
private static StrongboxKey m_Key;
|
||||
|
||||
public ChestTarget(Mobile from, StrongboxKey key) : base(2, false, TargetFlags.None)
|
||||
{
|
||||
m_From = from;
|
||||
m_Key = key;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object o)
|
||||
{
|
||||
if (o is SorcerersRewardChest)
|
||||
{
|
||||
Item item = new SalvagerSuitPlans();
|
||||
Container pack = from.Backpack;
|
||||
|
||||
if (pack == null || !pack.TryDropItem(from, item, false))
|
||||
from.BankBox.DropItem(item);
|
||||
|
||||
m_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*
|
||||
|
||||
m_Key.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(501668); // This key doesn't seem to unlock that.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
350
Scripts/Services/ExploringTheDeep/Items/SpecialSalvageHook.cs
Normal file
350
Scripts/Services/ExploringTheDeep/Items/SpecialSalvageHook.cs
Normal file
@@ -0,0 +1,350 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Multis;
|
||||
using Server.Spells;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpecialSalvageHook : Item
|
||||
{
|
||||
private static readonly int[] m_Hues = new int[]
|
||||
{
|
||||
0x09B,
|
||||
0x0CD,
|
||||
0x0D3,
|
||||
0x14D,
|
||||
0x1DD,
|
||||
0x1E9,
|
||||
0x1F4,
|
||||
0x373,
|
||||
0x451,
|
||||
0x47F,
|
||||
0x489,
|
||||
0x492,
|
||||
0x4B5,
|
||||
0x8AA
|
||||
};
|
||||
|
||||
private static readonly int[] m_WaterTiles = new int[]
|
||||
{
|
||||
0x00A8, 0x00AB,
|
||||
0x0136, 0x0137
|
||||
};
|
||||
|
||||
private static readonly int[] m_UndeepWaterTiles = new int[]
|
||||
{
|
||||
0x1797, 0x179C
|
||||
};
|
||||
|
||||
private bool m_InUse;
|
||||
private int _Tick;
|
||||
private Timer _EffectTimer;
|
||||
|
||||
[Constructable]
|
||||
public SpecialSalvageHook()
|
||||
: base(0x14F7)
|
||||
{
|
||||
this.Weight = 25.0;
|
||||
this.Hue = 2654;
|
||||
}
|
||||
|
||||
public SpecialSalvageHook(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber { get { return 1154215; } } // A Special Salvage Hook
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool InUse
|
||||
{
|
||||
get { return this.m_InUse; }
|
||||
set { this.m_InUse = value; }
|
||||
}
|
||||
|
||||
public virtual bool RequireDeepWater { get { return true; } }
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write(this.m_InUse);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
this.m_InUse = reader.ReadBool();
|
||||
|
||||
if (this.m_InUse)
|
||||
this.Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.Stackable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest > ExploringTheDeepQuestChain.None)
|
||||
{
|
||||
if (!this.m_InUse)
|
||||
{
|
||||
from.SendLocalizedMessage(1154219); // Where do you wish to use this?
|
||||
from.BeginTarget(-1, true, TargetFlags.None, new TargetCallback(OnTarget));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154274); // *You aren't quite sure what to do with this. If you spoke to the Salvage Master at the Sons of the Sea in Trinsic you might have a better understanding of its use...*
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void OnTarget(Mobile from, object obj)
|
||||
{
|
||||
if (this.Deleted || this.m_InUse)
|
||||
return;
|
||||
|
||||
IPoint3D p3D = obj as IPoint3D;
|
||||
|
||||
if (p3D == null)
|
||||
return;
|
||||
|
||||
Map map = from.Map;
|
||||
|
||||
if (map == null || map == Map.Internal)
|
||||
return;
|
||||
|
||||
int x = p3D.X, y = p3D.Y, z = map.GetAverageZ(x, y); // OSI just takes the targeted Z
|
||||
|
||||
if (!from.InLOS(obj))
|
||||
{
|
||||
from.SendLocalizedMessage(500979); // You cannot see that location.
|
||||
}
|
||||
else if (this.RequireDeepWater ? SpecialFishingNet.FullValidation(map, x, y) : (SpecialFishingNet.ValidateDeepWater(map, x, y) || SpecialFishingNet.ValidateUndeepWater(map, obj, ref z)))
|
||||
{
|
||||
Point3D p = new Point3D(x, y, z);
|
||||
|
||||
if (this.GetType() == typeof(SpecialSalvageHook))
|
||||
{
|
||||
for (int i = 1; i < this.Amount; ++i) // these were stackable before, doh
|
||||
from.AddToBackpack(new SpecialSalvageHook());
|
||||
}
|
||||
|
||||
_Tick = 0;
|
||||
|
||||
this.m_InUse = true;
|
||||
this.Movable = false;
|
||||
this.MoveToWorld(p, map);
|
||||
|
||||
SpellHelper.Turn(from, p);
|
||||
from.Animate(12, 5, 1, true, false, 0);
|
||||
|
||||
Effects.SendLocationEffect(p, map, 0x352D, 16, 4);
|
||||
Effects.PlaySound(p, map, 0x364);
|
||||
|
||||
_EffectTimer = Timer.DelayCall(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.25), new TimerStateCallback(DoEffect), new object[] { p, from });
|
||||
_EffectTimer.Start();
|
||||
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154220); // *You cast the mighty hook into the sea!*
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1010485); // You can only use this in deep water!
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual int GetSpawnCount()
|
||||
{
|
||||
int count = Utility.RandomMinMax(1, 3);
|
||||
|
||||
if (this.Hue != 0x8A0)
|
||||
count += Utility.RandomMinMax(1, 2);
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
protected void Spawn(Point3D p, Map map, BaseCreature spawn)
|
||||
{
|
||||
if (map == null)
|
||||
{
|
||||
spawn.Delete();
|
||||
return;
|
||||
}
|
||||
|
||||
int x = p.X, y = p.Y;
|
||||
|
||||
for (int j = 0; j < 20; ++j)
|
||||
{
|
||||
int tx = p.X - 2 + Utility.Random(5);
|
||||
int ty = p.Y - 2 + Utility.Random(5);
|
||||
|
||||
LandTile t = map.Tiles.GetLandTile(tx, ty);
|
||||
|
||||
if (t.Z == p.Z && ((t.ID >= 0xA8 && t.ID <= 0xAB) || (t.ID >= 0x136 && t.ID <= 0x137)) && !Spells.SpellHelper.CheckMulti(new Point3D(tx, ty, p.Z), map))
|
||||
{
|
||||
x = tx;
|
||||
y = ty;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
spawn.MoveToWorld(new Point3D(x, y, p.Z), map);
|
||||
}
|
||||
|
||||
protected virtual void SpawnBaddies(Point3D p, Map map, Mobile from)
|
||||
{
|
||||
if (from != null || map != null)
|
||||
{
|
||||
from.RevealingAction();
|
||||
|
||||
int count = this.GetSpawnCount();
|
||||
BaseCreature spawn;
|
||||
|
||||
for (int i = 0; i < count; ++i)
|
||||
{
|
||||
switch (Utility.Random(4))
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
spawn = new SeaSerpent();
|
||||
break;
|
||||
case 1:
|
||||
spawn = new DeepSeaSerpent();
|
||||
break;
|
||||
case 2:
|
||||
spawn = new WaterElemental();
|
||||
break;
|
||||
case 3:
|
||||
spawn = new Kraken();
|
||||
break;
|
||||
}
|
||||
|
||||
this.Spawn(p, map, spawn);
|
||||
spawn.Combatant = from;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool ValidateUndeepWater(Map map, object obj, ref int z)
|
||||
{
|
||||
if (!(obj is StaticTarget))
|
||||
return false;
|
||||
|
||||
StaticTarget target = (StaticTarget)obj;
|
||||
|
||||
if (BaseHouse.FindHouseAt(target.Location, map, 0) != null)
|
||||
return false;
|
||||
|
||||
int itemID = target.ItemID;
|
||||
|
||||
for (int i = 0; i < m_UndeepWaterTiles.Length; i += 2)
|
||||
{
|
||||
if (itemID >= m_UndeepWaterTiles[i] && itemID <= m_UndeepWaterTiles[i + 1])
|
||||
{
|
||||
z = target.Z;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private void DoEffect(object state)
|
||||
{
|
||||
if (this.Deleted)
|
||||
return;
|
||||
|
||||
object[] states = (object[])state;
|
||||
|
||||
Point3D p = (Point3D)states[0];
|
||||
Mobile from = (Mobile)states[1];
|
||||
|
||||
if (_Tick == 1)
|
||||
{
|
||||
Effects.SendLocationEffect(p, this.Map, 0x352D, 16, 4);
|
||||
Effects.PlaySound(p, this.Map, 0x364);
|
||||
}
|
||||
else if (_Tick <= 7 || _Tick == 14)
|
||||
{
|
||||
if (this.RequireDeepWater)
|
||||
{
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int x, y = 0;
|
||||
|
||||
do
|
||||
{
|
||||
x = Utility.RandomMinMax(-1, 1);
|
||||
y = Utility.RandomMinMax(-1, 1);
|
||||
}
|
||||
while (x == 0 && y == 0);
|
||||
|
||||
Effects.SendLocationEffect(new Point3D(p.X + x, p.Y + y, p.Z), this.Map, 0x352D, 16, 4);
|
||||
}
|
||||
|
||||
if (_Tick == 14)
|
||||
{
|
||||
if (0.6 >= Utility.RandomDouble())
|
||||
{
|
||||
if (0.5 >= Utility.RandomDouble())
|
||||
{
|
||||
from.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154218); // *The line snaps tight as you snare a piece of wreckage from the sea floor!*
|
||||
|
||||
from.AddToBackpack(new BrokenShipwreckRemains());
|
||||
}
|
||||
else
|
||||
{
|
||||
SpawnBaddies(p, this.Map, from);
|
||||
}
|
||||
}
|
||||
|
||||
//TODO: Message?
|
||||
|
||||
this.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.SendLocationEffect(p, this.Map, 0x352D, 16, 4);
|
||||
}
|
||||
|
||||
if (Utility.RandomBool())
|
||||
Effects.PlaySound(p, this.Map, 0x364);
|
||||
|
||||
this.Z -= 1;
|
||||
}
|
||||
|
||||
_Tick++;
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
base.Delete();
|
||||
|
||||
if (_EffectTimer != null)
|
||||
{
|
||||
_EffectTimer.Stop();
|
||||
_EffectTimer = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ShipLadder : Item
|
||||
{
|
||||
private Point3D m_PointDest;
|
||||
private Map m_Map;
|
||||
|
||||
[Constructable]
|
||||
public ShipLadder(Point3D point, Map map, int id)
|
||||
: base(0x08A6)
|
||||
{
|
||||
this.ItemID = id;
|
||||
this.m_PointDest = point;
|
||||
this.m_Map = map;
|
||||
this.Movable = false;
|
||||
}
|
||||
|
||||
public ShipLadder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClickDead(Mobile from)
|
||||
{
|
||||
if (from.InRange(this.Location, 2))
|
||||
{
|
||||
Server.Mobiles.BaseCreature.TeleportPets(from, m_PointDest, from.Map);
|
||||
from.MoveToWorld(m_PointDest, m_Map);
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.Alive)
|
||||
return;
|
||||
|
||||
if (from.InRange(this.Location, 2))
|
||||
{
|
||||
Server.Mobiles.BaseCreature.TeleportPets(from, m_PointDest, from.Map);
|
||||
from.MoveToWorld(m_PointDest, m_Map);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_PointDest);
|
||||
writer.Write(m_Map);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_PointDest = reader.ReadPoint3D();
|
||||
m_Map = reader.ReadMap();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ShipSign : Item
|
||||
{
|
||||
private int m_Cliloc;
|
||||
|
||||
public override int LabelNumber { get { return m_Cliloc; } }
|
||||
|
||||
|
||||
[Constructable]
|
||||
public ShipSign(int id, int cliloc)
|
||||
: base(0xBD2)
|
||||
{
|
||||
this.ItemID = id;
|
||||
this.m_Cliloc = cliloc;
|
||||
this.Movable = false;
|
||||
}
|
||||
|
||||
public ShipSign(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_Cliloc);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Cliloc = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
353
Scripts/Services/ExploringTheDeep/Items/Teleporter/Whirlpool.cs
Normal file
353
Scripts/Services/ExploringTheDeep/Items/Teleporter/Whirlpool.cs
Normal file
@@ -0,0 +1,353 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
using System.Linq;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Whirlpool : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1033459; } } // whirlpool
|
||||
|
||||
private bool m_Active, m_Creatures, m_CombatCheck, m_CriminalCheck;
|
||||
private Point3D m_PointDest;
|
||||
private Map m_MapDest;
|
||||
private bool m_SourceEffect;
|
||||
private bool m_DestEffect;
|
||||
private int m_SoundID;
|
||||
private TimeSpan m_Delay;
|
||||
|
||||
[Constructable]
|
||||
public Whirlpool(Point3D pointDest, Map mapDest)
|
||||
: this(pointDest, mapDest, false)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Whirlpool(Point3D pointDest, Map mapDest, bool creatures)
|
||||
: base(0x3789)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 2592;
|
||||
|
||||
m_Active = true;
|
||||
m_PointDest = pointDest;
|
||||
m_MapDest = mapDest;
|
||||
m_Creatures = creatures;
|
||||
|
||||
m_CombatCheck = false;
|
||||
m_CriminalCheck = false;
|
||||
}
|
||||
|
||||
public Whirlpool(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool SourceEffect
|
||||
{
|
||||
get { return m_SourceEffect; }
|
||||
set
|
||||
{
|
||||
m_SourceEffect = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool DestEffect
|
||||
{
|
||||
get { return m_DestEffect; }
|
||||
set
|
||||
{
|
||||
m_DestEffect = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int SoundID
|
||||
{
|
||||
get { return m_SoundID; }
|
||||
set
|
||||
{
|
||||
m_SoundID = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public TimeSpan Delay
|
||||
{
|
||||
get { return m_Delay; }
|
||||
set
|
||||
{
|
||||
m_Delay = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Active
|
||||
{
|
||||
get { return m_Active; }
|
||||
set
|
||||
{
|
||||
m_Active = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Point3D PointDest
|
||||
{
|
||||
get { return m_PointDest; }
|
||||
set
|
||||
{
|
||||
m_PointDest = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Map MapDest
|
||||
{
|
||||
get { return m_MapDest; }
|
||||
set
|
||||
{
|
||||
m_MapDest = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Creatures
|
||||
{
|
||||
get { return m_Creatures; }
|
||||
set
|
||||
{
|
||||
m_Creatures = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool CombatCheck
|
||||
{
|
||||
get { return m_CombatCheck; }
|
||||
set
|
||||
{
|
||||
m_CombatCheck = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool CriminalCheck
|
||||
{
|
||||
get { return m_CriminalCheck; }
|
||||
set
|
||||
{
|
||||
m_CriminalCheck = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.Holding != null)
|
||||
{
|
||||
from.SendLocalizedMessage(1071955); // You cannot teleport while dragging an object.
|
||||
return;
|
||||
}
|
||||
PlayerMobile mobile = from as PlayerMobile;
|
||||
|
||||
if (mobile == null)
|
||||
return;
|
||||
|
||||
if (mobile.IsStaff())
|
||||
{
|
||||
StartTeleport(mobile);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!mobile.Alive || !mobile.IsPlayer())
|
||||
return;
|
||||
|
||||
else if (m_Active && CanTeleport(from))
|
||||
{
|
||||
int equipment = mobile.Items.Where(i => (i is CanvassRobe || i is BootsOfBallast || i is NictitatingLens || i is AquaPendant || i is GargishNictitatingLens) && (i.Parent is Mobile && ((Mobile)i.Parent).FindItemOnLayer(i.Layer) == i)).Count();
|
||||
|
||||
if (equipment < 4)
|
||||
{
|
||||
mobile.Kill();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
StartTeleport(from);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool CanTeleport(Mobile m)
|
||||
{
|
||||
if (!m_Creatures && !m.Player)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (m_CriminalCheck && m.Criminal)
|
||||
{
|
||||
m.SendLocalizedMessage(1005561, "", 0x22); // Thou'rt a criminal and cannot escape so easily.
|
||||
return false;
|
||||
}
|
||||
else if (m_CombatCheck && SpellHelper.CheckCombat(m))
|
||||
{
|
||||
m.SendLocalizedMessage(1005564, "", 0x22); // Wouldst thou flee during the heat of battle??
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual void StartTeleport(Mobile m)
|
||||
{
|
||||
if (m.Holding != null)
|
||||
{
|
||||
m.SendLocalizedMessage(1071955); // You cannot teleport while dragging an object.
|
||||
return;
|
||||
}
|
||||
else if (m_Delay == TimeSpan.Zero)
|
||||
{
|
||||
DoTeleport(m);
|
||||
}
|
||||
else
|
||||
{
|
||||
Timer.DelayCall(m_Delay, DoTeleport, m);
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void DoTeleport(Mobile m)
|
||||
{
|
||||
Map map = m_MapDest;
|
||||
|
||||
if (map == null || map == Map.Internal)
|
||||
{
|
||||
map = m.Map;
|
||||
}
|
||||
|
||||
Point3D p = m_PointDest;
|
||||
|
||||
if (p == Point3D.Zero)
|
||||
{
|
||||
p = m.Location;
|
||||
}
|
||||
|
||||
BaseCreature.TeleportPets(m, p, map);
|
||||
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), () =>
|
||||
{
|
||||
var spell = QuestHelper.GetQuest<ExploringTheDeepQuest>((PlayerMobile)m);
|
||||
|
||||
if (spell != null)
|
||||
{
|
||||
spell.CompleteQuest();
|
||||
}
|
||||
else if (((PlayerMobile)m).AddRewardTitle(1154505))
|
||||
{
|
||||
((PlayerMobile)m).SendLocalizedMessage(1155605, "#1154505"); //Thou hath been bestowed the title ~1_TITLE~!
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
bool sendEffect = (!m.Hidden || m.IsPlayer());
|
||||
|
||||
if (m_SourceEffect && sendEffect)
|
||||
{
|
||||
Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);
|
||||
}
|
||||
|
||||
m.MoveToWorld(p, map);
|
||||
|
||||
if (m_DestEffect && sendEffect)
|
||||
{
|
||||
Effects.SendLocationEffect(m.Location, m.Map, 0x3728, 10, 10);
|
||||
}
|
||||
|
||||
if (m_SoundID > 0 && sendEffect)
|
||||
{
|
||||
Effects.PlaySound(m.Location, m.Map, m_SoundID);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write(4); // version
|
||||
|
||||
writer.Write(m_CriminalCheck);
|
||||
writer.Write(m_CombatCheck);
|
||||
|
||||
writer.Write(m_SourceEffect);
|
||||
writer.Write(m_DestEffect);
|
||||
writer.Write(m_Delay);
|
||||
writer.WriteEncodedInt(m_SoundID);
|
||||
|
||||
writer.Write(m_Creatures);
|
||||
|
||||
writer.Write(m_Active);
|
||||
writer.Write(m_PointDest);
|
||||
writer.Write(m_MapDest);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 4:
|
||||
{
|
||||
m_CriminalCheck = reader.ReadBool();
|
||||
goto case 3;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
m_CombatCheck = reader.ReadBool();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_SourceEffect = reader.ReadBool();
|
||||
m_DestEffect = reader.ReadBool();
|
||||
m_Delay = reader.ReadTimeSpan();
|
||||
m_SoundID = reader.ReadEncodedInt();
|
||||
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_Creatures = reader.ReadBool();
|
||||
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Active = reader.ReadBool();
|
||||
m_PointDest = reader.ReadPoint3D();
|
||||
m_MapDest = reader.ReadMap();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
505
Scripts/Services/ExploringTheDeep/Items/WinchAssembly.cs
Normal file
505
Scripts/Services/ExploringTheDeep/Items/WinchAssembly.cs
Normal file
@@ -0,0 +1,505 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Commands;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WinchAssembly : Item
|
||||
{
|
||||
public static readonly string EntityName = "winchassemply";
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("GenWinchAssembly", AccessLevel.Administrator, GenWinchAssembly_Command);
|
||||
CommandSystem.Register("DelWinchAssembly", AccessLevel.Administrator, DelWinchAssembly_Command);
|
||||
}
|
||||
|
||||
[Usage("GenWinchAssembly")]
|
||||
private static void GenWinchAssembly_Command(CommandEventArgs e)
|
||||
{
|
||||
GenWinchAssembly(e.Mobile);
|
||||
}
|
||||
|
||||
[Usage("GenWinchAssembly")]
|
||||
private static void DelWinchAssembly_Command(CommandEventArgs e)
|
||||
{
|
||||
DeleteWinchAssembly(e.Mobile);
|
||||
}
|
||||
|
||||
public static void GenWinchAssembly(Mobile m)
|
||||
{
|
||||
DeleteWinchAssembly(m);
|
||||
|
||||
// Winch
|
||||
WinchAssembly winch = new WinchAssembly();
|
||||
WeakEntityCollection.Add(EntityName, winch);
|
||||
|
||||
Hatch hatch = new Hatch();
|
||||
WeakEntityCollection.Add(EntityName, hatch);
|
||||
|
||||
WinchAssemblyLever lever = new WinchAssemblyLever(winch, hatch);
|
||||
WeakEntityCollection.Add(EntityName, lever);
|
||||
|
||||
lever.MoveToWorld(new Point3D(6310, 1705, 0), Map.Trammel);
|
||||
winch.MoveToWorld(new Point3D(6310, 1704, 0), Map.Trammel);
|
||||
hatch.MoveToWorld(new Point3D(6303, 1711, 10), Map.Trammel);
|
||||
|
||||
m.SendMessage("Winch Assembly Generation completed!");
|
||||
}
|
||||
|
||||
private static void DeleteWinchAssembly(Mobile from)
|
||||
{
|
||||
WeakEntityCollection.Delete(EntityName);
|
||||
}
|
||||
|
||||
public override int LabelNumber { get { return 1154433; } } // Winch Assembly
|
||||
|
||||
private bool m_flywheel;
|
||||
private bool m_wirespool;
|
||||
private bool m_bearingassembly;
|
||||
private bool m_powercore;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool FlyWheel
|
||||
{
|
||||
get { return m_flywheel; }
|
||||
set
|
||||
{
|
||||
m_flywheel = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool WireSpool
|
||||
{
|
||||
get { return m_wirespool; }
|
||||
set
|
||||
{
|
||||
m_wirespool = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool BearingAssembly
|
||||
{
|
||||
get { return m_bearingassembly; }
|
||||
set
|
||||
{
|
||||
m_bearingassembly = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool PowerCore
|
||||
{
|
||||
get { return m_powercore; }
|
||||
set
|
||||
{
|
||||
m_powercore = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WinchAssembly() : base(0x280E)
|
||||
{
|
||||
this.Movable = false;
|
||||
this.Hue = 2101;
|
||||
}
|
||||
|
||||
public WinchAssembly(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(FlyWheel ? 1154448 : 1154432);
|
||||
list.Add(WireSpool ? 1154449 : 1154434);
|
||||
list.Add(PowerCore ? 1154450 : 1154435);
|
||||
list.Add(BearingAssembly ? 1154451 : 1154436);
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
if (dropped is BearingAssembly && !m_bearingassembly)
|
||||
{
|
||||
dropped.Delete();
|
||||
BearingAssembly = true;
|
||||
}
|
||||
else if (dropped is FlyWheel && !m_flywheel)
|
||||
{
|
||||
dropped.Delete();
|
||||
FlyWheel = true;
|
||||
}
|
||||
else if (dropped is PowerCore && !m_powercore)
|
||||
{
|
||||
dropped.Delete();
|
||||
PowerCore = true;
|
||||
}
|
||||
else if (dropped is WireSpool && !m_wirespool)
|
||||
{
|
||||
dropped.Delete();
|
||||
WireSpool = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_flywheel);
|
||||
writer.Write(m_wirespool);
|
||||
writer.Write(m_bearingassembly);
|
||||
writer.Write(m_powercore);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_flywheel = reader.ReadBool();
|
||||
m_wirespool = reader.ReadBool();
|
||||
m_bearingassembly = reader.ReadBool();
|
||||
m_powercore = reader.ReadBool();
|
||||
}
|
||||
}
|
||||
|
||||
public class WinchAssemblyLever : Item
|
||||
{
|
||||
private WinchAssembly m_WinchAssembly;
|
||||
private Hatch m_hatch;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public WinchAssembly Winch
|
||||
{
|
||||
get { return m_WinchAssembly; }
|
||||
set { m_WinchAssembly = value; }
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Hatch Hatch
|
||||
{
|
||||
get { return m_hatch; }
|
||||
set { m_hatch = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WinchAssemblyLever(WinchAssembly winch, Hatch hatch)
|
||||
: base(0x108E)
|
||||
{
|
||||
this.Movable = false;
|
||||
this.m_WinchAssembly = winch;
|
||||
this.m_hatch = hatch;
|
||||
}
|
||||
|
||||
public WinchAssemblyLever(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (m_WinchAssembly == null || m_hatch == null)
|
||||
return;
|
||||
|
||||
if (m_WinchAssembly.BearingAssembly && m_WinchAssembly.FlyWheel && m_WinchAssembly.WireSpool && m_WinchAssembly.PowerCore)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0), 3, new TimerStateCallback(m_hatch.DoDownEffect), new object[] { m_hatch.Location, 0, from });
|
||||
|
||||
Mobile creature = Shadowlord.Spawn(new Point3D(6417, 1649, 0), Map.Trammel);
|
||||
|
||||
m_WinchAssembly.BearingAssembly = false;
|
||||
m_WinchAssembly.FlyWheel = false;
|
||||
m_WinchAssembly.WireSpool = false;
|
||||
m_WinchAssembly.PowerCore = false;
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write(m_WinchAssembly);
|
||||
writer.Write(m_hatch);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_WinchAssembly = reader.ReadItem() as WinchAssembly;
|
||||
m_hatch = reader.ReadItem() as Hatch;
|
||||
}
|
||||
}
|
||||
|
||||
public class Hatch : BaseAddon
|
||||
{
|
||||
private Timer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public Hatch()
|
||||
: base()
|
||||
{
|
||||
this.AddComponent(new HatchTile(this), 2, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), 2, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), 3, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), 4, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), 5, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 7, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 6, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 5, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 4, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 3, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, 2, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), -4, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), -3, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), -2, -6, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -1, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -2, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -3, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -4, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -5, 0);
|
||||
this.AddComponent(new HatchTile(this), -1, -6, 0);
|
||||
}
|
||||
|
||||
public Hatch(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public void DoDownEffect(object state)
|
||||
{
|
||||
if (this.Deleted)
|
||||
return;
|
||||
|
||||
object[] states = (object[])state;
|
||||
|
||||
Point3D p = (Point3D)states[0];
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
int x, y;
|
||||
|
||||
switch (Utility.Random(8))
|
||||
{
|
||||
default:
|
||||
case 0:
|
||||
x = -1;
|
||||
y = -1;
|
||||
break;
|
||||
case 1:
|
||||
x = -1;
|
||||
y = 0;
|
||||
break;
|
||||
case 2:
|
||||
x = -1;
|
||||
y = +1;
|
||||
break;
|
||||
case 3:
|
||||
x = 0;
|
||||
y = -1;
|
||||
break;
|
||||
case 4:
|
||||
x = 0;
|
||||
y = +1;
|
||||
break;
|
||||
case 5:
|
||||
x = +1;
|
||||
y = -1;
|
||||
break;
|
||||
case 6:
|
||||
x = +1;
|
||||
y = 0;
|
||||
break;
|
||||
case 7:
|
||||
x = +1;
|
||||
y = +1;
|
||||
break;
|
||||
}
|
||||
|
||||
Effects.SendLocationEffect(new Point3D(p.X + x, p.Y + y, p.Z), this.Map, 0x36CB, 16, 4, 1362, 0);
|
||||
|
||||
|
||||
this.Z -= 1;
|
||||
|
||||
if (this.Z == 1)
|
||||
{
|
||||
this.Hue = 1;
|
||||
this.m_Timer = new InternalTimer(this);
|
||||
this.m_Timer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if (this.m_Timer != null)
|
||||
this.m_Timer.Stop();
|
||||
|
||||
this.m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public class InternalTimer : Timer
|
||||
{
|
||||
public Hatch m_hatch;
|
||||
|
||||
public InternalTimer(Hatch hatch) : base(TimeSpan.FromMinutes(30.0))
|
||||
{
|
||||
Priority = TimerPriority.OneSecond;
|
||||
m_hatch = hatch;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
this.m_hatch.Z = 10;
|
||||
this.m_hatch.Hue = 2969;
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
this.m_Timer = new InternalTimer(this);
|
||||
this.m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
public class HatchTile : AddonComponent
|
||||
{
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Active { get { return (this.Z == 1); } }
|
||||
|
||||
public HatchTile(Hatch hatch)
|
||||
: base(0x07CD)
|
||||
{
|
||||
this.Hue = 2969;
|
||||
}
|
||||
|
||||
public HatchTile(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement { get { return true; } }
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (Active && m.Player && Utility.InRange(this.Location, m.Location, 0) && !Utility.InRange(this.Location, oldLocation, 0))
|
||||
{
|
||||
m.MoveToWorld(new Point3D(6415, 1647, 0), Map.Trammel);
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
535
Scripts/Services/ExploringTheDeep/Items/WoodenKeyBarrel.cs
Normal file
535
Scripts/Services/ExploringTheDeep/Items/WoodenKeyBarrel.cs
Normal file
@@ -0,0 +1,535 @@
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WoodenKeyBarrel : DamageableItem
|
||||
{
|
||||
private Parts m_key;
|
||||
private StorageLocker m_StorageLocker;
|
||||
public override int LabelNumber { get { return 1023703; } } // barrel
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public StorageLocker StorageLocker
|
||||
{
|
||||
get { return m_StorageLocker; }
|
||||
set { m_StorageLocker = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WoodenKeyBarrel(Parts key)
|
||||
: base(0x0FAE, 0x0FAE)
|
||||
{
|
||||
Name = "barrel";
|
||||
m_key = key;
|
||||
Level = ItemLevel.VeryEasy;
|
||||
Movable = false;
|
||||
HitsMax = 60;
|
||||
}
|
||||
|
||||
public WoodenKeyBarrel(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnBeforeDestroyed()
|
||||
{
|
||||
if (m_key != Parts.None)
|
||||
{
|
||||
(new LockerKey(m_key)).MoveToWorld(new Point3D(base.Location), base.Map);
|
||||
m_StorageLocker.BeginRestart(TimeSpan.FromMinutes(10.0));
|
||||
}
|
||||
else
|
||||
{
|
||||
Item debris = new WoodKeyDebris();
|
||||
debris.Movable = false;
|
||||
debris.MoveToWorld(new Point3D(base.Location), base.Map);
|
||||
|
||||
switch (Utility.Random(3))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
BarrelWrath.DoRandomWrath(debris);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
BarrelPoisonWrath.DoRandomWrath(debris);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
switch (Utility.Random(8))
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
(new SeaSnake()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
(new ShipRat()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
(new ShipBat()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
(new ShipBat()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
case 4:
|
||||
{
|
||||
(new ShipRat()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
case 5:
|
||||
{
|
||||
(new SeaSnake()).MoveToWorld(new Point3D(Location), Map);
|
||||
break;
|
||||
}
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
(new BarrelHoops()).MoveToWorld(new Point3D(Location), Map);
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
(new BarrelStaves()).MoveToWorld(new Point3D(Location), Map);
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
(new BarrelLid()).MoveToWorld(new Point3D(Location), Map);
|
||||
if (Utility.RandomDouble() < 0.05)
|
||||
(new CopperWire()).MoveToWorld(new Point3D(Location), Map);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)1); //version
|
||||
|
||||
writer.Write((int)m_key);
|
||||
writer.Write(m_StorageLocker);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_key = (Parts)reader.ReadInt();
|
||||
m_StorageLocker = (StorageLocker)reader.ReadItem();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class WoodenToMetalBarrel : DamageableItem
|
||||
{
|
||||
public override int LabelNumber { get { return 1023703; } } // barrel
|
||||
private StorageLocker m_StorageLocker;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public StorageLocker StorageLocker
|
||||
{
|
||||
get { return m_StorageLocker; }
|
||||
set { m_StorageLocker = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public WoodenToMetalBarrel(StorageLocker item)
|
||||
: base(0x0FAE, 0x0FAE)
|
||||
{
|
||||
Name = "barrel";
|
||||
|
||||
Level = ItemLevel.VeryEasy;
|
||||
Movable = false;
|
||||
HitsMax = 60;
|
||||
m_StorageLocker = item;
|
||||
}
|
||||
|
||||
public WoodenToMetalBarrel(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnBeforeDestroyed()
|
||||
{
|
||||
Item barrel = new MetalBarrel();
|
||||
|
||||
m_StorageLocker.Barrels.Add(barrel);
|
||||
barrel.MoveToWorld(new Point3D(Location), Map);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)1); //version
|
||||
|
||||
writer.Write(m_StorageLocker);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_StorageLocker = (StorageLocker)reader.ReadItem();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MetalBarrel : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1023703; } } // barrel
|
||||
|
||||
[Constructable]
|
||||
public MetalBarrel()
|
||||
: base(0x0FAE)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 2301;
|
||||
}
|
||||
|
||||
public MetalBarrel(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 WoodKeyDebris : Item
|
||||
{
|
||||
[Constructable]
|
||||
public WoodKeyDebris()
|
||||
: base(0x0C2F)
|
||||
{
|
||||
Movable = false;
|
||||
new InternalTimer(this).Start();
|
||||
}
|
||||
|
||||
public WoodKeyDebris(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Item m_Item;
|
||||
public InternalTimer(Item item) : base(TimeSpan.FromMinutes(30))
|
||||
{
|
||||
m_Item = item;
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Item.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
|
||||
new InternalTimer(this).Start();
|
||||
}
|
||||
}
|
||||
|
||||
public class MetalBarrelWrath
|
||||
{
|
||||
public static void DoRandomWrath(Item source)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
int randomrange = Utility.RandomMinMax(4, 7);
|
||||
int mindmg = 60 + Utility.Random(60) - (randomrange * 10);
|
||||
if (mindmg < 0) { mindmg = 1; }
|
||||
int maxdmg = mindmg += Utility.Random(200);
|
||||
|
||||
DoWrath(source, mindmg, maxdmg, randomrange);
|
||||
}
|
||||
|
||||
public static void DoWrath(Item source, int mindmg, int maxdmg, int range)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
Map map = source.Map;
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
for (int x = -range; x <= range; ++x)
|
||||
{
|
||||
for (int y = -range; y <= range; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist <= range)
|
||||
{
|
||||
new BarrelExplodeWrathTimer(map, source.X + x, source.Y + y, mindmg, maxdmg, source).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelWrath
|
||||
{
|
||||
public static void DoRandomWrath(Item source)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
int randomrange = Utility.RandomMinMax(2, 4);
|
||||
int mindmg = 30 + Utility.Random(30) - (randomrange * 10);
|
||||
if (mindmg < 0) { mindmg = 1; }
|
||||
int maxdmg = mindmg += Utility.Random(100);
|
||||
|
||||
DoWrath(source, mindmg, maxdmg, randomrange);
|
||||
}
|
||||
|
||||
public static void DoWrath(Item source, int mindmg, int maxdmg, int range)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
Map map = source.Map;
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
for (int x = -range; x <= range; ++x)
|
||||
{
|
||||
for (int y = -range; y <= range; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist <= range)
|
||||
{
|
||||
new BarrelExplodeWrathTimer(map, source.X + x, source.Y + y, mindmg, maxdmg, source).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelExplodeWrathTimer : Timer
|
||||
{
|
||||
private Map n_Map;
|
||||
private int n_X, n_Y;
|
||||
private int n_MinDamage;
|
||||
private int n_MaxDamage;
|
||||
private Item n_SourceItem;
|
||||
|
||||
public BarrelExplodeWrathTimer(Map map, int x, int y, int mindamage, int maxdamage, Item sourceitem) : base(TimeSpan.FromSeconds(0))
|
||||
{
|
||||
n_Map = map;
|
||||
n_X = x;
|
||||
n_Y = y;
|
||||
n_MinDamage = mindamage;
|
||||
n_MaxDamage = maxdamage;
|
||||
n_SourceItem = sourceitem;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
int z = n_Map.GetAverageZ(n_X, n_Y);
|
||||
bool canFit = n_Map.CanFit(n_X, n_Y, z, 6, false, false);
|
||||
|
||||
for (int i = -3; !canFit && i <= 3; ++i)
|
||||
{
|
||||
canFit = n_Map.CanFit(n_X, n_Y, z + i, 6, false, false);
|
||||
|
||||
if (canFit)
|
||||
z += i;
|
||||
}
|
||||
|
||||
if (!canFit)
|
||||
return;
|
||||
|
||||
Item g = n_SourceItem;
|
||||
|
||||
// Explosion
|
||||
if (g == null || g.Deleted)
|
||||
return;
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x36BD, 9, 10, 5044);
|
||||
Effects.PlaySound(g, g.Map, 0x307);
|
||||
DoDamage(g, n_MinDamage, n_MaxDamage);
|
||||
}
|
||||
|
||||
public virtual void DoDamage(Item g, int mindmg, int maxdmg)
|
||||
{
|
||||
IPooledEnumerable eable = g.GetMobilesInRange(4);
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m != null)
|
||||
{
|
||||
if (m.Alive && m is PlayerMobile && m.AccessLevel == AccessLevel.Player)
|
||||
{
|
||||
m.DoHarmful(m);
|
||||
m.FixedParticles(0x376A, 1, 3, 5052, EffectLayer.Waist);
|
||||
m.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154447); // *The barrel explodes sending deadly debris hurdling in your direction!*
|
||||
m.Damage(Utility.RandomMinMax(mindmg, maxdmg), m);
|
||||
Effects.PlaySound(g, g.Map, 0x307);
|
||||
}
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
n_SourceItem.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelPoisonWrath
|
||||
{
|
||||
public static void DoRandomWrath(Item source)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
int randomrange = Utility.RandomMinMax(2, 4);
|
||||
int mindmg = 0;
|
||||
int maxdmg = 0;
|
||||
|
||||
DoWrath(source, mindmg, maxdmg, randomrange);
|
||||
}
|
||||
|
||||
public static void DoWrath(Item source, int mindmg, int maxdmg, int range)
|
||||
{
|
||||
if (source.Deleted)
|
||||
return;
|
||||
|
||||
Map map = source.Map;
|
||||
|
||||
if (map != null)
|
||||
{
|
||||
for (int x = -range; x <= range; ++x)
|
||||
{
|
||||
for (int y = -range; y <= range; ++y)
|
||||
{
|
||||
double dist = Math.Sqrt(x * x + y * y);
|
||||
|
||||
if (dist <= range)
|
||||
new BarrelPoisonWrathTimer(map, source.X + x, source.Y + y, mindmg, maxdmg, source).Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelPoisonWrathTimer : Timer
|
||||
{
|
||||
private Map n_Map;
|
||||
private int n_X, n_Y;
|
||||
private int n_MinDamage;
|
||||
private int n_MaxDamage;
|
||||
private Item n_SourceItem;
|
||||
|
||||
public BarrelPoisonWrathTimer(Map map, int x, int y, int mindamage, int maxdamage, Item sourceitem) : base(TimeSpan.FromSeconds(0))
|
||||
{
|
||||
n_Map = map;
|
||||
n_X = x;
|
||||
n_Y = y;
|
||||
n_MinDamage = mindamage;
|
||||
n_MaxDamage = maxdamage;
|
||||
n_SourceItem = sourceitem;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
int z = n_Map.GetAverageZ(n_X, n_Y);
|
||||
bool canFit = n_Map.CanFit(n_X, n_Y, z, 6, false, false);
|
||||
|
||||
for (int i = -3; !canFit && i <= 3; ++i)
|
||||
{
|
||||
canFit = n_Map.CanFit(n_X, n_Y, z + i, 6, false, false);
|
||||
|
||||
if (canFit)
|
||||
z += i;
|
||||
}
|
||||
|
||||
if (!canFit)
|
||||
return;
|
||||
|
||||
Item g = n_SourceItem;
|
||||
|
||||
//Poisonous Vapor
|
||||
if (g == null || g.Deleted)
|
||||
return;
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(g.Location, g.Map, EffectItem.DefaultDuration), 0x376A, 9, 10, 5040);
|
||||
Effects.PlaySound(g, g.Map, 0x474);
|
||||
DoDamage(g, n_MinDamage, n_MaxDamage);
|
||||
}
|
||||
|
||||
public virtual void DoDamage(Item g, int mindmg, int maxdmg)
|
||||
{
|
||||
if (g == null || g.Deleted)
|
||||
return;
|
||||
|
||||
IPooledEnumerable eable = g.GetMobilesInRange(4);
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m != null)
|
||||
{
|
||||
if (m.Alive && m is PlayerMobile && m.AccessLevel == AccessLevel.Player)
|
||||
{
|
||||
m.DoHarmful(m);
|
||||
m.Damage(Utility.RandomMinMax(mindmg, maxdmg), m);
|
||||
m.PublicOverheadMessage(MessageType.Regular, 0x3B2, 1154446); // *Poisonous gas escapes from the ruptured barrel enveloping you in a noxious cloud!*
|
||||
m.ApplyPoison(m, Poison.Deadly);
|
||||
m.PlaySound(0x474);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
g.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user