Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
83
Scripts/Items/Resource/AbyssalCloth.cs
Normal file
83
Scripts/Items/Resource/AbyssalCloth.cs
Normal file
@@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1765, 0x1767)]
|
||||
public class AbyssalCloth : Item, ICommodity, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public AbyssalCloth()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AbyssalCloth(int amount)
|
||||
: base(0x1767)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Hue = 2075;
|
||||
}
|
||||
|
||||
public AbyssalCloth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113350;
|
||||
}
|
||||
}// abyssal cloth
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
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 override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = (this.Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
from.Send(new MessageLocalized(this.Serial, this.ItemID, MessageType.Regular, 0x3B2, 3, number, "", this.Amount.ToString()));
|
||||
}
|
||||
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
base.ScissorHelper(from, new Bandage(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/Amber.cs
Normal file
50
Scripts/Items/Resource/Amber.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Amber : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Amber()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Amber(int amount)
|
||||
: base(0xF25)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Amber(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/Amethyst.cs
Normal file
47
Scripts/Items/Resource/Amethyst.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Amethyst : Item, IGem
|
||||
{
|
||||
[Constructable]
|
||||
public Amethyst()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Amethyst(int amount)
|
||||
: base(0xF16)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Amethyst(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resource/AnimalPheromone.cs
Normal file
39
Scripts/Items/Resource/AnimalPheromone.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AnimalPheromone : Item
|
||||
{
|
||||
[Constructable]
|
||||
public AnimalPheromone()
|
||||
: base(0x182F)
|
||||
{
|
||||
}
|
||||
|
||||
public AnimalPheromone(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1071200;
|
||||
}
|
||||
}// animal pheromone
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
245
Scripts/Items/Resource/ArcaneGem.cs
Normal file
245
Scripts/Items/Resource/ArcaneGem.cs
Normal file
@@ -0,0 +1,245 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ArcaneGem : Item, ICommodity
|
||||
{
|
||||
public const int DefaultArcaneHue = 2117;
|
||||
public override int LabelNumber {get {return 1114115;} } // Arcane Gem
|
||||
|
||||
[Constructable]
|
||||
public ArcaneGem()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcaneGem(int amount)
|
||||
: base(0x1EA7)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ArcaneGem(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public static bool ConsumeCharges(Mobile from, int amount)
|
||||
{
|
||||
List<Item> items = from.Items;
|
||||
int avail = 0;
|
||||
|
||||
for (int i = 0; i < items.Count; ++i)
|
||||
{
|
||||
Item obj = items[i];
|
||||
|
||||
if (obj is IArcaneEquip)
|
||||
{
|
||||
IArcaneEquip eq = (IArcaneEquip)obj;
|
||||
|
||||
if (eq.IsArcane)
|
||||
avail += eq.CurArcaneCharges;
|
||||
}
|
||||
}
|
||||
|
||||
if (avail < amount)
|
||||
return false;
|
||||
|
||||
for (int i = 0; i < items.Count; ++i)
|
||||
{
|
||||
Item obj = items[i];
|
||||
|
||||
if (obj is IArcaneEquip)
|
||||
{
|
||||
IArcaneEquip eq = (IArcaneEquip)obj;
|
||||
|
||||
if (eq.IsArcane)
|
||||
{
|
||||
if (eq.CurArcaneCharges > amount)
|
||||
{
|
||||
eq.CurArcaneCharges -= amount;
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
amount -= eq.CurArcaneCharges;
|
||||
eq.CurArcaneCharges = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.BeginTarget(2, false, TargetFlags.None, new TargetCallback(OnTarget));
|
||||
}
|
||||
}
|
||||
|
||||
public int GetChargesFor(Mobile m)
|
||||
{
|
||||
int v = (int)(m.Skills[SkillName.Tailoring].Value / 5);
|
||||
|
||||
if (v < 16)
|
||||
return 16;
|
||||
else if (v > 24)
|
||||
return 24;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
public void OnTarget(Mobile from, object obj)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042010); // You must have the object in your backpack to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is IArcaneEquip && obj is Item)
|
||||
{
|
||||
Item item = (Item)obj;
|
||||
CraftResource resource = CraftResource.None;
|
||||
|
||||
if (item is BaseClothing)
|
||||
resource = ((BaseClothing)item).Resource;
|
||||
else if (item is BaseArmor)
|
||||
resource = ((BaseArmor)item).Resource;
|
||||
else if (item is BaseWeapon) // Sanity, weapons cannot recieve gems...
|
||||
resource = ((BaseWeapon)item).Resource;
|
||||
|
||||
IArcaneEquip eq = (IArcaneEquip)obj;
|
||||
|
||||
if (!item.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendMessage("You may only target items in your backpack.");
|
||||
return;
|
||||
}
|
||||
|
||||
int charges = GetChargesFor(from);
|
||||
|
||||
if (eq.IsArcane)
|
||||
{
|
||||
if (eq.CurArcaneCharges > 0)
|
||||
{
|
||||
from.SendMessage("This item still has charges left.");
|
||||
}
|
||||
else
|
||||
{
|
||||
item.Hue = eq.TempHue;
|
||||
|
||||
if (charges >= eq.MaxArcaneCharges)
|
||||
{
|
||||
eq.CurArcaneCharges = eq.MaxArcaneCharges;
|
||||
from.SendMessage("Your skill in tailoring allows you to fully recharge the item.");
|
||||
}
|
||||
else
|
||||
{
|
||||
eq.CurArcaneCharges += charges;
|
||||
from.SendMessage("You are only able to restore some of the charges.");
|
||||
|
||||
}
|
||||
|
||||
Consume();
|
||||
}
|
||||
}
|
||||
else if (from.Skills[SkillName.Tailoring].Value >= 60.0)
|
||||
{
|
||||
bool isExceptional = false;
|
||||
|
||||
if (item is BaseClothing)
|
||||
isExceptional = ((BaseClothing)item).Quality == ItemQuality.Exceptional;
|
||||
else if (item is BaseArmor)
|
||||
isExceptional = ((BaseArmor)item).Quality == ItemQuality.Exceptional;
|
||||
else if (item is BaseWeapon)
|
||||
isExceptional = ((BaseWeapon)item).Quality == ItemQuality.Exceptional;
|
||||
|
||||
if (isExceptional)
|
||||
{
|
||||
if (item is BaseClothing)
|
||||
{
|
||||
BaseClothing cloth = item as BaseClothing;
|
||||
|
||||
cloth.Quality = ItemQuality.Normal;
|
||||
cloth.Crafter = from;
|
||||
}
|
||||
else if (item is BaseArmor)
|
||||
{
|
||||
BaseArmor armor = item as BaseArmor;
|
||||
|
||||
if (armor.IsImbued || armor.IsArtifact || RunicReforging.GetArtifactRarity(armor) > 0)
|
||||
{
|
||||
from.SendLocalizedMessage(1049690); // Arcane gems cannot be used on that type of leather.
|
||||
return;
|
||||
}
|
||||
|
||||
armor.Quality = ItemQuality.Normal;
|
||||
armor.Crafter = from;
|
||||
armor.PhysicalBonus = 0;
|
||||
armor.FireBonus = 0;
|
||||
armor.ColdBonus = 0;
|
||||
armor.PoisonBonus = 0;
|
||||
armor.EnergyBonus = 0;
|
||||
}
|
||||
else if (item is BaseWeapon) // Sanity, weapons cannot recieve gems...
|
||||
{
|
||||
BaseWeapon weapon = item as BaseWeapon;
|
||||
|
||||
weapon.Quality = ItemQuality.Normal;
|
||||
weapon.Crafter = from;
|
||||
}
|
||||
|
||||
eq.CurArcaneCharges = eq.MaxArcaneCharges = charges;
|
||||
|
||||
item.Hue = DefaultArcaneHue;
|
||||
|
||||
if (item.LootType == LootType.Blessed)
|
||||
item.LootType = LootType.Regular;
|
||||
|
||||
Consume();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("You can only use this on exceptionally crafted robes, thigh boots, cloaks, or leather gloves.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("You do not have enough skill in tailoring to use this.");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendMessage("You can only use this on exceptionally crafted robes, thigh boots, cloaks, or leather gloves.");
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/ArcanicRuneStone.cs
Normal file
50
Scripts/Items/Resource/ArcanicRuneStone.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ArcanicRuneStone : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public ArcanicRuneStone()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcanicRuneStone(int amount)
|
||||
: base(0x573C)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public ArcanicRuneStone(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113352;
|
||||
}
|
||||
}// arcanic rune stone
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Scripts/Items/Resource/Arrow.cs
Normal file
61
Scripts/Items/Resource/Arrow.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Arrow : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Arrow()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Arrow(int amount)
|
||||
: base(0xF3F)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Arrow(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/Axle.cs
Normal file
42
Scripts/Items/Resource/Axle.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x105B, 0x105C)]
|
||||
public class Axle : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Axle()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Axle(int amount)
|
||||
: base(0x105B)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public Axle(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/AxleGears.cs
Normal file
42
Scripts/Items/Resource/AxleGears.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x1051, 0x1052)]
|
||||
public class AxleGears : Item
|
||||
{
|
||||
[Constructable]
|
||||
public AxleGears()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AxleGears(int amount)
|
||||
: base(0x1051)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public AxleGears(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
778
Scripts/Items/Resource/Bandage.cs
Normal file
778
Scripts/Items/Resource/Bandage.cs
Normal file
@@ -0,0 +1,778 @@
|
||||
#region References
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using Server.Factions;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Engines.Despise;
|
||||
using Server.Services.Virtues;
|
||||
#endregion
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bandage : Item, IDyable, ICommodity
|
||||
{
|
||||
public static void Initialize()
|
||||
{
|
||||
EventSink.BandageTargetRequest += BandageTargetRequest;
|
||||
}
|
||||
|
||||
public static int Range = (Core.AOS ? 2 : 1);
|
||||
|
||||
public override double DefaultWeight { get { return 0.1; } }
|
||||
|
||||
[Constructable]
|
||||
public Bandage()
|
||||
: this(1)
|
||||
{ }
|
||||
|
||||
[Constructable]
|
||||
public Bandage(int amount)
|
||||
: base(0xE21)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bandage(Serial serial)
|
||||
: base(serial)
|
||||
{ }
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public virtual bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (Deleted)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), Range))
|
||||
{
|
||||
from.RevealingAction();
|
||||
|
||||
from.SendLocalizedMessage(500948); // Who will you use the bandages on?
|
||||
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
|
||||
public static void BandageTargetRequest(BandageTargetRequestEventArgs e)
|
||||
{
|
||||
BandageTargetRequest(e.Bandage as Bandage, e.Mobile, e.Target);
|
||||
}
|
||||
|
||||
public static void BandageTargetRequest(Bandage bandage, Mobile from, Mobile target)
|
||||
{
|
||||
if (bandage == null || bandage.Deleted)
|
||||
return;
|
||||
|
||||
if (from.InRange(bandage.GetWorldLocation(), Range))
|
||||
{
|
||||
Target t = from.Target;
|
||||
|
||||
if (t != null)
|
||||
{
|
||||
Target.Cancel(from);
|
||||
from.Target = null;
|
||||
}
|
||||
|
||||
from.RevealingAction();
|
||||
from.SendLocalizedMessage(500948); // Who will you use the bandages on?
|
||||
|
||||
new InternalTarget(bandage).Invoke(from, target);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly Bandage m_Bandage;
|
||||
|
||||
public InternalTarget(Bandage bandage)
|
||||
: base(Bandage.Range, false, TargetFlags.Beneficial)
|
||||
{
|
||||
m_Bandage = bandage;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Bandage.Deleted)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (targeted is Mobile)
|
||||
{
|
||||
if (from.InRange(m_Bandage.GetWorldLocation(), Bandage.Range))
|
||||
{
|
||||
if (BandageContext.BeginHeal(from, (Mobile)targeted, m_Bandage is EnhancedBandage) != null)
|
||||
{
|
||||
NegativeAttributes.OnCombatAction(from);
|
||||
m_Bandage.Consume();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500295); // You are too far away to do that.
|
||||
}
|
||||
}
|
||||
else if (targeted is PlagueBeastInnard)
|
||||
{
|
||||
if (((PlagueBeastInnard)targeted).OnBandage(from))
|
||||
{
|
||||
NegativeAttributes.OnCombatAction(from);
|
||||
m_Bandage.Consume();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(500970); // Bandages can not be used on that.
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnNonlocalTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (targeted is PlagueBeastInnard)
|
||||
{
|
||||
if (((PlagueBeastInnard)targeted).OnBandage(from))
|
||||
{
|
||||
m_Bandage.Consume();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
base.OnNonlocalTarget(from, targeted);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BandageContext
|
||||
{
|
||||
private readonly Mobile m_Healer;
|
||||
private readonly Mobile m_Patient;
|
||||
private int m_Slips;
|
||||
private int m_HealedPoisonOrBleed;
|
||||
private Timer m_Timer;
|
||||
private int m_HealingBonus;
|
||||
|
||||
public Mobile Healer { get { return m_Healer; } }
|
||||
public Mobile Patient { get { return m_Patient; } }
|
||||
public int Slips { get { return m_Slips; } set { m_Slips = value; } }
|
||||
public int HealedPoisonOrBleed { get { return m_HealedPoisonOrBleed; } set { m_HealedPoisonOrBleed = value; } }
|
||||
public Timer Timer { get { return m_Timer; } }
|
||||
public int HealingBonus { get { return m_HealingBonus; } }
|
||||
|
||||
public void Slip()
|
||||
{
|
||||
m_Healer.SendLocalizedMessage(500961); // Your fingers slip!
|
||||
++m_Slips;
|
||||
}
|
||||
|
||||
public BandageContext(Mobile healer, Mobile patient, TimeSpan delay)
|
||||
: this(healer, patient, delay, false)
|
||||
{ }
|
||||
|
||||
public BandageContext(Mobile healer, Mobile patient, TimeSpan delay, bool enhanced)
|
||||
{
|
||||
m_Healer = healer;
|
||||
m_Patient = patient;
|
||||
|
||||
if (enhanced)
|
||||
m_HealingBonus += EnhancedBandage.HealingBonus;
|
||||
|
||||
m_Timer = new InternalTimer(this, delay);
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public void StopHeal()
|
||||
{
|
||||
m_Table.Remove(m_Healer);
|
||||
|
||||
if (m_Timer != null)
|
||||
{
|
||||
m_Timer.Stop();
|
||||
}
|
||||
|
||||
m_Timer = null;
|
||||
}
|
||||
|
||||
private static readonly Dictionary<Mobile, BandageContext> m_Table = new Dictionary<Mobile, BandageContext>();
|
||||
|
||||
public static BandageContext GetContext(Mobile healer)
|
||||
{
|
||||
BandageContext bc = null;
|
||||
m_Table.TryGetValue(healer, out bc);
|
||||
return bc;
|
||||
}
|
||||
|
||||
public static SkillName GetPrimarySkill(Mobile healer, Mobile m)
|
||||
{
|
||||
if (m is DespiseCreature)
|
||||
{
|
||||
return healer.Skills[SkillName.Healing].Value > healer.Skills[SkillName.Veterinary].Value ? SkillName.Healing : SkillName.Veterinary;
|
||||
}
|
||||
|
||||
if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal))
|
||||
{
|
||||
return SkillName.Veterinary;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SkillName.Healing;
|
||||
}
|
||||
}
|
||||
|
||||
public static SkillName GetSecondarySkill(Mobile healer, Mobile m)
|
||||
{
|
||||
if (m is DespiseCreature)
|
||||
{
|
||||
return healer.Skills[SkillName.Healing].Value > healer.Skills[SkillName.Veterinary].Value ? SkillName.Anatomy : SkillName.AnimalLore;
|
||||
}
|
||||
|
||||
if (!m.Player && (m.Body.IsMonster || m.Body.IsAnimal))
|
||||
{
|
||||
return SkillName.AnimalLore;
|
||||
}
|
||||
else
|
||||
{
|
||||
return SkillName.Anatomy;
|
||||
}
|
||||
}
|
||||
|
||||
public void CheckPoisonOrBleed()
|
||||
{
|
||||
bool bleeding = BleedAttack.IsBleeding(m_Patient);
|
||||
bool poisoned = m_Patient.Poisoned;
|
||||
|
||||
if (bleeding || poisoned)
|
||||
{
|
||||
double healing = m_Healer.Skills[SkillName.Healing].Value;
|
||||
double anatomy = m_Healer.Skills[SkillName.Anatomy].Value;
|
||||
double chance = ((healing + anatomy) - 120) * 25;
|
||||
|
||||
if (poisoned)
|
||||
chance /= m_Patient.Poison.RealLevel * 20;
|
||||
else
|
||||
chance /= 3 * 20;
|
||||
|
||||
if (chance >= Utility.Random(100))
|
||||
{
|
||||
m_HealedPoisonOrBleed = poisoned ? m_Patient.Poison.RealLevel : 3;
|
||||
|
||||
if (poisoned && m_Patient.CurePoison(m_Healer))
|
||||
{
|
||||
m_Patient.SendLocalizedMessage(1010059); // You have been cured of all poisons.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (BleedAttack.IsBleeding(m_Patient))
|
||||
{
|
||||
BleedAttack.EndBleed(m_Patient, false);
|
||||
}
|
||||
|
||||
m_Patient.SendLocalizedMessage(1060088); // You bind the wound and stop the bleeding
|
||||
m_Patient.SendLocalizedMessage(1060167); // The bleeding wounds have healed, you are no longer bleeding!
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EndHeal()
|
||||
{
|
||||
StopHeal();
|
||||
|
||||
int healerNumber = -1, patientNumber = -1;
|
||||
bool playSound = true;
|
||||
bool checkSkills = false;
|
||||
|
||||
SkillName primarySkill = GetPrimarySkill(m_Healer, m_Patient);
|
||||
SkillName secondarySkill = GetSecondarySkill(m_Healer, m_Patient);
|
||||
|
||||
BaseCreature petPatient = m_Patient as BaseCreature;
|
||||
|
||||
if (!m_Healer.Alive)
|
||||
{
|
||||
healerNumber = 500962; // You were unable to finish your work before you died.
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if (!m_Healer.InRange(m_Patient, Bandage.Range))
|
||||
{
|
||||
healerNumber = 500963; // You did not stay close enough to heal your target.
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if (!m_Patient.Alive || (petPatient != null && petPatient.IsDeadPet))
|
||||
{
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
double chance = ((healing - 68.0) / 50.0) - (m_Slips * 0.02);
|
||||
|
||||
if (((checkSkills = (healing >= 80.0 && anatomy >= 80.0)) && chance > Utility.RandomDouble()) ||
|
||||
(Core.SE && petPatient is FactionWarHorse && petPatient.ControlMaster == m_Healer) ||
|
||||
(Server.Engines.VvV.ViceVsVirtueSystem.Enabled && petPatient is Server.Engines.VvV.VvVMount && petPatient.ControlMaster == m_Healer))
|
||||
//TODO: Dbl check doesn't check for faction of the horse here?
|
||||
{
|
||||
if (m_Patient.Map == null || !m_Patient.Map.CanFit(m_Patient.Location, 16, false, false))
|
||||
{
|
||||
healerNumber = 501042; // Target can not be resurrected at that location.
|
||||
patientNumber = 502391; // Thou can not be resurrected there!
|
||||
}
|
||||
else if (m_Patient.Region != null && m_Patient.Region.IsPartOf("Khaldun"))
|
||||
{
|
||||
healerNumber = 1010395; // The veil of death in this area is too strong and resists thy efforts to restore life.
|
||||
patientNumber = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 500965; // You are able to resurrect your patient.
|
||||
patientNumber = -1;
|
||||
|
||||
m_Patient.PlaySound(0x214);
|
||||
m_Patient.FixedEffect(0x376A, 10, 16);
|
||||
|
||||
if (petPatient != null && petPatient.IsDeadPet)
|
||||
{
|
||||
Mobile master = petPatient.ControlMaster;
|
||||
|
||||
if (master != null && m_Healer == master)
|
||||
{
|
||||
petPatient.ResurrectPet();
|
||||
|
||||
for (int i = 0; i < petPatient.Skills.Length; ++i)
|
||||
{
|
||||
petPatient.Skills[i].Base -= 0.1;
|
||||
}
|
||||
}
|
||||
else if (master != null && master.InRange(petPatient, 3))
|
||||
{
|
||||
healerNumber = 1049658; // The owner has been asked to sanctify the resurrection.
|
||||
|
||||
master.CloseGump(typeof(PetResurrectGump));
|
||||
master.SendGump(new PetResurrectGump(m_Healer, petPatient));
|
||||
}
|
||||
else
|
||||
{
|
||||
bool found = false;
|
||||
|
||||
var friends = petPatient.Friends;
|
||||
|
||||
for (int i = 0; friends != null && i < friends.Count; ++i)
|
||||
{
|
||||
Mobile friend = friends[i];
|
||||
|
||||
if (friend.InRange(petPatient, 3))
|
||||
{
|
||||
healerNumber = 1049658; // The owner has been asked to sanctify the resurrection.
|
||||
|
||||
friend.CloseGump(typeof(PetResurrectGump));
|
||||
friend.SendGump(new PetResurrectGump(m_Healer, petPatient));
|
||||
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!found)
|
||||
{
|
||||
healerNumber = 1049659; // Neither the owner or friends of the pet are nearby to sanctify the resurrection.
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Patient.CloseGump(typeof(ResurrectGump));
|
||||
m_Patient.SendGump(new ResurrectGump(m_Patient, m_Healer));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (petPatient != null && petPatient.IsDeadPet)
|
||||
{
|
||||
healerNumber = 503256; // You fail to resurrect the creature.
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 500966; // You are unable to resurrect your patient.
|
||||
}
|
||||
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else if (m_Patient.Poisoned)
|
||||
{
|
||||
m_Healer.SendLocalizedMessage(500969); // You finish applying the bandages.
|
||||
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
double chance = ((healing - 30.0) / 50.0) - (m_Patient.Poison.RealLevel * 0.1) - (m_Slips * 0.02);
|
||||
|
||||
if ((checkSkills = (healing >= 60.0 && anatomy >= 60.0)) && chance > Utility.RandomDouble())
|
||||
{
|
||||
if (m_Patient.CurePoison(m_Healer))
|
||||
{
|
||||
healerNumber = (m_Healer == m_Patient) ? -1 : 1010058; // You have cured the target of all poisons.
|
||||
patientNumber = 1010059; // You have been cured of all poisons.
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = -1;
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 1010060; // You have failed to cure your target!
|
||||
patientNumber = -1;
|
||||
}
|
||||
}
|
||||
else if (BleedAttack.IsBleeding(m_Patient))
|
||||
{
|
||||
healerNumber = 1060088; // You bind the wound and stop the bleeding
|
||||
patientNumber = 1060167; // The bleeding wounds have healed, you are no longer bleeding!
|
||||
|
||||
BleedAttack.EndBleed(m_Patient, false);
|
||||
}
|
||||
else if (MortalStrike.IsWounded(m_Patient))
|
||||
{
|
||||
healerNumber = (m_Healer == m_Patient ? 1005000 : 1010398);
|
||||
patientNumber = -1;
|
||||
playSound = false;
|
||||
}
|
||||
else if (m_Patient.Hits == m_Patient.HitsMax)
|
||||
{
|
||||
healerNumber = 500967; // You heal what little damage your patient had.
|
||||
patientNumber = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
checkSkills = true;
|
||||
patientNumber = -1;
|
||||
|
||||
double healing = m_Healer.Skills[primarySkill].Value;
|
||||
double anatomy = m_Healer.Skills[secondarySkill].Value;
|
||||
|
||||
FirstAidBelt belt = m_Healer.FindItemOnLayer(Layer.Waist) as FirstAidBelt;
|
||||
|
||||
if (belt != null)
|
||||
m_HealingBonus += belt.HealingBonus;
|
||||
|
||||
Item item = m_Healer.FindItemOnLayer(Layer.TwoHanded);
|
||||
|
||||
if (item is Asclepius || item is GargishAsclepius)
|
||||
m_HealingBonus += 15;
|
||||
|
||||
if (m_HealingBonus > 0)
|
||||
healing += m_HealingBonus;
|
||||
|
||||
double chance = ((healing + 10.0) / 100.0) - (m_Slips * 0.02);
|
||||
|
||||
if (chance > Utility.RandomDouble())
|
||||
{
|
||||
healerNumber = 500969; // You finish applying the bandages.
|
||||
|
||||
double min, max;
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
min = (anatomy / 8.0) + (healing / 5.0) + 4.0;
|
||||
max = (anatomy / 6.0) + (healing / 2.5) + 4.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
min = (anatomy / 5.0) + (healing / 5.0) + 3.0;
|
||||
max = (anatomy / 5.0) + (healing / 2.0) + 10.0;
|
||||
}
|
||||
|
||||
double toHeal = min + (Utility.RandomDouble() * (max - min));
|
||||
|
||||
if (m_Patient.Body.IsMonster || m_Patient.Body.IsAnimal)
|
||||
{
|
||||
toHeal += m_Patient.HitsMax / 100;
|
||||
}
|
||||
|
||||
if (Core.AOS)
|
||||
{
|
||||
toHeal -= toHeal * m_Slips * 0.35; // TODO: Verify algorithm
|
||||
}
|
||||
else
|
||||
{
|
||||
toHeal -= m_Slips * 4;
|
||||
}
|
||||
|
||||
#region City Loyalty
|
||||
if (Server.Engines.CityLoyalty.CityLoyaltySystem.HasTradeDeal(m_Healer, Server.Engines.CityLoyalty.TradeDeal.GuildOfHealers))
|
||||
toHeal += (int)Math.Ceiling(toHeal * 0.05);
|
||||
#endregion
|
||||
|
||||
if (m_HealedPoisonOrBleed > 0)
|
||||
{
|
||||
toHeal /= m_HealedPoisonOrBleed;
|
||||
}
|
||||
|
||||
if (SearingWounds.IsUnderEffects(m_Patient))
|
||||
{
|
||||
toHeal /= 2;
|
||||
m_Patient.SendLocalizedMessage(1151178); // The cauterized wound resists some of your healing.
|
||||
}
|
||||
|
||||
if (toHeal < 1)
|
||||
{
|
||||
toHeal = 1;
|
||||
healerNumber = 500968; // You apply the bandages, but they barely help.
|
||||
}
|
||||
else if (m_Patient != m_Healer && m_Patient is PlayerMobile && m_Healer is PlayerMobile)
|
||||
{
|
||||
SpiritualityVirtue.OnHeal(m_Healer, Math.Min((int)toHeal, m_Patient.HitsMax - m_Patient.Hits));
|
||||
}
|
||||
|
||||
m_Patient.Heal((int)toHeal, m_Healer, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
healerNumber = 500968; // You apply the bandages, but they barely help.
|
||||
playSound = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (healerNumber != -1)
|
||||
{
|
||||
m_Healer.SendLocalizedMessage(healerNumber);
|
||||
}
|
||||
|
||||
if (patientNumber != -1)
|
||||
{
|
||||
m_Patient.SendLocalizedMessage(patientNumber);
|
||||
}
|
||||
|
||||
if (playSound)
|
||||
{
|
||||
m_Patient.PlaySound(0x57);
|
||||
}
|
||||
|
||||
if (checkSkills)
|
||||
{
|
||||
m_Healer.CheckSkill(secondarySkill, 0.0, 120.0);
|
||||
m_Healer.CheckSkill(primarySkill, 0.0, 120.0);
|
||||
}
|
||||
|
||||
if (m_Patient is PlayerMobile)
|
||||
BuffInfo.RemoveBuff(m_Healer, BuffIcon.Healing);
|
||||
else
|
||||
BuffInfo.RemoveBuff(m_Healer, BuffIcon.Veterinary);
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private BandageContext m_Context;
|
||||
private long m_Begin;
|
||||
private long m_Expires;
|
||||
private bool m_CheckedHealAndBleed;
|
||||
|
||||
public bool CanCheckAtHalf
|
||||
{
|
||||
get
|
||||
{
|
||||
return Core.SA &&
|
||||
m_Context != null && m_Context.Healer == m_Context.Patient &&
|
||||
m_Context.Healer.Skills[SkillName.Healing].Value >= 80 &&
|
||||
m_Context.Healer.Skills[SkillName.Anatomy].Value >= 80;
|
||||
}
|
||||
}
|
||||
|
||||
public InternalTimer(BandageContext context, TimeSpan delay)
|
||||
: base(TimeSpan.FromMilliseconds(250), TimeSpan.FromMilliseconds(250))
|
||||
{
|
||||
m_Context = context;
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
|
||||
m_Begin = Core.TickCount;
|
||||
m_Expires = Core.TickCount + (int)delay.TotalMilliseconds;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (Core.TickCount >= m_Expires)
|
||||
{
|
||||
m_Context.EndHeal();
|
||||
Stop();
|
||||
}
|
||||
else if (!m_CheckedHealAndBleed && CanCheckAtHalf && m_Begin + ((m_Expires - m_Begin) / 2) < Core.TickCount)
|
||||
{
|
||||
m_Context.CheckPoisonOrBleed();
|
||||
m_CheckedHealAndBleed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static BandageContext BeginHeal(Mobile healer, Mobile patient)
|
||||
{
|
||||
return BeginHeal(healer, patient, false);
|
||||
}
|
||||
|
||||
public static BandageContext BeginHeal(Mobile healer, Mobile patient, bool enhanced)
|
||||
{
|
||||
bool isDeadPet = (patient is BaseCreature && ((BaseCreature)patient).IsDeadPet);
|
||||
|
||||
if (patient is IRepairableMobile)
|
||||
{
|
||||
healer.SendLocalizedMessage(500970); // Bandages cannot be used on that.
|
||||
}
|
||||
else if (patient is BaseCreature && ((BaseCreature)patient).IsAnimatedDead)
|
||||
{
|
||||
healer.SendLocalizedMessage(500951); // You cannot heal that.
|
||||
}
|
||||
else if (!patient.Poisoned && patient.Hits == patient.HitsMax && !BleedAttack.IsBleeding(patient) && !isDeadPet)
|
||||
{
|
||||
healer.SendLocalizedMessage(500955); // That being is not damaged!
|
||||
}
|
||||
else if (!patient.Alive && (patient.Map == null || !patient.Map.CanFit(patient.Location, 16, false, false)))
|
||||
{
|
||||
healer.SendLocalizedMessage(501042); // Target cannot be resurrected at that location.
|
||||
}
|
||||
else if (healer.CanBeBeneficial(patient, true, true))
|
||||
{
|
||||
healer.DoBeneficial(patient);
|
||||
|
||||
BandageContext context = GetContext(healer);
|
||||
|
||||
if (context != null)
|
||||
{
|
||||
context.StopHeal();
|
||||
}
|
||||
|
||||
var delay = GetDelay(healer, patient);
|
||||
|
||||
if (patient is PlayerMobile)
|
||||
BuffInfo.AddBuff(healer, new BuffInfo(BuffIcon.Healing, 1002082, 1151400, delay, healer, String.Format("{0}", patient.Name)));
|
||||
else
|
||||
BuffInfo.AddBuff(healer, new BuffInfo(BuffIcon.Veterinary, 1002167, 1151400, delay, healer, String.Format("{0}", patient.Name)));
|
||||
|
||||
context = new BandageContext(healer, patient, delay, enhanced);
|
||||
|
||||
m_Table[healer] = context;
|
||||
|
||||
if (healer != patient)
|
||||
{
|
||||
patient.SendLocalizedMessage(1008078, false, healer.Name); // : Attempting to heal you.
|
||||
}
|
||||
|
||||
healer.SendLocalizedMessage(500956); // You begin applying the bandages.
|
||||
|
||||
if (healer.NetState != null && healer.NetState.IsEnhancedClient)
|
||||
{
|
||||
healer.NetState.Send(new BandageTimerPacket((int)delay.TotalSeconds));
|
||||
}
|
||||
|
||||
return context;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public static TimeSpan GetDelay(Mobile healer, Mobile patient)
|
||||
{
|
||||
return GetDelay(healer, patient, !patient.Alive || patient.IsDeadBondedPet);
|
||||
}
|
||||
|
||||
public static TimeSpan GetDelay(Mobile healer, Mobile patient, bool dead)
|
||||
{
|
||||
return GetDelay(healer, patient, dead, GetPrimarySkill(healer, patient));
|
||||
}
|
||||
|
||||
public static TimeSpan GetDelay(Mobile healer, Mobile patient, bool dead, SkillName skill)
|
||||
{
|
||||
var resDelay = dead ? 5.0 : 0.0;
|
||||
|
||||
var dex = healer.Dex;
|
||||
|
||||
double seconds;
|
||||
|
||||
if (healer == patient)
|
||||
{
|
||||
if (Core.AOS)
|
||||
{
|
||||
seconds = Math.Min(8, Math.Ceiling(11.0 - dex / 20));
|
||||
seconds = Math.Max(seconds, 4);
|
||||
}
|
||||
else
|
||||
{
|
||||
seconds = 9.4 + (0.6 * ((double)(120 - dex) / 10));
|
||||
}
|
||||
}
|
||||
else if (Core.AOS && skill == SkillName.Veterinary)
|
||||
{
|
||||
seconds = 2.0;
|
||||
}
|
||||
else if (Core.AOS)
|
||||
{
|
||||
seconds = Math.Ceiling((double)4 - dex / 60);
|
||||
seconds = Math.Max(seconds, 2);
|
||||
}
|
||||
else if (dex >= 100)
|
||||
{
|
||||
seconds = 3.0 + resDelay;
|
||||
}
|
||||
else if (dex >= 40)
|
||||
{
|
||||
seconds = 4.0 + resDelay;
|
||||
}
|
||||
else
|
||||
{
|
||||
seconds = 5.0 + resDelay;
|
||||
}
|
||||
|
||||
return TimeSpan.FromSeconds(seconds);
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class BandageTimerPacket : Packet
|
||||
{
|
||||
public BandageTimerPacket(int duration)
|
||||
: base(0xBF)
|
||||
{
|
||||
EnsureCapacity(15);
|
||||
|
||||
m_Stream.Write((short)0x31);
|
||||
m_Stream.Write((short)0x01);
|
||||
|
||||
m_Stream.Write((int)0xE21);
|
||||
m_Stream.Write(duration);
|
||||
}
|
||||
}
|
||||
}
|
||||
333
Scripts/Items/Resource/BarrelParts.cs
Normal file
333
Scripts/Items/Resource/BarrelParts.cs
Normal file
@@ -0,0 +1,333 @@
|
||||
using System;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BarrelLid : Item, IResource, IQuality
|
||||
{
|
||||
private CraftResource _Resource;
|
||||
private ItemQuality _Quality;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource { get { return _Resource; } set { _Resource = value; Hue = CraftResources.GetHue(_Resource); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ItemQuality Quality { get { return _Quality; } set { _Quality = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool PlayerConstructed { get { return _Resource != CraftResource.None; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelLid()
|
||||
: base(0x1DB8)
|
||||
{
|
||||
Weight = 2;
|
||||
}
|
||||
|
||||
public override void AddCraftedProperties(ObjectPropertyList list)
|
||||
{
|
||||
if (_Quality == ItemQuality.Exceptional)
|
||||
{
|
||||
list.Add(1060636); // Exceptional
|
||||
}
|
||||
}
|
||||
|
||||
public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
|
||||
{
|
||||
Quality = (ItemQuality)quality;
|
||||
|
||||
if (!craftItem.ForceNonExceptional)
|
||||
{
|
||||
if (typeRes == null)
|
||||
typeRes = craftItem.Resources.GetAt(0).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType(typeRes);
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
public BarrelLid(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1);
|
||||
|
||||
writer.Write((int)_Resource);
|
||||
writer.Write((int)_Quality);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_Resource = (CraftResource)reader.ReadInt();
|
||||
_Quality = (ItemQuality)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1EB1, 0x1EB2, 0x1EB3, 0x1EB4)]
|
||||
public class BarrelStaves : Item, IResource, IQuality
|
||||
{
|
||||
private CraftResource _Resource;
|
||||
private ItemQuality _Quality;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource { get { return _Resource; } set { _Resource = value; Hue = CraftResources.GetHue(_Resource); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ItemQuality Quality { get { return _Quality; } set { _Quality = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool PlayerConstructed { get { return _Resource != CraftResource.None; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelStaves()
|
||||
: base(0x1EB1)
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public override void AddCraftedProperties(ObjectPropertyList list)
|
||||
{
|
||||
if (_Quality == ItemQuality.Exceptional)
|
||||
{
|
||||
list.Add(1060636); // Exceptional
|
||||
}
|
||||
}
|
||||
|
||||
public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
|
||||
{
|
||||
Quality = (ItemQuality)quality;
|
||||
|
||||
if (!craftItem.ForceNonExceptional)
|
||||
{
|
||||
if (typeRes == null)
|
||||
typeRes = craftItem.Resources.GetAt(0).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType(typeRes);
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
public BarrelStaves(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1);
|
||||
|
||||
writer.Write((int)_Resource);
|
||||
writer.Write((int)_Quality);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
_Resource = (CraftResource)reader.ReadInt();
|
||||
_Quality = (ItemQuality)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelHoops : Item, IResource, IQuality
|
||||
{
|
||||
private CraftResource _Resource;
|
||||
private ItemQuality _Quality;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource { get { return _Resource; } set { _Resource = value; Hue = CraftResources.GetHue(_Resource); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ItemQuality Quality { get { return _Quality; } set { _Quality = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool PlayerConstructed { get { return _Resource != CraftResource.None; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelHoops()
|
||||
: base(0x1DB7)
|
||||
{
|
||||
Weight = 5;
|
||||
}
|
||||
|
||||
public override void AddCraftedProperties(ObjectPropertyList list)
|
||||
{
|
||||
if (_Quality == ItemQuality.Exceptional)
|
||||
{
|
||||
list.Add(1060636); // Exceptional
|
||||
}
|
||||
}
|
||||
|
||||
public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
|
||||
{
|
||||
Quality = (ItemQuality)quality;
|
||||
|
||||
if (!craftItem.ForceNonExceptional)
|
||||
{
|
||||
if (typeRes == null)
|
||||
typeRes = craftItem.Resources.GetAt(0).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType(typeRes);
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
public BarrelHoops(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1011228;
|
||||
}
|
||||
}// Barrel hoops
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)2);
|
||||
|
||||
writer.Write((int)_Resource);
|
||||
writer.Write((int)_Quality);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
_Resource = (CraftResource)reader.ReadInt();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
_Quality = (ItemQuality)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class BarrelTap : Item, IResource, IQuality
|
||||
{
|
||||
private CraftResource _Resource;
|
||||
private ItemQuality _Quality;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource { get { return _Resource; } set { _Resource = value; Hue = CraftResources.GetHue(_Resource); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public ItemQuality Quality { get { return _Quality; } set { _Quality = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool PlayerConstructed { get { return _Resource != CraftResource.None; } }
|
||||
|
||||
[Constructable]
|
||||
public BarrelTap()
|
||||
: base(0x1004)
|
||||
{
|
||||
Weight = 1;
|
||||
}
|
||||
|
||||
public override void AddCraftedProperties(ObjectPropertyList list)
|
||||
{
|
||||
if (_Quality == ItemQuality.Exceptional)
|
||||
{
|
||||
list.Add(1060636); // Exceptional
|
||||
}
|
||||
}
|
||||
|
||||
public int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
|
||||
{
|
||||
Quality = (ItemQuality)quality;
|
||||
|
||||
if (!craftItem.ForceNonExceptional)
|
||||
{
|
||||
if (typeRes == null)
|
||||
typeRes = craftItem.Resources.GetAt(0).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType(typeRes);
|
||||
}
|
||||
|
||||
return quality;
|
||||
}
|
||||
|
||||
public BarrelTap(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)2);
|
||||
|
||||
writer.Write((int)_Resource);
|
||||
writer.Write((int)_Quality);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch (version)
|
||||
{
|
||||
case 2:
|
||||
{
|
||||
_Resource = (CraftResource)reader.ReadInt();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
_Quality = (ItemQuality)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0: break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
100
Scripts/Items/Resource/BaseFish.cs
Normal file
100
Scripts/Items/Resource/BaseFish.cs
Normal file
@@ -0,0 +1,100 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BaseFish : Item
|
||||
{
|
||||
private static readonly TimeSpan DeathDelay = TimeSpan.FromMinutes(5);
|
||||
private Timer m_Timer;
|
||||
[Constructable]
|
||||
public BaseFish(int itemID)
|
||||
: base(itemID)
|
||||
{
|
||||
this.StartTimer();
|
||||
}
|
||||
|
||||
public BaseFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public bool Dead
|
||||
{
|
||||
get
|
||||
{
|
||||
return (this.ItemID == 0x3B0C);
|
||||
}
|
||||
}
|
||||
public virtual void StartTimer()
|
||||
{
|
||||
if (this.m_Timer != null)
|
||||
this.m_Timer.Stop();
|
||||
|
||||
this.m_Timer = Timer.DelayCall(DeathDelay, new TimerCallback(Kill));
|
||||
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
|
||||
public virtual void StopTimer()
|
||||
{
|
||||
if (this.m_Timer != null)
|
||||
this.m_Timer.Stop();
|
||||
|
||||
this.m_Timer = null;
|
||||
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
this.StopTimer();
|
||||
}
|
||||
|
||||
public virtual void Kill()
|
||||
{
|
||||
this.ItemID = 0x3B0C;
|
||||
this.StopTimer();
|
||||
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
|
||||
public int GetDescription()
|
||||
{
|
||||
// TODO: This will never return "very unusual dead aquarium creature" due to the way it is killed
|
||||
if (this.ItemID > 0x3B0F)
|
||||
return this.Dead ? 1074424 : 1074422; // A very unusual [dead/live] aquarium creature
|
||||
else if (this.Hue != 0)
|
||||
return this.Dead ? 1074425 : 1074423; // A [dead/live] aquarium creature of unusual color
|
||||
|
||||
return this.Dead ? 1073623 : 1073622; // A [dead/live] aquarium creature
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
list.Add(this.GetDescription());
|
||||
|
||||
if (!this.Dead && this.m_Timer != null)
|
||||
list.Add(1074507); // Gasping for air
|
||||
}
|
||||
|
||||
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 (!(this.Parent is Aquarium) && !(this.Parent is FishBowl))
|
||||
this.StartTimer();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/BatWing.cs
Normal file
52
Scripts/Items/Resource/BatWing.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BatWing : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BatWing()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BatWing(int amount)
|
||||
: base(0xF78, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BatWing(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Resource/Beeswax.cs
Normal file
41
Scripts/Items/Resource/Beeswax.cs
Normal file
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Beeswax : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Beeswax()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Beeswax(int amount)
|
||||
: base(0x1422)
|
||||
{
|
||||
this.Weight = 1.0;
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Beeswax(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
116
Scripts/Items/Resource/BigFish.cs
Normal file
116
Scripts/Items/Resource/BigFish.cs
Normal file
@@ -0,0 +1,116 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BigFish : Item, ICarvable
|
||||
{
|
||||
#region Old Item Serialization Vars used for RedHerring and MudPuppy
|
||||
/* DO NOT USE! Only used in serialization of special scrolls that originally derived from Item */
|
||||
private bool m_InheritsItem;
|
||||
|
||||
protected bool InheritsItem
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_InheritsItem;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
private Mobile m_Fisher;
|
||||
private DateTime m_DateCaught;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public Mobile Fisher { get { return m_Fisher; } set { m_Fisher = value; InvalidateProperties(); } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime DateCaught { get { return m_DateCaught; } set { m_DateCaught = value; InvalidateProperties(); } }
|
||||
|
||||
[Constructable]
|
||||
public BigFish()
|
||||
: base(0x09CC)
|
||||
{
|
||||
Weight = Math.Max(20, GetWeight());
|
||||
|
||||
Hue = Utility.RandomBool() ? 0x847 : 0x58C;
|
||||
}
|
||||
|
||||
private int GetWeight()
|
||||
{
|
||||
int v = Utility.RandomMinMax(0, 10000);
|
||||
v = (int)Math.Sqrt(v);
|
||||
v = 100 - v;
|
||||
|
||||
return (int)(225.0 * ((double)v / 100));
|
||||
}
|
||||
|
||||
public BigFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber { get { return 1041112; } }// a big fish
|
||||
|
||||
public bool Carve(Mobile from, Item item)
|
||||
{
|
||||
base.ScissorHelper(from, new RawFishSteak(), Math.Max(16, (int)Weight) / 4, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (Weight >= 20)
|
||||
{
|
||||
if (m_Fisher != null)
|
||||
list.Add(1070857, m_Fisher.Name); // Caught by ~1_fisherman~
|
||||
|
||||
if (m_DateCaught != DateTime.MinValue)
|
||||
list.Add(1049644, m_DateCaught.ToShortDateString()); // [~1_stuff~]
|
||||
|
||||
list.Add(1070858, ((int)Weight).ToString()); // ~1_weight~ stones
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)3); // version
|
||||
|
||||
writer.Write(m_DateCaught);
|
||||
writer.Write((Mobile)m_Fisher);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version < 3)
|
||||
m_InheritsItem = true;
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 3: // RedHerring/MudPuppy Conversion
|
||||
case 2:
|
||||
{
|
||||
m_DateCaught = reader.ReadDateTime();
|
||||
goto case 1;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
m_Fisher = reader.ReadMobile();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
Weight = Utility.RandomMinMax(3, 200);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/BlackPearl.cs
Normal file
52
Scripts/Items/Resource/BlackPearl.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlackPearl : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BlackPearl()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlackPearl(int amount)
|
||||
: base(0xF7A, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BlackPearl(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/Blackrock.cs
Normal file
47
Scripts/Items/Resource/Blackrock.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Blackrock : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Blackrock()
|
||||
: base(Utility.RandomList(0x136C, 0x1EA7))
|
||||
{
|
||||
Hue = 1954;
|
||||
}
|
||||
|
||||
public Blackrock(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
switch (ItemID)
|
||||
{
|
||||
case 0x136C: return 1153837; // a large piece of blackrock
|
||||
case 0x1EA7: return 1150016; // a small piece of blackrock
|
||||
default: return 1153836; // a piece of blackrock
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/BlankScroll.cs
Normal file
62
Scripts/Items/Resource/BlankScroll.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using Server.Engines.Craft;
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BlankScroll : Item, ICommodity, ICraftable
|
||||
{
|
||||
[Constructable]
|
||||
public BlankScroll()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BlankScroll(int amount)
|
||||
: base(0xEF3)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 1.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public BlankScroll(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Core.ML);
|
||||
}
|
||||
}
|
||||
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 int OnCraft(int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, ITool tool, CraftItem craftItem, int resHue)
|
||||
{
|
||||
Amount = 5;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Scripts/Items/Resource/BloodOfTheDarkFather.cs
Normal file
51
Scripts/Items/Resource/BloodOfTheDarkFather.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BloodOfTheDarkFather : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BloodOfTheDarkFather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodOfTheDarkFather(int amount)
|
||||
: base(0x9D7F)
|
||||
{
|
||||
this.Hue = 2741;
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public BloodOfTheDarkFather(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1157343;
|
||||
}
|
||||
}// Blood of the Dark Father
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/Bloodmoss.cs
Normal file
52
Scripts/Items/Resource/Bloodmoss.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bloodmoss : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Bloodmoss()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bloodmoss(int amount)
|
||||
: base(0xF7B, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Bloodmoss(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
361
Scripts/Items/Resource/Board.cs
Normal file
361
Scripts/Items/Resource/Board.cs
Normal file
@@ -0,0 +1,361 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1BD7, 0x1BDA )]
|
||||
public class BaseWoodBoard : Item, ICommodity, IResource
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set { m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_Resource >= CraftResource.OakWood && m_Resource <= CraftResource.YewWood )
|
||||
return 1075052 + ( (int)m_Resource - (int)CraftResource.OakWood );
|
||||
|
||||
switch ( m_Resource )
|
||||
{
|
||||
case CraftResource.Bloodwood: return 1075055;
|
||||
case CraftResource.Frostwood: return 1075056;
|
||||
case CraftResource.Heartwood: return 1075062; //WHY Osi. Why?
|
||||
}
|
||||
|
||||
return LabelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[Constructable]
|
||||
public BaseWoodBoard()
|
||||
: this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseWoodBoard( int amount )
|
||||
: this( CraftResource.RegularWood, amount )
|
||||
{
|
||||
}
|
||||
|
||||
public BaseWoodBoard( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseWoodBoard( CraftResource resource ) : this( resource, 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseWoodBoard( CraftResource resource, int amount )
|
||||
: base( 0x1BD7 )
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
|
||||
m_Resource = resource;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 4 );
|
||||
|
||||
writer.Write( (int)m_Resource );
|
||||
}
|
||||
|
||||
public static bool UpdatingBaseClass;
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
if ( version == 3 )
|
||||
UpdatingBaseClass = true;
|
||||
switch ( version )
|
||||
{
|
||||
case 4:
|
||||
case 3:
|
||||
case 2:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( (version == 0 && Weight == 0.1) || ( version <= 2 && Weight == 2 ) )
|
||||
Weight = -1;
|
||||
|
||||
if ( version <= 1 )
|
||||
m_Resource = CraftResource.RegularWood;
|
||||
}
|
||||
}
|
||||
|
||||
public class Board : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public Board()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Board(int amount)
|
||||
: base(CraftResource.RegularWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Board(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);
|
||||
if (BaseWoodBoard.UpdatingBaseClass)
|
||||
return;
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class HeartwoodBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public HeartwoodBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HeartwoodBoard(int amount)
|
||||
: base(CraftResource.Heartwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public HeartwoodBoard(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 BloodwoodBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public BloodwoodBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodwoodBoard(int amount)
|
||||
: base(CraftResource.Bloodwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BloodwoodBoard(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 FrostwoodBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public FrostwoodBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FrostwoodBoard(int amount)
|
||||
: base(CraftResource.Frostwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public FrostwoodBoard(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 OakBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public OakBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OakBoard(int amount)
|
||||
: base(CraftResource.OakWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public OakBoard(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 AshBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public AshBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AshBoard(int amount)
|
||||
: base(CraftResource.AshWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public AshBoard(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 YewBoard : BaseWoodBoard
|
||||
{
|
||||
[Constructable]
|
||||
public YewBoard()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public YewBoard(int amount)
|
||||
: base(CraftResource.YewWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public YewBoard(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/BolaBall.cs
Normal file
42
Scripts/Items/Resource/BolaBall.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BolaBall : Item
|
||||
{
|
||||
[Constructable]
|
||||
public BolaBall()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BolaBall(int amount)
|
||||
: base(0xE73)
|
||||
{
|
||||
this.Weight = 4.0;
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Hue = 0x8AC;
|
||||
}
|
||||
|
||||
public BolaBall(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Resource/Bolt.cs
Normal file
43
Scripts/Items/Resource/Bolt.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bolt : Item, ICommodity
|
||||
{
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override double DefaultWeight { get { return 0.1; } }
|
||||
|
||||
[Constructable]
|
||||
public Bolt()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bolt(int amount)
|
||||
: base(0x1BFB)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public Bolt(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Scripts/Items/Resource/BoltOfCloth.cs
Normal file
84
Scripts/Items/Resource/BoltOfCloth.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0xF95, 0xF96, 0xF97, 0xF98, 0xF99, 0xF9A, 0xF9B, 0xF9C)]
|
||||
public class BoltOfCloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BoltOfCloth()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BoltOfCloth(int amount)
|
||||
: base(0xF95)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 5.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public BoltOfCloth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (this.Deleted)
|
||||
return false;
|
||||
|
||||
this.Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
base.ScissorHelper(from, new Cloth(), 50);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = (this.Amount == 1) ? 1049122 : 1049121;
|
||||
|
||||
from.Send(new MessageLocalized(this.Serial, this.ItemID, MessageType.Label, 0x3B2, 3, number, "", (this.Amount * 50).ToString()));
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Items/Resource/Bone.cs
Normal file
55
Scripts/Items/Resource/Bone.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bone : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Bone()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bone(int amount)
|
||||
: base(0xf7e)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public Bone(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Items/Resource/Bottle.cs
Normal file
55
Scripts/Items/Resource/Bottle.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bottle : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Bottle()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Bottle(int amount)
|
||||
: base(0xF0E)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 1.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Bottle(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Core.ML);
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/BottleIchor.cs
Normal file
50
Scripts/Items/Resource/BottleIchor.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BottleIchor : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public BottleIchor()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BottleIchor(int amount)
|
||||
: base(0x5748)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public BottleIchor(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113361;
|
||||
}
|
||||
}// bottle of ichor
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/ChagaMushroom.cs
Normal file
50
Scripts/Items/Resource/ChagaMushroom.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ChagaMushroom : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public ChagaMushroom()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ChagaMushroom(int amount)
|
||||
: base(0x5743)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public ChagaMushroom(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113356;
|
||||
}
|
||||
}// chaga mushroom
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/Citrine.cs
Normal file
47
Scripts/Items/Resource/Citrine.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Citrine : Item, IGem
|
||||
{
|
||||
[Constructable]
|
||||
public Citrine()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Citrine(int amount)
|
||||
: base(0xF15)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Citrine(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/ClockFrame.cs
Normal file
42
Scripts/Items/Resource/ClockFrame.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x104D, 0x104E)]
|
||||
public class ClockFrame : Item
|
||||
{
|
||||
[Constructable]
|
||||
public ClockFrame()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ClockFrame(int amount)
|
||||
: base(0x104D)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 2.0;
|
||||
}
|
||||
|
||||
public ClockFrame(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/ClockParts.cs
Normal file
42
Scripts/Items/Resource/ClockParts.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x104F, 0x1050)]
|
||||
public class ClockParts : Item
|
||||
{
|
||||
[Constructable]
|
||||
public ClockParts()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ClockParts(int amount)
|
||||
: base(0x104F)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public ClockParts(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/Items/Resource/ClockworkAssembly.cs
Normal file
123
Scripts/Items/Resource/ClockworkAssembly.cs
Normal file
@@ -0,0 +1,123 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ClockworkAssembly : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber { get { return 1073426; } } // Clockwork Assembly
|
||||
|
||||
[Constructable]
|
||||
public ClockworkAssembly()
|
||||
: base(0x1EA8)
|
||||
{
|
||||
Weight = 5.0;
|
||||
Hue = 1102;
|
||||
}
|
||||
|
||||
public ClockworkAssembly(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (from.Skills[SkillName.Tinkering].Value < 60.0)
|
||||
{
|
||||
from.SendLocalizedMessage(1071943); // You must be a Journeyman or higher Tinker to construct a golem.
|
||||
return;
|
||||
}
|
||||
else if ((from.Followers + 4) > from.FollowersMax)
|
||||
{
|
||||
from.SendLocalizedMessage(1049607); // You have too many followers to control that creature.
|
||||
return;
|
||||
}
|
||||
|
||||
Container pack = from.Backpack;
|
||||
|
||||
if (pack == null)
|
||||
return;
|
||||
|
||||
int res = pack.ConsumeTotal(new Type[] { typeof(PowerCrystal), typeof(IronIngot), typeof(BronzeIngot), typeof(Gears) }, new int[] { 1, 50, 50, 5 });
|
||||
|
||||
switch ( res )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
from.SendLocalizedMessage(1071945); // You need a power crystal to construct a golem.
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
from.SendLocalizedMessage(1071948); // You need more iron ingots to construct a golem.
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
from.SendLocalizedMessage(1071947); // You need more bronze ingots to construct a golem.
|
||||
break;
|
||||
}
|
||||
case 3:
|
||||
{
|
||||
from.SendLocalizedMessage(1071946); // You need more gears to construct a golem.
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
Golem g = new Golem(true, Scalar(from));
|
||||
|
||||
if (g.SetControlMaster(from))
|
||||
{
|
||||
this.Delete();
|
||||
|
||||
g.MoveToWorld(from.Location, from.Map);
|
||||
from.PlaySound(0x241);
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public double Scalar(Mobile m)
|
||||
{
|
||||
double scalar;
|
||||
|
||||
double skill = m.Skills[SkillName.Tinkering].Value;
|
||||
|
||||
if (skill >= 100.0)
|
||||
scalar = 1.0;
|
||||
else if (skill >= 90.0)
|
||||
scalar = 0.9;
|
||||
else if (skill >= 80.0)
|
||||
scalar = 0.8;
|
||||
else if (skill >= 70.0)
|
||||
scalar = 0.7;
|
||||
else
|
||||
scalar = 0.6;
|
||||
|
||||
return scalar;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
224
Scripts/Items/Resource/Cloth.cs
Normal file
224
Scripts/Items/Resource/Cloth.cs
Normal file
@@ -0,0 +1,224 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute(0x1766, 0x1768)]
|
||||
public class Cloth : Item, IScissorable, IDyable, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Cloth()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cloth(int amount)
|
||||
: base(0x1766)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Cloth(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (this.Deleted)
|
||||
return false;
|
||||
|
||||
this.Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 override void OnSingleClick(Mobile from)
|
||||
{
|
||||
int number = (this.Amount == 1) ? 1049124 : 1049123;
|
||||
|
||||
from.Send(new MessageLocalized(this.Serial, this.ItemID, MessageType.Regular, 0x3B2, 3, number, "", this.Amount.ToString()));
|
||||
}
|
||||
|
||||
public bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
base.ScissorHelper(from, new Bandage(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class CutUpCloth : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1044458; } } // cut-up cloth
|
||||
|
||||
[Constructable]
|
||||
public CutUpCloth()
|
||||
: base(0x1767)
|
||||
{
|
||||
}
|
||||
|
||||
public CutUpCloth(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 void CutUp(Mobile from, Item[] items)
|
||||
{
|
||||
//Container backpack = from.Backpack;
|
||||
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
BoltOfCloth boc = items[i] as BoltOfCloth;
|
||||
|
||||
if (boc != null)
|
||||
boc.Scissor(from, null);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class CombineCloth : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1044459; } } // combine cloth
|
||||
|
||||
[Constructable]
|
||||
public CombineCloth()
|
||||
: base(0x1767)
|
||||
{
|
||||
}
|
||||
|
||||
public CombineCloth(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 bool CheckHue(int hue, int[] hues, out int count)
|
||||
{
|
||||
int result = 0;
|
||||
bool success = true;
|
||||
|
||||
for (int i = 0; i < hues.Length; i++)
|
||||
{
|
||||
if (hues[i] == hue)
|
||||
{
|
||||
result = i;
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
|
||||
count = result;
|
||||
|
||||
return success;
|
||||
}
|
||||
|
||||
public void Combine(Mobile from, Item[] items)
|
||||
{
|
||||
Container backpack = from.Backpack;
|
||||
|
||||
int[] hues = new int[backpack.Items.Count];
|
||||
int[] amounts = new int[backpack.Items.Count];
|
||||
|
||||
for (int i = 0; i < items.Length; i++)
|
||||
{
|
||||
Cloth c = items[i] as Cloth;
|
||||
|
||||
if (c != null)
|
||||
{
|
||||
int count;
|
||||
|
||||
if (CheckHue(c.Hue, hues, out count))
|
||||
{
|
||||
hues[i] = c.Hue;
|
||||
amounts[i] = c.Amount;
|
||||
}
|
||||
else
|
||||
{
|
||||
amounts[count] += c.Amount;
|
||||
}
|
||||
|
||||
c.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < hues.Length; i++)
|
||||
{
|
||||
Cloth cloth = new Cloth();
|
||||
cloth.Hue = hues[i];
|
||||
cloth.Amount = amounts[i];
|
||||
|
||||
if (cloth.Amount > 0)
|
||||
backpack.DropItem(cloth);
|
||||
else
|
||||
cloth.Delete();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
121
Scripts/Items/Resource/Cotton.cs
Normal file
121
Scripts/Items/Resource/Cotton.cs
Normal file
@@ -0,0 +1,121 @@
|
||||
using System;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Cotton : Item, IDyable, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Cotton()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cotton(int amount)
|
||||
: base(0xDF9)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 4.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Cotton(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new SpoolOfThread(6);
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
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 bool Dye(Mobile from, DyeTub sender)
|
||||
{
|
||||
if (this.Deleted)
|
||||
return false;
|
||||
|
||||
this.Hue = sender.DyedHue;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502655); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private readonly Cotton m_Cotton;
|
||||
public PickWheelTarget(Cotton cotton)
|
||||
: base(3, false, TargetFlags.None)
|
||||
{
|
||||
this.m_Cotton = cotton;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (this.m_Cotton.Deleted)
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if (wheel == null && targeted is AddonComponent)
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if (wheel is Item)
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if (!this.m_Cotton.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_Cotton.Consume();
|
||||
wheel.BeginSpin(new SpinCallback(Cotton.OnSpun), from, this.m_Cotton.Hue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/CrushedGlass.cs
Normal file
50
Scripts/Items/Resource/CrushedGlass.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CrushedGlass : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public CrushedGlass()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CrushedGlass(int amount)
|
||||
: base(0x573B)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public CrushedGlass(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113351;
|
||||
}
|
||||
}// crushed glass
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/CrystalShards.cs
Normal file
50
Scripts/Items/Resource/CrystalShards.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CrystalShards : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public CrystalShards()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CrystalShards(int amount)
|
||||
: base(0x5738)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public CrystalShards(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113347;
|
||||
}
|
||||
}// crystal shards
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/CrystallineBlackrock.cs
Normal file
50
Scripts/Items/Resource/CrystallineBlackrock.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CrystallineBlackrock : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public CrystallineBlackrock()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CrystallineBlackrock(int amount)
|
||||
: base(0x5732)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public CrystallineBlackrock(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113344;
|
||||
}
|
||||
}// crystalline blackrock
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/DaemonBlood.cs
Normal file
52
Scripts/Items/Resource/DaemonBlood.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DaemonBlood : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public DaemonBlood()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonBlood(int amount)
|
||||
: base(0xF7D, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DaemonBlood(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
39
Scripts/Items/Resource/DaemonBone.cs
Normal file
39
Scripts/Items/Resource/DaemonBone.cs
Normal file
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
// TODO: Commodity?
|
||||
public class DaemonBone : BaseReagent
|
||||
{
|
||||
[Constructable]
|
||||
public DaemonBone()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonBone(int amount)
|
||||
: base(0xF80, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DaemonBone(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/DaemonClaw.cs
Normal file
50
Scripts/Items/Resource/DaemonClaw.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DaemonClaw : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public DaemonClaw()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DaemonClaw(int amount)
|
||||
: base(0x5721)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public DaemonClaw(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113330;
|
||||
}
|
||||
}// daemon claw
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/DeadWood.cs
Normal file
52
Scripts/Items/Resource/DeadWood.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DeadWood : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public DeadWood()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DeadWood(int amount)
|
||||
: base(0xF90, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DeadWood(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/DelicateScales.cs
Normal file
50
Scripts/Items/Resource/DelicateScales.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DelicateScales : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public DelicateScales()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DelicateScales(int amount)
|
||||
: base(0x573A)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public DelicateScales(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113349;
|
||||
}
|
||||
}// delicate scales
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/Diamond.cs
Normal file
47
Scripts/Items/Resource/Diamond.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Diamond : Item, IGem
|
||||
{
|
||||
[Constructable]
|
||||
public Diamond()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Diamond(int amount)
|
||||
: base(0xF26)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Diamond(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/DragonBlood.cs
Normal file
50
Scripts/Items/Resource/DragonBlood.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DragonBlood : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public DragonBlood()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DragonBlood(int amount)
|
||||
: base(0x4077, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DragonBlood(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return (Core.ML);
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Scripts/Items/Resource/ElvenFletchings.cs
Normal file
51
Scripts/Items/Resource/ElvenFletchings.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[TypeAlias("Server.Items.ElvenFletchings")]
|
||||
public class ElvenFletching : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public ElvenFletching()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ElvenFletching(int amount)
|
||||
: base(0x5737)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public ElvenFletching(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113346;
|
||||
}
|
||||
}// elven fletching
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/Emerald.cs
Normal file
47
Scripts/Items/Resource/Emerald.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Emerald : Item, IGem
|
||||
{
|
||||
[Constructable]
|
||||
public Emerald()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Emerald(int amount)
|
||||
: base(0xF10)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Emerald(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resource/EnchantedSwitch.cs
Normal file
40
Scripts/Items/Resource/EnchantedSwitch.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EnchantedSwitch : Item
|
||||
{
|
||||
[Constructable]
|
||||
public EnchantedSwitch()
|
||||
: base(0x2F5C)
|
||||
{
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public EnchantedSwitch(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1072893;
|
||||
}
|
||||
}// enchanted switch
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceAchievement.cs
Normal file
62
Scripts/Items/Resource/EssenceAchievement.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceAchievement : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceAchievement()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceAchievement(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1724;
|
||||
}
|
||||
|
||||
public EssenceAchievement(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113325;
|
||||
}
|
||||
}// essence of achievement
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceBalance.cs
Normal file
62
Scripts/Items/Resource/EssenceBalance.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceBalance : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceBalance()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceBalance(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1268;
|
||||
}
|
||||
|
||||
public EssenceBalance(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113324;
|
||||
}
|
||||
}// essence of balance
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceControl.cs
Normal file
62
Scripts/Items/Resource/EssenceControl.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceControl : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceControl()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceControl(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1165;
|
||||
}
|
||||
|
||||
public EssenceControl(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113340;
|
||||
}
|
||||
}// essence of control
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceDiligence.cs
Normal file
62
Scripts/Items/Resource/EssenceDiligence.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceDiligence : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceDiligence()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceDiligence(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1166;
|
||||
}
|
||||
|
||||
public EssenceDiligence(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113338;
|
||||
}
|
||||
}// essence of diligence
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceDirection.cs
Normal file
62
Scripts/Items/Resource/EssenceDirection.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceDirection : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceDirection()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceDirection(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1156;
|
||||
}
|
||||
|
||||
public EssenceDirection(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113328;
|
||||
}
|
||||
}// essence of direction
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceFeeling.cs
Normal file
62
Scripts/Items/Resource/EssenceFeeling.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceFeeling : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceFeeling()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceFeeling(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 455;
|
||||
}
|
||||
|
||||
public EssenceFeeling(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113339;
|
||||
}
|
||||
}// essence of feeling
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceOrder.cs
Normal file
62
Scripts/Items/Resource/EssenceOrder.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceOrder : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceOrder()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceOrder(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1153;
|
||||
}
|
||||
|
||||
public EssenceOrder(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113342;
|
||||
}
|
||||
}// essence of order
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssencePassion.cs
Normal file
62
Scripts/Items/Resource/EssencePassion.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssencePassion : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssencePassion()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssencePassion(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1161;
|
||||
}
|
||||
|
||||
public EssencePassion(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113326;
|
||||
}
|
||||
}// essence of passion
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssencePersistence.cs
Normal file
62
Scripts/Items/Resource/EssencePersistence.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssencePersistence : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssencePersistence()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssencePersistence(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 37;
|
||||
}
|
||||
|
||||
public EssencePersistence(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113343;
|
||||
}
|
||||
}// essence of persistence
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssencePrecision.cs
Normal file
62
Scripts/Items/Resource/EssencePrecision.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssencePrecision : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssencePrecision()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssencePrecision(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1158;
|
||||
}
|
||||
|
||||
public EssencePrecision(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113327;
|
||||
}
|
||||
}// essence of precision
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
62
Scripts/Items/Resource/EssenceSingularity.cs
Normal file
62
Scripts/Items/Resource/EssenceSingularity.cs
Normal file
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EssenceSingularity : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public EssenceSingularity()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EssenceSingularity(int amount)
|
||||
: base(0x571C)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = 1109;
|
||||
}
|
||||
|
||||
public EssenceSingularity(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113341;
|
||||
}
|
||||
}// essence of singularity
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/EtherealSand.cs
Normal file
50
Scripts/Items/Resource/EtherealSand.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EtherealSand : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber { get { return 1125984; } } // ethereal sand
|
||||
public override double DefaultWeight { get { return 0.1; } }
|
||||
|
||||
[Constructable]
|
||||
public EtherealSand(int amountFrom, int amountTo)
|
||||
: this(Utility.RandomMinMax(amountFrom, amountTo))
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EtherealSand()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EtherealSand(int amount)
|
||||
: base(0xA3E8)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public EtherealSand(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resource/FaeryDust.cs
Normal file
48
Scripts/Items/Resource/FaeryDust.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FaeryDust : Item, ICommodity
|
||||
{
|
||||
|
||||
[Constructable]
|
||||
public FaeryDust() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FaeryDust( int amountFrom, int amountTo ) : this( Utility.RandomMinMax( amountFrom, amountTo ) )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FaeryDust( int amount ): base(0x5745)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public FaeryDust(Serial serial): base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber{get { return 1113358; } }// faery dust
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Scripts/Items/Resource/Feather.cs
Normal file
61
Scripts/Items/Resource/Feather.cs
Normal file
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Feather : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Feather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Feather(int amount)
|
||||
: base(0x1BD1)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Feather(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resource/FertileDirt.cs
Normal file
48
Scripts/Items/Resource/FertileDirt.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FertileDirt : Item
|
||||
{
|
||||
[Constructable]
|
||||
public FertileDirt()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FertileDirt(int amount)
|
||||
: base(0xF81)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public FertileDirt(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Resource/FeyWings.cs
Normal file
44
Scripts/Items/Resource/FeyWings.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FeyWings : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber { get { return 1113332; } } // fey wings
|
||||
public override double DefaultWeight { get { return 0.1; } }
|
||||
|
||||
[Constructable]
|
||||
public FeyWings()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FeyWings(int amount)
|
||||
: base(0x5726)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public FeyWings(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
55
Scripts/Items/Resource/Fish.cs
Normal file
55
Scripts/Items/Resource/Fish.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Fish : Item, ICarvable
|
||||
{
|
||||
[Constructable]
|
||||
public Fish()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Fish(int amount)
|
||||
: base(Utility.Random(0x09CC, 4))
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 1.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Fish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public bool Carve(Mobile from, Item item)
|
||||
{
|
||||
var fish = new RawFishSteak();
|
||||
|
||||
if (HasSocket<Caddellite>())
|
||||
{
|
||||
fish.AttachSocket(new Caddellite());
|
||||
}
|
||||
|
||||
base.ScissorHelper(from, fish, 4);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
108
Scripts/Items/Resource/Flax.cs
Normal file
108
Scripts/Items/Resource/Flax.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
using System;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Flax : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Flax()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Flax(int amount)
|
||||
: base(0x1A9C)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 1.0;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public Flax(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public static void OnSpun(ISpinningWheel wheel, Mobile from, int hue)
|
||||
{
|
||||
Item item = new SpoolOfThread(6);
|
||||
item.Hue = hue;
|
||||
|
||||
from.AddToBackpack(item);
|
||||
from.SendLocalizedMessage(1010577); // You put the spools of thread in your backpack.
|
||||
}
|
||||
|
||||
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 override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502655); // What spinning wheel do you wish to spin this on?
|
||||
from.Target = new PickWheelTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
|
||||
private class PickWheelTarget : Target
|
||||
{
|
||||
private readonly Flax m_Flax;
|
||||
public PickWheelTarget(Flax flax)
|
||||
: base(3, false, TargetFlags.None)
|
||||
{
|
||||
this.m_Flax = flax;
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (this.m_Flax.Deleted)
|
||||
return;
|
||||
|
||||
ISpinningWheel wheel = targeted as ISpinningWheel;
|
||||
|
||||
if (wheel == null && targeted is AddonComponent)
|
||||
wheel = ((AddonComponent)targeted).Addon as ISpinningWheel;
|
||||
|
||||
if (wheel is Item)
|
||||
{
|
||||
Item item = (Item)wheel;
|
||||
|
||||
if (!this.m_Flax.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (wheel.Spinning)
|
||||
{
|
||||
from.SendLocalizedMessage(502656); // That spinning wheel is being used.
|
||||
}
|
||||
else
|
||||
{
|
||||
this.m_Flax.Consume();
|
||||
wheel.BeginSpin(new SpinCallback(Flax.OnSpun), from, this.m_Flax.Hue);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502658); // Use that on a spinning wheel.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
104
Scripts/Items/Resource/FocusingGemOfVirtueBane.cs
Normal file
104
Scripts/Items/Resource/FocusingGemOfVirtueBane.cs
Normal file
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FocusingGemOfVirtueBane : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1150004; } } // Focusing Gem of Virtue Bane
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public DateTime Cooldown { get; private set; }
|
||||
|
||||
[Constructable]
|
||||
public FocusingGemOfVirtueBane()
|
||||
: base(0x1F1E)
|
||||
{
|
||||
Hue = 2508;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
bool messagecheck = true;
|
||||
|
||||
if (Cooldown < DateTime.Now)
|
||||
{
|
||||
from.SendLocalizedMessage(1149987); // Using this on your weapon will make it a rage focused weapon and turn it brittle.
|
||||
Cooldown = DateTime.Now + TimeSpan.FromMinutes(10);
|
||||
messagecheck = false;
|
||||
}
|
||||
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (messagecheck)
|
||||
{
|
||||
from.BeginTarget(2, false, TargetFlags.None, new TargetCallback(OnTarget));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void OnTarget(Mobile from, object obj)
|
||||
{
|
||||
if (!IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (obj is Item)
|
||||
{
|
||||
Item item = (Item)obj;
|
||||
|
||||
if (!item.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
return;
|
||||
}
|
||||
|
||||
if (item is BaseWeapon)
|
||||
{
|
||||
BaseWeapon weapon = (BaseWeapon)obj;
|
||||
|
||||
if (weapon.ExtendedWeaponAttributes.Focus == 0)
|
||||
{
|
||||
weapon.Hue = 2500;
|
||||
weapon.ExtendedWeaponAttributes.Focus = 1;
|
||||
weapon.NegativeAttributes.Brittle = 1;
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1149989); // That property already exists on that item.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(1149988); // That can only be used on a weapon.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public FocusingGemOfVirtueBane(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
52
Scripts/Items/Resource/Garlic.cs
Normal file
52
Scripts/Items/Resource/Garlic.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Garlic : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Garlic()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Garlic(int amount)
|
||||
: base(0xF84, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Garlic(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/Gears.cs
Normal file
42
Scripts/Items/Resource/Gears.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x1053, 0x1054)]
|
||||
public class Gears : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Gears()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Gears(int amount)
|
||||
: base(0x1053)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public Gears(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/Ginseng.cs
Normal file
52
Scripts/Items/Resource/Ginseng.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Ginseng : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Ginseng()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Ginseng(int amount)
|
||||
: base(0xF85, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Ginseng(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/GoblinBlood.cs
Normal file
50
Scripts/Items/Resource/GoblinBlood.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GoblinBlood : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public GoblinBlood()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoblinBlood(int amount)
|
||||
: base(0x572C)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public GoblinBlood(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113335;
|
||||
}
|
||||
}// goblin blood
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
438
Scripts/Items/Resource/Granite.cs
Normal file
438
Scripts/Items/Resource/Granite.cs
Normal file
@@ -0,0 +1,438 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseGranite : Item, ICommodity
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
public BaseGranite(CraftResource resource)
|
||||
: base(0x1779)
|
||||
{
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
Stackable = Core.ML;
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseGranite(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Resource;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return Core.ML ? 1.0 : 10.0;
|
||||
}// Pub 57
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1044607;
|
||||
}
|
||||
}// high quality granite
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 1)
|
||||
Stackable = Core.ML;
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!CraftResources.IsStandard(m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(m_Resource);
|
||||
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class Granite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public Granite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Granite(int amount)
|
||||
: base(CraftResource.Iron)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public Granite(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 DullCopperGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public DullCopperGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DullCopperGranite(int amount)
|
||||
: base(CraftResource.DullCopper)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public DullCopperGranite(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 ShadowIronGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public ShadowIronGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronGranite(int amount)
|
||||
: base(CraftResource.ShadowIron)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public ShadowIronGranite(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 CopperGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public CopperGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperGranite(int amount)
|
||||
: base(CraftResource.Copper)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public CopperGranite(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 BronzeGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public BronzeGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BronzeGranite(int amount)
|
||||
: base(CraftResource.Bronze)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public BronzeGranite(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 GoldGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public GoldGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoldGranite(int amount)
|
||||
: base(CraftResource.Gold)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public GoldGranite(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 AgapiteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public AgapiteGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AgapiteGranite(int amount)
|
||||
: base(CraftResource.Agapite)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public AgapiteGranite(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 VeriteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public VeriteGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public VeriteGranite(int amount)
|
||||
: base(CraftResource.Verite)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public VeriteGranite(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 ValoriteGranite : BaseGranite
|
||||
{
|
||||
[Constructable]
|
||||
public ValoriteGranite()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ValoriteGranite(int amount)
|
||||
: base(CraftResource.Valorite)
|
||||
{
|
||||
if (Stackable)
|
||||
Amount = amount;
|
||||
else
|
||||
Amount = 1;
|
||||
}
|
||||
|
||||
public ValoriteGranite(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/GraveDust.cs
Normal file
52
Scripts/Items/Resource/GraveDust.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GraveDust : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public GraveDust()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GraveDust(int amount)
|
||||
: base(0xF8F, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public GraveDust(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
336
Scripts/Items/Resource/Hides.cs
Normal file
336
Scripts/Items/Resource/Hides.cs
Normal file
@@ -0,0 +1,336 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseHides : Item, ICommodity
|
||||
{
|
||||
protected virtual CraftResource DefaultResource { get { return CraftResource.RegularLeather; } }
|
||||
|
||||
private CraftResource m_Resource;
|
||||
public BaseHides(CraftResource resource)
|
||||
: this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseHides(CraftResource resource, int amount)
|
||||
: base(0x1079)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 5.0;
|
||||
this.Amount = amount;
|
||||
this.Hue = CraftResources.GetHue(resource);
|
||||
|
||||
this.m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseHides(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Resource;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Resource = value;
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_Resource >= CraftResource.SpinedLeather && this.m_Resource <= CraftResource.BarbedLeather)
|
||||
return 1049687 + (int)(this.m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
return 1047023;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)this.m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: // Reset from Resource System
|
||||
this.m_Resource = this.DefaultResource;
|
||||
reader.ReadString();
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
this.m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());
|
||||
|
||||
this.m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (this.Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", this.Amount, 1024216); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1024216); // pile of hides
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!CraftResources.IsStandard(this.m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(this.m_Resource);
|
||||
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(this.m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1079, 0x1078)]
|
||||
public class Hides : BaseHides, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public Hides()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hides(int amount)
|
||||
: base(CraftResource.RegularLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Hides(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 bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
if (Core.AOS && !this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
base.ScissorHelper(from, new Leather(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1079, 0x1078)]
|
||||
public class SpinedHides : BaseHides, IScissorable
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.SpinedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public SpinedHides()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinedHides(int amount)
|
||||
: base(CraftResource.SpinedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public SpinedHides(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 bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
if (Core.AOS && !this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper(from, new SpinedLeather(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1079, 0x1078)]
|
||||
public class HornedHides : BaseHides, IScissorable
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.HornedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public HornedHides()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HornedHides(int amount)
|
||||
: base(CraftResource.HornedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public HornedHides(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 bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
if (Core.AOS && !this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper(from, new HornedLeather(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1079, 0x1078)]
|
||||
public class BarbedHides : BaseHides, IScissorable
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.BarbedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public BarbedHides()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BarbedHides(int amount)
|
||||
: base(CraftResource.BarbedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BarbedHides(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 bool Scissor(Mobile from, Scissors scissors)
|
||||
{
|
||||
if (this.Deleted || !from.CanSee(this))
|
||||
return false;
|
||||
|
||||
if (Core.AOS && !this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(502437); // Items you wish to cut must be in your backpack
|
||||
return false;
|
||||
}
|
||||
|
||||
base.ScissorHelper(from, new BarbedLeather(), 1);
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/Hinge.cs
Normal file
42
Scripts/Items/Resource/Hinge.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable(0x1055, 0x1056)]
|
||||
public class Hinge : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Hinge()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hinge(int amount)
|
||||
: base(0x1055)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public Hinge(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resource/HollowPrism.cs
Normal file
40
Scripts/Items/Resource/HollowPrism.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class HollowPrism : Item
|
||||
{
|
||||
[Constructable]
|
||||
public HollowPrism()
|
||||
: base(0x2F5D)
|
||||
{
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public HollowPrism(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1072895;
|
||||
}
|
||||
}// hollow prism
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
103
Scripts/Items/Resource/HotGoo.cs
Normal file
103
Scripts/Items/Resource/HotGoo.cs
Normal file
@@ -0,0 +1,103 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class ExplosiveGoo : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1157463; } } // Explosive Goo
|
||||
|
||||
private bool m_Drying;
|
||||
private readonly DateTime m_Created;
|
||||
private readonly TimeSpan m_Duration;
|
||||
private readonly int m_MaxDamage;
|
||||
private readonly int m_MinDamage;
|
||||
private readonly Timer m_Timer;
|
||||
|
||||
[Constructable]
|
||||
public ExplosiveGoo() : this(TimeSpan.FromSeconds(10.0), 5, 10)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ExplosiveGoo(TimeSpan duration, int minDamage, int maxDamage)
|
||||
: base(0x122A)
|
||||
{
|
||||
Hue = 1932;
|
||||
Movable = false;
|
||||
m_MinDamage = minDamage;
|
||||
m_MaxDamage = maxDamage;
|
||||
m_Created = DateTime.UtcNow;
|
||||
m_Duration = duration;
|
||||
m_Timer = Timer.DelayCall(TimeSpan.Zero, TimeSpan.FromSeconds(1), OnTick);
|
||||
}
|
||||
|
||||
public ExplosiveGoo(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
}
|
||||
|
||||
private void OnTick()
|
||||
{
|
||||
var now = DateTime.UtcNow;
|
||||
var age = now - m_Created;
|
||||
|
||||
if (age > m_Duration)
|
||||
{
|
||||
Delete();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!m_Drying && age > (m_Duration - age))
|
||||
{
|
||||
m_Drying = true;
|
||||
ItemID = 0x122B;
|
||||
}
|
||||
|
||||
var toDamage = new List<Mobile>();
|
||||
IPooledEnumerable eable = GetMobilesInRange(0);
|
||||
|
||||
foreach (Mobile m in eable)
|
||||
{
|
||||
var bc = m as BaseCreature;
|
||||
if (m.Alive && !m.IsDeadBondedPet && (bc == null || bc.Controlled || bc.Summoned))
|
||||
{
|
||||
toDamage.Add(m);
|
||||
}
|
||||
}
|
||||
eable.Free();
|
||||
|
||||
for (var i = 0; i < toDamage.Count; i++)
|
||||
Damage(toDamage[i]);
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnMoveOver(Mobile m)
|
||||
{
|
||||
Damage(m);
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Damage(Mobile m)
|
||||
{
|
||||
m.SendLocalizedMessage(1112366); // The flammable goo covering you bursts into flame!
|
||||
|
||||
AOS.Damage(m, Utility.RandomMinMax(m_MinDamage, m_MaxDamage), 0, 100, 0, 0, 0);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
6
Scripts/Items/Resource/IGem.cs
Normal file
6
Scripts/Items/Resource/IGem.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
using System;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public interface IGem { }
|
||||
}
|
||||
498
Scripts/Items/Resource/Ingots.cs
Normal file
498
Scripts/Items/Resource/Ingots.cs
Normal file
@@ -0,0 +1,498 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseIngot : Item, ICommodity, IResource
|
||||
{
|
||||
protected virtual CraftResource DefaultResource { get { return CraftResource.Iron; } }
|
||||
|
||||
private CraftResource m_Resource;
|
||||
public BaseIngot(CraftResource resource)
|
||||
: this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseIngot(CraftResource resource, int amount)
|
||||
: base(0x1BF2)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseIngot(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Resource;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0.1;
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Resource >= CraftResource.DullCopper && m_Resource <= CraftResource.Valorite)
|
||||
return 1042684 + (int)(m_Resource - CraftResource.DullCopper);
|
||||
|
||||
return 1042692;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: // Reset from Resource System
|
||||
m_Resource = DefaultResource;
|
||||
reader.ReadString();
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info;
|
||||
|
||||
switch ( reader.ReadInt() )
|
||||
{
|
||||
case 0:
|
||||
info = OreInfo.Iron;
|
||||
break;
|
||||
case 1:
|
||||
info = OreInfo.DullCopper;
|
||||
break;
|
||||
case 2:
|
||||
info = OreInfo.ShadowIron;
|
||||
break;
|
||||
case 3:
|
||||
info = OreInfo.Copper;
|
||||
break;
|
||||
case 4:
|
||||
info = OreInfo.Bronze;
|
||||
break;
|
||||
case 5:
|
||||
info = OreInfo.Gold;
|
||||
break;
|
||||
case 6:
|
||||
info = OreInfo.Agapite;
|
||||
break;
|
||||
case 7:
|
||||
info = OreInfo.Verite;
|
||||
break;
|
||||
case 8:
|
||||
info = OreInfo.Valorite;
|
||||
break;
|
||||
default:
|
||||
info = null;
|
||||
break;
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", Amount, 1027154); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1027154); // ingots
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!CraftResources.IsStandard(m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(m_Resource);
|
||||
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1BF2, 0x1BEF)]
|
||||
public class IronIngot : BaseIngot
|
||||
{
|
||||
[Constructable]
|
||||
public IronIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronIngot(int amount)
|
||||
: base(CraftResource.Iron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public IronIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class DullCopperIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.DullCopper; } }
|
||||
|
||||
[Constructable]
|
||||
public DullCopperIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DullCopperIngot(int amount)
|
||||
: base(CraftResource.DullCopper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DullCopperIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class ShadowIronIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.ShadowIron; } }
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronIngot(int amount)
|
||||
: base(CraftResource.ShadowIron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public ShadowIronIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class CopperIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Copper; } }
|
||||
|
||||
[Constructable]
|
||||
public CopperIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperIngot(int amount)
|
||||
: base(CraftResource.Copper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public CopperIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class BronzeIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Bronze; } }
|
||||
|
||||
[Constructable]
|
||||
public BronzeIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BronzeIngot(int amount)
|
||||
: base(CraftResource.Bronze, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BronzeIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class GoldIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Gold; } }
|
||||
|
||||
[Constructable]
|
||||
public GoldIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoldIngot(int amount)
|
||||
: base(CraftResource.Gold, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public GoldIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class AgapiteIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Agapite; } }
|
||||
|
||||
[Constructable]
|
||||
public AgapiteIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AgapiteIngot(int amount)
|
||||
: base(CraftResource.Agapite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public AgapiteIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class VeriteIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Verite; } }
|
||||
|
||||
[Constructable]
|
||||
public VeriteIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public VeriteIngot(int amount)
|
||||
: base(CraftResource.Verite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public VeriteIngot(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(0x1BF2, 0x1BEF)]
|
||||
public class ValoriteIngot : BaseIngot
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Valorite; } }
|
||||
|
||||
[Constructable]
|
||||
public ValoriteIngot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ValoriteIngot(int amount)
|
||||
: base(CraftResource.Valorite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public ValoriteIngot(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Resource/JeweledFiligree.cs
Normal file
40
Scripts/Items/Resource/JeweledFiligree.cs
Normal file
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JeweledFiligree : Item
|
||||
{
|
||||
[Constructable]
|
||||
public JeweledFiligree()
|
||||
: base(0x2F5E)
|
||||
{
|
||||
this.Weight = 1.0;
|
||||
}
|
||||
|
||||
public JeweledFiligree(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1072894;
|
||||
}
|
||||
}// jeweled filigree
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
51
Scripts/Items/Resource/LavaSerpenCrust.cs
Normal file
51
Scripts/Items/Resource/LavaSerpenCrust.cs
Normal file
@@ -0,0 +1,51 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[TypeAlias("Server.Items.LavaSerpenCrust")]
|
||||
public class LavaSerpentCrust : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public LavaSerpentCrust()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LavaSerpentCrust(int amount)
|
||||
: base(0x572D)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public LavaSerpentCrust(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113336;
|
||||
}
|
||||
}// lava serpent crust
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
273
Scripts/Items/Resource/Leathers.cs
Normal file
273
Scripts/Items/Resource/Leathers.cs
Normal file
@@ -0,0 +1,273 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseLeather : Item, ICommodity
|
||||
{
|
||||
protected virtual CraftResource DefaultResource { get { return CraftResource.RegularLeather; } }
|
||||
|
||||
private CraftResource m_Resource;
|
||||
public BaseLeather(CraftResource resource)
|
||||
: this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseLeather(CraftResource resource, int amount)
|
||||
: base(0x1081)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Weight = 1.0;
|
||||
this.Amount = amount;
|
||||
this.Hue = CraftResources.GetHue(resource);
|
||||
|
||||
this.m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseLeather(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.m_Resource;
|
||||
}
|
||||
set
|
||||
{
|
||||
this.m_Resource = value;
|
||||
this.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this.m_Resource >= CraftResource.SpinedLeather && this.m_Resource <= CraftResource.BarbedLeather)
|
||||
return 1049684 + (int)(this.m_Resource - CraftResource.SpinedLeather);
|
||||
|
||||
return 1047022;
|
||||
}
|
||||
}
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)this.m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: // Reset from Resource System
|
||||
this.m_Resource = this.DefaultResource;
|
||||
reader.ReadString();
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
this.m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info = new OreInfo(reader.ReadInt(), reader.ReadInt(), reader.ReadString());
|
||||
|
||||
this.m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (this.Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", this.Amount, 1024199); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1024199); // cut leather
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!CraftResources.IsStandard(this.m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(this.m_Resource);
|
||||
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(this.m_Resource));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x1081, 0x1082)]
|
||||
public class Leather : BaseLeather
|
||||
{
|
||||
[Constructable]
|
||||
public Leather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Leather(int amount)
|
||||
: base(CraftResource.RegularLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Leather(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(0x1081, 0x1082)]
|
||||
public class SpinedLeather : BaseLeather
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.SpinedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public SpinedLeather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SpinedLeather(int amount)
|
||||
: base(CraftResource.SpinedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public SpinedLeather(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(0x1081, 0x1082)]
|
||||
public class HornedLeather : BaseLeather
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.HornedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public HornedLeather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HornedLeather(int amount)
|
||||
: base(CraftResource.HornedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public HornedLeather(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(0x1081, 0x1082)]
|
||||
public class BarbedLeather : BaseLeather
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.BarbedLeather; } }
|
||||
|
||||
[Constructable]
|
||||
public BarbedLeather()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BarbedLeather(int amount)
|
||||
: base(CraftResource.BarbedLeather, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BarbedLeather(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Resource/LiveRock.cs
Normal file
43
Scripts/Items/Resource/LiveRock.cs
Normal file
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LiveRock : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber { get { return 1125985; } } // live rock
|
||||
|
||||
[Constructable]
|
||||
public LiveRock()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LiveRock(int amount)
|
||||
: base(0xA3E9)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public LiveRock(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
415
Scripts/Items/Resource/Log.cs
Normal file
415
Scripts/Items/Resource/Log.cs
Normal file
@@ -0,0 +1,415 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1bdd, 0x1be0 )]
|
||||
public class BaseLog : Item, ICommodity, IAxe, IResource
|
||||
{
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set { m_Resource = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return CraftResources.IsStandard( m_Resource ) ? LabelNumber : 1075062 + ( (int)m_Resource - (int)CraftResource.RegularWood ); } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
[Constructable]
|
||||
public BaseLog() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseLog( int amount ) : this( CraftResource.RegularWood, amount )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BaseLog( CraftResource resource )
|
||||
: this( resource, 1 )
|
||||
{
|
||||
}
|
||||
[Constructable]
|
||||
public BaseLog( CraftResource resource, int amount )
|
||||
: base( 0x1BDD )
|
||||
{
|
||||
Stackable = true;
|
||||
Weight = 2.0;
|
||||
Amount = amount;
|
||||
|
||||
m_Resource = resource;
|
||||
Hue = CraftResources.GetHue( resource );
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber( m_Resource );
|
||||
|
||||
if ( num > 0 )
|
||||
list.Add( num );
|
||||
else
|
||||
list.Add( CraftResources.GetName( m_Resource ) );
|
||||
}
|
||||
}
|
||||
public BaseLog( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 2 ); // version
|
||||
|
||||
writer.Write( (int)m_Resource );
|
||||
}
|
||||
|
||||
public static bool UpdatingBaseLogClass;
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 1)
|
||||
UpdatingBaseLogClass = true;
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
|
||||
if ( version == 0 )
|
||||
m_Resource = CraftResource.RegularWood;
|
||||
}
|
||||
|
||||
public virtual bool TryCreateBoards( Mobile from, double skill, Item item )
|
||||
{
|
||||
if (Deleted || !from.CanSee(this))
|
||||
{
|
||||
item.Delete();
|
||||
return false;
|
||||
}
|
||||
if (from.Skills.Carpentry.Value < skill && from.Skills.Lumberjacking.Value < skill)
|
||||
{
|
||||
item.Delete();
|
||||
from.SendLocalizedMessage(1072652); // You cannot work this strange and unusual wood.
|
||||
return false;
|
||||
}
|
||||
|
||||
if (HasSocket<Caddellite>())
|
||||
{
|
||||
item.AttachSocket(new Caddellite());
|
||||
}
|
||||
|
||||
base.ScissorHelper( from, item, 1, false );
|
||||
return true;
|
||||
}
|
||||
|
||||
public virtual bool Axe( Mobile from, BaseAxe axe )
|
||||
{
|
||||
if ( !TryCreateBoards( from , 0, new Board() ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class Log : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public Log()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Log(int amount)
|
||||
: base(CraftResource.RegularWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Log(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);
|
||||
//don't deserialize anything on update
|
||||
if (BaseLog.UpdatingBaseLogClass)
|
||||
return;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 0, new Board()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class HeartwoodLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public HeartwoodLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HeartwoodLog(int amount)
|
||||
: base(CraftResource.Heartwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public HeartwoodLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 100, new HeartwoodBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class BloodwoodLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public BloodwoodLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BloodwoodLog(int amount)
|
||||
: base(CraftResource.Bloodwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BloodwoodLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 100, new BloodwoodBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class FrostwoodLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public FrostwoodLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FrostwoodLog(int amount)
|
||||
: base(CraftResource.Frostwood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public FrostwoodLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 100, new FrostwoodBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class OakLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public OakLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OakLog(int amount)
|
||||
: base(CraftResource.OakWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public OakLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 65, new OakBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class AshLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public AshLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AshLog(int amount)
|
||||
: base(CraftResource.AshWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public AshLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 80, new AshBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
public class YewLog : BaseLog
|
||||
{
|
||||
[Constructable]
|
||||
public YewLog()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public YewLog(int amount)
|
||||
: base(CraftResource.YewWood, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public YewLog(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 override bool Axe(Mobile from, BaseAxe axe)
|
||||
{
|
||||
if (!TryCreateBoards(from, 95, new YewBoard()))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
279
Scripts/Items/Resource/MagicFish.cs
Normal file
279
Scripts/Items/Resource/MagicFish.cs
Normal file
@@ -0,0 +1,279 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseMagicFish : Item
|
||||
{
|
||||
public BaseMagicFish(int hue)
|
||||
: base(0xDD6)
|
||||
{
|
||||
this.Hue = hue;
|
||||
}
|
||||
|
||||
public BaseMagicFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual int Bonus
|
||||
{
|
||||
get
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
public virtual StatType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatType.Str;
|
||||
}
|
||||
}
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
}
|
||||
public virtual bool Apply(Mobile from)
|
||||
{
|
||||
bool applied = Spells.SpellHelper.AddStatOffset(from, this.Type, this.Bonus, TimeSpan.FromMinutes(1.0));
|
||||
|
||||
if (!applied)
|
||||
from.SendLocalizedMessage(502173); // You are already under a similar effect.
|
||||
|
||||
return applied;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!this.IsChildOf(from.Backpack))
|
||||
{
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
else if (this.Apply(from))
|
||||
{
|
||||
from.FixedEffect(0x375A, 10, 15);
|
||||
from.PlaySound(0x1E7);
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 501774); // You swallow the fish whole!
|
||||
this.Delete();
|
||||
}
|
||||
}
|
||||
|
||||
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 PrizedFish : BaseMagicFish
|
||||
{
|
||||
[Constructable]
|
||||
public PrizedFish()
|
||||
: base(51)
|
||||
{
|
||||
}
|
||||
|
||||
public PrizedFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Bonus
|
||||
{
|
||||
get
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
public override StatType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatType.Int;
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1041073;
|
||||
}
|
||||
}// prized fish
|
||||
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 (this.Hue == 151)
|
||||
this.Hue = 51;
|
||||
}
|
||||
}
|
||||
|
||||
public class WondrousFish : BaseMagicFish
|
||||
{
|
||||
[Constructable]
|
||||
public WondrousFish()
|
||||
: base(86)
|
||||
{
|
||||
}
|
||||
|
||||
public WondrousFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Bonus
|
||||
{
|
||||
get
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
public override StatType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatType.Dex;
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1041074;
|
||||
}
|
||||
}// wondrous fish
|
||||
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 (this.Hue == 286)
|
||||
this.Hue = 86;
|
||||
}
|
||||
}
|
||||
|
||||
public class TrulyRareFish : BaseMagicFish
|
||||
{
|
||||
[Constructable]
|
||||
public TrulyRareFish()
|
||||
: base(76)
|
||||
{
|
||||
}
|
||||
|
||||
public TrulyRareFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int Bonus
|
||||
{
|
||||
get
|
||||
{
|
||||
return 5;
|
||||
}
|
||||
}
|
||||
public override StatType Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return StatType.Str;
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1041075;
|
||||
}
|
||||
}// truly rare fish
|
||||
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 (this.Hue == 376)
|
||||
this.Hue = 76;
|
||||
}
|
||||
}
|
||||
|
||||
public class PeculiarFish : BaseMagicFish
|
||||
{
|
||||
[Constructable]
|
||||
public PeculiarFish()
|
||||
: base(66)
|
||||
{
|
||||
}
|
||||
|
||||
public PeculiarFish(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1041076;
|
||||
}
|
||||
}// highly peculiar fish
|
||||
public override bool Apply(Mobile from)
|
||||
{
|
||||
from.Stam += 10;
|
||||
return true;
|
||||
}
|
||||
|
||||
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 (this.Hue == 266)
|
||||
this.Hue = 66;
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/MandrakeRoot.cs
Normal file
52
Scripts/Items/Resource/MandrakeRoot.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MandrakeRoot : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public MandrakeRoot()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MandrakeRoot(int amount)
|
||||
: base(0xF86, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public MandrakeRoot(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
50
Scripts/Items/Resource/MedusaBlood.cs
Normal file
50
Scripts/Items/Resource/MedusaBlood.cs
Normal file
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MedusaBlood : Item, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public MedusaBlood()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MedusaBlood(int amount)
|
||||
: base(0x2DB6)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public MedusaBlood(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1031702;
|
||||
}
|
||||
}// Medusa Blood
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resource/MedusaDarkScales.cs
Normal file
48
Scripts/Items/Resource/MedusaDarkScales.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MedusaDarkScales : Item
|
||||
{
|
||||
[Constructable]
|
||||
public MedusaDarkScales()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MedusaDarkScales(int amount)
|
||||
: base(9908)
|
||||
{
|
||||
this.Hue = 2223;
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public MedusaDarkScales(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1112626;
|
||||
}
|
||||
}// Medusa Scales
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Resource/MedusaLightScales.cs
Normal file
48
Scripts/Items/Resource/MedusaLightScales.cs
Normal file
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MedusaLightScales : Item
|
||||
{
|
||||
[Constructable]
|
||||
public MedusaLightScales()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MedusaLightScales(int amount)
|
||||
: base(9908)
|
||||
{
|
||||
this.Hue = 1266;
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public MedusaLightScales(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1112626;
|
||||
}
|
||||
}// Medusa Scales
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
1105
Scripts/Items/Resource/MiscMLResources.cs
Normal file
1105
Scripts/Items/Resource/MiscMLResources.cs
Normal file
File diff suppressed because it is too large
Load Diff
52
Scripts/Items/Resource/Nightshade.cs
Normal file
52
Scripts/Items/Resource/Nightshade.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Nightshade : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public Nightshade()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Nightshade(int amount)
|
||||
: base(0xF88, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public Nightshade(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/NoxCrystal.cs
Normal file
52
Scripts/Items/Resource/NoxCrystal.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NoxCrystal : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public NoxCrystal()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public NoxCrystal(int amount)
|
||||
: base(0xF8E, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public NoxCrystal(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Resource/OceanSapphire.cs
Normal file
44
Scripts/Items/Resource/OceanSapphire.cs
Normal file
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class OceanSapphire : Item, ICommodity
|
||||
{
|
||||
public override int LabelNumber { get { return 1159162; } } // ocean sapphire
|
||||
|
||||
[Constructable]
|
||||
public OceanSapphire()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OceanSapphire(int amount)
|
||||
: base(0xA414)
|
||||
{
|
||||
Hue = 1917;
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public OceanSapphire(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description { get { return LabelNumber; } }
|
||||
bool ICommodity.IsDeedable { get { return true; } }
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Scripts/Items/Resource/OilFlask.cs
Normal file
84
Scripts/Items/Resource/OilFlask.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class EmptyOilFlask : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1150866; } } // empty oil flask
|
||||
|
||||
[Constructable]
|
||||
public EmptyOilFlask()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EmptyOilFlask(int amount)
|
||||
: base(0x1C18)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public EmptyOilFlask(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();
|
||||
}
|
||||
}
|
||||
|
||||
[TypeAlias("Server.Items.FlaskOfOil ")]
|
||||
public class OilFlask : Item
|
||||
{
|
||||
[Constructable]
|
||||
public OilFlask()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public OilFlask(int amount)
|
||||
: base(0x1C18)
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
}
|
||||
|
||||
public OilFlask(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1027199; // Oil Flask
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
816
Scripts/Items/Resource/Ore.cs
Normal file
816
Scripts/Items/Resource/Ore.cs
Normal file
@@ -0,0 +1,816 @@
|
||||
using System;
|
||||
using Server.Engines.Craft;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseOre : Item
|
||||
{
|
||||
protected virtual CraftResource DefaultResource { get { return CraftResource.Iron; } }
|
||||
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Resource;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Resource = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public abstract BaseIngot GetIngot();
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)m_Resource);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 2: // Reset from Resource System
|
||||
m_Resource = DefaultResource;
|
||||
reader.ReadString();
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
m_Resource = (CraftResource)reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
OreInfo info;
|
||||
|
||||
switch ( reader.ReadInt() )
|
||||
{
|
||||
case 0:
|
||||
info = OreInfo.Iron;
|
||||
break;
|
||||
case 1:
|
||||
info = OreInfo.DullCopper;
|
||||
break;
|
||||
case 2:
|
||||
info = OreInfo.ShadowIron;
|
||||
break;
|
||||
case 3:
|
||||
info = OreInfo.Copper;
|
||||
break;
|
||||
case 4:
|
||||
info = OreInfo.Bronze;
|
||||
break;
|
||||
case 5:
|
||||
info = OreInfo.Gold;
|
||||
break;
|
||||
case 6:
|
||||
info = OreInfo.Agapite;
|
||||
break;
|
||||
case 7:
|
||||
info = OreInfo.Verite;
|
||||
break;
|
||||
case 8:
|
||||
info = OreInfo.Valorite;
|
||||
break;
|
||||
default:
|
||||
info = null;
|
||||
break;
|
||||
}
|
||||
|
||||
m_Resource = CraftResources.GetFromOreInfo(info);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static int RandomSize()
|
||||
{
|
||||
double rand = Utility.RandomDouble();
|
||||
|
||||
if (rand < 0.12)
|
||||
return 0x19B7;
|
||||
else if (rand < 0.18)
|
||||
return 0x19B8;
|
||||
else if (rand < 0.25)
|
||||
return 0x19BA;
|
||||
else
|
||||
return 0x19B9;
|
||||
}
|
||||
|
||||
public BaseOre(CraftResource resource)
|
||||
: this(resource, 1)
|
||||
{
|
||||
}
|
||||
|
||||
public BaseOre(CraftResource resource, int amount)
|
||||
: base(RandomSize())
|
||||
{
|
||||
Stackable = true;
|
||||
Amount = amount;
|
||||
Hue = CraftResources.GetHue(resource);
|
||||
|
||||
m_Resource = resource;
|
||||
}
|
||||
|
||||
public BaseOre(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
if (Amount > 1)
|
||||
list.Add(1050039, "{0}\t#{1}", Amount, 1026583); // ~1_NUMBER~ ~2_ITEMNAME~
|
||||
else
|
||||
list.Add(1026583); // ore
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
if (!CraftResources.IsStandard(m_Resource))
|
||||
{
|
||||
int num = CraftResources.GetLocalizationNumber(m_Resource);
|
||||
|
||||
if (num > 0)
|
||||
list.Add(num);
|
||||
else
|
||||
list.Add(CraftResources.GetName(m_Resource));
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Resource >= CraftResource.DullCopper && m_Resource <= CraftResource.Valorite)
|
||||
return 1042845 + (int)(m_Resource - CraftResource.DullCopper);
|
||||
|
||||
return 1042853; // iron ore;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!Movable)
|
||||
return;
|
||||
|
||||
if (RootParent is BaseCreature)
|
||||
{
|
||||
from.SendLocalizedMessage(500447); // That is not accessible
|
||||
}
|
||||
else if (from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
from.SendLocalizedMessage(501971); // Select the forge on which to smelt the ore, or another pile of ore with which to combine it.
|
||||
from.Target = new InternalTarget(this);
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(501976); // The ore is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private readonly BaseOre m_Ore;
|
||||
|
||||
public InternalTarget(BaseOre ore)
|
||||
: base(2, false, TargetFlags.None)
|
||||
{
|
||||
m_Ore = ore;
|
||||
}
|
||||
|
||||
private bool IsForge(object obj)
|
||||
{
|
||||
if (Core.ML && obj is Mobile && ((Mobile)obj).IsDeadBondedPet)
|
||||
return false;
|
||||
|
||||
if (obj.GetType().IsDefined(typeof(ForgeAttribute), false))
|
||||
return true;
|
||||
|
||||
int itemID = 0;
|
||||
|
||||
if (obj is Item)
|
||||
itemID = ((Item)obj).ItemID;
|
||||
else if (obj is StaticTarget)
|
||||
itemID = ((StaticTarget)obj).ItemID;
|
||||
|
||||
return (itemID == 4017 || (itemID >= 6522 && itemID <= 6569));
|
||||
}
|
||||
|
||||
protected override void OnTarget(Mobile from, object targeted)
|
||||
{
|
||||
if (m_Ore.Deleted)
|
||||
return;
|
||||
|
||||
if (!from.InRange(m_Ore.GetWorldLocation(), 2))
|
||||
{
|
||||
from.SendLocalizedMessage(501976); // The ore is too far away.
|
||||
return;
|
||||
}
|
||||
|
||||
#region Combine Ore
|
||||
if (targeted is BaseOre)
|
||||
{
|
||||
BaseOre ore = (BaseOre)targeted;
|
||||
|
||||
if (!ore.Movable)
|
||||
{
|
||||
return;
|
||||
}
|
||||
else if (m_Ore == ore)
|
||||
{
|
||||
from.SendLocalizedMessage(501972); // Select another pile or ore with which to combine
|
||||
from.Target = new InternalTarget(ore);
|
||||
return;
|
||||
}
|
||||
else if (ore.Resource != m_Ore.Resource)
|
||||
{
|
||||
from.SendLocalizedMessage(501979); // You cannot combine ores of different metals.
|
||||
return;
|
||||
}
|
||||
|
||||
int worth = ore.Amount;
|
||||
|
||||
if (ore.ItemID == 0x19B9)
|
||||
worth *= 8;
|
||||
else if (ore.ItemID == 0x19B7)
|
||||
worth *= 2;
|
||||
else
|
||||
worth *= 4;
|
||||
|
||||
int sourceWorth = m_Ore.Amount;
|
||||
|
||||
if (m_Ore.ItemID == 0x19B9)
|
||||
sourceWorth *= 8;
|
||||
else if (m_Ore.ItemID == 0x19B7)
|
||||
sourceWorth *= 2;
|
||||
else
|
||||
sourceWorth *= 4;
|
||||
|
||||
worth += sourceWorth;
|
||||
|
||||
int plusWeight = 0;
|
||||
int newID = ore.ItemID;
|
||||
|
||||
if (ore.DefaultWeight != m_Ore.DefaultWeight)
|
||||
{
|
||||
if (ore.ItemID == 0x19B7 || m_Ore.ItemID == 0x19B7)
|
||||
{
|
||||
newID = 0x19B7;
|
||||
}
|
||||
else if (ore.ItemID == 0x19B9)
|
||||
{
|
||||
newID = m_Ore.ItemID;
|
||||
plusWeight = ore.Amount * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
plusWeight = m_Ore.Amount * 2;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ore.ItemID == 0x19B9 && worth > 120000) || ((ore.ItemID == 0x19B8 || ore.ItemID == 0x19BA) && worth > 60000) || (ore.ItemID == 0x19B7 && worth > 30000))
|
||||
{
|
||||
from.SendLocalizedMessage(1062844); // There is too much ore to combine.
|
||||
return;
|
||||
}
|
||||
else if (ore.RootParent is Mobile && (plusWeight + ((Mobile)ore.RootParent).Backpack.TotalWeight) > ((Mobile)ore.RootParent).Backpack.MaxWeight)
|
||||
{
|
||||
from.SendLocalizedMessage(501978); // The weight is too great to combine in a container.
|
||||
return;
|
||||
}
|
||||
|
||||
ore.ItemID = newID;
|
||||
|
||||
if (ore.ItemID == 0x19B9)
|
||||
ore.Amount = worth / 8;
|
||||
else if (ore.ItemID == 0x19B7)
|
||||
ore.Amount = worth / 2;
|
||||
else
|
||||
ore.Amount = worth / 4;
|
||||
|
||||
m_Ore.Delete();
|
||||
return;
|
||||
}
|
||||
#endregion
|
||||
|
||||
if (IsForge(targeted))
|
||||
{
|
||||
double difficulty;
|
||||
|
||||
#region Void Pool Rewards
|
||||
bool talisman = false;
|
||||
SmeltersTalisman t = from.FindItemOnLayer(Layer.Talisman) as SmeltersTalisman;
|
||||
if (t != null && t.Resource == m_Ore.Resource)
|
||||
talisman = true;
|
||||
#endregion
|
||||
|
||||
switch ( m_Ore.Resource )
|
||||
{
|
||||
default:
|
||||
difficulty = 50.0;
|
||||
break;
|
||||
case CraftResource.DullCopper:
|
||||
difficulty = 65.0;
|
||||
break;
|
||||
case CraftResource.ShadowIron:
|
||||
difficulty = 70.0;
|
||||
break;
|
||||
case CraftResource.Copper:
|
||||
difficulty = 75.0;
|
||||
break;
|
||||
case CraftResource.Bronze:
|
||||
difficulty = 80.0;
|
||||
break;
|
||||
case CraftResource.Gold:
|
||||
difficulty = 85.0;
|
||||
break;
|
||||
case CraftResource.Agapite:
|
||||
difficulty = 90.0;
|
||||
break;
|
||||
case CraftResource.Verite:
|
||||
difficulty = 95.0;
|
||||
break;
|
||||
case CraftResource.Valorite:
|
||||
difficulty = 99.0;
|
||||
break;
|
||||
}
|
||||
|
||||
double minSkill = difficulty - 25.0;
|
||||
double maxSkill = difficulty + 25.0;
|
||||
|
||||
if (difficulty > 50.0 && difficulty > from.Skills[SkillName.Mining].Value && !talisman)
|
||||
{
|
||||
from.SendLocalizedMessage(501986); // You have no idea how to smelt this strange ore!
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_Ore.ItemID == 0x19B7 && m_Ore.Amount < 2)
|
||||
{
|
||||
from.SendLocalizedMessage(501987); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
return;
|
||||
}
|
||||
|
||||
if (talisman || from.CheckTargetSkill(SkillName.Mining, targeted, minSkill, maxSkill))
|
||||
{
|
||||
int toConsume = m_Ore.Amount;
|
||||
|
||||
if (toConsume <= 0)
|
||||
{
|
||||
from.SendLocalizedMessage(501987); // There is not enough metal-bearing ore in this pile to make an ingot.
|
||||
}
|
||||
else
|
||||
{
|
||||
if (toConsume > 30000)
|
||||
toConsume = 30000;
|
||||
|
||||
int ingotAmount;
|
||||
|
||||
if (m_Ore.ItemID == 0x19B7)
|
||||
{
|
||||
ingotAmount = toConsume / 2;
|
||||
|
||||
if (toConsume % 2 != 0)
|
||||
--toConsume;
|
||||
}
|
||||
else if (m_Ore.ItemID == 0x19B9)
|
||||
{
|
||||
ingotAmount = toConsume * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
ingotAmount = toConsume;
|
||||
}
|
||||
|
||||
BaseIngot ingot = m_Ore.GetIngot();
|
||||
ingot.Amount = ingotAmount;
|
||||
|
||||
if (m_Ore.HasSocket<Caddellite>())
|
||||
{
|
||||
ingot.AttachSocket(new Caddellite());
|
||||
}
|
||||
|
||||
m_Ore.Consume(toConsume);
|
||||
from.AddToBackpack(ingot);
|
||||
//from.PlaySound( 0x57 );
|
||||
|
||||
if (talisman && t != null)
|
||||
{
|
||||
t.UsesRemaining--;
|
||||
from.SendLocalizedMessage(1152620); // The magic of your talisman guides your hands as you purify the metal. Success is ensured!
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(501988); // You smelt the ore removing the impurities and put the metal in your backpack.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (m_Ore.Amount < 2)
|
||||
{
|
||||
if (m_Ore.ItemID == 0x19B9)
|
||||
m_Ore.ItemID = 0x19B8;
|
||||
else
|
||||
m_Ore.ItemID = 0x19B7;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Ore.Amount /= 2;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage(501990); // You burn away the impurities but are left with less useable metal.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class IronOre : BaseOre
|
||||
{
|
||||
[Constructable]
|
||||
public IronOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public IronOre(int amount)
|
||||
: base(CraftResource.Iron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public IronOre(bool fixedSize)
|
||||
: this(1)
|
||||
{
|
||||
if (fixedSize)
|
||||
ItemID = 0x19B8;
|
||||
}
|
||||
|
||||
public IronOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new IronIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class DullCopperOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.DullCopper; } }
|
||||
|
||||
[Constructable]
|
||||
public DullCopperOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DullCopperOre(int amount)
|
||||
: base(CraftResource.DullCopper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public DullCopperOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new DullCopperIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class ShadowIronOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.ShadowIron; } }
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ShadowIronOre(int amount)
|
||||
: base(CraftResource.ShadowIron, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public ShadowIronOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new ShadowIronIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class CopperOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Copper; } }
|
||||
|
||||
[Constructable]
|
||||
public CopperOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public CopperOre(int amount)
|
||||
: base(CraftResource.Copper, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public CopperOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new CopperIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class BronzeOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Bronze; } }
|
||||
|
||||
[Constructable]
|
||||
public BronzeOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public BronzeOre(int amount)
|
||||
: base(CraftResource.Bronze, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public BronzeOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new BronzeIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class GoldOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Gold; } }
|
||||
|
||||
[Constructable]
|
||||
public GoldOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public GoldOre(int amount)
|
||||
: base(CraftResource.Gold, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public GoldOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new GoldIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class AgapiteOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Agapite; } }
|
||||
|
||||
[Constructable]
|
||||
public AgapiteOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AgapiteOre(int amount)
|
||||
: base(CraftResource.Agapite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public AgapiteOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new AgapiteIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class VeriteOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Verite; } }
|
||||
|
||||
[Constructable]
|
||||
public VeriteOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public VeriteOre(int amount)
|
||||
: base(CraftResource.Verite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public VeriteOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new VeriteIngot();
|
||||
}
|
||||
}
|
||||
|
||||
public class ValoriteOre : BaseOre
|
||||
{
|
||||
protected override CraftResource DefaultResource { get { return CraftResource.Valorite; } }
|
||||
|
||||
[Constructable]
|
||||
public ValoriteOre()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ValoriteOre(int amount)
|
||||
: base(CraftResource.Valorite, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public ValoriteOre(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 override BaseIngot GetIngot()
|
||||
{
|
||||
return new ValoriteIngot();
|
||||
}
|
||||
}
|
||||
}
|
||||
52
Scripts/Items/Resource/PigIron.cs
Normal file
52
Scripts/Items/Resource/PigIron.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PigIron : BaseReagent, ICommodity
|
||||
{
|
||||
[Constructable]
|
||||
public PigIron()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PigIron(int amount)
|
||||
: base(0xF8A, amount)
|
||||
{
|
||||
}
|
||||
|
||||
public PigIron(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
TextDefinition ICommodity.Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.LabelNumber;
|
||||
}
|
||||
}
|
||||
bool ICommodity.IsDeedable
|
||||
{
|
||||
get
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
92
Scripts/Items/Resource/PlantClippings.cs
Normal file
92
Scripts/Items/Resource/PlantClippings.cs
Normal file
@@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Engines.Plants;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PlantClippings : Item, IPlantHue
|
||||
{
|
||||
private PlantHue m_PlantHue;
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public PlantHue PlantHue { get { return m_PlantHue; } set { m_PlantHue = value; InvalidatePlantHue(); InvalidateProperties(); } }
|
||||
|
||||
public override int LabelNumber { get { return 1112131; } } // plant clippings
|
||||
|
||||
[Constructable]
|
||||
public PlantClippings()
|
||||
: this(PlantHue.Plain)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PlantClippings(PlantHue hue)
|
||||
: base(0x4022)
|
||||
{
|
||||
m_PlantHue = hue;
|
||||
InvalidatePlantHue();
|
||||
Stackable = true;
|
||||
}
|
||||
|
||||
public void InvalidatePlantHue()
|
||||
{
|
||||
PlantHueInfo info = PlantHueInfo.GetInfo(m_PlantHue);
|
||||
|
||||
if (info == null)
|
||||
{
|
||||
m_PlantHue = PlantHue.Plain;
|
||||
Hue = 0;
|
||||
}
|
||||
else
|
||||
Hue = info.Hue;
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
|
||||
public override void AddNameProperty(ObjectPropertyList list)
|
||||
{
|
||||
PlantHueInfo info = PlantHueInfo.GetInfo(m_PlantHue);
|
||||
|
||||
if (this.Amount > 1)
|
||||
list.Add(info.IsBright() ? 1113272 : 1113274, String.Format("{0}\t#{1}", Amount.ToString(), info.Name)); //~1_AMOUNT~ bright ~2_COLOR~ plant clippings
|
||||
else
|
||||
list.Add(info.IsBright() ? 1112121 : 1112122, String.Format("#{0}", info.Name)); //bright ~1_COLOR~ plant clippings
|
||||
}
|
||||
|
||||
public override bool WillStack(Mobile from, Item dropped)
|
||||
{
|
||||
return dropped is IPlantHue && ((IPlantHue)dropped).PlantHue == m_PlantHue && base.WillStack(from, dropped);
|
||||
}
|
||||
|
||||
public override void OnAfterDuped(Item newItem)
|
||||
{
|
||||
if (newItem is IPlantHue)
|
||||
((IPlantHue)newItem).PlantHue = this.PlantHue;
|
||||
|
||||
base.OnAfterDuped(newItem);
|
||||
}
|
||||
|
||||
public PlantClippings(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.Write((int)1);
|
||||
|
||||
writer.Write((int)m_PlantHue);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int v = reader.ReadInt();
|
||||
|
||||
if(v > 0)
|
||||
m_PlantHue = (PlantHue)reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
33
Scripts/Items/Resource/PolishedMeteorite.cs
Normal file
33
Scripts/Items/Resource/PolishedMeteorite.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PolishedMeteorite : Item
|
||||
{
|
||||
public override int LabelNumber { get { return 1158693; } } // polished meteorite
|
||||
|
||||
[Constructable]
|
||||
public PolishedMeteorite()
|
||||
: base(41422 + Utility.Random(12))
|
||||
{
|
||||
Weight = 3;
|
||||
}
|
||||
|
||||
public PolishedMeteorite(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
388
Scripts/Items/Resource/PotionKeg.cs
Normal file
388
Scripts/Items/Resource/PotionKeg.cs
Normal file
@@ -0,0 +1,388 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PotionKeg : Item
|
||||
{
|
||||
private PotionEffect m_Type;
|
||||
private int m_Held;
|
||||
[Constructable]
|
||||
public PotionKeg()
|
||||
: base(0x1940)
|
||||
{
|
||||
UpdateWeight();
|
||||
}
|
||||
|
||||
public PotionKeg(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public int Held
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Held;
|
||||
}
|
||||
set
|
||||
{
|
||||
if (m_Held != value)
|
||||
{
|
||||
m_Held = value;
|
||||
UpdateWeight();
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
[CommandProperty(AccessLevel.GameMaster)]
|
||||
public PotionEffect Type
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Type;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Type = value;
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if (m_Held > 0 && (int)m_Type >= (int)PotionEffect.Conflagration)
|
||||
{
|
||||
switch (m_Type)
|
||||
{
|
||||
case PotionEffect.Parasitic: return 1080069;
|
||||
case PotionEffect.Darkglow: return 1080070;
|
||||
case PotionEffect.Invisibility: return 1080071;
|
||||
case PotionEffect.Conflagration: return 1072658;
|
||||
case PotionEffect.ConflagrationGreater: return 1072659;
|
||||
case PotionEffect.ConfusionBlast: return 1072662;
|
||||
case PotionEffect.ConfusionBlastGreater: return 1072663;
|
||||
}
|
||||
}
|
||||
|
||||
return (m_Held > 0 ? 1041620 + (int)m_Type : 1041641);
|
||||
}
|
||||
}
|
||||
public static void Initialize()
|
||||
{
|
||||
TileData.ItemTable[0x1940].Height = 4;
|
||||
}
|
||||
|
||||
public virtual void UpdateWeight()
|
||||
{
|
||||
int held = Math.Max(0, Math.Min(m_Held, 100));
|
||||
|
||||
Weight = 20 + ((held * 80) / 100);
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1); // version
|
||||
|
||||
writer.Write((int)m_Type);
|
||||
writer.Write((int)m_Held);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Type = (PotionEffect)reader.ReadInt();
|
||||
m_Held = reader.ReadInt();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (version < 1)
|
||||
Timer.DelayCall(TimeSpan.Zero, new TimerCallback(UpdateWeight));
|
||||
}
|
||||
|
||||
public override void GetProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.GetProperties(list);
|
||||
|
||||
int number;
|
||||
|
||||
if (m_Held <= 0)
|
||||
number = 502246; // The keg is empty.
|
||||
else if (m_Held < 5)
|
||||
number = 502248; // The keg is nearly empty.
|
||||
else if (m_Held < 20)
|
||||
number = 502249; // The keg is not very full.
|
||||
else if (m_Held < 30)
|
||||
number = 502250; // The keg is about one quarter full.
|
||||
else if (m_Held < 40)
|
||||
number = 502251; // The keg is about one third full.
|
||||
else if (m_Held < 47)
|
||||
number = 502252; // The keg is almost half full.
|
||||
else if (m_Held < 54)
|
||||
number = 502254; // The keg is approximately half full.
|
||||
else if (m_Held < 70)
|
||||
number = 502253; // The keg is more than half full.
|
||||
else if (m_Held < 80)
|
||||
number = 502255; // The keg is about three quarters full.
|
||||
else if (m_Held < 96)
|
||||
number = 502256; // The keg is very full.
|
||||
else if (m_Held < 100)
|
||||
number = 502257; // The liquid is almost to the top of the keg.
|
||||
else
|
||||
number = 502258; // The keg is completely full.
|
||||
|
||||
list.Add(number);
|
||||
}
|
||||
|
||||
public override void OnSingleClick(Mobile from)
|
||||
{
|
||||
base.OnSingleClick(from);
|
||||
|
||||
int number;
|
||||
|
||||
if (m_Held <= 0)
|
||||
number = 502246; // The keg is empty.
|
||||
else if (m_Held < 5)
|
||||
number = 502248; // The keg is nearly empty.
|
||||
else if (m_Held < 20)
|
||||
number = 502249; // The keg is not very full.
|
||||
else if (m_Held < 30)
|
||||
number = 502250; // The keg is about one quarter full.
|
||||
else if (m_Held < 40)
|
||||
number = 502251; // The keg is about one third full.
|
||||
else if (m_Held < 47)
|
||||
number = 502252; // The keg is almost half full.
|
||||
else if (m_Held < 54)
|
||||
number = 502254; // The keg is approximately half full.
|
||||
else if (m_Held < 70)
|
||||
number = 502253; // The keg is more than half full.
|
||||
else if (m_Held < 80)
|
||||
number = 502255; // The keg is about three quarters full.
|
||||
else if (m_Held < 96)
|
||||
number = 502256; // The keg is very full.
|
||||
else if (m_Held < 100)
|
||||
number = 502257; // The liquid is almost to the top of the keg.
|
||||
else
|
||||
number = 502258; // The keg is completely full.
|
||||
|
||||
LabelTo(from, number);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (from.InRange(GetWorldLocation(), 2))
|
||||
{
|
||||
if (m_Held > 0)
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
|
||||
if (pack != null && pack.ConsumeTotal(typeof(Bottle), 1))
|
||||
{
|
||||
from.SendLocalizedMessage(502242); // You pour some of the keg's contents into an empty bottle...
|
||||
|
||||
BasePotion pot = FillBottle();
|
||||
|
||||
if (pack.TryDropItem(from, pot, false))
|
||||
{
|
||||
from.SendLocalizedMessage(502243); // ...and place it into your backpack.
|
||||
from.PlaySound(0x240);
|
||||
|
||||
if (--Held == 0)
|
||||
from.SendLocalizedMessage(502245); // The keg is now empty.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502244); // ...but there is no room for the bottle in your backpack.
|
||||
pot.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: Target a bottle
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502246); // The keg is empty.
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.LocalOverheadMessage(Network.MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnDragDrop(Mobile from, Item item)
|
||||
{
|
||||
if (item is BasePotion)
|
||||
{
|
||||
BasePotion pot = (BasePotion)item;
|
||||
int toHold = Math.Min(100 - m_Held, pot.Amount);
|
||||
|
||||
if (pot.PotionEffect == PotionEffect.Darkglow || pot.PotionEffect == PotionEffect.Parasitic)
|
||||
{
|
||||
from.SendLocalizedMessage(502232); // The keg is not designed to hold that type of object.
|
||||
return false;
|
||||
}
|
||||
else if (toHold <= 0)
|
||||
{
|
||||
from.SendLocalizedMessage(502233); // The keg will not hold any more!
|
||||
return false;
|
||||
}
|
||||
else if (m_Held == 0)
|
||||
{
|
||||
if (GiveBottle(from, toHold))
|
||||
{
|
||||
m_Type = pot.PotionEffect;
|
||||
Held = toHold;
|
||||
|
||||
from.PlaySound(0x240);
|
||||
|
||||
from.SendLocalizedMessage(502237); // You place the empty bottle in your backpack.
|
||||
|
||||
item.Consume(toHold);
|
||||
|
||||
if (!item.Deleted)
|
||||
item.Bounce(from);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502238); // You don't have room for the empty bottle in your backpack.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (pot.PotionEffect != m_Type)
|
||||
{
|
||||
from.SendLocalizedMessage(502236); // You decide that it would be a bad idea to mix different types of potions.
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (GiveBottle(from, toHold))
|
||||
{
|
||||
Held += toHold;
|
||||
|
||||
from.PlaySound(0x240);
|
||||
|
||||
from.SendLocalizedMessage(502237); // You place the empty bottle in your backpack.
|
||||
|
||||
item.Consume(toHold);
|
||||
|
||||
if (!item.Deleted)
|
||||
item.Bounce(from);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502238); // You don't have room for the empty bottle in your backpack.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage(502232); // The keg is not designed to hold that type of object.
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public bool GiveBottle(Mobile m, int amount)
|
||||
{
|
||||
Container pack = m.Backpack;
|
||||
|
||||
Bottle bottle = new Bottle(amount);
|
||||
|
||||
if (pack == null || !pack.TryDropItem(m, bottle, false))
|
||||
{
|
||||
bottle.Delete();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public BasePotion FillBottle()
|
||||
{
|
||||
switch ( m_Type )
|
||||
{
|
||||
default:
|
||||
case PotionEffect.Nightsight:
|
||||
return new NightSightPotion();
|
||||
|
||||
case PotionEffect.CureLesser:
|
||||
return new LesserCurePotion();
|
||||
case PotionEffect.Cure:
|
||||
return new CurePotion();
|
||||
case PotionEffect.CureGreater:
|
||||
return new GreaterCurePotion();
|
||||
|
||||
case PotionEffect.Agility:
|
||||
return new AgilityPotion();
|
||||
case PotionEffect.AgilityGreater:
|
||||
return new GreaterAgilityPotion();
|
||||
|
||||
case PotionEffect.Strength:
|
||||
return new StrengthPotion();
|
||||
case PotionEffect.StrengthGreater:
|
||||
return new GreaterStrengthPotion();
|
||||
|
||||
case PotionEffect.PoisonLesser:
|
||||
return new LesserPoisonPotion();
|
||||
case PotionEffect.Poison:
|
||||
return new PoisonPotion();
|
||||
case PotionEffect.PoisonGreater:
|
||||
return new GreaterPoisonPotion();
|
||||
case PotionEffect.PoisonDeadly:
|
||||
return new DeadlyPoisonPotion();
|
||||
|
||||
case PotionEffect.Refresh:
|
||||
return new RefreshPotion();
|
||||
case PotionEffect.RefreshTotal:
|
||||
return new TotalRefreshPotion();
|
||||
|
||||
case PotionEffect.HealLesser:
|
||||
return new LesserHealPotion();
|
||||
case PotionEffect.Heal:
|
||||
return new HealPotion();
|
||||
case PotionEffect.HealGreater:
|
||||
return new GreaterHealPotion();
|
||||
|
||||
case PotionEffect.ExplosionLesser:
|
||||
return new LesserExplosionPotion();
|
||||
case PotionEffect.Explosion:
|
||||
return new ExplosionPotion();
|
||||
case PotionEffect.ExplosionGreater:
|
||||
return new GreaterExplosionPotion();
|
||||
|
||||
case PotionEffect.Conflagration:
|
||||
return new ConflagrationPotion();
|
||||
case PotionEffect.ConflagrationGreater:
|
||||
return new GreaterConflagrationPotion();
|
||||
|
||||
case PotionEffect.ConfusionBlast:
|
||||
return new ConfusionBlastPotion();
|
||||
case PotionEffect.ConfusionBlastGreater:
|
||||
return new GreaterConfusionBlastPotion();
|
||||
|
||||
case PotionEffect.Invisibility:
|
||||
return new InvisibilityPotion();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Resource/PowderedIron.cs
Normal file
47
Scripts/Items/Resource/PowderedIron.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PowderedIron : Item
|
||||
{
|
||||
[Constructable]
|
||||
public PowderedIron()
|
||||
: this(1)
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public PowderedIron(int amount)
|
||||
: base(0x573D)
|
||||
{
|
||||
this.Stackable = true;
|
||||
this.Amount = amount;
|
||||
}
|
||||
|
||||
public PowderedIron(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
return 1113353;
|
||||
}
|
||||
}// powdered iron
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Resource/PowerCrystal.cs
Normal file
42
Scripts/Items/Resource/PowerCrystal.cs
Normal file
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PowerCrystal : Item
|
||||
{
|
||||
public override int LabelNumber {get {return 1112811;} } // power crystal
|
||||
|
||||
[Constructable]
|
||||
public PowerCrystal()
|
||||
: base(0x1F1C)
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public PowerCrystal(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (!from.InRange(this.GetWorldLocation(), 3))
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
|
||||
else
|
||||
from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1114372); // This looks like part of a larger contraption.
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user