Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
35
Scripts/Items/Artifacts/Tools/AmeliasToolbox.cs
Normal file
35
Scripts/Items/Artifacts/Tools/AmeliasToolbox.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AmeliasToolbox : TinkerTools
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
public override int LabelNumber { get { return 1077749; } }// Amelias Toolbox
|
||||
|
||||
[Constructable]
|
||||
public AmeliasToolbox()
|
||||
: base(500)
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
Hue = 1895; // TODO check
|
||||
}
|
||||
|
||||
public AmeliasToolbox(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
84
Scripts/Items/Artifacts/Tools/JacobsPickaxe.cs
Normal file
84
Scripts/Items/Artifacts/Tools/JacobsPickaxe.cs
Normal file
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class JacobsPickaxe : Pickaxe
|
||||
{
|
||||
private static List<JacobsPickaxe> _Instances = new List<JacobsPickaxe>();
|
||||
|
||||
public static void Initialize()
|
||||
{
|
||||
Timer.DelayCall(TimeSpan.FromMinutes(5), TimeSpan.FromMinutes(5), new TimerCallback(Tick_Callback));
|
||||
}
|
||||
|
||||
private static void Tick_Callback()
|
||||
{
|
||||
foreach (var pickaxe in _Instances.Where(p => p != null && !p.Deleted))
|
||||
{
|
||||
int charge = pickaxe.UsesRemaining + 10 > 20 ? 20 - pickaxe.UsesRemaining : 10;
|
||||
|
||||
if (charge > 0)
|
||||
pickaxe.UsesRemaining += charge;
|
||||
|
||||
pickaxe.InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
public override int LabelNumber { get { return 1077758; } } // Jacob's Pickaxe
|
||||
|
||||
[Constructable]
|
||||
public JacobsPickaxe()
|
||||
: base()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
SkillBonuses.SetValues(0, SkillName.Mining, 10.0);
|
||||
UsesRemaining = 20;
|
||||
|
||||
_Instances.Add(this);
|
||||
}
|
||||
|
||||
public override void OnDoubleClick(Mobile from)
|
||||
{
|
||||
if (HarvestSystem == null)
|
||||
return;
|
||||
|
||||
if (IsChildOf(from.Backpack) || Parent == from)
|
||||
{
|
||||
if (UsesRemaining > 0)
|
||||
HarvestSystem.BeginHarvesting(from, this);
|
||||
else
|
||||
from.SendLocalizedMessage(1072306); // You must wait a moment for it to recharge.
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
|
||||
}
|
||||
|
||||
public override void Delete()
|
||||
{
|
||||
base.Delete();
|
||||
|
||||
_Instances.Remove(this);
|
||||
}
|
||||
|
||||
public JacobsPickaxe(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
writer.WriteEncodedInt(0); // version
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
int version = reader.ReadEncodedInt();
|
||||
_Instances.Add(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
113
Scripts/Items/Artifacts/Tools/XenrrFishingPole.cs
Normal file
113
Scripts/Items/Artifacts/Tools/XenrrFishingPole.cs
Normal file
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class XenrrFishingPole : FishingPole
|
||||
{
|
||||
public override bool IsArtifact { get { return true; } }
|
||||
|
||||
public override bool OnEquip(Mobile from)
|
||||
{
|
||||
if (!base.OnEquip(from))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if (from.Mounted)
|
||||
{
|
||||
from.SendLocalizedMessage(1010097); // You cannot use this while mounted.
|
||||
return false;
|
||||
}
|
||||
else if (from.Flying)
|
||||
{
|
||||
from.SendLocalizedMessage(1113414); // You can't use this while flying!
|
||||
return false;
|
||||
}
|
||||
else if (from.IsBodyMod)
|
||||
{
|
||||
from.SendLocalizedMessage(1111896); // You may only change forms while in your original body.
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnAdded(object parent)
|
||||
{
|
||||
base.OnAdded(parent);
|
||||
|
||||
if (parent is Mobile)
|
||||
{
|
||||
Mobile from = parent as Mobile;
|
||||
|
||||
from.FixedParticles(0x3728, 1, 13, 5042, EffectLayer.Waist);
|
||||
|
||||
from.BodyMod = 723;
|
||||
from.HueMod = 0;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnRemoved(object parent)
|
||||
{
|
||||
base.OnRemoved(parent);
|
||||
|
||||
if (parent is Mobile && !Deleted)
|
||||
{
|
||||
Mobile m = (Mobile)parent;
|
||||
|
||||
m.BodyMod = 0;
|
||||
m.HueMod = -1;
|
||||
m.FixedParticles(0x3728, 1, 13, 5042, EffectLayer.Waist);
|
||||
}
|
||||
}
|
||||
public override int LabelNumber { get { return 1095066; } }
|
||||
|
||||
[Constructable]
|
||||
public XenrrFishingPole()
|
||||
{
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
Attributes.SpellChanneling = 1;
|
||||
Attributes.CastSpeed = -1;
|
||||
}
|
||||
|
||||
public XenrrFishingPole(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)1);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if (version == 0)
|
||||
{
|
||||
reader.ReadInt();
|
||||
reader.ReadInt();
|
||||
}
|
||||
|
||||
if (Parent is Mobile)
|
||||
{
|
||||
var m = (Mobile)Parent;
|
||||
|
||||
Timer.DelayCall(() =>
|
||||
{
|
||||
if (!m.Mounted && !m.Flying && !m.IsBodyMod)
|
||||
{
|
||||
m.BodyMod = 723;
|
||||
m.HueMod = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user