Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
123
Scripts/Services/Seasonal Events/TreasuresOfDoom/DoomData.cs
Normal file
123
Scripts/Services/Seasonal Events/TreasuresOfDoom/DoomData.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.SeasonalEvents;
|
||||
|
||||
namespace Server.Engines.Points
|
||||
{
|
||||
public class DoomData : PointsSystem
|
||||
{
|
||||
public override PointsType Loyalty { get { return PointsType.Doom; } }
|
||||
public override TextDefinition Name { get { return m_Name; } }
|
||||
public override bool AutoAdd { get { return true; } }
|
||||
public override double MaxPoints { get { return double.MaxValue; } }
|
||||
public override bool ShowOnLoyaltyGump { get { return false; } }
|
||||
|
||||
public bool InSeason { get { return SeasonalEventSystem.IsActive(EventType.TreasuresOfDoom); } }
|
||||
|
||||
private TextDefinition m_Name = null;
|
||||
|
||||
public DoomData()
|
||||
{
|
||||
DungeonPoints = new Dictionary<Mobile, int>();
|
||||
}
|
||||
|
||||
public override void SendMessage(PlayerMobile from, double old, double points, bool quest)
|
||||
{
|
||||
from.SendLocalizedMessage(1155590, ((int)points).ToString()); // You have turned in ~1_COUNT~ artifacts of Doom
|
||||
}
|
||||
|
||||
public override void ProcessKill(Mobile victim, Mobile damager)
|
||||
{
|
||||
var bc = victim as BaseCreature;
|
||||
|
||||
if (!InSeason || bc == null || bc.Controlled || bc.Summoned || !damager.Alive || damager.Deleted || bc.IsChampionSpawn)
|
||||
return;
|
||||
|
||||
Region r = bc.Region;
|
||||
|
||||
if (damager is PlayerMobile && r.IsPartOf("Doom"))
|
||||
{
|
||||
if (!DungeonPoints.ContainsKey(damager))
|
||||
DungeonPoints[damager] = 0;
|
||||
|
||||
int fame = bc.Fame / 2;
|
||||
int luck = Math.Max(0, ((PlayerMobile)damager).RealLuck);
|
||||
|
||||
DungeonPoints[damager] += (int)(fame * (1 + Math.Sqrt(luck) / 100));
|
||||
|
||||
int x = DungeonPoints[damager];
|
||||
const double A = 0.000863316841;
|
||||
const double B = 0.00000425531915;
|
||||
|
||||
double chance = A * Math.Pow(10, B * x);
|
||||
|
||||
if (chance > Utility.RandomDouble())
|
||||
{
|
||||
Item i = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(bc), LootPackEntry.IsMondain(bc), LootPackEntry.IsStygian(bc));
|
||||
|
||||
if (i != null)
|
||||
{
|
||||
RunicReforging.GenerateRandomItem(i, damager, Math.Max(100, RunicReforging.GetDifficultyFor(bc)), RunicReforging.GetLuckForKiller(bc), ReforgedPrefix.None, ReforgedSuffix.Doom);
|
||||
|
||||
damager.PlaySound(0x5B4);
|
||||
damager.SendLocalizedMessage(1155588); // You notice the crest of Doom on your fallen foe's equipment and decide it may be of some value...
|
||||
|
||||
if (!damager.PlaceInBackpack(i))
|
||||
{
|
||||
if (damager.BankBox != null && damager.BankBox.TryDropItem(damager, i, false))
|
||||
damager.SendLocalizedMessage(1079730); // The item has been placed into your bank box.
|
||||
else
|
||||
{
|
||||
damager.SendLocalizedMessage(1072523); // You find an artifact, but your backpack and bank are too full to hold it.
|
||||
i.MoveToWorld(damager.Location, damager.Map);
|
||||
}
|
||||
}
|
||||
|
||||
DungeonPoints.Remove(damager);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public Dictionary<Mobile, int> DungeonPoints { get; set; }
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(Enabled);
|
||||
|
||||
writer.Write(DungeonPoints.Count);
|
||||
foreach (KeyValuePair<Mobile, int> kvp in DungeonPoints)
|
||||
{
|
||||
writer.Write(kvp.Key);
|
||||
writer.Write(kvp.Value);
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Enabled = reader.ReadBool();
|
||||
|
||||
int count = reader.ReadInt();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
Mobile m = reader.ReadMobile();
|
||||
int points = reader.ReadInt();
|
||||
|
||||
if (m != null && points > 0)
|
||||
DungeonPoints[m] = points;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
186
Scripts/Services/Seasonal Events/TreasuresOfDoom/Generation.cs
Normal file
186
Scripts/Services/Seasonal Events/TreasuresOfDoom/Generation.cs
Normal file
@@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Engines.Points;
|
||||
using Server.Engines.TreasuresOfDoom;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public static class TreasuresOfDoomGeneration
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.WorldSave += OnWorldSave;
|
||||
|
||||
if (Carey.Instance != null)
|
||||
{
|
||||
Carey.Instance.MoveToWorld(Carey.SpawnLocation, Map.Malas);
|
||||
}
|
||||
|
||||
if (Elizabeth.Instance != null)
|
||||
{
|
||||
Elizabeth.Instance.MoveToWorld(Elizabeth.SpawnLocation, Map.Malas);
|
||||
}
|
||||
|
||||
if (PointsSystem.TreasuresOfDoom.Enabled)
|
||||
{
|
||||
if (VaseSpawner.Instance == null)
|
||||
{
|
||||
VaseSpawner.Instance = new VaseSpawner();
|
||||
}
|
||||
|
||||
VaseSpawner.Instance.CheckVases();
|
||||
}
|
||||
else if (VaseSpawner.Instance != null)
|
||||
{
|
||||
if (VaseSpawner.Instance.Vases != null)
|
||||
{
|
||||
ColUtility.SafeDelete(VaseSpawner.Instance.Vases);
|
||||
}
|
||||
|
||||
VaseSpawner.Instance = null;
|
||||
}
|
||||
}
|
||||
|
||||
private static void OnWorldSave(WorldSaveEventArgs e)
|
||||
{
|
||||
CheckEnabled(true);
|
||||
}
|
||||
|
||||
public static void CheckEnabled(bool timed = false)
|
||||
{
|
||||
var doom = PointsSystem.TreasuresOfDoom;
|
||||
|
||||
if (doom.Enabled && !doom.InSeason)
|
||||
{
|
||||
if (timed)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(30), () =>
|
||||
{
|
||||
Utility.WriteConsoleColor(ConsoleColor.Green, "Auto Disabling Treasures of Doom");
|
||||
|
||||
Remove();
|
||||
doom.Enabled = false;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Utility.WriteConsoleColor(ConsoleColor.Green, "Auto Disabling Treasures of Doom");
|
||||
|
||||
Remove();
|
||||
doom.Enabled = false;
|
||||
}
|
||||
}
|
||||
else if (!doom.Enabled && doom.InSeason)
|
||||
{
|
||||
if (timed)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromSeconds(30), () =>
|
||||
{
|
||||
Utility.WriteConsoleColor(ConsoleColor.Green, "Enabling Treasures of Doom");
|
||||
|
||||
Generate();
|
||||
doom.Enabled = true;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
Utility.WriteConsoleColor(ConsoleColor.Green, "Enabling Treasures of Doom");
|
||||
|
||||
Generate();
|
||||
doom.Enabled = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void Generate()
|
||||
{
|
||||
if (Carey.Instance == null)
|
||||
{
|
||||
Carey.Instance = new Carey();
|
||||
Carey.Instance.MoveToWorld(Carey.SpawnLocation, Map.Malas);
|
||||
|
||||
Carey.Instance.Home = Carey.SpawnLocation;
|
||||
Carey.Instance.RangeHome = 2;
|
||||
}
|
||||
|
||||
if (Elizabeth.Instance == null)
|
||||
{
|
||||
Elizabeth.Instance = new Elizabeth();
|
||||
Elizabeth.Instance.MoveToWorld(Elizabeth.SpawnLocation, Map.Malas);
|
||||
|
||||
Elizabeth.Instance.Home = Elizabeth.SpawnLocation;
|
||||
Elizabeth.Instance.RangeHome = 2;
|
||||
}
|
||||
|
||||
if (Owain.Instance == null)
|
||||
{
|
||||
Owain.Instance = new Owain();
|
||||
Owain.Instance.MoveToWorld(Owain.SpawnLocation, Map.Malas);
|
||||
|
||||
Owain.Instance.Home = Owain.SpawnLocation;
|
||||
Owain.Instance.RangeHome = 10;
|
||||
}
|
||||
|
||||
if (VaseSpawner.Instance == null)
|
||||
{
|
||||
VaseSpawner.Instance = new VaseSpawner();
|
||||
}
|
||||
|
||||
VaseSpawner.Instance.CheckVases();
|
||||
|
||||
Point3D p = new Point3D(395, 220, -18);
|
||||
|
||||
if (Map.Malas.FindItem<DoomPlaque>(p) == null)
|
||||
{
|
||||
var plaque = new DoomPlaque();
|
||||
plaque.MoveToWorld(p, Map.Malas);
|
||||
}
|
||||
|
||||
p = new Point3D(388, 221, -20);
|
||||
|
||||
if (Map.Malas.FindItem<DoomSign>(p) == null)
|
||||
{
|
||||
var plaque = new DoomSign();
|
||||
plaque.MoveToWorld(p, Map.Malas);
|
||||
}
|
||||
|
||||
p = new Point3D(66, 223, -1);
|
||||
|
||||
if (Map.Malas.FindItem<Moongate>(p) == null)
|
||||
{
|
||||
var moongate = new Moongate();
|
||||
moongate.ItemID = 0x4BCB;
|
||||
moongate.Hue = 2676;
|
||||
moongate.Dispellable = false;
|
||||
moongate.Target = new Point3D(396, 220, -20);
|
||||
moongate.TargetMap = Map.Malas;
|
||||
|
||||
moongate.MoveToWorld(p, Map.Malas);
|
||||
}
|
||||
}
|
||||
|
||||
public static void Remove()
|
||||
{
|
||||
if (Carey.Instance != null)
|
||||
{
|
||||
Carey.Instance.Delete();
|
||||
}
|
||||
|
||||
if (VaseSpawner.Instance != null)
|
||||
{
|
||||
if (VaseSpawner.Instance.Vases != null)
|
||||
{
|
||||
ColUtility.SafeDelete(VaseSpawner.Instance.Vases);
|
||||
}
|
||||
|
||||
VaseSpawner.Instance = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Points;
|
||||
using Server.Engines.TreasuresOfDoom;
|
||||
using Server.SkillHandlers;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AncientClayVase : Item, ICarvable
|
||||
{
|
||||
public override int LabelNumber { get { return 1155625; } } // Ancient Clay Vase
|
||||
public bool DoomEvent { get; set; }
|
||||
|
||||
[Constructable]
|
||||
public AncientClayVase()
|
||||
: this(false)
|
||||
{
|
||||
}
|
||||
|
||||
public AncientClayVase(bool doom)
|
||||
: base(0x42B3)
|
||||
{
|
||||
DoomEvent = doom;
|
||||
Hue = 2676;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public bool Carve(Mobile from, Item item)
|
||||
{
|
||||
if (IsChildOf(from.Backpack))
|
||||
{
|
||||
from.PlaySound(Utility.Random(0x3E, 4));
|
||||
from.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1155629, from.NetState); // *The vase shatters as you cut away the sealing wax!"
|
||||
|
||||
Delete();
|
||||
|
||||
if (0.5 > Utility.RandomDouble())
|
||||
{
|
||||
from.AddToBackpack(new AncientParchment());
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
Stealing.ItemStolen += OnStolen;
|
||||
}
|
||||
|
||||
public static void OnStolen(ItemStolenEventArgs e)
|
||||
{
|
||||
if (e.Item is AncientClayVase)
|
||||
{
|
||||
e.Mobile.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1155626, e.Mobile.NetState); // *It appears to be an ancient vase. The top is sealed with some kind of wax. A bladed item would perhaps be useful...*
|
||||
}
|
||||
}
|
||||
|
||||
public AncientClayVase(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(DoomEvent);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
DoomEvent = reader.ReadBool();
|
||||
|
||||
if (DoomEvent)
|
||||
{
|
||||
VaseSpawner.AddToSpawner(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AncientParchment : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1155627; } } // Ancient Parchment
|
||||
|
||||
[Constructable]
|
||||
public AncientParchment()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AncientParchment(int amount)
|
||||
: base(0x2269)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (IsChildOf(m.Backpack))
|
||||
{
|
||||
m.PrivateOverheadMessage(Server.Network.MessageType.Regular, 0x3B2, 1155628, m.NetState); // *The parchment appears heavily worn and in need of restoration by a skilled Scribe...*
|
||||
}
|
||||
}
|
||||
|
||||
public AncientParchment(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AntiqueDocumentsKit : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1155630; } } // Antique Documents Kit
|
||||
|
||||
[Constructable]
|
||||
public AntiqueDocumentsKit()
|
||||
: base(0x1EBB)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public AntiqueDocumentsKit(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Alterable(typeof(DefTailoring), typeof(WingArmorOfLight))]
|
||||
public class CloakOfLight : Cloak
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
[Constructable]
|
||||
public CloakOfLight()
|
||||
{
|
||||
Attributes.NightSight = 1;
|
||||
Attributes.RegenHits = 2;
|
||||
Attributes.AttackChance = 5;
|
||||
}
|
||||
|
||||
public CloakOfLight(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber { get{return 1155608;} }// Cloak of Light
|
||||
|
||||
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 WingArmorOfLight : GargishClothWingArmor
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public WingArmorOfLight()
|
||||
{
|
||||
Attributes.NightSight = 1;
|
||||
Attributes.RegenHits = 2;
|
||||
Attributes.AttackChance = 5;
|
||||
}
|
||||
|
||||
public WingArmorOfLight(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber { get{return 1155683;} }// Wing Armor of Light
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CrookOfHumility : ShepherdsCrook
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
public override int LabelNumber { get { return 1155624; } } // Crook of Humilty
|
||||
|
||||
public override int InitMinHits { get { return 255; } }
|
||||
public override int InitMaxHits { get { return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public CrookOfHumility()
|
||||
{
|
||||
Slayer3 = TalismanSlayerName.Wolf;
|
||||
Attributes.SpellChanneling = 1;
|
||||
Attributes.BonusInt = 10;
|
||||
Attributes.WeaponDamage = 20;
|
||||
}
|
||||
|
||||
public CrookOfHumility(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Prompts;
|
||||
using Server.Network;
|
||||
using Server.Engines.Points;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DoomPlaque : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1155662; } } // Plaque
|
||||
public override bool ForceShowProperties { get { return true; } }
|
||||
|
||||
public Dictionary<Mobile, DateTime> NextMessage { get; set; }
|
||||
|
||||
public static readonly Point3D TeleportDestination = new Point3D(76, 224, 4);
|
||||
|
||||
[Constructable]
|
||||
public DoomPlaque()
|
||||
: base(0x4B20)
|
||||
{
|
||||
Movable = false;
|
||||
Hue = 2500;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (m.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
m.Prompt = new DoomPlaquePrompt();
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement { get { return true; } }
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (PointsSystem.TreasuresOfDoom.InSeason && m.Player && m.InRange(Location, 3) && m.InLOS(this))
|
||||
{
|
||||
if (NextMessage == null)
|
||||
{
|
||||
NextMessage = new Dictionary<Mobile, DateTime>();
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckList();
|
||||
}
|
||||
|
||||
if (!NextMessage.ContainsKey(m))
|
||||
{
|
||||
m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1155660, m.NetState); // *You examine the plaque...there appears to be a series of runic characters that are raised up...they look like buttons...*
|
||||
|
||||
NextMessage[m] = DateTime.UtcNow + TimeSpan.FromMinutes(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void CheckList()
|
||||
{
|
||||
if (NextMessage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var list = new List<Mobile>(NextMessage.Keys);
|
||||
|
||||
foreach (var m in list)
|
||||
{
|
||||
if (NextMessage[m] < DateTime.UtcNow)
|
||||
{
|
||||
NextMessage.Remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
ColUtility.Free(list);
|
||||
}
|
||||
|
||||
private class DoomPlaquePrompt : Prompt
|
||||
{
|
||||
public override int MessageCliloc { get { return 1155661; } }
|
||||
|
||||
public DoomPlaquePrompt()
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnResponse(Mobile from, string text)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(text) && text.Trim().ToLower() == "wolfgang")
|
||||
{
|
||||
Effects.SendLocationParticles(EffectItem.Create(from.Location, Map.Malas, EffectItem.DefaultDuration), 0x3728, 10, 10, 2023);
|
||||
from.MoveToWorld(TeleportDestination, Map.Malas);
|
||||
Effects.SendLocationParticles(EffectItem.Create(TeleportDestination, Map.Malas, EffectItem.DefaultDuration), 0x3728, 10, 10, 5023);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1155663); // Nothign Happens
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnCancel(Mobile from)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public DoomPlaque(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
CheckList();
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,134 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.Engines.Points;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DoomSign : Item, IRevealableItem
|
||||
{
|
||||
public List<Mobile> Revealed { get; set; }
|
||||
public Dictionary<Mobile, DateTime> NextMessage { get; set; }
|
||||
|
||||
public override bool ForceShowProperties { get { return true; } }
|
||||
public bool CheckWhenHidden { get { return false; } }
|
||||
|
||||
[Constructable]
|
||||
public DoomSign()
|
||||
: base(0xBD0)
|
||||
{
|
||||
Movable = false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (PointsSystem.TreasuresOfDoom.InSeason && m.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
var gump = new Gump(150, 150);
|
||||
|
||||
gump.AddImage(0, 0, HasRevealed(m) ? 0x7779 : 0x7724);
|
||||
|
||||
m.SendGump(gump);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool HandlesOnMovement { get { return PointsSystem.TreasuresOfDoom.InSeason; } }
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
if (m.Player && m.InRange(Location, 3) && m.InLOS(this))
|
||||
{
|
||||
if (NextMessage == null)
|
||||
{
|
||||
NextMessage = new Dictionary<Mobile, DateTime>();
|
||||
}
|
||||
else
|
||||
{
|
||||
CheckList();
|
||||
}
|
||||
|
||||
if (!NextMessage.ContainsKey(m))
|
||||
{
|
||||
m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1155659, m.NetState); // *The wooden sign seems in oddly good condition for how old the sarcophagus is. Most of the inscription is worn away...*
|
||||
|
||||
NextMessage[m] = DateTime.UtcNow + TimeSpan.FromMinutes(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private bool HasRevealed(Mobile m)
|
||||
{
|
||||
return Revealed != null && Revealed.Contains(m);
|
||||
}
|
||||
|
||||
public bool CheckReveal(Mobile m)
|
||||
{
|
||||
return Utility.Random((int)m.Skills[SkillName.DetectHidden].Value) < 100;
|
||||
}
|
||||
|
||||
public void OnRevealed(Mobile m)
|
||||
{
|
||||
if (Revealed == null)
|
||||
{
|
||||
Revealed = new List<Mobile>();
|
||||
}
|
||||
|
||||
if (!Revealed.Contains(m))
|
||||
{
|
||||
Revealed.Add(m);
|
||||
|
||||
m.PrivateOverheadMessage(MessageType.Regular, 0x3B2, 1155658, m.NetState); // *You reveal something hidden about the object...*
|
||||
}
|
||||
|
||||
OnDoubleClick(m);
|
||||
}
|
||||
|
||||
public bool CheckPassiveDetect(Mobile m)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private void CheckList()
|
||||
{
|
||||
if (NextMessage == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
var list = new List<Mobile>(NextMessage.Keys);
|
||||
|
||||
foreach (var m in list)
|
||||
{
|
||||
if (NextMessage[m] < DateTime.UtcNow)
|
||||
{
|
||||
NextMessage.Remove(m);
|
||||
}
|
||||
}
|
||||
|
||||
ColUtility.Free(list);
|
||||
}
|
||||
|
||||
public DoomSign(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
CheckList();
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LanternOfLight : Lantern
|
||||
{
|
||||
private string _OwnerName;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public string OwnerName { get { return _OwnerName; } set { _OwnerName = value; InvalidateProperties(); } }
|
||||
|
||||
[Constructable]
|
||||
public LanternOfLight()
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
list.Add(1155597, _OwnerName); // ~1_NAME~'s Lantern of Light
|
||||
}
|
||||
|
||||
public LanternOfLight(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(_OwnerName);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
|
||||
_OwnerName = reader.ReadString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PropheticManuscript : BaseJournal
|
||||
{
|
||||
public override int LabelNumber { get { return 1155631; } } // Prophetic Manuscript
|
||||
|
||||
public int Index { get; set; }
|
||||
|
||||
public override TextDefinition Title { get { return 1155638 + Index; } }
|
||||
public override TextDefinition Body { get { return 1155632 + Index; } }
|
||||
|
||||
[Constructable]
|
||||
public PropheticManuscript()
|
||||
: this(Utility.RandomMinMax(0, 4))
|
||||
{
|
||||
}
|
||||
|
||||
public PropheticManuscript(int index)
|
||||
{
|
||||
ItemID = 0x42BF;
|
||||
Index = index;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1154760, "#1155637"); // By: Owain the Blind Prophet
|
||||
}
|
||||
|
||||
public PropheticManuscript(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
writer.Write(Index);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Index = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class TreasuresOfDoomRewardDeed : BaseRewardTitleDeed
|
||||
{
|
||||
private TextDefinition _Title;
|
||||
|
||||
public override TextDefinition Title { get { return _Title; } }
|
||||
|
||||
public TreasuresOfDoomRewardDeed(int localization)
|
||||
{
|
||||
_Title = localization;
|
||||
}
|
||||
|
||||
public TreasuresOfDoomRewardDeed(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
|
||||
TextDefinition.Serialize(writer, _Title);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
_Title = TextDefinition.Deserialize(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ScepterOfPride : Scepter
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
public override int LabelNumber { get { return 1155623; } } // Sceptre of Pride
|
||||
|
||||
public override int InitMinHits { get { return 255; } }
|
||||
public override int InitMaxHits { get { return 255; } }
|
||||
|
||||
[Constructable]
|
||||
public ScepterOfPride()
|
||||
{
|
||||
WeaponAttributes.HitLeechStam = 70;
|
||||
WeaponAttributes.HitLeechMana = 70;
|
||||
WeaponAttributes.HitLeechHits = 70;
|
||||
Attributes.WeaponSpeed = 30;
|
||||
|
||||
Slayer = SlayerName.Exorcism;
|
||||
Slayer2 = SlayerName.Silver;
|
||||
}
|
||||
|
||||
public ScepterOfPride(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
using System;
|
||||
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class TinctureOfSilver : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1155619; } } // Tincture of Silver
|
||||
|
||||
[Constructable]
|
||||
public TinctureOfSilver()
|
||||
: base(0x183B)
|
||||
{
|
||||
Hue = 1900;
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (IsChildOf(m.Backpack))
|
||||
{
|
||||
m.SendLocalizedMessage(1155613); // Target the weapon, spellbook, or instrument you wish to apply this to...
|
||||
m.BeginTarget(-1, false, Server.Targeting.TargetFlags.None, (from, targeted) =>
|
||||
{
|
||||
if (targeted is Item && targeted is ISlayer)
|
||||
{
|
||||
var item = (Item)targeted;
|
||||
var slayer = (ISlayer)targeted;
|
||||
|
||||
var socket = item.GetSocket<SlayerSocket>();
|
||||
|
||||
if (socket == null || socket.Slayer != SlayerName.Silver)
|
||||
{
|
||||
if (slayer.Slayer != SlayerName.None && slayer.Slayer2 != SlayerName.None)
|
||||
{
|
||||
from.SendLocalizedMessage(1155680); // You cannot apply Tincture of Silver to items that are already slayers!
|
||||
}
|
||||
else
|
||||
{
|
||||
item.AttachSocket(new SlayerSocket(SlayerName.Silver, TimeSpan.FromHours(1)));
|
||||
|
||||
Delete();
|
||||
|
||||
from.SendLocalizedMessage(1155616); // You carefully apply Tincture of Silver to the item. The effects will fade in one hour.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1155614); // This item is already treated with Tincture of Silver!
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1155615); // You cannot apply Tincture of Silver to this item.
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(1155620); // When Applied:
|
||||
list.Add(1155621, "#1155622"); // 200% Damage Increase towards Monsters of ~1_NAME~ : Undead Vulnerability
|
||||
}
|
||||
|
||||
public TinctureOfSilver(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
reader.ReadInt(); // version
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Points;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public class Carey : BaseTurnInMobile
|
||||
{
|
||||
public override int TitleLocalization { get { return 1155595; } } // Artifacts of Doom
|
||||
public override int CancelLocalization { get { return 1155591; } } // Bring me items of Doom and I will reward you with valuable items.
|
||||
public override int TurnInLocalization { get { return 1155595; } } // Artifacts of Doom
|
||||
|
||||
public static Carey Instance { get; set; }
|
||||
public static readonly Point3D SpawnLocation = new Point3D(2373, 1278, -90);
|
||||
|
||||
[Constructable]
|
||||
public Carey() : base("the Researcher")
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
base.InitBody();
|
||||
|
||||
Name = "Carey";
|
||||
Female = true;
|
||||
|
||||
SpeechHue = 0x3B2;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
SetWearable(new Robe(), 1364);
|
||||
SetWearable(new ThighBoots(), 1908);
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
list.Add(1155594); // Artifacts of Doom Trader
|
||||
}
|
||||
|
||||
private DateTime _NextSpeak;
|
||||
|
||||
public override void OnMovement(Mobile m, Point3D oldLocation)
|
||||
{
|
||||
base.OnMovement(m, oldLocation);
|
||||
|
||||
if (_NextSpeak < DateTime.UtcNow)
|
||||
{
|
||||
SayTo(m, 1155591); // Bring me items of the Kotl and I will reward you with valuable items.
|
||||
_NextSpeak = DateTime.UtcNow + TimeSpan.FromSeconds(25);
|
||||
}
|
||||
}
|
||||
|
||||
public override void AwardPoints(PlayerMobile pm, Item item, int amount)
|
||||
{
|
||||
PointsSystem.TreasuresOfDoom.AwardPoints(pm, amount);
|
||||
}
|
||||
|
||||
public override bool IsRedeemableItem(Item item)
|
||||
{
|
||||
if (item is ICombatEquipment && ((ICombatEquipment)item).ReforgedSuffix == ReforgedSuffix.Doom)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void SendRewardGump(Mobile m)
|
||||
{
|
||||
if (m.Player && m.CheckAlive())
|
||||
m.SendGump(new DoomRewardGump(this, m as PlayerMobile));
|
||||
}
|
||||
|
||||
public Carey(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,85 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Points;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public class Elizabeth : BaseVendor
|
||||
{
|
||||
protected readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
|
||||
public override bool IsActiveVendor { get { return false; } }
|
||||
|
||||
public static Elizabeth Instance { get; set; }
|
||||
public static readonly Point3D SpawnLocation = new Point3D(2364, 1284, -90);
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Elizabeth() : base("the Professor")
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (m.InRange(Location, 5))
|
||||
{
|
||||
BaseGump.SendGump(new StoryGump(m as PlayerMobile,
|
||||
1155648,
|
||||
new PageData(1, 1155649, new SelectionEntry(1155650, 2)),
|
||||
new PageData(2, 1155651, new SelectionEntry(1155652, 3), new SelectionEntry(1155653, 4)),
|
||||
new PageData(3, 1155654, new SelectionEntry(1155653, 5), new SelectionEntry(1155655, 6)),
|
||||
new PageData(4, 1155657, new SelectionEntry(1155652, 5)),
|
||||
new PageData(5, 1155654, new SelectionEntry(1155655, 6)),
|
||||
new PageData(6, 1155656)));
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
base.InitBody();
|
||||
|
||||
Name = "Elizabeth";
|
||||
Female = true;
|
||||
|
||||
SpeechHue = 0x3B2;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Body = 0x191;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
SetWearable(new FancyShirt(), 1255);
|
||||
SetWearable(new JinBaori(), 2722);
|
||||
SetWearable(new Kilt(), 2012);
|
||||
SetWearable(new ThighBoots(), 1908);
|
||||
}
|
||||
|
||||
public Elizabeth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using System.Collections.Generic;
|
||||
using Server.ContextMenus;
|
||||
using Server.Engines.Points;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public class Owain : BaseVendor
|
||||
{
|
||||
protected readonly List<SBInfo> m_SBInfos = new List<SBInfo>();
|
||||
protected override List<SBInfo> SBInfos { get { return m_SBInfos; } }
|
||||
public override bool IsActiveVendor { get { return false; } }
|
||||
|
||||
public static Owain Instance { get; set; }
|
||||
public static readonly Point3D SpawnLocation = new Point3D(86, 223, -1);
|
||||
|
||||
public override void InitSBInfo()
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Owain() : base("the blind")
|
||||
{
|
||||
Instance = this;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile m)
|
||||
{
|
||||
if (m.InRange(Location, 5))
|
||||
{
|
||||
BaseGump.SendGump(new StoryGump(m as PlayerMobile,
|
||||
1155664,
|
||||
new PageData(1, 1155665, new SelectionEntry(1155666, 2)),
|
||||
new PageData(2, 1155667, new SelectionEntry(1155668, 3), new SelectionEntry(1155669, 4)),
|
||||
new PageData(3, 1155670, new SelectionEntry(1155671, 5)),
|
||||
new PageData(4, 1155672, new SelectionEntry(1155673, 6)),
|
||||
new PageData(5, 1155674, new SelectionEntry(1155675, 7)),
|
||||
new PageData(6, 1155676, new SelectionEntry(1155677, 8)),
|
||||
new PageData(7, 1155678),
|
||||
new PageData(8, 1155679)));
|
||||
}
|
||||
}
|
||||
|
||||
public override void InitBody()
|
||||
{
|
||||
base.InitBody();
|
||||
|
||||
Name = "Owain";
|
||||
|
||||
SpeechHue = 0x3B2;
|
||||
Hue = Utility.RandomSkinHue();
|
||||
Body = 0x190;
|
||||
}
|
||||
|
||||
public override void InitOutfit()
|
||||
{
|
||||
SetWearable(new Robe(), 1255);
|
||||
SetWearable(new ThighBoots(), 1908);
|
||||
}
|
||||
|
||||
public Owain(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write(0);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadInt();
|
||||
|
||||
Instance = this;
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Scripts/Services/Seasonal Events/TreasuresOfDoom/Region.cs
Normal file
33
Scripts/Services/Seasonal Events/TreasuresOfDoom/Region.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.Regions
|
||||
{
|
||||
public class MonestaryRegion : BaseRegion
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
new MonestaryRegion();
|
||||
}
|
||||
|
||||
public MonestaryRegion()
|
||||
: base("Doom Monestary", Map.Malas, Region.DefaultPriority, new Rectangle2D(64, 204, 99, 37))
|
||||
{
|
||||
GoLocation = new Point3D(79, 223, -1);
|
||||
|
||||
Register();
|
||||
}
|
||||
|
||||
public override bool CheckTravel(Mobile traveller, Point3D p, TravelCheckType type)
|
||||
{
|
||||
if (traveller.AccessLevel > AccessLevel.Player)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
return type == TravelCheckType.TeleportTo || type == TravelCheckType.TeleportFrom;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Engines.Points;
|
||||
using System.Collections.Generic;
|
||||
using Server.Gumps;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public class DoomRewardGump : BaseRewardGump
|
||||
{
|
||||
public DoomRewardGump(Mobile owner, PlayerMobile user)
|
||||
: base(owner, user, DoomRewards.Rewards, 1155595)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetYOffset(int id)
|
||||
{
|
||||
return 15;
|
||||
}
|
||||
|
||||
public override double GetPoints(Mobile m)
|
||||
{
|
||||
return PointsSystem.TreasuresOfDoom.GetPoints(m);
|
||||
}
|
||||
|
||||
public override void OnConfirmed(CollectionItem citem, int index)
|
||||
{
|
||||
Item item = null;
|
||||
|
||||
if (citem.Type == typeof(TreasuresOfDoomRewardDeed))
|
||||
{
|
||||
item = new TreasuresOfKotlRewardDeed(citem.Tooltip);
|
||||
}
|
||||
else
|
||||
{
|
||||
item = Loot.Construct(citem.Type);
|
||||
}
|
||||
|
||||
if (item != null)
|
||||
{
|
||||
if (item is LanternOfLight)
|
||||
{
|
||||
((LanternOfLight)item).OwnerName = User.Name;
|
||||
}
|
||||
|
||||
if (User.Backpack == null || !User.Backpack.TryDropItem(User, item, false))
|
||||
{
|
||||
User.SendLocalizedMessage(1074361); // The reward could not be given. Make sure you have room in your pack.
|
||||
item.Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
User.SendLocalizedMessage(1073621); // Your reward has been placed in your backpack.
|
||||
User.PlaySound(0x5A7);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnConfirmed(citem, index);
|
||||
}
|
||||
|
||||
PointsSystem.TreasuresOfDoom.DeductPoints(User, citem.Points);
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Scripts/Services/Seasonal Events/TreasuresOfDoom/Rewards.cs
Normal file
33
Scripts/Services/Seasonal Events/TreasuresOfDoom/Rewards.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using Server.Network;
|
||||
using System.Linq;
|
||||
using Server.Engines.Points;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public static class DoomRewards
|
||||
{
|
||||
public static List<CollectionItem> Rewards { get; set; }
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
Rewards = new List<CollectionItem>();
|
||||
|
||||
Rewards.Add(new CollectionItem(typeof(LanternOfLight), 0xA25, 1155598, 0, 30));
|
||||
Rewards.Add(new CollectionItem(typeof(TinctureOfSilver), 0x183B, 1155619, 1900, 10));
|
||||
Rewards.Add(new CollectionItem(typeof(AntiqueDocumentsKit), 0x1EBB, 1155630, 0, 10));
|
||||
Rewards.Add(new CollectionItem(typeof(TreasuresOfDoomRewardDeed), 0x14EF, 1155603, 0, 20));
|
||||
Rewards.Add(new CollectionItem(typeof(TreasuresOfDoomRewardDeed), 0x14EF, 1155600, 0, 30));
|
||||
Rewards.Add(new CollectionItem(typeof(TreasuresOfDoomRewardDeed), 0x14EF, 1155602, 0, 50));
|
||||
Rewards.Add(new CollectionItem(typeof(CrookOfHumility), 0xE81, 1155624, 0, 50));
|
||||
Rewards.Add(new CollectionItem(typeof(ScepterOfPride), 0x26BC, 1155623, 0, 50));
|
||||
Rewards.Add(new CollectionItem(typeof(CloakOfLight), 0x1515, 1155608, 0, 50));
|
||||
Rewards.Add(new CollectionItem(typeof(BootsOfEscaping), 0x1711, 1155607, 0, 50));
|
||||
Rewards.Add(new CollectionItem(typeof(SterlingSilverRing), 0x1F09, 1155606, 0, 50));
|
||||
}
|
||||
}
|
||||
}
|
||||
133
Scripts/Services/Seasonal Events/TreasuresOfDoom/VaseSpawner.cs
Normal file
133
Scripts/Services/Seasonal Events/TreasuresOfDoom/VaseSpawner.cs
Normal file
@@ -0,0 +1,133 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Engines.Points;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Engines.TreasuresOfDoom
|
||||
{
|
||||
public class VaseSpawner : ISpawner
|
||||
{
|
||||
public List<AncientClayVase> Vases { get; set; }
|
||||
public readonly int VaseCount = 3;
|
||||
public readonly Rectangle2D SpawnRecs = new Rectangle2D(257, 5, 249, 257);
|
||||
|
||||
public static readonly int MinSpawn = 1;
|
||||
public static readonly int MaxSpawn = 3;
|
||||
|
||||
public bool UnlinkOnTaming { get { return false; } }
|
||||
public Point3D HomeLocation { get { return Point3D.Zero; } }
|
||||
public int HomeRange { get { return 0; } }
|
||||
|
||||
public static VaseSpawner Instance { get; set; }
|
||||
|
||||
public VaseSpawner()
|
||||
{
|
||||
}
|
||||
|
||||
public void Remove(ISpawnable spawn)
|
||||
{
|
||||
if (spawn is AncientClayVase)
|
||||
{
|
||||
RemoveVase((AncientClayVase)spawn);
|
||||
}
|
||||
}
|
||||
|
||||
public void GetSpawnProperties(ISpawnable spawn, ObjectPropertyList list)
|
||||
{
|
||||
}
|
||||
|
||||
public void GetSpawnContextEntries(ISpawnable spawn, Mobile m, List<ContextMenuEntry> list)
|
||||
{
|
||||
}
|
||||
|
||||
public void AddVase(AncientClayVase vase)
|
||||
{
|
||||
if (Vases == null)
|
||||
{
|
||||
Vases = new List<AncientClayVase>();
|
||||
}
|
||||
|
||||
if (!Vases.Contains(vase))
|
||||
{
|
||||
Vases.Add(vase);
|
||||
}
|
||||
}
|
||||
|
||||
public void RemoveVase(AncientClayVase vase)
|
||||
{
|
||||
if (Vases != null)
|
||||
{
|
||||
if (Vases.Contains(vase))
|
||||
{
|
||||
Vases.Remove(vase);
|
||||
}
|
||||
|
||||
if (PointsSystem.TreasuresOfDoom.InSeason && Vases.Count < VaseCount)
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(Utility.RandomMinMax(MinSpawn, MaxSpawn)), () =>
|
||||
{
|
||||
CreateVases(1);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckVases()
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
if (Vases == null)
|
||||
{
|
||||
Vases = new List<AncientClayVase>();
|
||||
}
|
||||
|
||||
count = VaseCount - Vases.Count;
|
||||
|
||||
if (count > 0)
|
||||
{
|
||||
CreateVases(count);
|
||||
}
|
||||
}
|
||||
|
||||
public void CreateVases(int count)
|
||||
{
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
var vase = new AncientClayVase(true);
|
||||
ItemFlags.SetStealable(vase, true);
|
||||
vase.Movable = false;
|
||||
|
||||
vase.Spawner = this;
|
||||
|
||||
AddVase(vase);
|
||||
|
||||
Point3D p = Point3D.Zero;
|
||||
|
||||
do
|
||||
{
|
||||
p = Map.Malas.GetRandomSpawnPoint(SpawnRecs);
|
||||
}
|
||||
while (p == Point3D.Zero || !Map.Malas.CanSpawnMobile(p));
|
||||
|
||||
vase.OnBeforeSpawn(p, Map.Malas);
|
||||
vase.MoveToWorld(p, Map.Malas);
|
||||
}
|
||||
}
|
||||
|
||||
public static void AddToSpawner(AncientClayVase vase)
|
||||
{
|
||||
if (Instance == null)
|
||||
{
|
||||
Instance = new VaseSpawner();
|
||||
}
|
||||
|
||||
Instance.AddVase(vase);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user