Overwrite

Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
Unstable Kitsune
2023-11-28 23:20:26 -05:00
parent 3cd54811de
commit b918192e4e
11608 changed files with 2644205 additions and 47 deletions

View File

@@ -0,0 +1,116 @@
using System;
namespace Server.Items
{
public interface ICaddelliteTool
{
}
public class CaddellitePickaxe : Pickaxe, ICaddelliteTool
{
public override int LabelNumber { get { return 1158689; } } // Caddellite Pickaxe
[Constructable]
public CaddellitePickaxe()
{
}
public CaddellitePickaxe(Serial serial)
: base(serial)
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1158692); // * Can Harvest Caddellite Infused Resources in the Lost Lands *
}
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 CaddelliteHatchet : Hatchet, ICaddelliteTool
{
public override int LabelNumber { get { return 1158690; } } // Caddellite Hatchet
[Constructable]
public CaddelliteHatchet()
{
}
public CaddelliteHatchet(Serial serial)
: base(serial)
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1158692); // * Can Harvest Caddellite Infused Resources in the Lost Lands *
}
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 CaddelliteFishingPole : FishingPole, ICaddelliteTool
{
public override int LabelNumber { get { return 1158691; } } // Caddellite Fishing Pole
[Constructable]
public CaddelliteFishingPole()
{
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
list.Add(1158692); // * Can Harvest Caddellite Infused Resources in the Lost Lands *
}
public CaddelliteFishingPole(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,36 @@
using System;
namespace Server.Items
{
public class CounterfeitPlatinum : Item
{
public override int LabelNumber { get { return 1158686; } } // counterfeit platinum
[Constructable]
public CounterfeitPlatinum()
: base(0x1BF9)
{
Hue = 2500;
}
public CounterfeitPlatinum(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,42 @@
using System;
namespace Server.Items
{
public class CultistsRitualTome : Spellbook
{
public override bool IsArtifact { get { return true; } }
public override int LabelNumber { get { return 1158717; } } // Cultist's Ritual Tome
[Constructable]
public CultistsRitualTome()
: base()
{
Hue = 2745;
LootType = LootType.Blessed;
Slayer = SlayerGroup.RandomSuperSlayerTOL();
//Caddellite Infused
Attributes.DefendChance = 5;
Attributes.SpellDamage = 25;
Attributes.CastRecovery = 2;
Attributes.LowerManaCost = 4;
}
public CultistsRitualTome(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,133 @@
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class KhaldunCampAddon : BaseAddon
{
private static int[,] m_AddOnSimpleComponents = new int[,] {
{2879, -2, 6, 4}, {2883, 1, 10, 4}, {2879, -2, 7, 4}// 1 2 3
, {2880, 0, 6, 4}, {2880, -1, 6, 4}, {875, 5, 5, 4}// 4 5 6
, {875, -3, 5, 5}, {3014, 6, 6, 12}, {2421, 5, 8, 3}// 7 8 20
, {2884, 2, 10, 4}, {2879, -2, 8, 4}, {875, 5, 10, 5}// 21 22 23
, {2880, 0, -2, 4}, {2988, 0, -5, 20}, {2880, -2, -9, 3}// 38 41 42
, {2880, -3, -9, 3}, {2990, 2, 2, 23}, {2880, -2, -2, 4}// 45 46 47
, {2880, -3, -2, 4}, {2880, -1, -2, 4}, {2879, -5, -8, 3}// 51 53 58
, {2879, -5, -6, 3}, {2879, -5, -7, 3}, {2880, -5, -9, 3}// 59 60 65
, {880, -6, 1, 1}, {875, -6, -10, 1}, {2880, -4, -9, 3}// 68 70 71
, {2880, -4, -2, 4}, {2879, -5, 0, 4}, {2879, -5, -2, 4}// 72 73 77
, {2879, -5, -1, 4}, {875, -6, -3, 5}// 81 83
, {2880, 1, 6, 4}, {2880, 2, 6, 4}, {2980, 6, 11, 13} // 84, 85, 86
, {542, 7, 5, -1}, {542, 7, 6, -1}, {542, 7, 7, -1} // 87, 88, 89
, {542, 7, 8, -1}, {542, 7, 9, -1}, {542, 7, 10, -1},
};
public override BaseAddonDeed Deed
{
get
{
return null;
}
}
[ Constructable ]
public KhaldunCampAddon()
{
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] );
AddComplexComponent( (BaseAddon) this, 880, -3, 9, 5, 2500, -1, "", 1);// 9
AddComplexComponent( (BaseAddon) this, 880, -3, 8, 5, 1835, -1, "", 1);// 10
AddComplexComponent( (BaseAddon) this, 881, 0, 5, 5, 2500, -1, "", 1);// 11
AddComplexComponent( (BaseAddon) this, 873, -2, 10, 5, 2500, -1, "", 1);// 12
AddComplexComponent( (BaseAddon) this, 876, -3, 10, 5, 1835, -1, "", 1);// 13
AddComplexComponent( (BaseAddon) this, 881, -1, 5, 5, 1835, -1, "", 1);// 14
AddComplexComponent( (BaseAddon) this, 880, -3, 6, 5, 1835, -1, "", 1);// 15
AddComplexComponent( (BaseAddon) this, 873, 0, 10, 5, 2500, -1, "", 1);// 16
AddComplexComponent( (BaseAddon) this, 873, -1, 10, 5, 1835, -1, "", 1);// 17
AddComplexComponent( (BaseAddon) this, 880, -3, 7, 5, 2500, -1, "", 1);// 18
AddComplexComponent( (BaseAddon) this, 881, 1, 5, 5, 1835, -1, "", 1);// 19
AddComplexComponent( (BaseAddon) this, 4012, 5, 8, 3, 0, 2, "", 1);// 24
AddComplexComponent( (BaseAddon) this, 881, -2, 5, 5, 2500, -1, "", 1);// 25
AddComplexComponent( (BaseAddon) this, 881, 0, -3, 5, 1159, -1, "", 1);// 26
AddComplexComponent( (BaseAddon) this, 877, -1, -10, 0, 1911, -1, "", 1);// 27
AddComplexComponent( (BaseAddon) this, 874, -1, -9, 1, 1912, -1, "", 1);// 28
AddComplexComponent( (BaseAddon) this, 874, -1, -6, 3, 1912, -1, "", 1);// 29
AddComplexComponent( (BaseAddon) this, 881, -2, -3, 5, 1159, -1, "", 1);// 30
AddComplexComponent( (BaseAddon) this, 881, -3, -3, 5, 1917, -1, "", 1);// 31
AddComplexComponent( (BaseAddon) this, 873, -2, -5, 3, 1912, -1, "", 1);// 32
AddComplexComponent( (BaseAddon) this, 877, 1, -3, 5, 1917, -1, "", 1);// 33
AddComplexComponent( (BaseAddon) this, 872, -1, -5, 3, 1911, -1, "", 1);// 34
AddComplexComponent( (BaseAddon) this, 881, -1, -3, 5, 1917, -1, "", 1);// 35
AddComplexComponent( (BaseAddon) this, 873, -3, 2, 5, 1917, -1, "", 1);// 36
AddComplexComponent( (BaseAddon) this, 873, -2, 2, 5, 1159, -1, "", 1);// 37
AddComplexComponent( (BaseAddon) this, 873, -1, 2, 5, 1917, -1, "", 1);// 39
AddComplexComponent( (BaseAddon) this, 873, 0, 2, 5, 1159, -1, "", 1);// 40
AddComplexComponent( (BaseAddon) this, 873, -3, -5, 3, 1911, -1, "", 1);// 43
AddComplexComponent( (BaseAddon) this, 872, 1, 2, 4, 1917, -1, "", 1);// 44
AddComplexComponent( (BaseAddon) this, 874, 1, 1, 5, 1159, -1, "", 1);// 48
AddComplexComponent( (BaseAddon) this, 874, 1, -2, 5, 1159, -1, "", 1);// 49
AddComplexComponent( (BaseAddon) this, 878, -3, -10, 3, 1911, -1, "", 1);// 50
AddComplexComponent( (BaseAddon) this, 878, -2, -10, 2, 1912, -1, "", 1);// 52
AddComplexComponent( (BaseAddon) this, 876, -6, -5, 4, 1912, -1, "", 1);// 54
AddComplexComponent( (BaseAddon) this, 876, -6, 2, 5, 1159, -1, "", 1);// 55
AddComplexComponent( (BaseAddon) this, 873, -5, 2, 5, 1917, -1, "", 1);// 56
AddComplexComponent( (BaseAddon) this, 873, -4, 2, 5, 1159, -1, "", 1);// 57
AddComplexComponent( (BaseAddon) this, 873, -5, -5, 3, 1911, -1, "", 1);// 61
AddComplexComponent( (BaseAddon) this, 873, -4, -5, 3, 1912, -1, "", 1);// 62
AddComplexComponent( (BaseAddon) this, 880, -6, -1, 5, 1917, -1, "", 1);// 63
AddComplexComponent( (BaseAddon) this, 880, -6, 0, 5, 1159, -1, "", 1);// 64
AddComplexComponent( (BaseAddon) this, 881, -4, -3, 5, 1159, -1, "", 1);// 66
AddComplexComponent( (BaseAddon) this, 881, -5, -3, 4, 1917, -1, "", 1);// 67
AddComplexComponent( (BaseAddon) this, 880, -6, 1, 5, 1917, -1, "", 1);// 69
AddComplexComponent( (BaseAddon) this, 880, -6, -2, 5, 1159, -1, "", 1);// 74
AddComplexComponent( (BaseAddon) this, 880, -6, -8, 3, 1911, -1, "", 1);// 75
AddComplexComponent( (BaseAddon) this, 880, -6, -9, 3, 1912, -1, "", 1);// 76
AddComplexComponent( (BaseAddon) this, 880, -6, -7, 3, 1912, -1, "", 1);// 78
AddComplexComponent( (BaseAddon) this, 878, -4, -10, 3, 1912, -1, "", 1);// 79
AddComplexComponent( (BaseAddon) this, 878, -5, -10, 3, 1911, -1, "", 1);// 80
AddComplexComponent( (BaseAddon) this, 880, -6, -6, 4, 1911, -1, "", 1);// 82
}
public KhaldunCampAddon( Serial serial ) : base( serial )
{
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
{
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null && name.Length > 0)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (amount > 1)
{
ac.Stackable = true;
ac.Amount = amount;
}
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
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();
}
}
}

View File

@@ -0,0 +1,202 @@
using System;
using System.Collections.Generic;
namespace Server.Items
{
public class KhaldunChest : LockableContainer, IRevealableItem
{
private Timer m_Timer;
public override int DefaultGumpID { get { return 0x49; } }
public bool CheckWhenHidden { get { return true; } }
[Constructable]
public KhaldunChest()
: base(Utility.RandomList(0xE3C, 0xE3E, 0x9a9))
{
Movable = false;
Locked = true;
Visible = false;
Hue = 2745;
LiftOverride = true;
Weight = 0.0;
LockLevel = 90;
RequiredSkill = 90;
MaxLockLevel = 100;
TrapType = TrapType.PoisonTrap;
TrapPower = 100;
Timer.DelayCall(TimeSpan.FromSeconds(1), Fill);
}
public virtual void Fill()
{
Reset();
List<Item> contains = new List<Item>(Items);
foreach (var i in contains)
{
i.Delete();
}
ColUtility.Free(contains);
for (int i = 0; i < Utility.RandomMinMax(6, 12); i++)
DropItem(Loot.RandomGem());
DropItem(new Gold(Utility.RandomMinMax(800, 1100)));
Item item = null;
if (0.30 > Utility.RandomDouble())
{
switch (Utility.Random(7))
{
case 0:
item = new Bandage(Utility.Random(10, 30)); break;
case 1:
item = new SmokeBomb();
item.Amount = Utility.Random(3, 6);
break;
case 2:
item = new InvisibilityPotion();
item.Amount = Utility.Random(1, 3);
break;
case 3:
item = new Lockpick(Utility.Random(1, 10)); break;
case 4:
item = new DreadHornMane(Utility.Random(1, 2)); break;
case 5:
item = new Corruption(Utility.Random(1, 2)); break;
case 6:
item = new Taint(Utility.Random(1, 2)); break;
}
DropItem(item);
}
if (0.25 > Utility.RandomDouble())
{
DropItem(new CounterfeitPlatinum());
}
if (0.2 > Utility.RandomDouble())
{
switch (Utility.Random(3))
{
case 0:
item = new ZombiePainting(); break;
case 1:
item = new SkeletonPortrait(); break;
case 2:
item = new LichPainting(); break;
}
DropItem(item);
}
if (0.1 > Utility.RandomDouble())
{
item = Loot.RandomArmorOrShieldOrWeaponOrJewelry(LootPackEntry.IsInTokuno(this), LootPackEntry.IsMondain(this), LootPackEntry.IsStygian(this));
if (item != null)
{
int min, max;
TreasureMapChest.GetRandomItemStat(out min, out max, 1.0);
RunicReforging.GenerateRandomItem(item, null, Utility.RandomMinMax(min, max), 0, ReforgedPrefix.None, ReforgedSuffix.Khaldun, Map);
DropItem(item);
}
}
}
public void Reset()
{
EndTimer();
Visible = false;
Locked = true;
RequiredSkill = 90;
LockLevel = RequiredSkill - Utility.Random(1, 10);
MaxLockLevel = RequiredSkill;
TrapType = TrapType.MagicTrap;
TrapPower = 100;
}
public virtual bool CheckReveal(Mobile m)
{
return m.CheckTargetSkill(SkillName.DetectHidden, this, 80.0, 100.0);
}
public virtual void OnRevealed(Mobile m)
{
Visible = true;
}
public virtual bool CheckPassiveDetect(Mobile m)
{
if (m.InRange(Location, 4))
{
int skill = (int)m.Skills[SkillName.DetectHidden].Value;
if (skill >= 80 && Utility.Random(300) < skill)
return true;
}
return false;
}
public override void LockPick(Mobile from)
{
TryDelayedLock();
base.LockPick(from);
}
public KhaldunChest(Serial serial) : base(serial)
{
}
public void TryDelayedLock()
{
if (Locked || (m_Timer != null && m_Timer.Running))
return;
EndTimer();
m_Timer = Timer.DelayCall(TimeSpan.FromMinutes(Utility.RandomMinMax(10, 15)), Fill);
}
public void EndTimer()
{
if (m_Timer != null)
{
m_Timer.Stop();
m_Timer = null;
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
TryDelayedLock();
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
TryDelayedLock();
}
}
}

View File

@@ -0,0 +1,104 @@
////////////////////////////////////////
// //
// Generated by CEO's YAAAG - V1.2 //
// (Yet Another Arya Addon Generator) //
// //
////////////////////////////////////////
using System;
using Server;
using Server.Items;
namespace Server.Items
{
public class KhaldunEntranceAddon : BaseAddon
{
private static int[,] m_AddOnSimpleComponents = new int[,] {
{476, 3, 5, 28}// 6
, {465, 3, 2, 8}, {465, 3, 1, 10}, {465, 3, 0, 14}// 7 8 9
, {466, 3, -1, 14}, {478, 2, 6, 28}, {476, 1, 5, 30}// 10 11 12
, {465, -1, 5, 27}, {465, -3, 2, 5}, {465, -3, 1, 6}// 13 14 15
, {465, -3, 0, 8}, {465, 2, 3, 5}, {465, 2, 2, 3}// 16 17 18
, {1313, -2, -4, 3}, {1313, 0, -4, 0}, {1313, -1, -5, 1}// 19 20 21
, {1313, 0, -6, 3}, {1313, -1, -6, 2}, {1313, -2, -6, 5}// 22 23 24
, {1929, -2, 1, 4}, {1929, -2, 0, 8}, {1929, -1, 1, 4}// 30 31 32
, {1929, 0, 1, 3}, {1929, 0, 0, 8}, {1929, 1, 1, 3}// 33 34 35
, {1929, 1, 0, 8}, {1929, -1, 0, 8}, {1928, -2, 0, 2}// 36 37 38
, {1928, -2, -1, 2}, {1928, -2, -2, 2}, {1928, -1, 0, 2}// 39 40 41
, {1928, -1, -1, 2}, {1928, -1, -2, 0}, {1928, 0, 0, 1}// 42 43 44
, {1928, 0, -1, 2}, {1928, 1, 0, 2}, {1928, 1, -1, 2}// 45 46 47
, {1928, 1, -1, 8}, {1928, 1, -2, 0}, {1928, -2, -1, 8}// 48 49 50
, {1928, -1, -1, 8}, {1928, 0, -1, 8}, {1928, 0, -2, 2}// 51 52 53
, {1931, -2, -2, 8}, {1931, -2, -3, 1}, {1931, -1, -2, 6}// 54 55 56
, {1931, -1, -3, 1}, {1931, 0, -3, 1}, {1931, 1, -2, 6}// 57 58 59
, {1931, 1, -3, 0}, {1931, 0, -2, 8}, {1931, 0, -3, 2}// 60 61 62
, {466, -3, -1, 11}, {466, 0, 5, 28}, {466, 2, 5, 24}// 63 64 65
, {6005, -3, -2, 4}, {6005, -3, -3, 2}// 66 67
};
public override BaseAddonDeed Deed
{
get
{
return null;
}
}
[ Constructable ]
public KhaldunEntranceAddon()
{
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] );
AddComplexComponent( (BaseAddon) this, 1313, 0, 1, 2, 1, -1, "", 1);// 25
AddComplexComponent( (BaseAddon) this, 1313, -1, 1, 3, 1, -1, "", 1);// 26
AddComplexComponent( (BaseAddon) this, 1313, -1, 2, 3, 1, -1, "", 1);// 27
AddComplexComponent( (BaseAddon) this, 1313, -2, 2, 5, 1, -1, "", 1);// 28
AddComplexComponent( (BaseAddon) this, 1313, 0, 2, 3, 1, -1, "", 1);// 29
}
public KhaldunEntranceAddon( Serial serial ) : base( serial )
{
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource)
{
AddComplexComponent(addon, item, xoffset, yoffset, zoffset, hue, lightsource, null, 1);
}
private static void AddComplexComponent(BaseAddon addon, int item, int xoffset, int yoffset, int zoffset, int hue, int lightsource, string name, int amount)
{
AddonComponent ac;
ac = new AddonComponent(item);
if (name != null && name.Length > 0)
ac.Name = name;
if (hue != 0)
ac.Hue = hue;
if (amount > 1)
{
ac.Stackable = true;
ac.Amount = amount;
}
if (lightsource != -1)
ac.Light = (LightType) lightsource;
addon.AddComponent(ac, xoffset, yoffset, zoffset);
}
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();
}
}
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Linq;
namespace Server.Items
{
public class KhaldunFirstAidBelt : FirstAidBelt
{
[Constructable]
public KhaldunFirstAidBelt()
{
LootType = LootType.Blessed;
WeightReduction = 50;
Attributes.RegenHits = 2;
HealingBonus = 10;
}
public KhaldunFirstAidBelt(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();
}
}
}

View File

@@ -0,0 +1,94 @@
using System;
namespace Server.Items
{
[FlipableAttribute(0xA1DE, 0xA1DF)]
public class ZombiePainting : Item
{
public override int LabelNumber { get { return 1023744; } } // painting
[Constructable]
public ZombiePainting()
: base(0x4C62)
{
Weight = 10.0;
}
public ZombiePainting(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();
}
}
[FlipableAttribute(0xA1E0, 0xA1E1)]
public class SkeletonPortrait : Item
{
public override int LabelNumber { get { return 1023744; } } // painting
[Constructable]
public SkeletonPortrait()
: base(0xA1E0)
{
Weight = 10.0;
}
public SkeletonPortrait(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();
}
}
[FlipableAttribute(0xA1E2, 0xA1E3)]
public class LichPainting : Item
{
public override int LabelNumber { get { return 1023744; } } // painting
[Constructable]
public LichPainting()
: base(0xA1E2)
{
Weight = 10.0;
}
public LichPainting(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,208 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Server.Mobiles;
using Server.Targeting;
namespace Server.Items
{
public class KhaldunTastyTreat : Item
{
public const int Duration = 1; // hours
public override int LabelNumber { get { return 1158680; } } // khaldun tasty treat
[Constructable]
public KhaldunTastyTreat()
: this(1)
{
}
public KhaldunTastyTreat(int amount)
: base(2424)
{
Stackable = true;
Amount = amount;
}
public override bool DropToMobile(Mobile from, Mobile target, Point3D p)
{
TryFeed(from, target);
return false;
}
public override void OnDoubleClick(Mobile m)
{
if (IsChildOf(m.Backpack))
{
m.BeginTarget(2, false, TargetFlags.Beneficial, (from, targeted) =>
{
if (targeted is Mobile)
{
TryFeed(from, (Mobile)targeted);
}
});
}
}
private void TryFeed(Mobile from, Mobile target)
{
if (target is BaseCreature && !((BaseCreature)target).IsDeadBondedPet && ((BaseCreature)target).ControlMaster == from)
{
BaseCreature bc = (BaseCreature)target;
if (UnderInfluence(bc))
{
from.SendLocalizedMessage(1113051); //Your pet is still enjoying the last tasty treat!
}
else
{
DoEffects(bc.ControlMaster, bc);
}
}
}
public bool DoEffects(Mobile owner, BaseCreature bc)
{
owner.SendLocalizedMessage(1158685); // Your pet is now Caddellite infused by this treat.
bc.PlaySound(0x1EA);
bc.FixedParticles(0x373A, 10, 15, 5018, EffectLayer.Waist);
bc.Loyalty = BaseCreature.MaxLoyalty;
if (Table == null)
{
Table = new Dictionary<BaseCreature, DateTime>();
}
Table.Add(bc, DateTime.UtcNow + TimeSpan.FromHours(1));
Timer.DelayCall(TimeSpan.FromHours(Duration), RemoveInfluence, bc);
Caddellite.UpdateBuff(owner);
Consume();
return true;
}
public static Dictionary<BaseCreature, DateTime> Table { get; set; }
public static void Initialize()
{
EventSink.Login += OnLogin;
}
public static bool UnderInfluence(BaseCreature bc)
{
return Table != null && Table.ContainsKey(bc);
}
public static void RemoveInfluence(BaseCreature bc)
{
if (Table != null && Table.ContainsKey(bc))
{
Table.Remove(bc);
if (bc.ControlMaster != null)
{
bc.ControlMaster.SendLocalizedMessage(1158687); // Your pet is no longer Caddellite infused.
Caddellite.UpdateBuff(bc.ControlMaster);
}
if (Table.Count == 0)
{
Table = null;
}
}
}
public static BaseCreature GetPetUnderEffects(Mobile m)
{
if (m is PlayerMobile)
{
var pm = m as PlayerMobile;
foreach (var pet in pm.AllFollowers.OfType<BaseCreature>())
{
if (UnderInfluence(pet))
{
return pet;
}
}
}
return null;
}
public static void Save(GenericWriter writer)
{
writer.Write(0);
writer.Write(Table == null ? 0 : Table.Count);
if (Table != null)
{
foreach (var kpv in Table)
{
writer.Write(kpv.Key);
writer.Write(kpv.Value);
}
}
}
public static void Load(GenericReader reader)
{
reader.ReadInt(); // version
int count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
var bc = reader.ReadMobile() as BaseCreature;
var dt = reader.ReadDateTime();
if (bc != null && dt > DateTime.UtcNow)
{
if (Table == null)
Table = new Dictionary<BaseCreature, DateTime>();
Table[bc] = dt;
Timer.DelayCall(dt - DateTime.UtcNow, RemoveInfluence, bc);
}
}
}
public static void OnLogin(LoginEventArgs e)
{
var pm = e.Mobile as PlayerMobile;
if (pm != null)
{
Timer.DelayCall(() => Caddellite.UpdateBuff(pm));
}
}
public KhaldunTastyTreat(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,158 @@
using System;
using Server.Spells;
using Server.Spells.Seventh;
namespace Server.Items
{
public class MaskOfKhalAnkur : BaseHat
{
public override bool IsArtifact { get { return true; } }
public override int LabelNumber { get { return 1158701; } } // Mask of Khal Ankur
[CommandProperty(AccessLevel.GameMaster)]
public int ChargeTime { get; set; }
private int m_Charges;
[CommandProperty(AccessLevel.GameMaster)]
public int Charges
{
get { return m_Charges; }
set
{
m_Charges = value;
if (m_Charges == 0)
StartTimer();
InvalidateProperties();
}
}
[Constructable]
public MaskOfKhalAnkur()
: this(0)
{
}
[Constructable]
public MaskOfKhalAnkur(int hue)
: base(0xA1C7, hue)
{
Weight = 3;
Charges = 1;
//Caddellite Infused
Attributes.BonusHits = 10;
Attributes.BonusMana = 15;
Attributes.EnhancePotions = 35;
Attributes.LowerManaCost = 10;
}
public override void OnDoubleClick(Mobile from)
{
if (Parent != from)
{
from.SendLocalizedMessage(1116250); // That must be equipped before you can use it.
}
else if (ChargeTime > 0)
{
from.SendLocalizedMessage(1074882, ChargeTime.ToString()); // You must wait ~1_val~ seconds for this to recharge.
}
else if (SpellHelper.CheckTown(from.Location, from))
{
MeteorSwarmSpell spell = new MeteorSwarmSpell(from, null, this);
spell.Cast();
}
}
public override void OnAdded(object parent)
{
base.OnAdded(parent);
if (Charges == 0)
StartTimer();
}
public override void OnRemoved(object parent)
{
base.OnRemoved(parent);
if (Charges == 0)
StopTimer();
}
public override int BasePhysicalResistance { get { return 15; } }
public override int BaseFireResistance { get { return 15; } }
public override int BaseColdResistance { get { return 15; } }
public override int BasePoisonResistance { get { return 15; } }
public override int BaseEnergyResistance { get { return 15; } }
public override int InitMinHits { get { return 255; } }
public override int InitMaxHits { get { return 255; } }
public override void AddWeightProperty(ObjectPropertyList list)
{
base.AddWeightProperty(list);
list.Add(1158732, Charges.ToString()); // Meteor Breath Charges: ~1_VAL~
}
public MaskOfKhalAnkur(Serial serial)
: base(serial)
{
}
private Timer m_Timer;
public virtual void StartTimer()
{
ChargeTime = 300;
if (m_Timer == null || !m_Timer.Running)
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), new TimerCallback(Slice));
}
public virtual void StopTimer()
{
if (m_Timer != null)
m_Timer.Stop();
m_Timer = null;
}
public virtual void Slice()
{
if (ChargeTime > 0)
ChargeTime--;
else
{
ChargeTime = 0;
Charges = 1;
StopTimer();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write((int)m_Charges);
writer.Write((int)ChargeTime);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Charges = reader.ReadInt();
ChargeTime = reader.ReadInt();
if (Parent != null && Parent is Mobile && ChargeTime > 0)
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), new TimerCallback(Slice));
}
}
}

View File

@@ -0,0 +1,91 @@
using System;
namespace Server.Items
{
public class Meteorite : Item
{
private bool _Polished;
[CommandProperty(AccessLevel.GameMaster)]
public bool Polished
{
get
{
return _Polished;
}
set
{
_Polished = value;
if (_Polished)
{
Polish();
}
else
{
UnPolish();
}
InvalidateProperties();
}
}
public override int LabelNumber { get { return _Polished ? 1125446 : 1158640; } } // Polished/Rough Meteorite
[Constructable]
public Meteorite()
: base(Utility.Random(0x1364, 3))
{
Hue = 1910;
}
public void TryPolish(Mobile from)
{
if (0.75 > Utility.RandomDouble())
{
Polished = true;
}
else
{
from.SendLocalizedMessage(1158694); // You attempt to polish the meteorite, but its delicate structure crumbles at the attempt.
Delete();
}
}
public void Polish()
{
Hue = 0;
ItemID = Utility.Random(0xA1CE, 12);
}
public void UnPolish()
{
Hue = 1910;
ItemID = Utility.Random(0x1364, 3);
}
public Meteorite(Serial serial)
: base(serial)
{
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0); // version
writer.Write(_Polished);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
_Polished = reader.ReadBool();
}
}
}

View File

@@ -0,0 +1,153 @@
using System;
using Server.Spells;
using Server.Spells.Seventh;
namespace Server.Items
{
public class PendantOfKhalAnkur : GargishNecklace
{
public override bool IsArtifact { get { return true; } }
public override int LabelNumber { get { return 1158731; } } // Pendant of Khal Ankur
[CommandProperty(AccessLevel.GameMaster)]
public int ChargeTime { get; set; }
private int m_Charges;
[CommandProperty(AccessLevel.GameMaster)]
public int Charges
{
get { return m_Charges; }
set
{
m_Charges = value;
if (m_Charges == 0)
StartTimer();
InvalidateProperties();
}
}
[Constructable]
public PendantOfKhalAnkur()
: base(0xA1C9)
{
Weight = 1;
Charges = 1;
//Caddellite Infused
Attributes.BonusHits = 10;
Attributes.BonusMana = 15;
Attributes.EnhancePotions = 35;
Attributes.LowerManaCost = 10;
ArmorAttributes.MageArmor = 1;
}
public override void OnDoubleClick(Mobile from)
{
if (Parent != from)
{
from.SendLocalizedMessage(1116250); // That must be equipped before you can use it.
}
else if (ChargeTime > 0)
{
from.SendLocalizedMessage(1074882, ChargeTime.ToString()); // You must wait ~1_val~ seconds for this to recharge.
}
else if (SpellHelper.CheckTown(from.Location, from))
{
MeteorSwarmSpell spell = new MeteorSwarmSpell(from, null, this);
spell.Cast();
}
}
public override void OnAdded(object parent)
{
base.OnAdded(parent);
if (Charges == 0)
StartTimer();
}
public override void OnRemoved(object parent)
{
base.OnRemoved(parent);
if (Charges == 0)
StopTimer();
}
public override int BasePhysicalResistance { get { return 15; } }
public override int BaseFireResistance { get { return 15; } }
public override int BaseColdResistance { get { return 15; } }
public override int BasePoisonResistance { get { return 15; } }
public override int BaseEnergyResistance { get { return 15; } }
public override int InitMinHits { get { return 255; } }
public override int InitMaxHits { get { return 255; } }
public override void AddWeightProperty(ObjectPropertyList list)
{
base.AddWeightProperty(list);
list.Add(1158732, Charges.ToString()); // Meteor Breath Charges: ~1_VAL~
}
public PendantOfKhalAnkur(Serial serial)
: base(serial)
{
}
private Timer m_Timer;
public virtual void StartTimer()
{
ChargeTime = 300;
if (m_Timer == null || !m_Timer.Running)
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), new TimerCallback(Slice));
}
public virtual void StopTimer()
{
if (m_Timer != null)
m_Timer.Stop();
m_Timer = null;
}
public virtual void Slice()
{
if (ChargeTime > 0)
ChargeTime--;
else
{
ChargeTime = 0;
Charges = 1;
StopTimer();
}
}
public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
writer.Write((int)m_Charges);
writer.Write((int)ChargeTime);
}
public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
m_Charges = reader.ReadInt();
ChargeTime = reader.ReadInt();
if (Parent != null && Parent is Mobile && ChargeTime > 0)
m_Timer = Timer.DelayCall(TimeSpan.FromSeconds(1), TimeSpan.FromSeconds(1), new TimerCallback(Slice));
}
}
}

View File

@@ -0,0 +1,211 @@
using System;
using System.Collections.Generic;
using Server.Mobiles;
namespace Server.Items
{
public class PotionOfGloriousFortune : Item
{
public override int LabelNumber { get { return 1158688; } } // Potion of Glorious Fortune
public static int Bonus = 400;
[Constructable]
public PotionOfGloriousFortune()
: base(0xA1E6)
{
Hue = 1195;
LootType = LootType.Blessed;
}
public override void OnDoubleClick(Mobile m)
{
if (IsChildOf(m.Backpack))
{
if (TryAddEffects(m))
{
Consume();
}
}
}
public PotionOfGloriousFortune(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 static Dictionary<Mobile, DateTime> Table { get; set; }
public static Timer Timer { get; set; }
public static void OnTick()
{
if (Table == null)
{
return;
}
var list = new List<Mobile>(Table.Keys);
foreach(var m in list)
{
UnderEffects(m);
}
ColUtility.Free(list);
}
public static int GetBonus(Mobile m)
{
if (UnderEffects(m))
{
return (int)(Bonus / 100);
}
return 1;
}
public static bool TryAddEffects(Mobile m)
{
if (Table == null)
{
Table = new Dictionary<Mobile, DateTime>();
}
if (!UnderEffects(m))
{
Table[m] = DateTime.UtcNow + TimeSpan.FromHours(1);
m.SendLocalizedMessage(1158719); // You are now under the effect of the Potion of Glorious Fortune.
BuffInfo.AddBuff(m, new BuffInfo(BuffIcon.PotionGloriousFortune, 1158688, 1158720, TimeSpan.FromMinutes(60), m, Bonus.ToString(), true));
m.FixedEffect(0x375A, 10, 15);
m.PlaySound(0x1E7);
if (Timer == null)
{
Timer = Timer.DelayCall(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), OnTick);
Timer.Start();
}
return true;
}
else
{
m.SendLocalizedMessage(1158718); // You are already under the effect of the Potion of Glorious Fortune.
}
return false;
}
public static bool UnderEffects(Mobile m)
{
if (Table != null && Table.ContainsKey(m))
{
if (Table[m] < DateTime.UtcNow)
{
ExpireBuff(m);
return false;
}
return true;
}
return false;
}
public static void ExpireBuff(Mobile m)
{
Table.Remove(m);
if (Table.Count == 0)
{
Table = null;
if (Timer != null)
{
Timer.Stop();
Timer = null;
}
}
}
public static void Save(GenericWriter writer)
{
writer.Write(0);
writer.Write(Table == null ? 0 : Table.Count);
if (Table != null)
{
foreach (var kpv in Table)
{
writer.Write(kpv.Key);
writer.Write(kpv.Value);
}
}
}
public static void Load(GenericReader reader)
{
reader.ReadInt(); // version
int count = reader.ReadInt();
for (int i = 0; i < count; i++)
{
var bc = reader.ReadMobile();
var dt = reader.ReadDateTime();
if (bc != null && dt > DateTime.UtcNow)
{
if (Table == null)
Table = new Dictionary<Mobile, DateTime>();
Table[bc] = dt;
if (Timer == null)
{
Timer = Timer.DelayCall(TimeSpan.FromSeconds(5), TimeSpan.FromSeconds(5), OnTick);
Timer.Start();
}
}
}
}
public static void Initialize()
{
EventSink.Login += OnLogin;
}
public static void OnLogin(LoginEventArgs e)
{
var pm = e.Mobile as PlayerMobile;
if (pm != null)
{
if (Table != null && UnderEffects(pm))
{
BuffInfo.AddBuff(pm, new BuffInfo(BuffIcon.PotionGloriousFortune, 1158688, 1158720, Table[pm] - DateTime.UtcNow, pm, Bonus.ToString(), true));
}
}
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
public class ProphetTitleDeed : BaseRewardTitleDeed
{
public override TextDefinition Title { get { return 1158683; } } // Prophet
[Constructable]
public ProphetTitleDeed()
{
}
public ProphetTitleDeed(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 v = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
public class SeekerOfTheFallenStarTitleDeed : BaseRewardTitleDeed
{
public override TextDefinition Title { get { return 1158682; } } // Seeker of the Fallen Star
[Constructable]
public SeekerOfTheFallenStarTitleDeed()
{
}
public SeekerOfTheFallenStarTitleDeed(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 v = reader.ReadInt();
}
}
}

View File

@@ -0,0 +1,78 @@
using System;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
namespace Server.Items
{
public class SterlingSilverRing : SilverRing
{
public override bool IsArtifact { get { return true; } }
public override int LabelNumber { get { return 1155606; } } // Stirling Silver Ring
public override int InitMinHits { get { return 255; } }
public override int InitMaxHits { get { return 255; } }
public bool HasSkillBonus
{
get { return SkillBonuses.Skill_1_Value != 0; }
}
[Constructable]
public SterlingSilverRing()
{
Attributes.RegenHits = 3;
Attributes.RegenMana = 5;
Attributes.WeaponDamage = 75;
}
public override void OnDoubleClick(Mobile m)
{
if (IsChildOf(m.Backpack) && m is PlayerMobile && !HasSkillBonus)
{
BaseGump.SendGump(new ApplySkillBonusGump((PlayerMobile)m, SkillBonuses, Skills, 20, 0));
}
else
{
base.OnDoubleClick(m);
}
}
public override void GetProperties(ObjectPropertyList list)
{
base.GetProperties(list);
if (!HasSkillBonus)
{
list.Add(1155609); // Double Click to Set Skill Bonus
}
}
public static SkillName[] Skills =
{
SkillName.Archery,
SkillName.Fencing,
SkillName.Macing,
SkillName.Swords,
SkillName.Throwing,
SkillName.Wrestling
};
public SterlingSilverRing(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
}
}
}

View File

@@ -0,0 +1,32 @@
using System;
using Server.Mobiles;
namespace Server.Items
{
public class ZealotOfKhalAnkurTitleDeed : BaseRewardTitleDeed
{
public override TextDefinition Title { get { return 1158684; } } // Zealot of Khal Ankur
[Constructable]
public ZealotOfKhalAnkurTitleDeed()
{
}
public ZealotOfKhalAnkurTitleDeed(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 v = reader.ReadInt();
}
}
}