Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CousteauPerronAddon : BaseAddon
|
||||
{
|
||||
private static int[,] m_AddOnSimpleComponents = new int[,]
|
||||
{
|
||||
{2602, 1, 2, 0}, {7828, 1, 3, 3}, {4602, 0, 1, 0},
|
||||
{4601, -1, 1, 0}, {1560, 0, 0, 26}, {1560, 1, 0, 26},
|
||||
{1560, 2, 0, 26}, {1537, 0, 1, 14}, {1537, -1, 1, 14},
|
||||
{1537, 1, 1, 14}, {1544, 1, 0, 22}, {1544, -1, 0, 22},
|
||||
{1544, 0, 0, 22}, {740, 0, -2, 0}, {740, -1, -2, 0},
|
||||
{741, -2, -1, 0}, {741, -2, 0, 0}, {738, -2, 1, 0},
|
||||
{734, 1, 1, 0}, {736, 1, 0, 0}, {736, 1, -1, 0},
|
||||
{739, 1, -2, 0}
|
||||
};
|
||||
|
||||
[Constructable]
|
||||
public CousteauPerronAddon()
|
||||
{
|
||||
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
|
||||
AddComponent(new AddonComponent(m_AddOnSimpleComponents[i, 0]), m_AddOnSimpleComponents[i, 1], m_AddOnSimpleComponents[i, 2], m_AddOnSimpleComponents[i, 3]);
|
||||
|
||||
AddComponent(new AddonComponent(6571), 1, 3, 3);
|
||||
AddComponent(new AddonComponent(4012), 1, 3, 0);
|
||||
}
|
||||
|
||||
public CousteauPerronAddon(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Engines.Quests
|
||||
{
|
||||
public enum ExploringTheDeepQuestChain
|
||||
{
|
||||
None,
|
||||
HeplerPaulson,
|
||||
HeplerPaulsonComplete,
|
||||
CusteauPerronHouse,
|
||||
CusteauPerron,
|
||||
Sorcerers,
|
||||
CollectTheComponent,
|
||||
CollectTheComponentComplete
|
||||
}
|
||||
|
||||
public class ExploringTheDeepBaseChain
|
||||
{
|
||||
private Type m_CurrentQuest;
|
||||
|
||||
public ExploringTheDeepBaseChain(Type currentQuest, Type quester)
|
||||
{
|
||||
this.m_CurrentQuest = currentQuest;
|
||||
}
|
||||
|
||||
public Type CurrentQuest
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_CurrentQuest;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_CurrentQuest = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
386
Scripts/Services/ExploringTheDeep/Generate.cs
Normal file
386
Scripts/Services/ExploringTheDeep/Generate.cs
Normal file
@@ -0,0 +1,386 @@
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Commands;
|
||||
|
||||
namespace Server.Engines.ExploringTheDeep
|
||||
{
|
||||
public static class GenerateExploringTheDeep
|
||||
{
|
||||
public static readonly string EntityName = "exploringthedeep";
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("GenExploringTheDeep", AccessLevel.Administrator, Generate);
|
||||
CommandSystem.Register("DelExploringTheDeep", AccessLevel.Administrator, Delete);
|
||||
}
|
||||
|
||||
public static void Generate(CommandEventArgs e)
|
||||
{
|
||||
Mobile m = e.Mobile;
|
||||
|
||||
Delete(e);
|
||||
Generate(m);
|
||||
|
||||
m.SendMessage("Exploring the Deep Quest Line Generated!");
|
||||
}
|
||||
|
||||
public static void Delete(CommandEventArgs e)
|
||||
{
|
||||
WeakEntityCollection.Delete(EntityName);
|
||||
WeakEntityCollection.Delete(WinchAssembly.EntityName);
|
||||
WeakEntityCollection.Delete(SorcerersPlateController.EntityName);
|
||||
|
||||
SpawnerPersistence.RemoveSpawnsFromXmlFile("Spawns", "GravewaterLake");
|
||||
}
|
||||
|
||||
public static void Generate(Mobile m)
|
||||
{
|
||||
#region Gravewater Lake Finish
|
||||
|
||||
CommandSystem.Handle(m, Server.Commands.CommandSystem.Prefix + "XmlLoad Spawns/GravewaterLake.xml");
|
||||
|
||||
CommandSystem.Handle(m, Server.Commands.CommandSystem.Prefix + "GenWinchAssembly");
|
||||
|
||||
// StorageLocker
|
||||
|
||||
StorageLocker storagelocker = new StorageLocker(Parts.Flywheel);
|
||||
WeakEntityCollection.Add(EntityName, storagelocker);
|
||||
storagelocker.MoveToWorld(new Point3D(6421, 1753, 0), Map.Trammel);
|
||||
storagelocker.Active = true;
|
||||
|
||||
storagelocker = new StorageLocker(Parts.BearingAssembly);
|
||||
WeakEntityCollection.Add(EntityName, storagelocker);
|
||||
storagelocker.MoveToWorld(new Point3D(6441, 1753, 0), Map.Trammel);
|
||||
storagelocker.Active = true;
|
||||
|
||||
storagelocker = new StorageLocker(Parts.PowerCore);
|
||||
WeakEntityCollection.Add(EntityName, storagelocker);
|
||||
storagelocker.MoveToWorld(new Point3D(6441, 1733, 0), Map.Trammel);
|
||||
storagelocker.Active = true;
|
||||
|
||||
storagelocker = new StorageLocker(Parts.WireSpool);
|
||||
WeakEntityCollection.Add(EntityName, storagelocker);
|
||||
storagelocker.MoveToWorld(new Point3D(6421, 1733, 0), Map.Trammel);
|
||||
storagelocker.Active = true;
|
||||
|
||||
Item door = new LightWoodDoor(DoorFacing.SouthCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6427, 1735, 0), Map.Trammel);
|
||||
|
||||
door = new LightWoodDoor(DoorFacing.SouthCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6427, 1752, 0), Map.Trammel);
|
||||
|
||||
door = new LightWoodDoor(DoorFacing.SouthCCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6435, 1735, 0), Map.Trammel);
|
||||
|
||||
door = new LightWoodDoor(DoorFacing.SouthCCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6435, 1752, 0), Map.Trammel);
|
||||
|
||||
door = new LightWoodDoor(DoorFacing.WestCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6431, 1727, 0), Map.Trammel);
|
||||
|
||||
door = new LightWoodDoor(DoorFacing.EastCCW);
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.Hue = 2952;
|
||||
door.MoveToWorld(new Point3D(6432, 1727, 0), Map.Trammel);
|
||||
|
||||
Static decor = new Static(0x1EAF);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
decor.MoveToWorld(new Point3D(6310, 1704, 11), Map.Trammel);
|
||||
|
||||
decor = new Static(0x1ED5);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
decor.MoveToWorld(new Point3D(6310, 1705, -5), Map.Trammel);
|
||||
|
||||
decor = new Static(0x10A4);
|
||||
decor.MoveToWorld(new Point3D(6310, 1703, 8), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0x2E3D);
|
||||
decor.MoveToWorld(new Point3D(6311, 1703, 19), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0x3A8);
|
||||
decor.MoveToWorld(new Point3D(6309, 1704, 20), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0x3A8);
|
||||
decor.MoveToWorld(new Point3D(6310, 1704, 20), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0x3A6);
|
||||
decor.MoveToWorld(new Point3D(6309, 1703, 24), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0x3A6);
|
||||
decor.MoveToWorld(new Point3D(6310, 1703, 24), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
Item ladder = new ShipLadder(new Point3D(6302, 1672, 0), Map.Trammel, 0x08A6);
|
||||
ladder.MoveToWorld(new Point3D(6431, 1699, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, ladder);
|
||||
|
||||
ladder = new ShipLadder(new Point3D(6432, 1699, 0), Map.Trammel, 0x08A6);
|
||||
ladder.MoveToWorld(new Point3D(6304, 1672, -5), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, ladder);
|
||||
|
||||
ladder = new ShipLadder(new Point3D(6292, 1720, 0), Map.Trammel, 0x08A1);
|
||||
ladder.MoveToWorld(new Point3D(6400, 1656, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, ladder);
|
||||
|
||||
ladder = new ShipLadder(new Point3D(1699, 1646, -115), Map.Malas, 0x14FA);
|
||||
ladder.MoveToWorld(new Point3D(6278, 1773, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, ladder);
|
||||
|
||||
Item sign = new ShipSign(0xBD2, 1154461); // Use Ladder to Return to Foredeck
|
||||
sign.MoveToWorld(new Point3D(6400, 1658, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, sign);
|
||||
|
||||
sign = new ShipSign(0xBCF, 1154492); // Use the rope to return to the surface
|
||||
sign.MoveToWorld(new Point3D(6278, 1773, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, sign);
|
||||
|
||||
sign = new ShipSign(0xBD1, 1154463); // Warning! Only those with proper gear may enter the lake for salvage operations! Enter at your own risk! No Pets!
|
||||
sign.MoveToWorld(new Point3D(1698, 1566, -110), Map.Malas);
|
||||
WeakEntityCollection.Add(EntityName, sign);
|
||||
|
||||
// CaptainsLogScroll
|
||||
Item scroll = new CaptainsLogScroll();
|
||||
scroll.MoveToWorld(new Point3D(6430, 1743, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
Item tele = new Teleporter(new Point3D(6445, 1743, 0), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6321, 1710, -35), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6445, 1743, 0), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6321, 1711, -35), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6322, 1710, -35), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6447, 1741, 1), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6322, 1710, -35), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6447, 1742, 1), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6322, 1710, -35), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6447, 1743, 1), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6322, 1710, -35), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6447, 1744, 1), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Teleporter(new Point3D(6322, 1710, -35), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(6447, 1745, 1), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
tele = new Whirlpool(new Point3D(6274, 1787, 0), Map.Trammel);
|
||||
tele.MoveToWorld(new Point3D(1700, 1638, -115), Map.Malas);
|
||||
WeakEntityCollection.Add(EntityName, tele);
|
||||
|
||||
Item item = new AnkhWest();
|
||||
item.MoveToWorld(new Point3D(1694, 1562, -109), Map.Malas);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new DungeonHitchingPost();
|
||||
item.MoveToWorld(new Point3D(1702, 1552, -109), Map.Malas);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Quester Spawns
|
||||
|
||||
XmlSpawner sp;
|
||||
|
||||
sp = new XmlSpawner("GipsyGemologist");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(1509, 618, -16), Map.Ilshenar);
|
||||
sp.Respawn();
|
||||
|
||||
sp = new XmlSpawner("ChampHuthwait");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(2995, 635, 0), Map.Trammel);
|
||||
sp.Respawn();
|
||||
|
||||
sp = new XmlSpawner("JosefSkimmons");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(2630, 2092, 10), Map.Trammel);
|
||||
sp.Respawn();
|
||||
|
||||
sp = new XmlSpawner("MadelineHarte");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(1364, 3780, 0), Map.Trammel);
|
||||
sp.Respawn();
|
||||
|
||||
sp = new XmlSpawner("CousteauPerron");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(5212, 2314, 28), Map.Trammel);
|
||||
sp.Respawn();
|
||||
|
||||
sp = new XmlSpawner("HeplerPaulson");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.SpawnRange = 1;
|
||||
sp.HomeRange = 5;
|
||||
sp.MoveToWorld(new Point3D(2039, 2842, 0), Map.Trammel);
|
||||
sp.Respawn();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Custeau Perron House
|
||||
door = new CusteauPerronHouseDoor();
|
||||
WeakEntityCollection.Add(EntityName, door);
|
||||
door.MoveToWorld(new Point3D(1651, 1551, 25), Map.Trammel);
|
||||
|
||||
scroll = new MasterThinkerSchematics();
|
||||
scroll.MoveToWorld(new Point3D(1649, 1547, 54), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
decor = new Static(0xB7F);
|
||||
decor.MoveToWorld(new Point3D(1651, 1549, 45), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0xB80);
|
||||
decor.MoveToWorld(new Point3D(1652, 1549, 45), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
decor = new Static(0xB7E);
|
||||
decor.MoveToWorld(new Point3D(1653, 1549, 45), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, decor);
|
||||
|
||||
item = new MasterThinkerContoller();
|
||||
item.MoveToWorld(new Point3D(1652, 1547, 45), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
#endregion
|
||||
|
||||
#region Ice Dungeon
|
||||
Item addon = new CousteauPerronAddon();
|
||||
addon.MoveToWorld(new Point3D(5211, 2312, 28), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, addon);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5799, 234, -5), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5799, 235, -4), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5800, 236, -8), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5802, 234, -4), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5801, 239, -7), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5801, 240, -4), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5803, 243, -2), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5806, 244, -6), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5807, 240, -2), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
|
||||
item = new IceCrystals();
|
||||
item.MoveToWorld(new Point3D(5808, 237, -3), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, item);
|
||||
#endregion
|
||||
|
||||
#region Sorcerers Dungeon
|
||||
|
||||
sp = new XmlSpawner(2, 5, 5, 0, 5, 1, "RockMite");
|
||||
WeakEntityCollection.Add(EntityName, sp);
|
||||
sp.MoveToWorld(new Point3D(122, 10, -28), Map.Ilshenar);
|
||||
sp.Respawn();
|
||||
|
||||
CommandSystem.Handle(m, Server.Commands.CommandSystem.Prefix + "GenSorcerersPlate");
|
||||
|
||||
#endregion
|
||||
|
||||
#region Scroll
|
||||
scroll = new WillemHarteScroll();
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
scroll.MoveToWorld(new Point3D(1359, 3779, 7), Map.Trammel);
|
||||
|
||||
scroll = new MadelineHarteScroll();
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
scroll.MoveToWorld(new Point3D(1359, 3780, 7), Map.Trammel);
|
||||
|
||||
scroll = new LiamDeFoeScroll();
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
scroll.MoveToWorld(new Point3D(1364, 3778, 1), Map.Trammel);
|
||||
|
||||
scroll = new CalculationsScroll();
|
||||
scroll.MoveToWorld(new Point3D(2997, 632, 9), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new SuspicionsScroll();
|
||||
scroll.MoveToWorld(new Point3D(2993, 632, 14), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new SealedLettersScroll();
|
||||
scroll.MoveToWorld(new Point3D(2992, 636, 5), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new LedgerScroll();
|
||||
scroll.MoveToWorld(new Point3D(2580, 1118, 5), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new JournalScroll();
|
||||
scroll.MoveToWorld(new Point3D(2578, 1120, 0), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new JosefSkimmonsScroll();
|
||||
scroll.MoveToWorld(new Point3D(2632, 2085, 21), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new CousteauPerronScroll();
|
||||
scroll.MoveToWorld(new Point3D(2632, 2081, 12), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new EliseTrentScroll();
|
||||
scroll.MoveToWorld(new Point3D(2636, 2082, 16), Map.Trammel);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
|
||||
scroll = new SorcerersScroll();
|
||||
scroll.MoveToWorld(new Point3D(101, 42, -22), Map.Ilshenar);
|
||||
WeakEntityCollection.Add(EntityName, scroll);
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
183
Scripts/Services/ExploringTheDeep/Mobiles/DiabolicalSeaweed.cs
Normal file
183
Scripts/Services/ExploringTheDeep/Mobiles/DiabolicalSeaweed.cs
Normal file
@@ -0,0 +1,183 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a seaweed corpse")]
|
||||
public class DiabolicalSeaweed : BaseCreature
|
||||
{
|
||||
private PullTimer m_Timer;
|
||||
[Constructable]
|
||||
|
||||
public DiabolicalSeaweed()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.0, 0.0)
|
||||
{
|
||||
Name = "Diabolical Seaweed";
|
||||
Body = 129;
|
||||
Hue = 1914;
|
||||
|
||||
SetStr(452, 485);
|
||||
SetDex(401, 420);
|
||||
SetInt(126, 140);
|
||||
|
||||
SetHits(501, 532);
|
||||
|
||||
SetDamage(10, 23);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 60);
|
||||
SetDamageType(ResistanceType.Poison, 40);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 35, 40);
|
||||
SetResistance(ResistanceType.Fire, 20, 30);
|
||||
SetResistance(ResistanceType.Cold, 10, 20);
|
||||
SetResistance(ResistanceType.Poison, 100);
|
||||
SetResistance(ResistanceType.Energy, 10, 20);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 50.1, 54.7);
|
||||
SetSkill(SkillName.Tactics, 100.3, 114.8);
|
||||
SetSkill(SkillName.Wrestling, 45.1, 59.5);
|
||||
|
||||
Fame = 3000;
|
||||
Karma = -3000;
|
||||
CantWalk = true;
|
||||
|
||||
VirtualArmor = 60;
|
||||
|
||||
m_Timer = new PullTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
switch (Utility.Random(8))
|
||||
{
|
||||
case 0: PackItem(new BlueDiamond()); break;
|
||||
case 1: PackItem(new FireRuby()); break;
|
||||
case 2: PackItem(new BrilliantAmber()); break;
|
||||
case 3: PackItem(new PerfectEmerald()); break;
|
||||
case 4: PackItem(new DarkSapphire()); break;
|
||||
case 5: PackItem(new Turquoise()); break;
|
||||
case 6: PackItem(new EcruCitrine()); break;
|
||||
case 7: PackItem(new WhitePearl()); break;
|
||||
}
|
||||
PackItem(new ParasiticPlant());
|
||||
PackItem(new LuminescentFungi());
|
||||
}
|
||||
|
||||
public DiabolicalSeaweed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
private class PullTimer : Timer
|
||||
{
|
||||
private static readonly ArrayList m_ToDrain = new ArrayList();
|
||||
private readonly DiabolicalSeaweed m_Owner;
|
||||
|
||||
public PullTimer(DiabolicalSeaweed owner)
|
||||
: base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1))
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Owner.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
IPooledEnumerable eable = m_Owner.GetMobilesInRange(9);
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == null || m is DiabolicalSeaweed || !m_Owner.CanBeHarmful(m) || m.AccessLevel == AccessLevel.Player)
|
||||
continue;
|
||||
|
||||
int offsetX = Math.Abs(m.Location.X - m_Owner.Location.X);
|
||||
int offsetY = Math.Abs(m.Location.Y - m_Owner.Location.Y);
|
||||
|
||||
if (offsetX < 2 && offsetY < 2)
|
||||
continue;
|
||||
|
||||
if (m is BaseCreature)
|
||||
{
|
||||
BaseCreature bc = m as BaseCreature;
|
||||
|
||||
if (bc.Controlled || bc.Summoned)
|
||||
m_ToDrain.Add(m);
|
||||
}
|
||||
else if (m.Player)
|
||||
{
|
||||
m_ToDrain.Add(m);
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
foreach (Mobile m in m_ToDrain)
|
||||
{
|
||||
m_Owner.DoHarmful(m);
|
||||
|
||||
//m.FixedParticles( 0x376A, 10, 15, 5052, EffectLayer.Waist );
|
||||
//m.PlaySound(0x1F1);
|
||||
int drain = Utility.RandomMinMax(1, 10);
|
||||
int ownerlocX = m_Owner.Location.X + Utility.RandomMinMax(-1, 1);
|
||||
int ownerlocY = m_Owner.Location.Y + Utility.RandomMinMax(-1, 1);
|
||||
int ownerlocZ = m_Owner.Location.Z;
|
||||
m.MoveToWorld(new Point3D(ownerlocX, ownerlocY, ownerlocZ), m_Owner.Map);
|
||||
m.Damage(drain, m_Owner);
|
||||
}
|
||||
|
||||
m_ToDrain.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
base.OnDeath(c);
|
||||
for (int i = Utility.Random(5, 6); i > 1; i--)
|
||||
{
|
||||
Item ReagentLoot = Loot.RandomReagent();
|
||||
ReagentLoot.Amount = Utility.Random(4, 5);
|
||||
c.DropItem(ReagentLoot);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public override bool CanRummageCorpses { get { return true; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Meager);
|
||||
}
|
||||
|
||||
public override void 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_Timer = new PullTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
211
Scripts/Services/ExploringTheDeep/Mobiles/Djinn.cs
Normal file
211
Scripts/Services/ExploringTheDeep/Mobiles/Djinn.cs
Normal file
@@ -0,0 +1,211 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a djinn corpse")]
|
||||
public class Djinn : BaseCreature
|
||||
{
|
||||
public static List<Djinn> Instances { get; set; }
|
||||
private SummonEfreetTimer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public Djinn()
|
||||
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x311;
|
||||
Hue = 33072;
|
||||
Name = "Djinn";
|
||||
|
||||
SetStr(320, 500);
|
||||
SetDex(200, 300);
|
||||
SetInt(600, 700);
|
||||
|
||||
SetHits(2003);
|
||||
|
||||
SetDamage(11, 13);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 0);
|
||||
SetDamageType(ResistanceType.Fire, 50);
|
||||
SetDamageType(ResistanceType.Energy, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 50, 60);
|
||||
SetResistance(ResistanceType.Fire, 60, 70);
|
||||
SetResistance(ResistanceType.Cold, 30, 40);
|
||||
SetResistance(ResistanceType.Poison, 30, 40);
|
||||
SetResistance(ResistanceType.Energy, 80, 90);
|
||||
|
||||
SetSkill(SkillName.Wrestling, 60.0, 80.0);
|
||||
SetSkill(SkillName.Tactics, 60.0, 80.0);
|
||||
SetSkill(SkillName.MagicResist, 60.0, 80.0);
|
||||
SetSkill(SkillName.Magery, 100.0, 120.0);
|
||||
SetSkill(SkillName.EvalInt, 60.0, 110.0);
|
||||
SetSkill(SkillName.DetectHidden, 55.0);
|
||||
|
||||
Fame = 15000;
|
||||
Karma = -15000;
|
||||
|
||||
if (Instances == null)
|
||||
Instances = new List<Djinn>();
|
||||
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
|
||||
m_Timer = new SummonEfreetTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
}
|
||||
|
||||
public override int TreasureMapLevel { get { return 4; } }
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct())
|
||||
{
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
Item item = new AquaGem();
|
||||
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
|
||||
{
|
||||
m.BankBox.DropItem(item);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instances != null && Instances.Contains(this))
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public static Djinn Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (Instances != null && Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
Djinn creature = new Djinn();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private Djinn Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(60))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((Djinn)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Djinn(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
Instances.Remove(this);
|
||||
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
private class SummonEfreetTimer : Timer
|
||||
{
|
||||
//private static readonly ArrayList m_ToDrain = new ArrayList();
|
||||
private readonly Djinn m_Owner;
|
||||
|
||||
public SummonEfreetTimer(Djinn owner)
|
||||
: base(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1))
|
||||
{
|
||||
m_Owner = owner;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
//Type type = m_Owner.GetType();
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (m_Owner.Deleted)
|
||||
{
|
||||
Stop();
|
||||
return;
|
||||
}
|
||||
|
||||
IPooledEnumerable eable = m_Owner.GetMobilesInRange(10);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == null || !(m is PlayerMobile))
|
||||
continue;
|
||||
|
||||
if (m_Owner.CanBeHarmful(m) && m_Owner.Mana >= 100)
|
||||
{
|
||||
m_Owner.Mana -= 50;
|
||||
int ownerlocX = m_Owner.Location.X + Utility.RandomMinMax(-5, 5);
|
||||
int ownerlocY = m_Owner.Location.Y + Utility.RandomMinMax(-5, 5);
|
||||
int ownerlocZ = m_Owner.Location.Z;
|
||||
Efreet NewMobile = new Efreet();
|
||||
NewMobile.MoveToWorld(new Point3D(ownerlocX, ownerlocY, ownerlocZ), m_Owner.Map);
|
||||
NewMobile.Combatant = m;
|
||||
}
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instances = new List<Djinn>();
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
136
Scripts/Services/ExploringTheDeep/Mobiles/IceWyrm.cs
Normal file
136
Scripts/Services/ExploringTheDeep/Mobiles/IceWyrm.cs
Normal file
@@ -0,0 +1,136 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("an ice wyrm corpse")]
|
||||
public class IceWyrm : WhiteWyrm
|
||||
{
|
||||
public static List<IceWyrm> Instances { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public IceWyrm()
|
||||
: base()
|
||||
{
|
||||
Name = "Ice Wyrm";
|
||||
Hue = 2729;
|
||||
Body = 180;
|
||||
|
||||
SetResistance(ResistanceType.Cold, 100);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
|
||||
Tamable = false;
|
||||
|
||||
if (Instances == null)
|
||||
Instances = new List<IceWyrm>();
|
||||
|
||||
Instances.Add(this);
|
||||
}
|
||||
|
||||
public static IceWyrm Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (Instances != null && Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
IceWyrm creature = new IceWyrm();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private IceWyrm Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(60))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((IceWyrm)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct())
|
||||
{
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CusteauPerron)
|
||||
{
|
||||
Item item = new IceWyrmScale();
|
||||
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
|
||||
{
|
||||
m.BankBox.DropItem(item);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instances != null && Instances.Contains(this))
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public override bool ReacquireOnMovement { get { return true; } }
|
||||
public override int TreasureMapLevel { get { return 4; } }
|
||||
public override int Meat { get { return 20; } }
|
||||
public override int Hides { get { return 25; } }
|
||||
public override HideType HideType { get { return HideType.Barbed; } }
|
||||
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
public override bool CanRummageCorpses { get { return true; } }
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public IceWyrm(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instances = new List<IceWyrm>();
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
242
Scripts/Services/ExploringTheDeep/Mobiles/MercutioTheUnsavory.cs
Normal file
242
Scripts/Services/ExploringTheDeep/Mobiles/MercutioTheUnsavory.cs
Normal file
@@ -0,0 +1,242 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Quests;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a mercutio corpse")]
|
||||
public class MercutioTheUnsavory : BaseCreature
|
||||
{
|
||||
public static List<MercutioTheUnsavory> Instances { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public MercutioTheUnsavory()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Body = 0x190;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Name = "Mercutio";
|
||||
Title = "The Unsavory";
|
||||
Female = false;
|
||||
|
||||
SetStr(1000, 1300);
|
||||
SetDex(101, 125);
|
||||
SetInt(61, 75);
|
||||
|
||||
SetDamage(11, 24);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 10, 15);
|
||||
SetResistance(ResistanceType.Fire, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 10, 15);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
SetSkill(SkillName.Fencing, 106.0, 117.5);
|
||||
SetSkill(SkillName.Macing, 105.0, 117.5);
|
||||
SetSkill(SkillName.MagicResist, 50.0, 90.5);
|
||||
SetSkill(SkillName.Swords, 105.0, 117.5);
|
||||
SetSkill(SkillName.Parry, 105.0, 117.5);
|
||||
SetSkill(SkillName.Tactics, 105.0, 117.5);
|
||||
SetSkill(SkillName.Wrestling, 55.0, 87.5);
|
||||
|
||||
Fame = 3000;
|
||||
Karma = -3000;
|
||||
|
||||
if (Instances == null)
|
||||
Instances = new List<MercutioTheUnsavory>();
|
||||
|
||||
Instances.Add(this);
|
||||
|
||||
AddImmovableItem(new Cutlass());
|
||||
AddImmovableItem(new ChainChest());
|
||||
AddImmovableItem(Loot.RandomShield());
|
||||
AddImmovableItem(new ShortPants(Utility.RandomNeutralHue()));
|
||||
AddImmovableItem(new Boots(Utility.RandomNeutralHue()));
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
|
||||
private void AddImmovableItem(Item item)
|
||||
{
|
||||
item.LootType = LootType.Blessed;
|
||||
AddItem(item);
|
||||
}
|
||||
|
||||
public override bool ClickTitle { get { return false; } }
|
||||
public override bool AlwaysMurderer { get { return true; } }
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct())
|
||||
{
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
Item item = new MercutiosCutlass();
|
||||
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
|
||||
{
|
||||
m.BankBox.DropItem(item);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instances != null && Instances.Contains(this))
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public static MercutioTheUnsavory Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (Instances != null && Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
MercutioTheUnsavory creature = new MercutioTheUnsavory();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public MercutioTheUnsavory(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private MercutioTheUnsavory Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(60))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((MercutioTheUnsavory)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void OnGotMeleeAttack(Mobile attacker)
|
||||
{
|
||||
base.OnGotMeleeAttack(attacker);
|
||||
|
||||
if (0.1 >= Utility.RandomDouble())
|
||||
SpawnBrigand(attacker);
|
||||
}
|
||||
|
||||
public override void OnGaveMeleeAttack(Mobile defender)
|
||||
{
|
||||
base.OnGaveMeleeAttack(defender);
|
||||
|
||||
if (0.1 >= Utility.RandomDouble())
|
||||
SpawnBrigand(defender);
|
||||
}
|
||||
|
||||
#region Helpers
|
||||
public void SpawnBrigand(Mobile target)
|
||||
{
|
||||
Map map = Map;
|
||||
|
||||
if (map == null)
|
||||
return;
|
||||
|
||||
int brigands = 0;
|
||||
|
||||
IPooledEnumerable eable = GetMobilesInRange(10);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m is Brigand)
|
||||
++brigands;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
if (brigands < 16)
|
||||
{
|
||||
PlaySound(0x3D);
|
||||
|
||||
int newBrigands = Utility.RandomMinMax(3, 6);
|
||||
|
||||
for (int i = 0; i < newBrigands; ++i)
|
||||
{
|
||||
BaseCreature brigand = new Brigand();
|
||||
|
||||
brigand.Team = Team;
|
||||
|
||||
bool validLocation = false;
|
||||
Point3D loc = Location;
|
||||
|
||||
for (int j = 0; !validLocation && j < 10; ++j)
|
||||
{
|
||||
int x = X + Utility.Random(3) - 1;
|
||||
int y = Y + Utility.Random(3) - 1;
|
||||
int z = map.GetAverageZ(x, y);
|
||||
|
||||
if (validLocation = map.CanFit(x, y, Z, 16, false, false))
|
||||
loc = new Point3D(x, y, Z);
|
||||
else if (validLocation = map.CanFit(x, y, z, 16, false, false))
|
||||
loc = new Point3D(x, y, z);
|
||||
}
|
||||
|
||||
brigand.MoveToWorld(loc, map);
|
||||
brigand.Combatant = target;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instances = new List<MercutioTheUnsavory>();
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
174
Scripts/Services/ExploringTheDeep/Mobiles/ObsidianWyvern.cs
Normal file
174
Scripts/Services/ExploringTheDeep/Mobiles/ObsidianWyvern.cs
Normal file
@@ -0,0 +1,174 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections.Generic;
|
||||
using Server.Engines.Quests;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("an obsidian wyvern corpse")]
|
||||
public class ObsidianWyvern : BaseCreature
|
||||
{
|
||||
public static List<ObsidianWyvern> Instances { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public ObsidianWyvern()
|
||||
: base(AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = "Obsidian Wyvern";
|
||||
Body = 0x2E;
|
||||
Hue = 1910;
|
||||
BaseSoundID = 362;
|
||||
|
||||
SetStr(1377, 1450);
|
||||
SetDex(125, 180);
|
||||
SetInt(780, 900);
|
||||
|
||||
SetHits(1225, 1400);
|
||||
|
||||
SetDamage(29, 35);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 75);
|
||||
SetDamageType(ResistanceType.Fire, 25);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 67);
|
||||
SetResistance(ResistanceType.Fire, 80, 90);
|
||||
SetResistance(ResistanceType.Cold, 70, 80);
|
||||
SetResistance(ResistanceType.Poison, 60, 70);
|
||||
SetResistance(ResistanceType.Energy, 60, 70);
|
||||
|
||||
SetSkill(SkillName.Magery, 108.7, 115.0);
|
||||
SetSkill(SkillName.Meditation, 60.0, 87.6);
|
||||
SetSkill(SkillName.EvalInt, 110.0, 115.0);
|
||||
SetSkill(SkillName.Wrestling, 110.0, 115.0);
|
||||
SetSkill(SkillName.Tactics, 119.6, 125.0);
|
||||
SetSkill(SkillName.MagicResist, 115.0, 130.8);
|
||||
SetSkill(SkillName.Parry, 75.0, 85.0);
|
||||
SetSkill(SkillName.DetectHidden, 100.0);
|
||||
|
||||
Fame = 24000;
|
||||
Karma = -24000;
|
||||
|
||||
VirtualArmor = 70;
|
||||
|
||||
if (Instances == null)
|
||||
Instances = new List<ObsidianWyvern>();
|
||||
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
|
||||
SetSpecialAbility(SpecialAbility.DragonBreath);
|
||||
}
|
||||
|
||||
public static ObsidianWyvern Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (Instances != null && Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
ObsidianWyvern creature = new ObsidianWyvern();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private ObsidianWyvern Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(60))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((ObsidianWyvern)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct())
|
||||
{
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
Item item = new WillemHartesHat();
|
||||
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
|
||||
{
|
||||
m.BankBox.DropItem(item);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instances != null && Instances.Contains(this))
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public override bool ReacquireOnMovement { get { return true; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Deadly; } }
|
||||
public override Poison HitPoison { get { return Poison.Deadly; } }
|
||||
public override bool AutoDispel { get { return true; } }
|
||||
public override bool BardImmune { get { return true; } }
|
||||
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 3);
|
||||
AddLoot(LootPack.Gems, 5);
|
||||
}
|
||||
|
||||
public override int GetIdleSound() { return 0x2D3; }
|
||||
public override int GetHurtSound() { return 0x2D1; }
|
||||
|
||||
public ObsidianWyvern(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();
|
||||
|
||||
Instances = new List<ObsidianWyvern>();
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
147
Scripts/Services/ExploringTheDeep/Mobiles/OrcEngineer.cs
Normal file
147
Scripts/Services/ExploringTheDeep/Mobiles/OrcEngineer.cs
Normal file
@@ -0,0 +1,147 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("an orcish corpse")]
|
||||
public class OrcEngineer : Orc
|
||||
{
|
||||
public static List<OrcEngineer> Instances { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public OrcEngineer()
|
||||
: base()
|
||||
{
|
||||
Title = "the Orcish Engineer";
|
||||
|
||||
SetStr(500, 510);
|
||||
SetDex(200, 210);
|
||||
SetInt(200, 210);
|
||||
|
||||
SetHits(3500, 3700);
|
||||
|
||||
SetDamage(8, 14);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 65, 70);
|
||||
SetResistance(ResistanceType.Fire, 65, 70);
|
||||
SetResistance(ResistanceType.Cold, 65, 70);
|
||||
SetResistance(ResistanceType.Poison, 60);
|
||||
SetResistance(ResistanceType.Energy, 65, 70);
|
||||
|
||||
SetSkill(SkillName.Parry, 100.0, 110.0);
|
||||
SetSkill(SkillName.MagicResist, 70.0, 80.0);
|
||||
SetSkill(SkillName.Tactics, 110.0, 120.0);
|
||||
SetSkill(SkillName.Wrestling, 120.0, 130.0);
|
||||
SetSkill(SkillName.DetectHidden, 100.0, 110.0);
|
||||
|
||||
Fame = 1500;
|
||||
Karma = -1500;
|
||||
|
||||
if (Instances == null)
|
||||
Instances = new List<OrcEngineer>();
|
||||
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
|
||||
public static OrcEngineer Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (Instances != null && Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
OrcEngineer creature = new OrcEngineer();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private OrcEngineer Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(10))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((OrcEngineer)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (Mobile m in rights.Select(x => x.m_Mobile).Distinct())
|
||||
{
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
Item item = new OrcishSchematics();
|
||||
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, item, false))
|
||||
{
|
||||
m.BankBox.DropItem(item);
|
||||
}
|
||||
|
||||
m.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (Instances != null && Instances.Contains(this))
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public OrcEngineer(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();
|
||||
|
||||
Instances = new List<OrcEngineer>();
|
||||
Instances.Add(this);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
208
Scripts/Services/ExploringTheDeep/Mobiles/Paralithode.cs
Normal file
208
Scripts/Services/ExploringTheDeep/Mobiles/Paralithode.cs
Normal file
@@ -0,0 +1,208 @@
|
||||
using Server.Items;
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a paralithode corpse")]
|
||||
public class Paralithode : BaseCreature
|
||||
{
|
||||
private HideTimer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public Paralithode()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = "Paralithode";
|
||||
Body = 729;
|
||||
Hue = 1922;
|
||||
|
||||
SetStr(642, 729);
|
||||
SetDex(87, 103);
|
||||
SetInt(25, 30);
|
||||
|
||||
SetHits(1800, 2000);
|
||||
SetMana(315, 343);
|
||||
|
||||
SetDamage(20, 24);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 65, 75);
|
||||
SetResistance(ResistanceType.Fire, 50, 60);
|
||||
SetResistance(ResistanceType.Cold, 60, 70);
|
||||
SetResistance(ResistanceType.Poison, 50, 60);
|
||||
SetResistance(ResistanceType.Energy, 50, 60);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 68.7, 75.0);
|
||||
SetSkill(SkillName.Anatomy, 98.0, 100.6);
|
||||
SetSkill(SkillName.Tactics, 95.8, 100.9);
|
||||
SetSkill(SkillName.Wrestling, 100.2, 109.0);
|
||||
SetSkill(SkillName.Parry, 100.0, 110.0);
|
||||
SetSkill(SkillName.Ninjitsu, 100.2, 109.0);
|
||||
SetSkill(SkillName.DetectHidden, 50.0);
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 4;
|
||||
MinTameSkill = 47.1;
|
||||
|
||||
PackItem(new FertileDirt(2));
|
||||
m_Timer = new HideTimer(this);
|
||||
m_Timer.Start();
|
||||
|
||||
SetWeaponAbility(WeaponAbility.DualWield);
|
||||
SetWeaponAbility(WeaponAbility.ForceOfNature);
|
||||
}
|
||||
|
||||
public Paralithode(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void OnAfterTame(Mobile tamer)
|
||||
{
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
|
||||
CantWalk = false;
|
||||
Hidden = false;
|
||||
|
||||
base.OnAfterTame(tamer);
|
||||
}
|
||||
|
||||
private class HideTimer : Timer
|
||||
{
|
||||
private readonly Paralithode m_Creature;
|
||||
|
||||
public HideTimer(Paralithode owner)
|
||||
: base(TimeSpan.FromSeconds(1.0), TimeSpan.FromSeconds(1.0))
|
||||
{
|
||||
m_Creature = owner;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (!m_Creature.Controlled)
|
||||
{
|
||||
if (m_Creature.Warmode == false && m_Creature.Hidden == false)
|
||||
m_Creature.PerformHide();
|
||||
else if (m_Creature.Warmode == true)
|
||||
{
|
||||
m_Creature.CantWalk = false;
|
||||
return;
|
||||
}
|
||||
|
||||
IPooledEnumerable eable = m_Creature.GetMobilesInRange(5);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == m_Creature || (m is Paralithode) || !m_Creature.CanBeHarmful(m))
|
||||
continue;
|
||||
|
||||
m_Creature.CantWalk = false;
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
m_Creature.CantWalk = false;
|
||||
m_Creature.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void PerformHide()
|
||||
{
|
||||
if (Deleted)
|
||||
return;
|
||||
|
||||
Hidden = true;
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public override bool IsScaredOfScaryThings { get { return false; } }
|
||||
public override bool IsBondable { get { return false; } }
|
||||
public override FoodType FavoriteFood { get { return FoodType.FruitsAndVegies; } }
|
||||
public override bool BleedImmune { get { return true; } }
|
||||
public override bool DeleteOnRelease { get { return true; } }
|
||||
public override bool BardImmune { get { return !Core.AOS || Controlled; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
public override bool StatLossAfterTame { get { return true; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 541;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
if (!Controlled)
|
||||
return 542;
|
||||
|
||||
return base.GetIdleSound();
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
if (!Controlled)
|
||||
return 545;
|
||||
|
||||
return base.GetDeathSound();
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 562;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
if (Controlled)
|
||||
return 320;
|
||||
|
||||
return base.GetHurtSound();
|
||||
}
|
||||
public override int Meat { get { return 9; } }
|
||||
public override int Hides { get { return 20; } }
|
||||
public override HideType HideType { get { return HideType.Horned; } }
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (!Controlled)
|
||||
{
|
||||
m_Timer = new HideTimer(this);
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
99
Scripts/Services/ExploringTheDeep/Mobiles/RockMite.cs
Normal file
99
Scripts/Services/ExploringTheDeep/Mobiles/RockMite.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a rock mite corpse")]
|
||||
public class RockMite : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public RockMite()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
Name = "a rock mite";
|
||||
Body = 787;
|
||||
BaseSoundID = 1006;
|
||||
Hue = 2500;
|
||||
|
||||
SetStr(733, 754);
|
||||
SetDex(126, 144);
|
||||
SetInt(75, 94);
|
||||
|
||||
SetHits(803, 817);
|
||||
SetStam(126, 144);
|
||||
SetMana(75, 94);
|
||||
|
||||
SetDamage(12, 19);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 50);
|
||||
SetDamageType(ResistanceType.Cold, 50);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 50, 59);
|
||||
SetResistance(ResistanceType.Fire, 80, 90);
|
||||
SetResistance(ResistanceType.Cold, 52, 59);
|
||||
SetResistance(ResistanceType.Poison, 80, 85);
|
||||
SetResistance(ResistanceType.Energy, 80, 90);
|
||||
|
||||
SetSkill(SkillName.MagicResist, 88.5, 119.6);
|
||||
SetSkill(SkillName.Tactics, 84.9, 112.9);
|
||||
SetSkill(SkillName.Wrestling, 82.7, 119.8);
|
||||
SetSkill(SkillName.Parry, 90.0, 100.0);
|
||||
SetSkill(SkillName.DetectHidden, 42.9);
|
||||
|
||||
Fame = 3500;
|
||||
Karma = -3500;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
SetSpecialAbility(SpecialAbility.TailSwipe);
|
||||
}
|
||||
|
||||
public RockMite(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x5A;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x5A;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x164;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x187;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1BA;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.FilthyRich, 2);
|
||||
AddLoot(LootPack.Average);
|
||||
AddLoot(LootPack.Gems, Utility.Random(1, 5));
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
113
Scripts/Services/ExploringTheDeep/Mobiles/SalvageHookMonsters.cs
Normal file
113
Scripts/Services/ExploringTheDeep/Mobiles/SalvageHookMonsters.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
using Server.Items;
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HPKraken : Kraken
|
||||
{
|
||||
[Constructable]
|
||||
public HPKraken() : base()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(30), Delete);
|
||||
}
|
||||
|
||||
public HPKraken(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public class HPDeepSeaSerpent : DeepSeaSerpent
|
||||
{
|
||||
[Constructable]
|
||||
public HPDeepSeaSerpent() : base()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(30), Delete);
|
||||
}
|
||||
|
||||
public HPDeepSeaSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public class HPSeaSerpent : SeaSerpent
|
||||
{
|
||||
[Constructable]
|
||||
public HPSeaSerpent() : base()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(30), Delete);
|
||||
}
|
||||
|
||||
public HPSeaSerpent(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public class HPWaterElemental : WaterElemental
|
||||
{
|
||||
[Constructable]
|
||||
public HPWaterElemental() : base()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(30), Delete);
|
||||
}
|
||||
|
||||
public HPWaterElemental(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Services/ExploringTheDeep/Mobiles/SeaSnake.cs
Normal file
74
Scripts/Services/ExploringTheDeep/Mobiles/SeaSnake.cs
Normal file
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a sea snake corpse")]
|
||||
public class SeaSnake : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public SeaSnake()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
this.Body = 92;
|
||||
this.Name = "a sea snake";
|
||||
this.BaseSoundID = 219;
|
||||
this.Hue = 2041;
|
||||
|
||||
this.SetStr(261);
|
||||
this.SetDex(193);
|
||||
this.SetInt(39);
|
||||
|
||||
this.SetHits(194);
|
||||
|
||||
this.SetDamage(5, 21);
|
||||
|
||||
this.SetDamageType(ResistanceType.Physical, 50);
|
||||
this.SetDamageType(ResistanceType.Poison, 50);
|
||||
|
||||
this.SetResistance(ResistanceType.Physical, 35, 45);
|
||||
this.SetResistance(ResistanceType.Fire, 5, 10);
|
||||
this.SetResistance(ResistanceType.Cold, 5, 10);
|
||||
this.SetResistance(ResistanceType.Poison, 100);
|
||||
this.SetResistance(ResistanceType.Energy, 5, 10);
|
||||
|
||||
this.SetSkill(SkillName.Poisoning, 90.1, 100.0);
|
||||
this.SetSkill(SkillName.MagicResist, 95.1, 100.0);
|
||||
this.SetSkill(SkillName.Tactics, 80.1, 95.0);
|
||||
this.SetSkill(SkillName.Wrestling, 85.1, 100.0);
|
||||
|
||||
this.Fame = 7000;
|
||||
this.Karma = -7000;
|
||||
|
||||
this.VirtualArmor = 40;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Average);
|
||||
AddLoot(LootPack.Gems, 2);
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable { get { return true; } }
|
||||
public override int Meat { get { return 1; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Deadly; } }
|
||||
public override Poison HitPoison { get { return Poison.Deadly; } }
|
||||
|
||||
public SeaSnake(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
284
Scripts/Services/ExploringTheDeep/Mobiles/Shadowlord.cs
Normal file
284
Scripts/Services/ExploringTheDeep/Mobiles/Shadowlord.cs
Normal file
@@ -0,0 +1,284 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public enum ShadowlordType
|
||||
{
|
||||
Astaroth,
|
||||
Faulinei,
|
||||
Nosfentor
|
||||
};
|
||||
|
||||
[CorpseName("a shadowlord corpse")]
|
||||
public class Shadowlord : BaseCreature
|
||||
{
|
||||
private static readonly ArrayList m_Instances = new ArrayList();
|
||||
public static ArrayList Instances { get { return m_Instances; } }
|
||||
|
||||
private ShadowlordType m_Type;
|
||||
public virtual Type[] ArtifactDrops { get { return _ArtifactTypes; } }
|
||||
|
||||
private Type[] _ArtifactTypes = new Type[]
|
||||
{
|
||||
typeof(Abhorrence), typeof(CaptainJohnesBlade), typeof(Craven),
|
||||
typeof(Equivocation), typeof(GargishCaptainJohnesBlade), typeof(GargishEquivocation),
|
||||
typeof(GargishPincer), typeof(Pincer)
|
||||
};
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ShadowlordType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Shadowlord()
|
||||
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
m_Instances.Add(this);
|
||||
|
||||
m_Type = (ShadowlordType)Utility.Random(3);
|
||||
Name = m_Type.ToString();
|
||||
|
||||
Body = 146;
|
||||
BaseSoundID = 0x4B0;
|
||||
|
||||
SetStr(981, 1078);
|
||||
SetDex(1003, 1114);
|
||||
SetInt(1098, 1245);
|
||||
|
||||
SetHits(50000, 55000);
|
||||
SetStam(1003, 1114);
|
||||
|
||||
SetDamage(35, 41);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 20);
|
||||
SetDamageType(ResistanceType.Fire, 20);
|
||||
SetDamageType(ResistanceType.Cold, 20);
|
||||
SetDamageType(ResistanceType.Poison, 20);
|
||||
SetDamageType(ResistanceType.Energy, 20);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 70, 80);
|
||||
SetResistance(ResistanceType.Fire, 70, 80);
|
||||
SetResistance(ResistanceType.Cold, 70, 80);
|
||||
SetResistance(ResistanceType.Poison, 70, 80);
|
||||
SetResistance(ResistanceType.Energy, 70, 80);
|
||||
|
||||
SetSkill(SkillName.EvalInt, 140.0);
|
||||
SetSkill(SkillName.Magery, 120.0);
|
||||
SetSkill(SkillName.Meditation, 140.0);
|
||||
SetSkill(SkillName.MagicResist, 110.2, 120.0);
|
||||
SetSkill(SkillName.Tactics, 110.1, 115.0);
|
||||
SetSkill(SkillName.Wrestling, 110.1, 115.0);
|
||||
SetSkill(SkillName.Necromancy, 120.0);
|
||||
SetSkill(SkillName.SpiritSpeak, 120.0);
|
||||
SetSkill(SkillName.Anatomy, 10.0, 20.0);
|
||||
|
||||
Fame = 24000;
|
||||
Karma = -24000;
|
||||
|
||||
VirtualArmor = 20;
|
||||
Hue = 902;
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
|
||||
SetSpecialAbility(SpecialAbility.LifeDrain);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add("#{0}", 1154453 + (int)m_Type); // Shadowlord of ..
|
||||
}
|
||||
|
||||
public Shadowlord(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
m_Instances.Add(this);
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
m_Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override bool AlwaysMurderer { get { return true; } }
|
||||
|
||||
public override int GetAngerSound() { return 1550; }
|
||||
public override int GetHurtSound() { return 1552; }
|
||||
public override int GetDeathSound() { return 1551; }
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private Shadowlord Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(180))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((Shadowlord)p);
|
||||
}
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static Shadowlord Spawn(Point3D platLoc, Map platMap)
|
||||
{
|
||||
if (m_Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
Shadowlord creature = new Shadowlord();
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.SuperBoss, 4);
|
||||
AddLoot(LootPack.FilthyRich);
|
||||
}
|
||||
|
||||
public override void CheckReflect(Mobile caster, ref bool reflect)
|
||||
{
|
||||
int c = 0;
|
||||
IPooledEnumerable eable = GetMobilesInRange(20);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m != null && m is DarkWisp)
|
||||
c++;
|
||||
continue;
|
||||
}
|
||||
eable.Free();
|
||||
if (c > 0)
|
||||
reflect = true; // Reflect spells if ShadowLord having wisps around
|
||||
}
|
||||
|
||||
public override void OnDrainLife(Mobile victim)
|
||||
{
|
||||
if (Map == null)
|
||||
return;
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
int count = 0;
|
||||
IPooledEnumerable eable = GetMobilesInRange(20);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
if (m == this || !CanBeHarmful(m))
|
||||
{
|
||||
if (m is DarkWisp) { count++; }
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m is BaseCreature && (((BaseCreature)m).Controlled || ((BaseCreature)m).Summoned || ((BaseCreature)m).Team != Team))
|
||||
list.Add(m);
|
||||
else if (m.Player)
|
||||
list.Add(m);
|
||||
}
|
||||
|
||||
eable.Free();
|
||||
|
||||
foreach (Mobile m in list)
|
||||
{
|
||||
(new DarkWisp()).MoveToWorld(new Point3D(Location), Map);
|
||||
int teleportchance = Hits / HitsMax;
|
||||
|
||||
if (teleportchance < Utility.RandomDouble() && m.Alive)
|
||||
{
|
||||
switch (Utility.Random(6))
|
||||
{
|
||||
case 0: m.MoveToWorld(new Point3D(6431, 1664, 0), Map); break;
|
||||
case 1: m.MoveToWorld(new Point3D(6432, 1634, 0), Map); break;
|
||||
case 2: m.MoveToWorld(new Point3D(6401, 1657, 0), Map); break;
|
||||
case 3: m.MoveToWorld(new Point3D(6401, 1637, 0), Map); break;
|
||||
default: m.MoveToWorld(new Point3D(Location), Map); break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDeath(Container c)
|
||||
{
|
||||
List<DamageStore> rights = GetLootingRights();
|
||||
|
||||
foreach (DamageStore ds in rights.Where(s => s.m_HasRight))
|
||||
{
|
||||
int luck = ds.m_Mobile is PlayerMobile ? ((PlayerMobile)ds.m_Mobile).RealLuck : ds.m_Mobile.Luck;
|
||||
int chance = 75 + (luck / 15);
|
||||
|
||||
if (chance > Utility.Random(5000))
|
||||
{
|
||||
Mobile m = ds.m_Mobile;
|
||||
Item artifact = Loot.Construct(ArtifactDrops[Utility.Random(ArtifactDrops.Length)]);
|
||||
|
||||
if (artifact != null)
|
||||
{
|
||||
if (m.Backpack == null || !m.Backpack.TryDropItem(m, artifact, false))
|
||||
{
|
||||
m.BankBox.DropItem(artifact);
|
||||
m.SendMessage("For your valor in combating the fallen beast, a special reward has been placed in your bankbox.");
|
||||
}
|
||||
else
|
||||
m.SendLocalizedMessage(1062317); // For your valor in combating the fallen beast, a special reward has been bestowed on you.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
base.OnDeath(c);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
writer.Write((int)m_Type);
|
||||
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Type = (ShadowlordType)reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Services/ExploringTheDeep/Mobiles/ShipBat.cs
Normal file
68
Scripts/Services/ExploringTheDeep/Mobiles/ShipBat.cs
Normal file
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a ship bat corpse")]
|
||||
public class ShipBat : VampireBat
|
||||
{
|
||||
[Constructable]
|
||||
public ShipBat()
|
||||
: base()
|
||||
{
|
||||
Name = "a ship bat";
|
||||
Body = 317;
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
SetStr(120);
|
||||
SetDex(120);
|
||||
SetInt(101);
|
||||
|
||||
SetHits(85, 96);
|
||||
|
||||
SetDamage(4, 12);
|
||||
|
||||
SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
SetResistance(ResistanceType.Physical, 15, 20);
|
||||
SetResistance(ResistanceType.Fire, 15, 25);
|
||||
SetResistance(ResistanceType.Cold, 10, 15);
|
||||
SetResistance(ResistanceType.Poison, 15, 25);
|
||||
SetResistance(ResistanceType.Energy, 10, 15);
|
||||
|
||||
//SetSkill( SkillName.MagicResist, 70.1, 95.0 );
|
||||
SetSkill(SkillName.Tactics, 45.0, 55.0);
|
||||
SetSkill(SkillName.Wrestling, 90.0, 100.0);
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 14;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x29B;
|
||||
}
|
||||
|
||||
public ShipBat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
85
Scripts/Services/ExploringTheDeep/Mobiles/ShipRat.cs
Normal file
85
Scripts/Services/ExploringTheDeep/Mobiles/ShipRat.cs
Normal file
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a ship rat corpse")]
|
||||
public class ShipRat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public ShipRat()
|
||||
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
this.Name = "Ship Rat";
|
||||
this.Body = 0xD7;
|
||||
this.BaseSoundID = 0x188;
|
||||
|
||||
this.SetStr(32, 74);
|
||||
this.SetDex(46, 65);
|
||||
this.SetInt(16, 30);
|
||||
|
||||
this.SetHits(26, 39);
|
||||
this.SetMana(0);
|
||||
|
||||
this.SetDamage(4, 8);
|
||||
|
||||
this.SetDamageType(ResistanceType.Physical, 100);
|
||||
|
||||
this.SetResistance(ResistanceType.Physical, 15, 20);
|
||||
this.SetResistance(ResistanceType.Fire, 5, 10);
|
||||
this.SetResistance(ResistanceType.Poison, 25, 35);
|
||||
|
||||
this.SetSkill(SkillName.MagicResist, 25.1, 30.0);
|
||||
this.SetSkill(SkillName.Tactics, 29.3, 44.0);
|
||||
this.SetSkill(SkillName.Wrestling, 29.3, 44.0);
|
||||
|
||||
this.Fame = 300;
|
||||
this.Karma = -300;
|
||||
|
||||
this.VirtualArmor = 18;
|
||||
}
|
||||
|
||||
public ShipRat(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Meat
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
public override int Hides
|
||||
{
|
||||
get
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
}
|
||||
public override FoodType FavoriteFood
|
||||
{
|
||||
get
|
||||
{
|
||||
return FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies | FoodType.Eggs;
|
||||
}
|
||||
}
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
this.AddLoot(LootPack.Poor);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
180
Scripts/Services/ExploringTheDeep/Mobiles/TheMasterInstructor.cs
Normal file
180
Scripts/Services/ExploringTheDeep/Mobiles/TheMasterInstructor.cs
Normal file
@@ -0,0 +1,180 @@
|
||||
using Server.Items;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("an ancient liche's corpse")]
|
||||
public class TheMasterInstructor : BaseCreature
|
||||
{
|
||||
private static readonly ArrayList m_Instances = new ArrayList();
|
||||
public static ArrayList Instances { get { return m_Instances; } }
|
||||
private SorcerersPlateController m_Controller;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public SorcerersPlateController Controller
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Controller;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TheMasterInstructor(SorcerersPlateController controller)
|
||||
: base(AIType.AI_NecroMage, FightMode.Closest, 10, 1, 0.2, 0.4)
|
||||
{
|
||||
m_Instances.Add(this);
|
||||
m_Controller = controller;
|
||||
|
||||
this.Name = "Anshu";
|
||||
this.Title = "The Master Instructor";
|
||||
this.Body = 0x4e;
|
||||
this.BaseSoundID = 412;
|
||||
this.Hue = 1284;
|
||||
|
||||
this.SetStr(216, 305);
|
||||
this.SetDex(96, 115);
|
||||
this.SetInt(966, 1045);
|
||||
|
||||
this.SetHits(700, 800);
|
||||
|
||||
this.SetDamage(15, 27);
|
||||
|
||||
this.SetDamageType(ResistanceType.Physical, 20);
|
||||
this.SetDamageType(ResistanceType.Cold, 40);
|
||||
this.SetDamageType(ResistanceType.Energy, 40);
|
||||
|
||||
this.SetResistance(ResistanceType.Physical, 55, 65);
|
||||
this.SetResistance(ResistanceType.Fire, 30, 40);
|
||||
this.SetResistance(ResistanceType.Cold, 50, 60);
|
||||
this.SetResistance(ResistanceType.Poison, 50, 60);
|
||||
this.SetResistance(ResistanceType.Energy, 50, 60);
|
||||
|
||||
this.SetSkill(SkillName.EvalInt, 120.1, 130.0);
|
||||
this.SetSkill(SkillName.Magery, 120.1, 130.0);
|
||||
this.SetSkill(SkillName.Meditation, 100.1, 101.0);
|
||||
this.SetSkill(SkillName.Poisoning, 100.1, 101.0);
|
||||
this.SetSkill(SkillName.MagicResist, 175.2, 200.0);
|
||||
this.SetSkill(SkillName.Tactics, 90.1, 100.0);
|
||||
this.SetSkill(SkillName.Wrestling, 75.1, 100.0);
|
||||
this.SetSkill(SkillName.Necromancy, 120.0);
|
||||
this.SetSkill(SkillName.SpiritSpeak, 120.0);
|
||||
this.SetSkill(SkillName.DetectHidden, 100.0);
|
||||
|
||||
this.Fame = 23000;
|
||||
this.Karma = -23000;
|
||||
|
||||
this.VirtualArmor = 60;
|
||||
this.PackNecroReg(30, 275);
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
|
||||
public class InternalSelfDeleteTimer : Timer
|
||||
{
|
||||
private TheMasterInstructor Mare;
|
||||
|
||||
public InternalSelfDeleteTimer(Mobile p) : base(TimeSpan.FromMinutes(60))
|
||||
{
|
||||
Priority = TimerPriority.FiveSeconds;
|
||||
Mare = ((TheMasterInstructor)p);
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Mare.Map != Map.Internal)
|
||||
{
|
||||
Mare.Delete();
|
||||
this.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public TheMasterInstructor(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
m_Instances.Add(this);
|
||||
}
|
||||
|
||||
public override bool AlwaysMurderer { get { return true; } }
|
||||
public override OppositionGroup OppositionGroup { get { return OppositionGroup.FeyAndUndead; } }
|
||||
public override bool Unprovokable { get { return true; } }
|
||||
public override bool BleedImmune { get { return true; } }
|
||||
public override Poison PoisonImmune { get { return Poison.Lethal; } }
|
||||
public override int TreasureMapLevel { get { return 5; } }
|
||||
public override bool AutoDispel { get { return true; } }
|
||||
|
||||
public override int GetIdleSound() { return 0x19D; }
|
||||
public override int GetAngerSound() { return 0x175; }
|
||||
public override int GetDeathSound() { return 0x108; }
|
||||
public override int GetAttackSound() { return 0xE2; }
|
||||
public override int GetHurtSound() { return 0x28B; }
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
Mobile killer = DemonKnight.FindRandomPlayer(this);
|
||||
|
||||
if (killer != null)
|
||||
{
|
||||
Item item = new StrongboxKey();
|
||||
|
||||
Container pack = killer.Backpack;
|
||||
|
||||
if (pack == null || !pack.TryDropItem(killer, item, false))
|
||||
killer.BankBox.DropItem(item);
|
||||
|
||||
killer.SendLocalizedMessage(1154489); // You received a Quest Item!
|
||||
}
|
||||
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(10.0), new TimerCallback(m_Controller.CreateSorcerersPlates));
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public static TheMasterInstructor Spawn(Point3D platLoc, Map platMap, SorcerersPlateController controller)
|
||||
{
|
||||
if (m_Instances.Count > 0)
|
||||
return null;
|
||||
|
||||
TheMasterInstructor creature = new TheMasterInstructor(controller);
|
||||
creature.Home = platLoc;
|
||||
creature.RangeHome = 4;
|
||||
creature.MoveToWorld(platLoc, platMap);
|
||||
|
||||
return creature;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
m_Instances.Remove(this);
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
this.AddLoot(LootPack.FilthyRich, 3);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Timer SelfDeleteTimer = new InternalSelfDeleteTimer(this);
|
||||
SelfDeleteTimer.Start();
|
||||
}
|
||||
}
|
||||
}
|
||||
255
Scripts/Services/ExploringTheDeep/Questers/ChampHuthwait.cs
Normal file
255
Scripts/Services/ExploringTheDeep/Questers/ChampHuthwait.cs
Normal file
@@ -0,0 +1,255 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ChampHuthwait : Mobile
|
||||
{
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public ChampHuthwait()
|
||||
: base()
|
||||
{
|
||||
this.Name = "Champ Huthwait";
|
||||
this.Title = "The Seedy Cobbler";
|
||||
this.Female = false;
|
||||
this.Race = Race.Human;
|
||||
this.CantWalk = true;
|
||||
this.Blessed = true;
|
||||
|
||||
this.Hue = Utility.RandomSkinHue();
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
this.AddItem(new Backpack());
|
||||
this.AddItem(new Boots(2017));
|
||||
this.AddItem(new LongPants(2017));
|
||||
this.AddItem(new FancyShirt(1432));
|
||||
this.AddItem(new JinBaori(1408));
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (!m.HasGump(typeof(ChampHuthwaitGump)))
|
||||
{
|
||||
m.SendGump(new ChampHuthwaitGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (dropped is MercutiosCutlass)
|
||||
{
|
||||
dropped.Delete();
|
||||
from.AddToBackpack(new BootsOfBallast());
|
||||
|
||||
if (!m.HasGump(typeof(ChampHuthwaitCompleteGump)))
|
||||
{
|
||||
m.SendGump(new ChampHuthwaitCompleteGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public ChampHuthwait(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class ChampHuthwaitGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("ChampHuthwait", AccessLevel.GameMaster, new CommandEventHandler(ChampHuthwaitGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void ChampHuthwaitGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new ChampHuthwaitGump(e.Mobile));
|
||||
}
|
||||
|
||||
public ChampHuthwaitGump(Mobile owner): base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154303, 0x7FFF, false, true); // Just tell him I'll have the money by...*pauses*...*with a smile*...Oh, you aren't part of Mercutio's crew? Oh well then, what's your business then? Loafers? Sandals? A Fine pair of boots then?
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154304, 0x7FFF, false, false); // I'm looking for the Boots of Ballast...
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(2);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154305, 0x7FFF, false, true); // *reads the note* Well I see you and Cousteau are after that suit then. Well I'll tell you what I tell everyone else...if you want the Boots of Ballast you need to help me out with a sticky situation.
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154306, 0x7FFF, false, false); // What kind of sticky situation?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 3);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(3);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154307, 0x7FFF, false, true); // Yea, that's right. Seems Mercutio's Gang is after me for a bit of a...disagreement about a small debt...if you were to...take care of Mercutio's gang I'd be willing to hook you up with those boots.
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154308, 0x7FFF, false, false); // Where is Mercutio's Gang?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 4);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(4);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154309, 0x7FFF, false, true); // They usually hangout just southwest of the City in some old ruins. Bring me evidence of Mercutio's demise and I will get you the boots you seek.
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ChampHuthwaitCompleteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("ChampHuthwaitComplete", AccessLevel.GameMaster, new CommandEventHandler(ChampHuthwaitCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void ChampHuthwaitCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new ChampHuthwaitCompleteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public ChampHuthwaitCompleteGump(Mobile owner): base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154310, 0x7FFF, false, true); // You did it! Hot diggity! Looks like I won't have to deal with that knave any longer! Smooth sailing from here on out...just me and the tables...oh, right here are your boots!
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
337
Scripts/Services/ExploringTheDeep/Questers/CusteauPerron.cs
Normal file
337
Scripts/Services/ExploringTheDeep/Questers/CusteauPerron.cs
Normal file
@@ -0,0 +1,337 @@
|
||||
using System;
|
||||
using Server.Commands;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class CousteauPerron : Mobile
|
||||
{
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public CousteauPerron()
|
||||
{
|
||||
this.Name = "Cousteau Perron";
|
||||
this.Title = "The Master Tinker";
|
||||
this.Female = true;
|
||||
this.Race = Race.Human;
|
||||
this.Blessed = true;
|
||||
|
||||
this.CantWalk = true;
|
||||
this.Hue = Utility.RandomSkinHue();
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
this.AddItem(new Backpack());
|
||||
this.AddItem(new FurBoots(2017));
|
||||
this.AddItem(new LongPants(2017));
|
||||
this.AddItem(new Doublet(1326));
|
||||
this.AddItem(new LongHair(2213));
|
||||
this.AddItem(new Cloak(2017));
|
||||
this.AddItem(new Cap(398));
|
||||
|
||||
Item gloves = new LeatherGloves();
|
||||
gloves.Hue = 2213;
|
||||
AddItem(gloves);
|
||||
}
|
||||
|
||||
public CousteauPerron(Serial serial): base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1072269); // Quest Giver
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CusteauPerronHouse)
|
||||
{
|
||||
if (!m.HasGump(typeof(CousteauPerronGump)))
|
||||
{
|
||||
m.SendGump(new CousteauPerronGump(m));
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.CusteauPerron;
|
||||
}
|
||||
}
|
||||
else if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
|
||||
{
|
||||
if (!m.HasGump(typeof(CousteauPerronCompleteGump)))
|
||||
{
|
||||
m.SendGump(new CousteauPerronCompleteGump(m));
|
||||
}
|
||||
}
|
||||
else if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (!m.HasGump(typeof(CousteauPerronPlansGump)))
|
||||
{
|
||||
m.SendGump(new CousteauPerronPlansGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile pm = from as PlayerMobile;
|
||||
|
||||
if (pm != null)
|
||||
{
|
||||
if (pm.ExploringTheDeepQuest < ExploringTheDeepQuestChain.CusteauPerron)
|
||||
{
|
||||
pm.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
else if (dropped is IceWyrmScale && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CusteauPerron)
|
||||
{
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.Sorcerers;
|
||||
dropped.Delete();
|
||||
pm.SendGump(new CousteauPerronCompleteGump(pm));
|
||||
}
|
||||
else if (dropped is SalvagerSuitPlans && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.Sorcerers)
|
||||
{
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.CollectTheComponent;
|
||||
dropped.Delete();
|
||||
pm.SendGump(new CousteauPerronPlansGump(pm));
|
||||
pm.AddToBackpack(new CusteauPerronNote());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class CousteauPerronGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CousteauPerron", AccessLevel.GameMaster, new CommandEventHandler(CousteauPerronGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CousteauPerronGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CousteauPerronGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CousteauPerronGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154287, 0x7FFF, false, true); // *She looks up from the slowly rotating rabbit on a spit* Oh hello there, what brings you way out to this frozen tundra?
|
||||
|
||||
AddHtmlLocalized(145, 300, 270, 24, 1154288, 0x7FFF, false, false); // Hepler sent me to ask about Shipwrecks...
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(2);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154289, 0x7FFF, false, true); // Ahh, been listening to old Hepler have you? So I've heard something of these shipwrecks, even all the way out here. I'm guessing you want me to tell you of one of these suits to help you explore beneath the waves?
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154290, 0x7FFF, false, false); // Do you know of the suit?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 3);//Suit
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(3);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154291, 0x7FFF, false, true); // Before I will help you with this perhaps you can assist me with a small task? I require an Ice Wyrm Scale to assist me in my research, but sadly I am not strong enough to slay one alone. Do you think you could collect this for me? Yes? Oh grand! Return to me with the ice wyrm scale and I will assist thee further.
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CousteauPerronCompleteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CousteauPerronComplete", AccessLevel.GameMaster, new CommandEventHandler(CousteauPerronCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CousteauPerronCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CousteauPerronCompleteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CousteauPerronCompleteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154292, 0x7FFF, false, true); // You've got one! I don't know how but you did! This will prove invaluable in my research! I will do as promised. Long ago I learned of a set of items known as the Salvager's Suit. It had been quite some time since anyone had seen the actual plans - or a suit for that matter, but legend tells any who wear the suit will be aided in undersea exploration. Last anyone heard the plans could be found deep within the Sorcerer's Dungeon in Ilshenar.
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CousteauPerronPlansGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("CousteauPerronPlans", AccessLevel.GameMaster, new CommandEventHandler(CousteauPerronPlansGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void CousteauPerronPlansGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new CousteauPerronPlansGump(e.Mobile));
|
||||
}
|
||||
|
||||
public CousteauPerronPlansGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154293, 0x7FFF, false, true); // This is exactly what I was talking about! How did you ever find such a thing! No matter! *reads the plans carefully* It<49>s all here by golly, detailed instructions on how to craft each item. There are a number of professionals throughout the realm who will be able to assist you in crafting such things <20> I<>ve written them down on this list here *hands you a note* Simply seek the professionals I have listed and you should be well on your way!
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
253
Scripts/Services/ExploringTheDeep/Questers/GipsyGemologist.cs
Normal file
253
Scripts/Services/ExploringTheDeep/Questers/GipsyGemologist.cs
Normal file
@@ -0,0 +1,253 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class GipsyGemologist : Mobile
|
||||
{
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public GipsyGemologist() : base()
|
||||
{
|
||||
this.Name = "Zalia";
|
||||
this.Title = "The Gypsy Gemologist";
|
||||
this.Female = true;
|
||||
this.Race = Race.Human;
|
||||
this.Blessed = true;
|
||||
|
||||
this.Hue = Utility.RandomSkinHue();
|
||||
|
||||
this.AddItem(new LongHair(2213));
|
||||
this.AddItem(new Backpack());
|
||||
this.AddItem(new Shoes(0x737));
|
||||
this.AddItem(new Skirt(0x1BB));
|
||||
this.AddItem(new FancyShirt(0x535));
|
||||
Utility.AssignRandomHair(this);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (!m.HasGump(typeof(ZaliaQuestGump)))
|
||||
{
|
||||
m.SendGump(new ZaliaQuestGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (dropped is AquaGem)
|
||||
{
|
||||
dropped.Delete();
|
||||
from.AddToBackpack(new AquaPendant());
|
||||
|
||||
if (!m.HasGump(typeof(ZaliaQuestCompleteGump)))
|
||||
{
|
||||
m.SendGump(new ZaliaQuestCompleteGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public GipsyGemologist(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class ZaliaQuestGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("ZaliaQuest", AccessLevel.GameMaster, new CommandEventHandler(ZaliaQuestGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void ZaliaQuestGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new ZaliaQuestGump(e.Mobile));
|
||||
}
|
||||
|
||||
public ZaliaQuestGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154311, 0x7FFF, false, true); // Hello zere my darling - looking for something shiny? Zalia has just vhat you are looking for!
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154312, 0x7FFF, false, false); // I'm looking for a special pendant...
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(2);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154313, 0x7FFF, false, true); // *Reads the note from Cousteau* Oh another one of you zhen eh? Zha Aqua pendant! Might as well ask for zha crown jewels! I will craft zhis jewel for you if you acquire zha correct gemstone!
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154314, 0x7FFF, false, false); // Where do I find such a gemstone?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 3);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(3);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154315, 0x7FFF, false, true); // Zha Aqua Gem! And I vhant a loaf of bread filled with gold! *laughs* Oh, you vhere serious? Well zhen ye must wrestle one avay from zhe Djinn.
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154316, 0x7FFF, false, false); // You want me to wrestle a Djinn!?!
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 4);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(4);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154317, 0x7FFF, false, true); // Zhey are usually around the winding sandy paths around zhe camp here...oddly zhey are fond of zhe water...*shrugs*
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ZaliaQuestCompleteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("ZaliaQuestComplete", AccessLevel.GameMaster, new CommandEventHandler(ZaliaQuestCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void ZaliaQuestCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new ZaliaQuestCompleteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public ZaliaQuestCompleteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154318, 0x7FFF, false, true); // Ahah! Yes, yes, zhat is indeed zhe gem! *does some quick tinkering* Here is your pendant as you vish...
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
215
Scripts/Services/ExploringTheDeep/Questers/HeplerPaulson.cs
Normal file
215
Scripts/Services/ExploringTheDeep/Questers/HeplerPaulson.cs
Normal file
@@ -0,0 +1,215 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HeplerPaulson : BaseVendor
|
||||
{
|
||||
private readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
m_SBInfos.Add(new SBHepler());
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HeplerPaulson()
|
||||
: base("The Salvage Master")
|
||||
{
|
||||
Name = "Hepler Paulson";
|
||||
Race = Race.Human;
|
||||
CantWalk = true;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Blessed = true;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Shoes(0x737));
|
||||
AddItem(new LongPants(0x1BB));
|
||||
AddItem(new FancyShirt(0x535));
|
||||
}
|
||||
|
||||
public HeplerPaulson(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1072269); // Quest Giver
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if(pm.Young)
|
||||
{
|
||||
m.SendLocalizedMessage(502593); // Thou art too young to choose this fate.
|
||||
return;
|
||||
}
|
||||
|
||||
Item boots = m.Backpack.FindItemByType(typeof(BootsOfBallast));
|
||||
Item robe = m.Backpack.FindItemByType(typeof(CanvassRobe));
|
||||
Item neck = m.Backpack.FindItemByType(typeof(AquaPendant));
|
||||
Item lens = m.Backpack.FindItemByType(m.Race == Race.Gargoyle ? typeof(GargishNictitatingLens) : typeof(NictitatingLens));
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.None)
|
||||
{
|
||||
if (!m.HasGump(typeof(HeplerPaulsonGump)))
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonGump(m as PlayerMobile));
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.HeplerPaulson;
|
||||
}
|
||||
}
|
||||
else if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent && boots != null && robe != null && neck != null && lens != null)
|
||||
{
|
||||
pm.ExploringTheDeepQuest = ExploringTheDeepQuestChain.CollectTheComponentComplete;
|
||||
m.AddToBackpack(new UnknownShipwreck());
|
||||
}
|
||||
else if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponentComplete)
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonCollectCompleteGump(m as PlayerMobile));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m.HasGump(typeof(HeplerPaulsonCompleteGump)))
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonCompleteGump(m as PlayerMobile));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
if (dropped is BrokenShipwreckRemains)
|
||||
{
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.HeplerPaulson)
|
||||
{
|
||||
dropped.Delete();
|
||||
BaseGump.SendGump(new HeplerPaulsonCompleteGump(m as PlayerMobile));
|
||||
m.ExploringTheDeepQuest = ExploringTheDeepQuestChain.HeplerPaulsonComplete;
|
||||
}
|
||||
else if (m.ExploringTheDeepQuest >= ExploringTheDeepQuestChain.HeplerPaulsonComplete)
|
||||
{
|
||||
m.SendLocalizedMessage(1154320); // You've already completed this task.
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class HeplerPaulsonGump : StoryGump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("HeplerPaulson", AccessLevel.GameMaster, new CommandEventHandler(HeplerPaulsonGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void HeplerPaulsonGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonGump(e.Mobile as PlayerMobile));
|
||||
}
|
||||
|
||||
private static PageData[] GumpInfo =
|
||||
{
|
||||
new PageData(1, 1154279, new SelectionEntry(1154280, 2), new SelectionEntry(1154282, 3)),
|
||||
new PageData(2, 1154281, new SelectionEntry(1154282, 4)),
|
||||
new PageData(3, 1154283, new SelectionEntry(1154280, 5)),
|
||||
new PageData(4, 1154283),
|
||||
new PageData(5, 1154281)
|
||||
};
|
||||
|
||||
public HeplerPaulsonGump(PlayerMobile pm)
|
||||
: base(pm, 1154327, GumpInfo)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class HeplerPaulsonCompleteGump : StoryGump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("HeplerPaulsonComplete", AccessLevel.GameMaster, new CommandEventHandler(HeplerPaulsonCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static PageData[] GumpInfo =
|
||||
{
|
||||
new PageData(1, 1154284, new SelectionEntry(1154285, 2)),
|
||||
new PageData(2, 1154286)
|
||||
};
|
||||
|
||||
private static void HeplerPaulsonCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonCompleteGump(e.Mobile as PlayerMobile));
|
||||
}
|
||||
|
||||
public HeplerPaulsonCompleteGump(PlayerMobile pm)
|
||||
: base(pm, 1154327, GumpInfo)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public class HeplerPaulsonCollectCompleteGump : StoryGump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("HeplerPaulsonCollectComplete", AccessLevel.GameMaster, new CommandEventHandler(HeplerPaulsonCollectCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void HeplerPaulsonCollectCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
BaseGump.SendGump(new HeplerPaulsonCollectCompleteGump(e.Mobile as PlayerMobile));
|
||||
}
|
||||
|
||||
private static PageData[] GumpInfo =
|
||||
{
|
||||
new PageData(1, 1154319),
|
||||
};
|
||||
|
||||
public HeplerPaulsonCollectCompleteGump(PlayerMobile pm)
|
||||
: base(pm, 1154327, GumpInfo)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
262
Scripts/Services/ExploringTheDeep/Questers/JosefSkimmons.cs
Normal file
262
Scripts/Services/ExploringTheDeep/Questers/JosefSkimmons.cs
Normal file
@@ -0,0 +1,262 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
using Server.Engines.Quests;
|
||||
using Server.Commands;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class JosefSkimmons : Mobile
|
||||
{
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public JosefSkimmons()
|
||||
{
|
||||
Name = "Josef Skimmons";
|
||||
Title = "The Master Blacksmith";
|
||||
Female = false;
|
||||
Race = Race.Human;
|
||||
this.Blessed = true;
|
||||
|
||||
CantWalk = true;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
AddItem(new Backpack());
|
||||
AddItem(new Sandals(2017));
|
||||
AddItem(new LongPants(2017));
|
||||
AddItem(new FullApron(1322));
|
||||
|
||||
Item gloves = new LeatherGloves();
|
||||
gloves.Hue = 1;
|
||||
AddItem(gloves);
|
||||
|
||||
Item weapon = new SmithHammer();
|
||||
weapon.Hue = 1;
|
||||
AddItem(weapon);
|
||||
}
|
||||
|
||||
public JosefSkimmons(Serial serial): base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (!m.HasGump(typeof(JosefSkimmonsGump)))
|
||||
{
|
||||
m.SendGump(new JosefSkimmonsGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (dropped is OrcishSchematics)
|
||||
{
|
||||
dropped.Delete();
|
||||
|
||||
if (from.Race == Race.Gargoyle)
|
||||
{
|
||||
from.AddToBackpack(new GargishNictitatingLens());
|
||||
}
|
||||
else
|
||||
{
|
||||
from.AddToBackpack(new NictitatingLens());
|
||||
}
|
||||
|
||||
if (!m.HasGump(typeof(JosefSkimmonsCompleteGump)))
|
||||
{
|
||||
m.SendGump(new JosefSkimmonsCompleteGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0); // version
|
||||
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace Server.Gumps
|
||||
{
|
||||
public class JosefSkimmonsCompleteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("JosefSkimmonsComplete", AccessLevel.GameMaster, new CommandEventHandler(JosefSkimmonsCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void JosefSkimmonsCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new JosefSkimmonsCompleteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public JosefSkimmonsCompleteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154299, 0x7FFF, false, true); // Great work! *Reading the schematic* Excellent! This is just what I need to give me a leg up on the competition! As promised here are those lenses you requested!
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class JosefSkimmonsGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("JosefSkimmons", AccessLevel.GameMaster, new CommandEventHandler(JosefSkimmonsGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void JosefSkimmonsGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new JosefSkimmonsGump(e.Mobile));
|
||||
}
|
||||
|
||||
public JosefSkimmonsGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154294, 0x7FFF, false, true); // Hello there...what<61>s this? *reads the note* Look at these lenses! Cousteau drew these up did she...hrmm<6D>well in any case I might be able to craft these lenses if you would be willing to assist me...
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154295, 0x7FFF, false, false); // What do you need assistance with?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(2);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154296, 0x7FFF, false, true); // I<>m looking to expand my operation here, before I can do that though I need a more reliable source of raw ore. Rumor has it the Orcs have a new machine they are using to drill huge quantities of ore!
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154297, 0x7FFF, false, false); // An orcish machine?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 3);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(3);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154298, 0x7FFF, false, true); // Yes! That<61>s exactly what I<>m talking about! Drill baby drill! You get me some schematics to make that machine and I<>ll strike your lenses for you...I bet those Orcs are holed up in their cave outside Yew.
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info) //Function for GumpButtonType.Reply Buttons
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
//Cancel
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
235
Scripts/Services/ExploringTheDeep/Questers/MadelineHarte.cs
Normal file
235
Scripts/Services/ExploringTheDeep/Questers/MadelineHarte.cs
Normal file
@@ -0,0 +1,235 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Commands;
|
||||
using Server.Items;
|
||||
using Server.Engines.Quests;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MadelineHarte : Mobile
|
||||
{
|
||||
public virtual bool IsInvulnerable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public MadelineHarte()
|
||||
{
|
||||
this.Name = "Madeline Harte";
|
||||
this.Title = "The Seamstress";
|
||||
this.Hue = Utility.RandomSkinHue();
|
||||
this.Blessed = true;
|
||||
|
||||
Utility.AssignRandomHair(this);
|
||||
|
||||
this.Female = true;
|
||||
this.Race = Race.Human;
|
||||
|
||||
this.AddItem(new LongHair(2213));
|
||||
this.AddItem(new Backpack());
|
||||
this.AddItem(new Sandals(2017));
|
||||
this.AddItem(new FullApron(1313));
|
||||
this.AddItem(new Skirt(1202));
|
||||
this.AddItem(new FancyShirt(2017));
|
||||
}
|
||||
|
||||
public MadelineHarte(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (!(m is PlayerMobile))
|
||||
return;
|
||||
|
||||
PlayerMobile pm = (PlayerMobile)m;
|
||||
|
||||
if (pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (!m.HasGump(typeof(MadelineHarteGump)))
|
||||
{
|
||||
m.SendGump(new MadelineHarteGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item dropped)
|
||||
{
|
||||
PlayerMobile m = from as PlayerMobile;
|
||||
|
||||
if (m != null)
|
||||
{
|
||||
if (m.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
if (dropped is WillemHartesHat)
|
||||
{
|
||||
dropped.Delete();
|
||||
from.AddToBackpack(new CanvassRobe());
|
||||
|
||||
if (!m.HasGump(typeof(MadelineHarteCompleteGump)))
|
||||
{
|
||||
m.SendGump(new MadelineHarteCompleteGump(m));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.PublicOverheadMessage(MessageType.Regular, 0x3B2, 501550); // I am not interested in this.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MadelineHarteCompleteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("MadelineHarteComplete", AccessLevel.GameMaster, new CommandEventHandler(MadelineHarteCompleteGump_OnCommand));
|
||||
}
|
||||
|
||||
private static void MadelineHarteCompleteGump_OnCommand(CommandEventArgs e)
|
||||
{
|
||||
e.Mobile.SendGump(new MadelineHarteCompleteGump(e.Mobile));
|
||||
}
|
||||
|
||||
public MadelineHarteCompleteGump(Mobile owner) : base(50, 50)
|
||||
{
|
||||
this.Closable = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154302, 0x7FFF, false, true); // Oh! You<6F>ve found his hat! Did you...*pauses and appears to begin to cry but regains her composure<72> Oh, I see. At least he showed Valor...I thank you for give me closure. I had a chance to read the note from Cousteau, this should be what you need.
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class MadelineHarteGump : Gump
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
CommandSystem.Register("MadelineHarte", 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 = false;
|
||||
this.Disposable = true;
|
||||
this.Dragable = true;
|
||||
this.Resizable = false;
|
||||
|
||||
AddPage(0);
|
||||
this.AddImageTiled(50, 20, 400, 460, 0x1404);
|
||||
this.AddImageTiled(50, 29, 30, 450, 0x28DC);
|
||||
this.AddImageTiled(34, 140, 17, 339, 0x242F);
|
||||
this.AddImage(48, 135, 0x28AB);
|
||||
this.AddImage(-16, 285, 0x28A2);
|
||||
this.AddImage(0, 10, 0x28B5);
|
||||
this.AddImage(25, 0, 0x28B4);
|
||||
this.AddImageTiled(83, 15, 350, 15, 0x280A);
|
||||
this.AddImage(34, 479, 0x2842);
|
||||
this.AddImage(442, 479, 0x2840);
|
||||
this.AddImageTiled(51, 479, 392, 17, 0x2775);
|
||||
this.AddImageTiled(415, 29, 44, 450, 0xA2D);
|
||||
this.AddImageTiled(415, 29, 30, 450, 0x28DC);
|
||||
this.AddImage(370, 50, 0x589);
|
||||
|
||||
this.AddImage(379, 60, 0x15A9);
|
||||
this.AddImage(425, 0, 0x28C9);
|
||||
this.AddImage(90, 33, 0x232D);
|
||||
this.AddImageTiled(130, 65, 175, 1, 0x238D);
|
||||
|
||||
AddHtmlLocalized(140, 45, 250, 24, 1154327, 0x7FFF, false, false); // Exploring the Deep
|
||||
|
||||
AddPage(1);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154300, 0x7FFF, false, true); // *You notice a woman whimpering as she struggles through manipulating the spinning wheel, you smile at her and hand her the note* Oh, hello, *wipes tear*...I<>m sorry did you need something...It<49>s just that...*begins crying again*...my son Willem has been killed Destard! If only I had something to remember him by...
|
||||
|
||||
AddHtmlLocalized(145, 300, 250, 24, 1154301, 0x7FFF, false, false); // Willem went to Destard?
|
||||
AddButton(115, 300, 0x26B0, 0x26B1, 0, GumpButtonType.Page, 2);
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
|
||||
AddPage(2);
|
||||
AddHtmlLocalized(107, 140, 300, 150, 1154335, 0x7FFF, false, true); // That's right! I told him not to go but he didn't listen! If only I had a bit of something of his to remember him by, you look brave...would you venture to Destard and find it for me? Please?
|
||||
|
||||
AddButton(345, 440, 0xF7, 0xF8, 0, GumpButtonType.Reply, 0);//OK
|
||||
}
|
||||
|
||||
public override void OnResponse(NetState state, RelayInfo info)
|
||||
{
|
||||
Mobile from = state.Mobile;
|
||||
|
||||
switch (info.ButtonID)
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Services/ExploringTheDeep/Questers/SBHepler.cs
Normal file
45
Scripts/Services/ExploringTheDeep/Questers/SBHepler.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SBHepler : SBInfo
|
||||
{
|
||||
private readonly List<GenericBuyInfo> m_BuyInfo = new InternalBuyInfo();
|
||||
private readonly IShopSellInfo m_SellInfo = new InternalSellInfo();
|
||||
public SBHepler()
|
||||
{
|
||||
}
|
||||
|
||||
public override IShopSellInfo SellInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_SellInfo;
|
||||
}
|
||||
}
|
||||
public override List<GenericBuyInfo> BuyInfo
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_BuyInfo;
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalBuyInfo : List<GenericBuyInfo>
|
||||
{
|
||||
public InternalBuyInfo()
|
||||
{
|
||||
this.Add(new GenericBuyInfo("1154215", typeof(SpecialSalvageHook), 1900, 10, 0x14F9, 2654));
|
||||
}
|
||||
}
|
||||
|
||||
public class InternalSellInfo : GenericSellInfo
|
||||
{
|
||||
public InternalSellInfo()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
162
Scripts/Services/ExploringTheDeep/Regions.cs
Normal file
162
Scripts/Services/ExploringTheDeep/Regions.cs
Normal file
@@ -0,0 +1,162 @@
|
||||
using System;
|
||||
using System.Xml;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells.Third;
|
||||
using Server.Spells.Seventh;
|
||||
using Server.Spells.Fourth;
|
||||
using Server.Spells.Sixth;
|
||||
using Server.Spells.Chivalry;
|
||||
using Server.Engines.Quests;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
public class ExploringDeepCreaturesRegion : DungeonRegion
|
||||
{
|
||||
public ExploringDeepCreaturesRegion(XmlElement xml, Map map, Region parent)
|
||||
: base(xml, map, parent)
|
||||
{
|
||||
}
|
||||
|
||||
Mobile creature;
|
||||
|
||||
public override void OnEnter(Mobile m)
|
||||
{
|
||||
if ((m is PlayerMobile) && m.Alive)
|
||||
{
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (m.Region.Name == "Ice Wyrm" && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CusteauPerron)
|
||||
{
|
||||
creature = IceWyrm.Spawn(new Point3D(5805 + Utility.RandomMinMax(-5, 5), 240 + Utility.RandomMinMax(-5, 5), 0), Map.Trammel);
|
||||
}
|
||||
else if (m.Region.Name == "Mercutio The Unsavory" && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
creature = MercutioTheUnsavory.Spawn(new Point3D(2582 + Utility.RandomMinMax(-5, 5), 1118 + Utility.RandomMinMax(-5, 5), 0), Map.Trammel);
|
||||
}
|
||||
else if (m.Region.Name == "Djinn" && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
creature = Djinn.Spawn(new Point3D(1732 + Utility.RandomMinMax(-5, 5), 520 + Utility.RandomMinMax(-5, 5), 8), Map.Ilshenar);
|
||||
}
|
||||
else if (m.Region.Name == "Obsidian Wyvern" && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
creature = ObsidianWyvern.Spawn(new Point3D(5136 + Utility.RandomMinMax(-5, 5), 966 + Utility.RandomMinMax(-5, 5), 0), Map.Trammel);
|
||||
}
|
||||
else if (m.Region.Name == "Orc Engineer" && pm.ExploringTheDeepQuest == ExploringTheDeepQuestChain.CollectTheComponent)
|
||||
{
|
||||
creature = OrcEngineer.Spawn(new Point3D(5311 + Utility.RandomMinMax(-5, 5), 1968 + Utility.RandomMinMax(-5, 5), 0), Map.Trammel);
|
||||
}
|
||||
|
||||
if (creature == null)
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CusteauPerronHouseRegion : GuardedRegion
|
||||
{
|
||||
public CusteauPerronHouseRegion(XmlElement xml, Map map, Region parent)
|
||||
: base(xml, map, parent)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnBeginSpellCast(Mobile from, ISpell s)
|
||||
{
|
||||
if ((s is TeleportSpell || s is GateTravelSpell || s is RecallSpell || s is MarkSpell || s is SacredJourneySpell) && from.IsPlayer())
|
||||
{
|
||||
from.SendLocalizedMessage(500015); // You do not have that spell!
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.OnBeginSpellCast(from, s);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class NoTravelSpellsAllowed : DungeonRegion
|
||||
{
|
||||
public NoTravelSpellsAllowed(XmlElement xml, Map map, Region parent)
|
||||
: base(xml, map, parent)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool CheckTravel(Mobile m, Point3D newLocation, Server.Spells.TravelCheckType travelType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class Underwater : BaseRegion
|
||||
{
|
||||
public Underwater(XmlElement xml, Map map, Region parent)
|
||||
: base(xml, map, parent)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnMoveInto(Mobile m, Direction d, Point3D newLocation, Point3D oldLocation)
|
||||
{
|
||||
if (!base.OnMoveInto(m, d, newLocation, oldLocation))
|
||||
return false;
|
||||
|
||||
if (m is PlayerMobile)
|
||||
{
|
||||
int equipment = m.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();
|
||||
|
||||
PlayerMobile pm = m as PlayerMobile;
|
||||
|
||||
if (m.AccessLevel == AccessLevel.Player)
|
||||
{
|
||||
if (m.Mounted || m.Flying)
|
||||
{
|
||||
m.SendLocalizedMessage(1154411); // You cannot proceed while mounted or flying!
|
||||
return false;
|
||||
}
|
||||
else if (pm.AllFollowers.Count != 0)
|
||||
{
|
||||
if (pm.AllFollowers.Where(x => x is Paralithode).Count() == 0)
|
||||
{
|
||||
pm.SendLocalizedMessage(1154412); // You cannot proceed while pets are under your control!
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (pm.ExploringTheDeepQuest != ExploringTheDeepQuestChain.CollectTheComponentComplete)
|
||||
{
|
||||
m.SendLocalizedMessage(1154325); // You feel as though by doing this you are missing out on an important part of your journey...
|
||||
return false;
|
||||
}
|
||||
else if (equipment < 4)
|
||||
{
|
||||
m.SendLocalizedMessage(1154413); // You couldn't hope to survive proceeding without the proper equipment...
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (m is BaseCreature && !(m is Paralithode))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnExit(Mobile m)
|
||||
{
|
||||
if (m is Paralithode)
|
||||
{
|
||||
m.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool AllowHousing(Mobile from, Point3D p)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public override bool CheckTravel(Mobile m, Point3D newLocation, Server.Spells.TravelCheckType travelType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user