#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
71
Scripts/Items/Addons/AbbatoirAddon.cs
Normal file
71
Scripts/Items/Addons/AbbatoirAddon.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AbbatoirAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new AbbatoirDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AbbatoirAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x120E ), -1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x120F ), 0, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1210 ), 1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1215 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1216 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1211 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1214 ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1213 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1212 ), 1, 1, 0 );
|
||||
}
|
||||
|
||||
public AbbatoirAddon( 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 AbbatoirDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AbbatoirAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044329; } } // abbatoir
|
||||
|
||||
[Constructable]
|
||||
public AbbatoirDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public AbbatoirDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
285
Scripts/Items/Addons/AddonComponent.cs
Normal file
285
Scripts/Items/Addons/AddonComponent.cs
Normal file
|
|
@ -0,0 +1,285 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Server.Engines.Craft.Anvil]
|
||||
public class AnvilComponent : AddonComponent
|
||||
{
|
||||
[Constructable]
|
||||
public AnvilComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public AnvilComponent( 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();
|
||||
}
|
||||
}
|
||||
|
||||
[Server.Engines.Craft.Forge]
|
||||
public class ForgeComponent : AddonComponent
|
||||
{
|
||||
[Constructable]
|
||||
public ForgeComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
}
|
||||
|
||||
public ForgeComponent( 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 LocalizedAddonComponent : AddonComponent
|
||||
{
|
||||
private int m_LabelNumber;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Number
|
||||
{
|
||||
get{ return m_LabelNumber; }
|
||||
set{ m_LabelNumber = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
public override int LabelNumber{ get{ return m_LabelNumber; } }
|
||||
|
||||
[Constructable]
|
||||
public LocalizedAddonComponent( int itemID, int labelNumber ) : base( itemID )
|
||||
{
|
||||
m_LabelNumber = labelNumber;
|
||||
}
|
||||
|
||||
public LocalizedAddonComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( (int) m_LabelNumber );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_LabelNumber = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class AddonComponent : Item, IChopable
|
||||
{
|
||||
private Point3D m_Offset;
|
||||
private BaseAddon m_Addon;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Addon;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Addon = value;
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D Offset
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Offset;
|
||||
}
|
||||
set
|
||||
{
|
||||
m_Offset = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if ( m_Addon != null && m_Addon.ShareHue )
|
||||
m_Addon.Hue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool NeedsWall{ get{ return false; } }
|
||||
public virtual Point3D WallPosition{ get{ return Point3D.Zero; } }
|
||||
|
||||
[Constructable]
|
||||
public AddonComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
Movable = false;
|
||||
ApplyLightTo( this );
|
||||
}
|
||||
|
||||
public AddonComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.OnComponentUsed( this, from );
|
||||
}
|
||||
|
||||
public void OnChop( Mobile from )
|
||||
{
|
||||
if ( m_Addon != null && from.InRange( GetWorldLocation(), 3 ) )
|
||||
m_Addon.OnChop( from );
|
||||
else
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D old )
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Location = new Point3D( X - m_Offset.X, Y - m_Offset.Y, Z - m_Offset.Z );
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Map = Map;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Delete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( m_Addon );
|
||||
writer.Write( m_Offset );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Addon = reader.ReadItem() as BaseAddon;
|
||||
m_Offset = reader.ReadPoint3D();
|
||||
|
||||
if ( m_Addon != null )
|
||||
m_Addon.OnComponentLoaded( this );
|
||||
|
||||
ApplyLightTo( this );
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 1 && Weight == 0 )
|
||||
Weight = -1;
|
||||
}
|
||||
|
||||
public static void ApplyLightTo( Item item )
|
||||
{
|
||||
if ( (item.ItemData.Flags & TileFlag.LightSource) == 0 )
|
||||
return; // not a light source
|
||||
|
||||
int itemID = item.ItemID;
|
||||
|
||||
for ( int i = 0; i < m_Entries.Length; ++i )
|
||||
{
|
||||
LightEntry entry = m_Entries[i];
|
||||
int[] toMatch = entry.m_ItemIDs;
|
||||
bool contains = false;
|
||||
|
||||
for ( int j = 0; !contains && j < toMatch.Length; ++j )
|
||||
contains = ( itemID == toMatch[j] );
|
||||
|
||||
if ( contains )
|
||||
{
|
||||
item.Light = entry.m_Light;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static LightEntry[] m_Entries = new LightEntry[]
|
||||
{
|
||||
new LightEntry( LightType.WestSmall, 1122, 1123, 1124, 1141, 1142, 1143, 1144, 1145, 1146, 2347, 2359, 2360, 2361, 2362, 2363, 2364, 2387, 2388, 2389, 2390, 2391, 2392 ),
|
||||
new LightEntry( LightType.NorthSmall, 1131, 1133, 1134, 1147, 1148, 1149, 1150, 1151, 1152, 2352, 2373, 2374, 2375, 2376, 2377, 2378, 2401, 2402, 2403, 2404, 2405, 2406 ),
|
||||
new LightEntry( LightType.Circle300, 6526, 6538, 6571 ),
|
||||
new LightEntry( LightType.Circle150, 5703, 6587 )
|
||||
};
|
||||
|
||||
private class LightEntry
|
||||
{
|
||||
public LightType m_Light;
|
||||
public int[] m_ItemIDs;
|
||||
|
||||
public LightEntry( LightType light, params int[] itemIDs )
|
||||
{
|
||||
m_Light = light;
|
||||
m_ItemIDs = itemIDs;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
171
Scripts/Items/Addons/AddonContainerComponent.cs
Normal file
171
Scripts/Items/Addons/AddonContainerComponent.cs
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AddonContainerComponent : Item, IChopable
|
||||
{
|
||||
public virtual bool NeedsWall { get { return false; } }
|
||||
public virtual Point3D WallPosition { get { return Point3D.Zero; } }
|
||||
|
||||
private Point3D m_Offset;
|
||||
private BaseAddonContainer m_Addon;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public BaseAddonContainer Addon
|
||||
{
|
||||
get { return m_Addon; }
|
||||
set { m_Addon = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Point3D Offset
|
||||
{
|
||||
get { return m_Offset; }
|
||||
set { m_Offset = value; }
|
||||
}
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int Hue
|
||||
{
|
||||
get { return base.Hue; }
|
||||
set
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if ( m_Addon != null && m_Addon.ShareHue )
|
||||
m_Addon.Hue = value;
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public AddonContainerComponent( int itemID ) : base( itemID )
|
||||
{
|
||||
Movable = false;
|
||||
|
||||
AddonComponent.ApplyLightTo( this );
|
||||
}
|
||||
|
||||
public AddonContainerComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item dropped )
|
||||
{
|
||||
if ( Addon != null )
|
||||
return Addon.OnDragDrop( from, dropped );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.OnComponentUsed( this, from );
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D old )
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Location = new Point3D( X - m_Offset.X, Y - m_Offset.Y, Z - m_Offset.Z );
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.GetContextMenuEntries( from, list );
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Map = Map;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
if ( m_Addon != null )
|
||||
m_Addon.Delete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Addon );
|
||||
writer.Write( m_Offset );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Addon = reader.ReadItem() as BaseAddonContainer;
|
||||
m_Offset = reader.ReadPoint3D();
|
||||
|
||||
if ( m_Addon != null )
|
||||
m_Addon.OnComponentLoaded( this );
|
||||
|
||||
AddonComponent.ApplyLightTo( this );
|
||||
}
|
||||
|
||||
public virtual void OnChop( Mobile from )
|
||||
{
|
||||
if ( m_Addon != null && from.InRange( GetWorldLocation(), 3 ) )
|
||||
m_Addon.OnChop( from );
|
||||
else
|
||||
from.SendLocalizedMessage( 500446 ); // That is too far away.
|
||||
}
|
||||
}
|
||||
|
||||
public class LocalizedContainerComponent : AddonContainerComponent
|
||||
{
|
||||
private int m_LabelNumber;
|
||||
|
||||
public override int LabelNumber
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_LabelNumber > 0 )
|
||||
return m_LabelNumber;
|
||||
|
||||
return base.LabelNumber;
|
||||
}
|
||||
}
|
||||
|
||||
public LocalizedContainerComponent( int itemID, int labelNumber ) : base( itemID )
|
||||
{
|
||||
m_LabelNumber = labelNumber;
|
||||
}
|
||||
|
||||
public LocalizedContainerComponent( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_LabelNumber );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_LabelNumber = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Scripts/Items/Addons/AnvilEastAddon.cs
Normal file
63
Scripts/Items/Addons/AnvilEastAddon.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AnvilEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new AnvilEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AnvilEastAddon()
|
||||
{
|
||||
AddComponent( new AnvilComponent( 0xFAF ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public AnvilEastAddon( 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 AnvilEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AnvilEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044333; } } // anvil (east)
|
||||
|
||||
[Constructable]
|
||||
public AnvilEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public AnvilEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Scripts/Items/Addons/AnvilSouthAddon.cs
Normal file
63
Scripts/Items/Addons/AnvilSouthAddon.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class AnvilSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new AnvilSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public AnvilSouthAddon()
|
||||
{
|
||||
AddComponent( new AnvilComponent( 0xFB0 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public AnvilSouthAddon( 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 AnvilSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new AnvilSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044334; } } // anvil (south)
|
||||
|
||||
[Constructable]
|
||||
public AnvilSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public AnvilSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
371
Scripts/Items/Addons/ArcheryButteAddon.cs
Normal file
371
Scripts/Items/Addons/ArcheryButteAddon.cs
Normal file
|
|
@ -0,0 +1,371 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x100A/*East*/, 0x100B/*South*/ )]
|
||||
public class ArcheryButte : AddonComponent
|
||||
{
|
||||
private double m_MinSkill;
|
||||
private double m_MaxSkill;
|
||||
|
||||
private int m_Arrows, m_Bolts;
|
||||
|
||||
private DateTime m_LastUse;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MinSkill
|
||||
{
|
||||
get{ return m_MinSkill; }
|
||||
set{ m_MinSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MaxSkill
|
||||
{
|
||||
get{ return m_MaxSkill; }
|
||||
set{ m_MaxSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime LastUse
|
||||
{
|
||||
get{ return m_LastUse; }
|
||||
set{ m_LastUse = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool FacingEast
|
||||
{
|
||||
get{ return ( ItemID == 0x100A ); }
|
||||
set{ ItemID = value ? 0x100A : 0x100B; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Arrows
|
||||
{
|
||||
get{ return m_Arrows; }
|
||||
set{ m_Arrows = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Bolts
|
||||
{
|
||||
get{ return m_Bolts; }
|
||||
set{ m_Bolts = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ArcheryButte() : this( 0x100A )
|
||||
{
|
||||
}
|
||||
|
||||
public ArcheryButte( int itemID ) : base( itemID )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
public ArcheryButte( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( (m_Arrows > 0 || m_Bolts > 0) && from.InRange( GetWorldLocation(), 1 ) )
|
||||
Gather( from );
|
||||
else
|
||||
Fire( from );
|
||||
}
|
||||
|
||||
public void Gather( Mobile from )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500592 ); // You gather the arrows and bolts.
|
||||
|
||||
if ( m_Arrows > 0 )
|
||||
from.AddToBackpack( new Arrow( m_Arrows ) );
|
||||
|
||||
if ( m_Bolts > 0 )
|
||||
from.AddToBackpack( new Bolt( m_Bolts ) );
|
||||
|
||||
m_Arrows = 0;
|
||||
m_Bolts = 0;
|
||||
|
||||
m_Entries = null;
|
||||
}
|
||||
|
||||
private static TimeSpan UseDelay = TimeSpan.FromSeconds( 2.0 );
|
||||
|
||||
private class ScoreEntry
|
||||
{
|
||||
private int m_Total;
|
||||
private int m_Count;
|
||||
|
||||
public int Total{ get{ return m_Total; } set{ m_Total = value; } }
|
||||
public int Count{ get{ return m_Count; } set{ m_Count = value; } }
|
||||
|
||||
public void Record( int score )
|
||||
{
|
||||
m_Total += score;
|
||||
m_Count += 1;
|
||||
}
|
||||
|
||||
public ScoreEntry()
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private Hashtable m_Entries;
|
||||
|
||||
private ScoreEntry GetEntryFor( Mobile from )
|
||||
{
|
||||
if ( m_Entries == null )
|
||||
m_Entries = new Hashtable();
|
||||
|
||||
ScoreEntry e = (ScoreEntry)m_Entries[from];
|
||||
|
||||
if ( e == null )
|
||||
m_Entries[from] = e = new ScoreEntry();
|
||||
|
||||
return e;
|
||||
}
|
||||
|
||||
public void Fire( Mobile from )
|
||||
{
|
||||
BaseRanged bow = from.Weapon as BaseRanged;
|
||||
|
||||
if ( bow == null )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 500593 ); // You must practice with ranged weapons on this.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( DateTime.Now < (m_LastUse + UseDelay) )
|
||||
return;
|
||||
|
||||
Point3D worldLoc = GetWorldLocation();
|
||||
|
||||
if ( FacingEast ? from.X <= worldLoc.X : from.Y <= worldLoc.Y )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500596 ); // You would do better to stand in front of the archery butte.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( FacingEast ? from.Y != worldLoc.Y : from.X != worldLoc.X )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500597 ); // You aren't properly lined up with the archery butte to get an accurate shot.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !from.InRange( worldLoc, 6 ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500598 ); // You are too far away from the archery butte to get an accurate shot.
|
||||
return;
|
||||
}
|
||||
else if ( from.InRange( worldLoc, 4 ) )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500599 ); // You are too close to the target.
|
||||
return;
|
||||
}
|
||||
|
||||
Container pack = from.Backpack;
|
||||
Type ammoType = bow.AmmoType;
|
||||
|
||||
bool isArrow = ( ammoType == typeof( Arrow ) );
|
||||
bool isBolt = ( ammoType == typeof( Bolt ) );
|
||||
bool isKnown = ( isArrow || isBolt );
|
||||
|
||||
if ( from is PlayerMobile && ( pack == null || !pack.ConsumeTotal( ammoType, 1 ) ) )
|
||||
{
|
||||
if ( isArrow )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500594 ); // You do not have any arrows with which to practice.
|
||||
else if ( isBolt )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500595 ); // You do not have any crossbow bolts with which to practice.
|
||||
else
|
||||
SendLocalizedMessageTo( from, 500593 ); // You must practice with ranged weapons on this.
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
m_LastUse = DateTime.Now;
|
||||
|
||||
from.Direction = from.GetDirectionTo( GetWorldLocation() );
|
||||
bow.PlaySwingAnimation( from );
|
||||
from.MovingEffect( this, bow.EffectID, 18, 1, false, false );
|
||||
|
||||
ScoreEntry se = GetEntryFor( from );
|
||||
|
||||
if ( from is PlayerMobile && !from.CheckSkill( bow.Skill, m_MinSkill, m_MaxSkill ) )
|
||||
{
|
||||
from.PlaySound( bow.MissSound );
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 500604, from.Name ); // You miss the target altogether.
|
||||
|
||||
se.Record( 0 );
|
||||
|
||||
if ( se.Count == 1 )
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1062719, se.Total.ToString() );
|
||||
else
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1042683, String.Format( "{0}\t{1}", se.Total, se.Count ) );
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
Effects.PlaySound( Location, Map, 0x2B1 );
|
||||
|
||||
if ( from is PlayerMobile )
|
||||
{
|
||||
double rand = Utility.RandomDouble();
|
||||
|
||||
int area, score, splitScore;
|
||||
|
||||
if ( 0.10 > rand )
|
||||
{
|
||||
area = 0; // bullseye
|
||||
score = 50;
|
||||
splitScore = 100;
|
||||
}
|
||||
else if ( 0.25 > rand )
|
||||
{
|
||||
area = 1; // inner ring
|
||||
score = 10;
|
||||
splitScore = 20;
|
||||
}
|
||||
else if ( 0.50 > rand )
|
||||
{
|
||||
area = 2; // middle ring
|
||||
score = 5;
|
||||
splitScore = 15;
|
||||
}
|
||||
else
|
||||
{
|
||||
area = 3; // outer ring
|
||||
score = 2;
|
||||
splitScore = 5;
|
||||
}
|
||||
|
||||
bool split = ( isKnown && ((m_Arrows + m_Bolts) * 0.02) > Utility.RandomDouble() );
|
||||
|
||||
if ( split )
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1010027 + (isArrow ? 0 : 4) + area, from.Name );
|
||||
}
|
||||
else
|
||||
{
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1010035 + area, from.Name );
|
||||
|
||||
if ( isArrow )
|
||||
++m_Arrows;
|
||||
else if ( isBolt )
|
||||
++m_Bolts;
|
||||
}
|
||||
|
||||
se.Record( split ? splitScore : score );
|
||||
|
||||
if ( se.Count == 1 )
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1062719, se.Total.ToString() );
|
||||
else
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, 1042683, String.Format( "{0}\t{1}", se.Total, se.Count ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
writer.Write( m_MinSkill );
|
||||
writer.Write( m_MaxSkill );
|
||||
writer.Write( m_Arrows );
|
||||
writer.Write( m_Bolts );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_MinSkill = reader.ReadDouble();
|
||||
m_MaxSkill = reader.ReadDouble();
|
||||
m_Arrows = reader.ReadInt();
|
||||
m_Bolts = reader.ReadInt();
|
||||
|
||||
if ( m_MinSkill == 0.0 && m_MaxSkill == 30.0 )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class ArcheryButteAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new ArcheryButteDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public ArcheryButteAddon()
|
||||
{
|
||||
AddComponent( new ArcheryButte( 0x100A ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public ArcheryButteAddon( 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 ArcheryButteDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new ArcheryButteAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1024106; } } // archery butte
|
||||
|
||||
[Constructable]
|
||||
public ArcheryButteDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public ArcheryButteDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
277
Scripts/Items/Addons/BaseAddon.cs
Normal file
277
Scripts/Items/Addons/BaseAddon.cs
Normal file
|
|
@ -0,0 +1,277 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum AddonFitResult
|
||||
{
|
||||
Valid,
|
||||
Blocked,
|
||||
NotInHouse,
|
||||
DoorTooClose,
|
||||
NoWall,
|
||||
DoorsNotClosed
|
||||
}
|
||||
|
||||
public interface IAddon
|
||||
{
|
||||
Item Deed{ get; }
|
||||
|
||||
bool CouldFit( IPoint3D p, Map map );
|
||||
}
|
||||
|
||||
public abstract class BaseAddon : Item, IChopable, IAddon
|
||||
{
|
||||
private List<AddonComponent> m_Components;
|
||||
|
||||
public void AddComponent( AddonComponent c, int x, int y, int z )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
m_Components.Add( c );
|
||||
|
||||
c.Addon = this;
|
||||
c.Offset = new Point3D( x, y, z );
|
||||
c.MoveToWorld( new Point3D( X + x, Y + y, Z + z ), Map );
|
||||
}
|
||||
|
||||
public BaseAddon() : base( 1 )
|
||||
{
|
||||
Movable = false;
|
||||
Visible = false;
|
||||
|
||||
m_Components = new List<AddonComponent>();
|
||||
}
|
||||
|
||||
public virtual bool RetainDeedHue{ get{ return false; } }
|
||||
|
||||
public virtual void OnChop( Mobile from )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house != null && house.IsOwner( from ) && house.Addons.Contains( this ) )
|
||||
{
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x3B3 );
|
||||
from.SendLocalizedMessage( 500461 ); // You destroy the item.
|
||||
|
||||
int hue = 0;
|
||||
|
||||
if ( RetainDeedHue )
|
||||
{
|
||||
for ( int i = 0; hue == 0 && i < m_Components.Count; ++i )
|
||||
{
|
||||
AddonComponent c = m_Components[i];
|
||||
|
||||
if ( c.Hue != 0 )
|
||||
hue = c.Hue;
|
||||
}
|
||||
}
|
||||
|
||||
Delete();
|
||||
|
||||
house.Addons.Remove( this );
|
||||
|
||||
BaseAddonDeed deed = Deed;
|
||||
|
||||
if ( deed != null )
|
||||
{
|
||||
if ( RetainDeedHue )
|
||||
deed.Hue = hue;
|
||||
|
||||
from.AddToBackpack( deed );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual BaseAddonDeed Deed{ get{ return null; } }
|
||||
|
||||
Item IAddon.Deed
|
||||
{
|
||||
get{ return this.Deed; }
|
||||
}
|
||||
|
||||
public List<AddonComponent> Components
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Components;
|
||||
}
|
||||
}
|
||||
|
||||
public BaseAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public bool CouldFit( IPoint3D p, Map map )
|
||||
{
|
||||
BaseHouse h = null;
|
||||
return ( CouldFit( p, map, null, ref h ) == AddonFitResult.Valid );
|
||||
}
|
||||
|
||||
public virtual AddonFitResult CouldFit( IPoint3D p, Map map, Mobile from, ref BaseHouse house )
|
||||
{
|
||||
if ( Deleted )
|
||||
return AddonFitResult.Blocked;
|
||||
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
{
|
||||
Point3D p3D = new Point3D( p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z );
|
||||
|
||||
if ( !map.CanFit( p3D.X, p3D.Y, p3D.Z, c.ItemData.Height, false, true, ( c.Z == 0 ) ) )
|
||||
return AddonFitResult.Blocked;
|
||||
else if ( !CheckHouse( from, p3D, map, c.ItemData.Height, ref house ) )
|
||||
return AddonFitResult.NotInHouse;
|
||||
|
||||
if ( c.NeedsWall )
|
||||
{
|
||||
Point3D wall = c.WallPosition;
|
||||
|
||||
if ( !IsWall( p3D.X + wall.X, p3D.Y + wall.Y, p3D.Z + wall.Z, map ) )
|
||||
return AddonFitResult.NoWall;
|
||||
}
|
||||
}
|
||||
|
||||
ArrayList doors = house.Doors;
|
||||
|
||||
for ( int i = 0; i < doors.Count; ++i )
|
||||
{
|
||||
BaseDoor door = doors[i] as BaseDoor;
|
||||
|
||||
Point3D doorLoc = door.GetWorldLocation();
|
||||
int doorHeight = door.ItemData.CalcHeight;
|
||||
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
{
|
||||
Point3D addonLoc = new Point3D( p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z );
|
||||
int addonHeight = c.ItemData.CalcHeight;
|
||||
|
||||
if ( Utility.InRange( doorLoc, addonLoc, 1 ) && (addonLoc.Z == doorLoc.Z || ((addonLoc.Z + addonHeight) > doorLoc.Z && (doorLoc.Z + doorHeight) > addonLoc.Z)) )
|
||||
return AddonFitResult.DoorTooClose;
|
||||
}
|
||||
}
|
||||
|
||||
return AddonFitResult.Valid;
|
||||
}
|
||||
|
||||
public static bool CheckHouse( Mobile from, Point3D p, Map map, int height, ref BaseHouse house )
|
||||
{
|
||||
house = BaseHouse.FindHouseAt( p, map, height );
|
||||
|
||||
if ( from == null || house == null || !house.IsOwner( from ) )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public static bool IsWall( int x, int y, int z, Map map )
|
||||
{
|
||||
if ( map == null )
|
||||
return false;
|
||||
|
||||
StaticTile[] tiles = map.Tiles.GetStaticTiles( x, y, true );
|
||||
|
||||
for ( int i = 0; i < tiles.Length; ++i )
|
||||
{
|
||||
StaticTile t = tiles[i];
|
||||
ItemData id = TileData.ItemTable[t.ID & TileData.MaxItemValue];
|
||||
|
||||
if ( (id.Flags & TileFlag.Wall) != 0 && (z + 16) > t.Z && (t.Z + t.Height) > z )
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public virtual void OnComponentLoaded( AddonComponent c )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D oldLoc )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
c.Location = new Point3D( X + c.Offset.X, Y + c.Offset.Y, Z + c.Offset.Z );
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
c.Map = Map;
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
c.Delete();
|
||||
}
|
||||
|
||||
public virtual bool ShareHue{ get{ return true; } }
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( base.Hue != value )
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if ( !Deleted && this.ShareHue && m_Components != null )
|
||||
{
|
||||
foreach ( AddonComponent c in m_Components )
|
||||
c.Hue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.WriteItemList<AddonComponent>( m_Components );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
case 0:
|
||||
{
|
||||
m_Components = reader.ReadStrongItemList<AddonComponent>();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( version < 1 && Weight == 0 )
|
||||
Weight = -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
307
Scripts/Items/Addons/BaseAddonContainer.cs
Normal file
307
Scripts/Items/Addons/BaseAddonContainer.cs
Normal file
|
|
@ -0,0 +1,307 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Regions;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public abstract class BaseAddonContainer : BaseContainer, IChopable, IAddon
|
||||
{
|
||||
public override bool DisplayWeight { get { return false; } }
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( base.Hue != value )
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if ( !Deleted && this.ShareHue && m_Components != null )
|
||||
{
|
||||
Hue = value;
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
c.Hue = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get { return m_Resource; }
|
||||
set
|
||||
{
|
||||
if ( m_Resource != value )
|
||||
{
|
||||
m_Resource = value;
|
||||
Hue = CraftResources.GetHue( m_Resource );
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Item IAddon.Deed
|
||||
{
|
||||
get { return this.Deed; }
|
||||
}
|
||||
|
||||
public virtual bool RetainDeedHue { get { return false; } }
|
||||
public virtual bool NeedsWall { get { return false; } }
|
||||
public virtual bool ShareHue { get { return true; } }
|
||||
public virtual Point3D WallPosition { get { return Point3D.Zero; } }
|
||||
public virtual BaseAddonContainerDeed Deed { get { return null; } }
|
||||
|
||||
private List<AddonContainerComponent> m_Components;
|
||||
|
||||
public List<AddonContainerComponent> Components
|
||||
{
|
||||
get { return m_Components; }
|
||||
}
|
||||
|
||||
public BaseAddonContainer( int itemID ) : base( itemID )
|
||||
{
|
||||
AddonComponent.ApplyLightTo( this );
|
||||
|
||||
m_Components = new List<AddonContainerComponent>();
|
||||
}
|
||||
|
||||
public BaseAddonContainer( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnLocationChange( Point3D oldLoc )
|
||||
{
|
||||
base.OnLocationChange( oldLoc );
|
||||
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
c.Location = new Point3D( X + c.Offset.X, Y + c.Offset.Y, Z + c.Offset.Z );
|
||||
}
|
||||
|
||||
public override void OnMapChange()
|
||||
{
|
||||
base.OnMapChange();
|
||||
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
c.Map = Map;
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house != null )
|
||||
house.Addons.Remove( this );
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
list.Add( CraftResources.GetLocalizationNumber( m_Resource ) );
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
base.OnAfterDelete();
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
c.Delete();
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.WriteItemList<AddonContainerComponent>( m_Components );
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_Components = reader.ReadStrongItemList<AddonContainerComponent>();
|
||||
m_Resource = (CraftResource) reader.ReadInt();
|
||||
|
||||
AddonComponent.ApplyLightTo( this );
|
||||
}
|
||||
|
||||
public void DropItemsToGround()
|
||||
{
|
||||
for ( int i = Items.Count - 1; i >= 0; i-- )
|
||||
Items[ i ].MoveToWorld( Location );
|
||||
}
|
||||
|
||||
public void AddComponent( AddonContainerComponent c, int x, int y, int z )
|
||||
{
|
||||
if ( Deleted )
|
||||
return;
|
||||
|
||||
m_Components.Add( c );
|
||||
|
||||
c.Addon = this;
|
||||
c.Offset = new Point3D( x, y, z );
|
||||
c.MoveToWorld( new Point3D( X + x, Y + y, Z + z ), Map );
|
||||
}
|
||||
|
||||
public AddonFitResult CouldFit( IPoint3D p, Map map, Mobile from, ref BaseHouse house )
|
||||
{
|
||||
if ( Deleted )
|
||||
return AddonFitResult.Blocked;
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
{
|
||||
Point3D p3D = new Point3D( p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z );
|
||||
|
||||
if ( !map.CanFit( p3D.X, p3D.Y, p3D.Z, c.ItemData.Height, false, true, ( c.Z == 0 ) ) )
|
||||
return AddonFitResult.Blocked;
|
||||
else if ( !BaseAddon.CheckHouse( from, p3D, map, c.ItemData.Height, ref house ) )
|
||||
return AddonFitResult.NotInHouse;
|
||||
|
||||
if ( c.NeedsWall )
|
||||
{
|
||||
Point3D wall = c.WallPosition;
|
||||
|
||||
if ( !BaseAddon.IsWall( p3D.X + wall.X, p3D.Y + wall.Y, p3D.Z + wall.Z, map ) )
|
||||
return AddonFitResult.NoWall;
|
||||
}
|
||||
}
|
||||
|
||||
Point3D p3 = new Point3D( p.X, p.Y, p.Z );
|
||||
|
||||
if ( !map.CanFit( p3.X, p3.Y, p3.Z, ItemData.Height, false, true, ( Z == 0 ) ) )
|
||||
return AddonFitResult.Blocked;
|
||||
else if ( !BaseAddon.CheckHouse( from, p3, map, ItemData.Height, ref house ) )
|
||||
return AddonFitResult.NotInHouse;
|
||||
|
||||
if ( NeedsWall )
|
||||
{
|
||||
Point3D wall = WallPosition;
|
||||
|
||||
if ( !BaseAddon.IsWall( p3.X + wall.X, p3.Y + wall.Y, p3.Z + wall.Z, map ) )
|
||||
return AddonFitResult.NoWall;
|
||||
}
|
||||
|
||||
if ( house != null )
|
||||
{
|
||||
ArrayList doors = house.Doors;
|
||||
|
||||
for ( int i = 0; i < doors.Count; ++i )
|
||||
{
|
||||
BaseDoor door = doors[ i ] as BaseDoor;
|
||||
|
||||
if ( door != null && door.Open )
|
||||
return AddonFitResult.DoorsNotClosed;
|
||||
|
||||
Point3D doorLoc = door.GetWorldLocation();
|
||||
int doorHeight = door.ItemData.CalcHeight;
|
||||
|
||||
foreach ( AddonContainerComponent c in m_Components )
|
||||
{
|
||||
Point3D addonLoc = new Point3D( p.X + c.Offset.X, p.Y + c.Offset.Y, p.Z + c.Offset.Z );
|
||||
int addonHeight = c.ItemData.CalcHeight;
|
||||
|
||||
if ( Utility.InRange( doorLoc, addonLoc, 1 ) && ( addonLoc.Z == doorLoc.Z || ( ( addonLoc.Z + addonHeight ) > doorLoc.Z && ( doorLoc.Z + doorHeight ) > addonLoc.Z ) ) )
|
||||
return AddonFitResult.DoorTooClose;
|
||||
}
|
||||
|
||||
Point3D addonLo = new Point3D( p.X, p.Y, p.Z );
|
||||
int addonHeigh = ItemData.CalcHeight;
|
||||
|
||||
if ( Utility.InRange( doorLoc, addonLo, 1 ) && ( addonLo.Z == doorLoc.Z || ( ( addonLo.Z + addonHeigh ) > doorLoc.Z && ( doorLoc.Z + doorHeight ) > addonLo.Z ) ) )
|
||||
return AddonFitResult.DoorTooClose;
|
||||
}
|
||||
}
|
||||
|
||||
return AddonFitResult.Valid;
|
||||
}
|
||||
|
||||
public bool CouldFit( IPoint3D p, Map map )
|
||||
{
|
||||
BaseHouse house = null;
|
||||
|
||||
return ( CouldFit( p, map, null, ref house ) == AddonFitResult.Valid );
|
||||
}
|
||||
|
||||
public virtual void OnChop( Mobile from )
|
||||
{
|
||||
BaseHouse house = BaseHouse.FindHouseAt( this );
|
||||
|
||||
if ( house != null && house.IsOwner( from ) )
|
||||
{
|
||||
if ( !IsSecure )
|
||||
{
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x3B3 );
|
||||
from.SendLocalizedMessage( 500461 ); // You destroy the item.
|
||||
|
||||
int hue = 0;
|
||||
|
||||
if ( RetainDeedHue )
|
||||
{
|
||||
for ( int i = 0; hue == 0 && i < m_Components.Count; ++i )
|
||||
{
|
||||
AddonContainerComponent c = m_Components[ i ];
|
||||
|
||||
if ( c.Hue != 0 )
|
||||
hue = c.Hue;
|
||||
}
|
||||
}
|
||||
|
||||
DropItemsToGround();
|
||||
|
||||
Delete();
|
||||
|
||||
house.Addons.Remove( this );
|
||||
|
||||
BaseAddonContainerDeed deed = Deed;
|
||||
|
||||
if ( deed != null )
|
||||
{
|
||||
deed.Resource = Resource;
|
||||
|
||||
if ( RetainDeedHue )
|
||||
deed.Hue = hue;
|
||||
|
||||
from.AddToBackpack( deed );
|
||||
}
|
||||
}
|
||||
else
|
||||
from.SendLocalizedMessage( 1074870 ); // This item must be unlocked/unsecured before re-deeding it.
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnComponentLoaded( AddonContainerComponent c )
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void OnComponentUsed( AddonContainerComponent c, Mobile from )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
162
Scripts/Items/Addons/BaseAddonContainerDeed.cs
Normal file
162
Scripts/Items/Addons/BaseAddonContainerDeed.cs
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
using System;
|
||||
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
using Server.Engines.Craft;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x14F0, 0x14EF )]
|
||||
public abstract class BaseAddonContainerDeed : Item, ICraftable
|
||||
{
|
||||
public abstract BaseAddonContainer Addon{ get; }
|
||||
|
||||
private CraftResource m_Resource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource Resource
|
||||
{
|
||||
get{ return m_Resource; }
|
||||
set
|
||||
{
|
||||
if ( m_Resource != value )
|
||||
{
|
||||
m_Resource = value;
|
||||
Hue = CraftResources.GetHue( m_Resource );
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public BaseAddonContainerDeed() : base( 0x14F0 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BaseAddonContainerDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
// version 1
|
||||
writer.Write( (int) m_Resource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
m_Resource = (CraftResource) reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
from.Target = new InternalTarget( this );
|
||||
else
|
||||
from.SendLocalizedMessage( 1062334 ); // This item must be in your backpack to be used.
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( !CraftResources.IsStandard( m_Resource ) )
|
||||
list.Add( CraftResources.GetLocalizationNumber( m_Resource ) );
|
||||
}
|
||||
|
||||
#region ICraftable
|
||||
public virtual int OnCraft( int quality, bool makersMark, Mobile from, CraftSystem craftSystem, Type typeRes, BaseTool tool, CraftItem craftItem, int resHue )
|
||||
{
|
||||
Type resourceType = typeRes;
|
||||
|
||||
if ( resourceType == null )
|
||||
resourceType = craftItem.Resources.GetAt( 0 ).ItemType;
|
||||
|
||||
Resource = CraftResources.GetFromType( resourceType );
|
||||
|
||||
CraftContext context = craftSystem.GetContext( from );
|
||||
|
||||
if ( context != null && context.DoNotColor )
|
||||
Hue = 0;
|
||||
|
||||
return quality;
|
||||
}
|
||||
#endregion
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private BaseAddonContainerDeed m_Deed;
|
||||
|
||||
public InternalTarget( BaseAddonContainerDeed deed ) : base( -1, true, TargetFlags.None )
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
CheckLOS = false;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
if ( p == null || map == null || m_Deed.Deleted )
|
||||
return;
|
||||
|
||||
if ( m_Deed.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
BaseAddonContainer addon = m_Deed.Addon;
|
||||
addon.Resource = m_Deed.Resource;
|
||||
|
||||
Server.Spells.SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
BaseHouse house = null;
|
||||
|
||||
AddonFitResult res = addon.CouldFit( p, map, from, ref house );
|
||||
|
||||
if ( res == AddonFitResult.Valid )
|
||||
addon.MoveToWorld( new Point3D( p ), map );
|
||||
else if ( res == AddonFitResult.Blocked )
|
||||
from.SendLocalizedMessage( 500269 ); // You cannot build that there.
|
||||
else if ( res == AddonFitResult.NotInHouse )
|
||||
from.SendLocalizedMessage( 500274 ); // You can only place this in a house that you own!
|
||||
else if ( res == AddonFitResult.DoorsNotClosed )
|
||||
from.SendMessage( "You must close all house doors before placing this." );
|
||||
else if ( res == AddonFitResult.DoorTooClose )
|
||||
from.SendLocalizedMessage( 500271 ); // You cannot build near the door.
|
||||
else if ( res == AddonFitResult.NoWall )
|
||||
from.SendLocalizedMessage( 500268 ); // This object needs to be mounted on something.
|
||||
|
||||
if ( res == AddonFitResult.Valid )
|
||||
{
|
||||
m_Deed.Delete();
|
||||
house.Addons.Add( addon );
|
||||
house.AddSecure( from, addon );
|
||||
}
|
||||
else
|
||||
{
|
||||
addon.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
105
Scripts/Items/Addons/BaseAddonDeed.cs
Normal file
105
Scripts/Items/Addons/BaseAddonDeed.cs
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Multis;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x14F0, 0x14EF )]
|
||||
public abstract class BaseAddonDeed : Item
|
||||
{
|
||||
public abstract BaseAddon Addon{ get; }
|
||||
|
||||
public BaseAddonDeed() : base( 0x14F0 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public BaseAddonDeed( 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();
|
||||
|
||||
if ( Weight == 0.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsChildOf( from.Backpack ) )
|
||||
from.Target = new InternalTarget( this );
|
||||
else
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private BaseAddonDeed m_Deed;
|
||||
|
||||
public InternalTarget( BaseAddonDeed deed ) : base( -1, true, TargetFlags.None )
|
||||
{
|
||||
m_Deed = deed;
|
||||
|
||||
CheckLOS = false;
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object targeted )
|
||||
{
|
||||
IPoint3D p = targeted as IPoint3D;
|
||||
Map map = from.Map;
|
||||
|
||||
if ( p == null || map == null || m_Deed.Deleted )
|
||||
return;
|
||||
|
||||
if ( m_Deed.IsChildOf( from.Backpack ) )
|
||||
{
|
||||
BaseAddon addon = m_Deed.Addon;
|
||||
|
||||
Server.Spells.SpellHelper.GetSurfaceTop( ref p );
|
||||
|
||||
BaseHouse house = null;
|
||||
|
||||
AddonFitResult res = addon.CouldFit( p, map, from, ref house );
|
||||
|
||||
if ( res == AddonFitResult.Valid )
|
||||
addon.MoveToWorld( new Point3D( p ), map );
|
||||
else if ( res == AddonFitResult.Blocked )
|
||||
from.SendLocalizedMessage( 500269 ); // You cannot build that there.
|
||||
else if ( res == AddonFitResult.NotInHouse )
|
||||
from.SendLocalizedMessage( 500274 ); // You can only place this in a house that you own!
|
||||
else if ( res == AddonFitResult.DoorTooClose )
|
||||
from.SendLocalizedMessage( 500271 ); // You cannot build near the door.
|
||||
else if ( res == AddonFitResult.NoWall )
|
||||
from.SendLocalizedMessage( 500268 ); // This object needs to be mounted on something.
|
||||
|
||||
if ( res == AddonFitResult.Valid )
|
||||
{
|
||||
m_Deed.Delete();
|
||||
house.Addons.Add( addon );
|
||||
}
|
||||
else
|
||||
{
|
||||
addon.Delete();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
269
Scripts/Items/Addons/BearRugs.cs
Normal file
269
Scripts/Items/Addons/BearRugs.cs
Normal file
|
|
@ -0,0 +1,269 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BrownBearRugEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new BrownBearRugEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public BrownBearRugEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1E40 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E41 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E42 ), 1,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E43 ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E44 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E45 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E46 ),-1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E47 ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E48 ),-1,-1, 0 );
|
||||
}
|
||||
|
||||
public BrownBearRugEastAddon( 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 BrownBearRugEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new BrownBearRugEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049397; } } // a brown bear rug deed facing east
|
||||
|
||||
[Constructable]
|
||||
public BrownBearRugEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public BrownBearRugEastDeed( 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 BrownBearRugSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new BrownBearRugSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public BrownBearRugSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1E36 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E37 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E38 ),-1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E39 ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E3A ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E3B ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E3C ), 1,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E3D ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E3E ),-1,-1, 0 );
|
||||
}
|
||||
|
||||
public BrownBearRugSouthAddon( 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 BrownBearRugSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new BrownBearRugSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049398; } } // a brown bear rug deed facing south
|
||||
|
||||
[Constructable]
|
||||
public BrownBearRugSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public BrownBearRugSouthDeed( 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 PolarBearRugEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new PolarBearRugEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PolarBearRugEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1E53 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E54 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E55 ), 1,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E56 ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E57 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E58 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E59 ),-1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E5A ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E5B ),-1,-1, 0 );
|
||||
}
|
||||
|
||||
public PolarBearRugEastAddon( 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 PolarBearRugEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PolarBearRugEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049399; } } // a polar bear rug deed facing east
|
||||
|
||||
[Constructable]
|
||||
public PolarBearRugEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public PolarBearRugEastDeed( 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 PolarBearRugSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new PolarBearRugSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PolarBearRugSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1E49 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4A ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4B ),-1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4C ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4E ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E4F ), 1,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E50 ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1E51 ),-1,-1, 0 );
|
||||
}
|
||||
|
||||
public PolarBearRugSouthAddon( 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 PolarBearRugSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PolarBearRugSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049400; } } // a polar bear rug deed facing south
|
||||
|
||||
[Constructable]
|
||||
public PolarBearRugSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public PolarBearRugSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Items/Addons/BloodPentagram.cs
Normal file
70
Scripts/Items/Addons/BloodPentagram.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class BloodPentagram : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public BloodPentagram ()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1CF9 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF8 ), 0, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF7 ), 0, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF6 ), 0, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF5 ), 0, 5, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1CFB ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CFA ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D09 ), 1, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D08 ), 1, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D07 ), 1, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF4 ), 1, 5, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1CFC ), 2, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0A ), 2, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D11 ), 2, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D10 ), 2, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D06 ), 2, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF3 ), 2, 5, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1CFD ), 3, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0B ), 3, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D12 ), 3, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0F ), 3, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D05 ), 3, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF2 ), 3, 5, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1CFE ), 4, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0C ), 4, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0D ), 4, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D0E ), 4, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D04 ), 4, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1CF1 ), 4, 5, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1CFF ), 5, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D00 ), 5, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D01 ), 5, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D02 ), 5, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1D03 ), 5, 4, 0 );
|
||||
}
|
||||
|
||||
public BloodPentagram( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
218
Scripts/Items/Addons/DartBoard.cs
Normal file
218
Scripts/Items/Addons/DartBoard.cs
Normal file
|
|
@ -0,0 +1,218 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class DartBoard : AddonComponent
|
||||
{
|
||||
public override bool NeedsWall{ get{ return true; } }
|
||||
public override Point3D WallPosition{ get{ return this.East ? new Point3D( -1, 0, 0 ) : new Point3D( 0, -1, 0 ); } }
|
||||
|
||||
public bool East{ get{ return this.ItemID == 0x1E2F; } }
|
||||
|
||||
[Constructable]
|
||||
public DartBoard() : this( true )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DartBoard( bool east ) : base( east ? 0x1E2F : 0x1E2E )
|
||||
{
|
||||
}
|
||||
|
||||
public DartBoard( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
Direction dir;
|
||||
if ( from.Location != this.Location )
|
||||
dir = from.GetDirectionTo( this );
|
||||
else if ( this.East )
|
||||
dir = Direction.West;
|
||||
else
|
||||
dir = Direction.North;
|
||||
|
||||
from.Direction = dir;
|
||||
|
||||
bool canThrow = true;
|
||||
|
||||
if ( !from.InRange( this, 4 ) || !from.InLOS( this ) )
|
||||
canThrow = false;
|
||||
else if ( this.East )
|
||||
canThrow = ( dir == Direction.Left || dir == Direction.West || dir == Direction.Up );
|
||||
else
|
||||
canThrow = ( dir == Direction.Up || dir == Direction.North || dir == Direction.Right );
|
||||
|
||||
if ( canThrow )
|
||||
Throw( from );
|
||||
else
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
}
|
||||
|
||||
public void Throw( Mobile from )
|
||||
{
|
||||
BaseKnife knife = from.Weapon as BaseKnife;
|
||||
|
||||
if ( knife == null )
|
||||
{
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 500751 ); // Try holding a knife...
|
||||
return;
|
||||
}
|
||||
|
||||
from.Animate( from.Mounted ? 26 : 9, 7, 1, true, false, 0 );
|
||||
from.MovingEffect( this, knife.ItemID, 7, 1, false, false );
|
||||
from.PlaySound( 0x238 );
|
||||
|
||||
double rand = Utility.RandomDouble();
|
||||
|
||||
int message;
|
||||
if ( rand < 0.05 )
|
||||
message = 500752; // BULLSEYE! 50 Points!
|
||||
else if ( rand < 0.20 )
|
||||
message = 500753; // Just missed the center! 20 points.
|
||||
else if ( rand < 0.45 )
|
||||
message = 500754; // 10 point shot.
|
||||
else if ( rand < 0.70 )
|
||||
message = 500755; // 5 pointer.
|
||||
else if ( rand < 0.85 )
|
||||
message = 500756; // 1 point. Bad throw.
|
||||
else
|
||||
message = 500757; // Missed.
|
||||
|
||||
PublicOverheadMessage( MessageType.Regular, 0x3B2, message );
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class DartBoardEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DartBoardEastDeed(); } }
|
||||
|
||||
public DartBoardEastAddon()
|
||||
{
|
||||
AddComponent( new DartBoard( true ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public DartBoardEastAddon( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class DartBoardEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DartBoardEastAddon(); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044326; } } // dartboard (east)
|
||||
|
||||
[Constructable]
|
||||
public DartBoardEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public DartBoardEastDeed( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class DartBoardSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DartBoardSouthDeed(); } }
|
||||
|
||||
public DartBoardSouthAddon()
|
||||
{
|
||||
AddComponent( new DartBoard( false ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public DartBoardSouthAddon( 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();
|
||||
}
|
||||
}
|
||||
|
||||
public class DartBoardSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DartBoardSouthAddon(); } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1044325; } } // dartboard (south)
|
||||
|
||||
[Constructable]
|
||||
public DartBoardSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public DartBoardSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
230
Scripts/Items/Addons/FlourMillEastAddon.cs
Normal file
230
Scripts/Items/Addons/FlourMillEastAddon.cs
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public interface IFlourMill
|
||||
{
|
||||
int MaxFlour{ get; }
|
||||
int CurFlour{ get; set; }
|
||||
}
|
||||
|
||||
public enum FlourMillStage
|
||||
{
|
||||
Empty,
|
||||
Filled,
|
||||
Working
|
||||
}
|
||||
|
||||
public class FlourMillEastAddon : BaseAddon, IFlourMill
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new FlourMillEastDeed(); } }
|
||||
|
||||
private int m_Flour;
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxFlour
|
||||
{
|
||||
get{ return 2; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurFlour
|
||||
{
|
||||
get{ return m_Flour; }
|
||||
set{ m_Flour = Math.Max( 0, Math.Min( value, MaxFlour ) ); UpdateStage(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool HasFlour
|
||||
{
|
||||
get{ return ( m_Flour > 0 ); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsFull
|
||||
{
|
||||
get{ return ( m_Flour >= MaxFlour ); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsWorking
|
||||
{
|
||||
get{ return ( m_Timer != null ); }
|
||||
}
|
||||
|
||||
public void StartWorking( Mobile from )
|
||||
{
|
||||
if ( IsWorking )
|
||||
return;
|
||||
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerStateCallback( FinishWorking_Callback ), from );
|
||||
UpdateStage();
|
||||
}
|
||||
|
||||
private void FinishWorking_Callback( object state )
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
{
|
||||
m_Timer.Stop();
|
||||
m_Timer = null;
|
||||
}
|
||||
|
||||
Mobile from = state as Mobile;
|
||||
|
||||
if ( from != null && !from.Deleted && !this.Deleted && IsFull )
|
||||
{
|
||||
SackFlour flour = new SackFlour();
|
||||
|
||||
flour.ItemID = ( Utility.RandomBool() ? 4153 : 4165 );
|
||||
|
||||
if ( from.PlaceInBackpack( flour ) )
|
||||
{
|
||||
m_Flour = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
flour.Delete();
|
||||
from.SendLocalizedMessage( 500998 ); // There is not enough room in your backpack! You stop grinding.
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStage();
|
||||
}
|
||||
|
||||
private static int[][] m_StageTable = new int[][]
|
||||
{
|
||||
new int[]{ 0x1920, 0x1921, 0x1925 },
|
||||
new int[]{ 0x1922, 0x1923, 0x1926 },
|
||||
new int[]{ 0x1924, 0x1924, 0x1928 }
|
||||
};
|
||||
|
||||
private int[] FindItemTable( int itemID )
|
||||
{
|
||||
for ( int i = 0; i < m_StageTable.Length; ++i )
|
||||
{
|
||||
int[] itemTable = m_StageTable[i];
|
||||
|
||||
for ( int j = 0; j < itemTable.Length; ++j )
|
||||
{
|
||||
if ( itemTable[j] == itemID )
|
||||
return itemTable;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void UpdateStage()
|
||||
{
|
||||
if ( IsWorking )
|
||||
UpdateStage( FlourMillStage.Working );
|
||||
else if ( HasFlour )
|
||||
UpdateStage( FlourMillStage.Filled );
|
||||
else
|
||||
UpdateStage( FlourMillStage.Empty );
|
||||
}
|
||||
|
||||
public void UpdateStage( FlourMillStage stage )
|
||||
{
|
||||
List<AddonComponent> components = this.Components;
|
||||
|
||||
int[][] stageTable = m_StageTable;
|
||||
|
||||
for ( int i = 0; i < components.Count; ++i )
|
||||
{
|
||||
AddonComponent component = components[i] as AddonComponent;
|
||||
|
||||
if ( component == null )
|
||||
continue;
|
||||
|
||||
int[] itemTable = FindItemTable( component.ItemID );
|
||||
|
||||
if ( itemTable != null )
|
||||
component.ItemID = itemTable[(int)stage];
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 4 ) || !from.InLOS( this ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else if ( !IsFull )
|
||||
from.SendLocalizedMessage( 500997 ); // You need more wheat to make a sack of flour.
|
||||
else
|
||||
StartWorking( from );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1920 ),-1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1922 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1924 ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
public FlourMillEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Flour );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Flour = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStage();
|
||||
}
|
||||
}
|
||||
|
||||
public class FlourMillEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FlourMillEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044347; } } // flour mill (east)
|
||||
|
||||
[Constructable]
|
||||
public FlourMillEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public FlourMillEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
216
Scripts/Items/Addons/FlourMillSouthAddon.cs
Normal file
216
Scripts/Items/Addons/FlourMillSouthAddon.cs
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class FlourMillSouthAddon : BaseAddon, IFlourMill
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new FlourMillSouthDeed(); } }
|
||||
private int m_Flour;
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxFlour
|
||||
{
|
||||
get{ return 2; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurFlour
|
||||
{
|
||||
get{ return m_Flour; }
|
||||
set{ m_Flour = Math.Max( 0, Math.Min( value, MaxFlour ) ); UpdateStage(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool HasFlour
|
||||
{
|
||||
get{ return ( m_Flour > 0 ); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsFull
|
||||
{
|
||||
get{ return ( m_Flour >= MaxFlour ); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsWorking
|
||||
{
|
||||
get{ return ( m_Timer != null ); }
|
||||
}
|
||||
|
||||
public void StartWorking( Mobile from )
|
||||
{
|
||||
if ( IsWorking )
|
||||
return;
|
||||
|
||||
m_Timer = Timer.DelayCall( TimeSpan.FromSeconds( 5.0 ), new TimerStateCallback( FinishWorking_Callback ), from );
|
||||
UpdateStage();
|
||||
}
|
||||
|
||||
private void FinishWorking_Callback( object state )
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
{
|
||||
m_Timer.Stop();
|
||||
m_Timer = null;
|
||||
}
|
||||
|
||||
Mobile from = state as Mobile;
|
||||
|
||||
if ( from != null && !from.Deleted && !this.Deleted && IsFull )
|
||||
{
|
||||
SackFlour flour = new SackFlour();
|
||||
|
||||
flour.ItemID = ( Utility.RandomBool() ? 4153 : 4165 );
|
||||
|
||||
if ( from.PlaceInBackpack( flour ) )
|
||||
{
|
||||
m_Flour = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
flour.Delete();
|
||||
from.SendLocalizedMessage( 500998 ); // There is not enough room in your backpack! You stop grinding.
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStage();
|
||||
}
|
||||
|
||||
private static int[][] m_StageTable = new int[][]
|
||||
{
|
||||
new int[]{ 0x192C, 0x192D, 0x1931 },
|
||||
new int[]{ 0x192E, 0x192F, 0x1932 },
|
||||
new int[]{ 0x1930, 0x1930, 0x1934 }
|
||||
};
|
||||
|
||||
private int[] FindItemTable( int itemID )
|
||||
{
|
||||
for ( int i = 0; i < m_StageTable.Length; ++i )
|
||||
{
|
||||
int[] itemTable = m_StageTable[i];
|
||||
|
||||
for ( int j = 0; j < itemTable.Length; ++j )
|
||||
{
|
||||
if ( itemTable[j] == itemID )
|
||||
return itemTable;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void UpdateStage()
|
||||
{
|
||||
if ( IsWorking )
|
||||
UpdateStage( FlourMillStage.Working );
|
||||
else if ( HasFlour )
|
||||
UpdateStage( FlourMillStage.Filled );
|
||||
else
|
||||
UpdateStage( FlourMillStage.Empty );
|
||||
}
|
||||
|
||||
public void UpdateStage( FlourMillStage stage )
|
||||
{
|
||||
List<AddonComponent> components = this.Components;
|
||||
|
||||
int[][] stageTable = m_StageTable;
|
||||
|
||||
for ( int i = 0; i < components.Count; ++i )
|
||||
{
|
||||
AddonComponent component = components[i] as AddonComponent;
|
||||
|
||||
if ( component == null )
|
||||
continue;
|
||||
|
||||
int[] itemTable = FindItemTable( component.ItemID );
|
||||
|
||||
if ( itemTable != null )
|
||||
component.ItemID = itemTable[(int)stage];
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnComponentUsed( AddonComponent c, Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 4 ) || !from.InLOS( this ) )
|
||||
from.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1019045 ); // I can't reach that.
|
||||
else if ( !IsFull )
|
||||
from.SendLocalizedMessage( 500997 ); // You need more wheat to make a sack of flour.
|
||||
else
|
||||
StartWorking( from );
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FlourMillSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x192C ), 0,-1, 0 );
|
||||
AddComponent( new AddonComponent( 0x192E ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1930 ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public FlourMillSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Flour );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Flour = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateStage();
|
||||
}
|
||||
}
|
||||
|
||||
public class FlourMillSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new FlourMillSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044348; } } // flour mill (south)
|
||||
|
||||
[Constructable]
|
||||
public FlourMillSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public FlourMillSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
241
Scripts/Items/Addons/FlowerTapestries.cs
Normal file
241
Scripts/Items/Addons/FlowerTapestries.cs
Normal file
|
|
@ -0,0 +1,241 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LightFlowerTapestryEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LightFlowerTapestryEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LightFlowerTapestryEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFDC ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFDB ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public LightFlowerTapestryEastAddon( 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 LightFlowerTapestryEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LightFlowerTapestryEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049393; } } // a flower tapestry deed facing east
|
||||
|
||||
[Constructable]
|
||||
public LightFlowerTapestryEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LightFlowerTapestryEastDeed( 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 LightFlowerTapestrySouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LightFlowerTapestrySouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LightFlowerTapestrySouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFD9 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFDA ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
public LightFlowerTapestrySouthAddon( 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 LightFlowerTapestrySouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LightFlowerTapestrySouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049394; } } // a flower tapestry deed facing south
|
||||
|
||||
[Constructable]
|
||||
public LightFlowerTapestrySouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LightFlowerTapestrySouthDeed( 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 DarkFlowerTapestryEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DarkFlowerTapestryEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public DarkFlowerTapestryEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFE0 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFDF ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public DarkFlowerTapestryEastAddon( 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 DarkFlowerTapestryEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DarkFlowerTapestryEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049395; } } // a dark flower tapestry deed facing east
|
||||
|
||||
[Constructable]
|
||||
public DarkFlowerTapestryEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public DarkFlowerTapestryEastDeed( 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 DarkFlowerTapestrySouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new DarkFlowerTapestrySouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public DarkFlowerTapestrySouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFDD ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFDE ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
public DarkFlowerTapestrySouthAddon( 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 DarkFlowerTapestrySouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new DarkFlowerTapestrySouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049396; } } // a dark flower tapestry deed facing south
|
||||
|
||||
[Constructable]
|
||||
public DarkFlowerTapestrySouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public DarkFlowerTapestrySouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
207
Scripts/Items/Addons/GiantWebs.cs
Normal file
207
Scripts/Items/Addons/GiantWebs.cs
Normal file
|
|
@ -0,0 +1,207 @@
|
|||
using System;
|
||||
using System.Text;
|
||||
using System.Net;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GiantWeb1 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb1()
|
||||
{
|
||||
int itemID = 4280;
|
||||
int count = 5;
|
||||
bool leftToRight = false;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb1( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiantWeb2 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb2()
|
||||
{
|
||||
int itemID = 4285;
|
||||
int count = 5;
|
||||
bool leftToRight = true;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb2( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiantWeb3 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb3()
|
||||
{
|
||||
int itemID = 4290;
|
||||
int count = 4;
|
||||
bool leftToRight = true;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb3( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiantWeb4 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb4()
|
||||
{
|
||||
int itemID = 4294;
|
||||
int count = 4;
|
||||
bool leftToRight = false;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb4( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiantWeb5 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb5()
|
||||
{
|
||||
int itemID = 4298;
|
||||
int count = 4;
|
||||
bool leftToRight = true;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb5( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
|
||||
public class GiantWeb6 : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public GiantWeb6()
|
||||
{
|
||||
int itemID = 4302;
|
||||
int count = 4;
|
||||
bool leftToRight = false;
|
||||
|
||||
for ( int i = 0; i < count; ++i )
|
||||
AddComponent( new AddonComponent( itemID++ ), leftToRight ? i : count - 1 - i, -( leftToRight ? i : count - 1 - i ), 0 );
|
||||
}
|
||||
|
||||
public GiantWeb6( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (byte) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadByte();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/GrayBrickFireplaceEastAddon.cs
Normal file
64
Scripts/Items/Addons/GrayBrickFireplaceEastAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GrayBrickFireplaceEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new GrayBrickFireplaceEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public GrayBrickFireplaceEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x93D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x937 ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public GrayBrickFireplaceEastAddon( 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 GrayBrickFireplaceEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new GrayBrickFireplaceEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061846; } } // grey brick fireplace (east)
|
||||
|
||||
[Constructable]
|
||||
public GrayBrickFireplaceEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public GrayBrickFireplaceEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/GrayBrickFireplaceSouthAddon.cs
Normal file
64
Scripts/Items/Addons/GrayBrickFireplaceSouthAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class GrayBrickFireplaceSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new GrayBrickFireplaceSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public GrayBrickFireplaceSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x94B ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x945 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public GrayBrickFireplaceSouthAddon( 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 GrayBrickFireplaceSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new GrayBrickFireplaceSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061847; } } // grey brick fireplace (south)
|
||||
|
||||
[Constructable]
|
||||
public GrayBrickFireplaceSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public GrayBrickFireplaceSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Items/Addons/LargeBedEastAddon.cs
Normal file
66
Scripts/Items/Addons/LargeBedEastAddon.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeBedEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeBedEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA7D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7C ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xA79 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA78 ), 1, 1, 0 );
|
||||
}
|
||||
|
||||
public LargeBedEastAddon( 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 LargeBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeBedEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044324; } } // large bed (east)
|
||||
|
||||
[Constructable]
|
||||
public LargeBedEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeBedEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Items/Addons/LargeBedSouthAddon.cs
Normal file
66
Scripts/Items/Addons/LargeBedSouthAddon.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeBedSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeBedSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA83 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7F ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xA82 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA7E ), 1, 1, 0 );
|
||||
}
|
||||
|
||||
public LargeBedSouthAddon( 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 LargeBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeBedSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044323; } } // large bed (south)
|
||||
|
||||
[Constructable]
|
||||
public LargeBedSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeBedSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Items/Addons/LargeForgeEastAddon.cs
Normal file
66
Scripts/Items/Addons/LargeForgeEastAddon.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeForgeEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeForgeEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeEastAddon()
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0x1986 ), 0, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x198A ), 0, 1, 0 );
|
||||
AddComponent( new ForgeComponent( 0x1996 ), 0, 2, 0 );
|
||||
AddComponent( new ForgeComponent( 0x1992 ), 0, 3, 0 );
|
||||
}
|
||||
|
||||
public LargeForgeEastAddon( 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 LargeForgeEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044331; } } // large forge (east)
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeForgeEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Items/Addons/LargeForgeSouthAddon.cs
Normal file
66
Scripts/Items/Addons/LargeForgeSouthAddon.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeForgeSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeForgeSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeSouthAddon()
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0x197A ), 0, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x197E ), 1, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x19A2 ), 2, 0, 0 );
|
||||
AddComponent( new ForgeComponent( 0x199E ), 3, 0, 0 );
|
||||
}
|
||||
|
||||
public LargeForgeSouthAddon( 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 LargeForgeSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeForgeSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044332; } } // large forge (south)
|
||||
|
||||
[Constructable]
|
||||
public LargeForgeSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeForgeSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Scripts/Items/Addons/LargeStoneTableEastAddon.cs
Normal file
73
Scripts/Items/Addons/LargeStoneTableEastAddon.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeStoneTableEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeStoneTableEastDeed(); } }
|
||||
|
||||
public override bool RetainDeedHue{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1202 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1203 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1201 ), 0, 2, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeStoneTableEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class LargeStoneTableEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeStoneTableEastAddon( this.Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044511; } } // large stone table (east)
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeStoneTableEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Scripts/Items/Addons/LargeStoneTableSouthAddon.cs
Normal file
73
Scripts/Items/Addons/LargeStoneTableSouthAddon.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LargeStoneTableSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LargeStoneTableSouthDeed(); } }
|
||||
|
||||
public override bool RetainDeedHue{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1205 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1206 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1204 ), 2, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public LargeStoneTableSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class LargeStoneTableSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LargeStoneTableSouthAddon( this.Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044512; } } // large stone table (South)
|
||||
|
||||
[Constructable]
|
||||
public LargeStoneTableSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LargeStoneTableSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Items/Addons/LoomEastAddon.cs
Normal file
86
Scripts/Items/Addons/LoomEastAddon.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public interface ILoom
|
||||
{
|
||||
int Phase{ get; set; }
|
||||
}
|
||||
|
||||
public class LoomEastAddon : BaseAddon, ILoom
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LoomEastDeed(); } }
|
||||
|
||||
private int m_Phase;
|
||||
|
||||
public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } }
|
||||
|
||||
[Constructable]
|
||||
public LoomEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1060 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x105F ), 0, 1, 0 );
|
||||
|
||||
Hue = Utility.RandomHue();
|
||||
}
|
||||
|
||||
public LoomEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Phase );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Phase = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class LoomEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LoomEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044343; } } // loom (east)
|
||||
|
||||
[Constructable]
|
||||
public LoomEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LoomEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Items/Addons/LoomSouthAddon.cs
Normal file
81
Scripts/Items/Addons/LoomSouthAddon.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LoomSouthAddon : BaseAddon, ILoom
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new LoomSouthDeed(); } }
|
||||
|
||||
private int m_Phase;
|
||||
|
||||
public int Phase{ get{ return m_Phase; } set{ m_Phase = value; } }
|
||||
|
||||
[Constructable]
|
||||
public LoomSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1061 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1062 ), 1, 0, 0 );
|
||||
|
||||
Hue = Utility.RandomHue();
|
||||
}
|
||||
|
||||
public LoomSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (int) m_Phase );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_Phase = reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class LoomSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new LoomSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044344; } } // loom (south)
|
||||
|
||||
[Constructable]
|
||||
public LoomSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public LoomSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Items/Addons/MediumStoneTableEastAddon.cs
Normal file
72
Scripts/Items/Addons/MediumStoneTableEastAddon.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MediumStoneTableEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new MediumStoneTableEastDeed(); } }
|
||||
|
||||
public override bool RetainDeedHue{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableEastAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableEastAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1202 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1201 ), 0, 1, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public MediumStoneTableEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class MediumStoneTableEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new MediumStoneTableEastAddon( this.Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044508; } } // stone table (east)
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public MediumStoneTableEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Items/Addons/MediumStoneTableSouthAddon.cs
Normal file
72
Scripts/Items/Addons/MediumStoneTableSouthAddon.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class MediumStoneTableSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new MediumStoneTableSouthDeed(); } }
|
||||
|
||||
public override bool RetainDeedHue{ get{ return true; } }
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableSouthAddon() : this( 0 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableSouthAddon( int hue )
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1205 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1204 ), 1, 0, 0 );
|
||||
Hue = hue;
|
||||
}
|
||||
|
||||
public MediumStoneTableSouthAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class MediumStoneTableSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new MediumStoneTableSouthAddon( Hue ); } }
|
||||
public override int LabelNumber{ get{ return 1044509; } } // stone table (South)
|
||||
|
||||
[Constructable]
|
||||
public MediumStoneTableSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public MediumStoneTableSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Items/Addons/PentagramAddon.cs
Normal file
71
Scripts/Items/Addons/PentagramAddon.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PentagramAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new PentagramDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PentagramAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xFE7 ), -1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFE8 ), 0, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFEB ), 1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFE6 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFEA ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFEE ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xFE9 ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFEC ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0xFED ), 1, 1, 0 );
|
||||
}
|
||||
|
||||
public PentagramAddon( 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 PentagramDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PentagramAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044328; } } // pentagram
|
||||
|
||||
[Constructable]
|
||||
public PentagramDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public PentagramDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
286
Scripts/Items/Addons/PickpocketDips.cs
Normal file
286
Scripts/Items/Addons/PickpocketDips.cs
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1EC0, 0x1EC3 )]
|
||||
public class PickpocketDip : AddonComponent
|
||||
{
|
||||
private double m_MinSkill;
|
||||
private double m_MaxSkill;
|
||||
private int m_ID;
|
||||
private int m_Moving;
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MinSkill
|
||||
{
|
||||
get{ return m_MinSkill; }
|
||||
set{ m_MinSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MaxSkill
|
||||
{
|
||||
get{ return m_MaxSkill; }
|
||||
set{ m_MaxSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ID
|
||||
{
|
||||
get{ return m_ID; }
|
||||
set{ m_ID = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Moving
|
||||
{
|
||||
get{ return m_Moving; }
|
||||
set{ m_Moving = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Swinging
|
||||
{
|
||||
get{ return ( m_Timer != null ); }
|
||||
}
|
||||
|
||||
public PickpocketDip( int itemID, int moving ) : base( itemID )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
ID = itemID;
|
||||
Moving = moving;
|
||||
}
|
||||
|
||||
public void UpdateItemID()
|
||||
{
|
||||
ItemID = (Swinging ? m_Moving : m_ID);
|
||||
}
|
||||
|
||||
public void BeginSwing()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = new InternalTimer( this );
|
||||
m_Timer.Start();
|
||||
|
||||
UpdateItemID();
|
||||
}
|
||||
|
||||
public void EndSwing()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
UpdateItemID();
|
||||
}
|
||||
|
||||
public void Use( Mobile from )
|
||||
{
|
||||
from.Direction = from.GetDirectionTo( GetWorldLocation() );
|
||||
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x4F );
|
||||
|
||||
if ( from.CheckSkill( SkillName.Stealing, m_MinSkill, m_MaxSkill ) )
|
||||
{
|
||||
SendLocalizedMessageTo( from, 501834 ); // You successfully avoid disturbing the dip while searching it.
|
||||
}
|
||||
else
|
||||
{
|
||||
Effects.PlaySound( GetWorldLocation(), Map, 0x390 );
|
||||
|
||||
BeginSwing();
|
||||
ProcessDelta();
|
||||
SendLocalizedMessageTo( from, 501831 ); // You carelessly bump the dip and start it swinging.
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( !from.InRange( GetWorldLocation(), 1 ) )
|
||||
SendLocalizedMessageTo( from, 501816 ); // You are too far away to do that.
|
||||
else if ( Swinging )
|
||||
SendLocalizedMessageTo( from, 501815 ); // You have to wait until it stops swinging.
|
||||
else if ( from.Skills[SkillName.Stealing].Base >= m_MaxSkill )
|
||||
SendLocalizedMessageTo( from, 501830 ); // Your ability to steal cannot improve any further by simply practicing on a dummy.
|
||||
else if ( from.Mounted )
|
||||
SendLocalizedMessageTo( from, 501829 ); // You can't practice on this while on a mount.
|
||||
else
|
||||
Use( from );
|
||||
}
|
||||
|
||||
public PickpocketDip( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
writer.Write( m_MinSkill );
|
||||
writer.Write( m_MaxSkill );
|
||||
writer.Write( m_ID );
|
||||
writer.Write( m_Moving );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
m_MinSkill = reader.ReadDouble();
|
||||
m_MaxSkill = reader.ReadDouble();
|
||||
|
||||
if ( m_MinSkill == 0.0 && m_MaxSkill == 30.0 )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
m_ID = reader.ReadInt();
|
||||
m_Moving = reader.ReadInt();
|
||||
|
||||
UpdateItemID();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private PickpocketDip m_Dip;
|
||||
|
||||
public InternalTimer( PickpocketDip dip ) : base( TimeSpan.FromSeconds( 3.0 ) )
|
||||
{
|
||||
m_Dip = dip;
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Dip.EndSwing();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class PickpocketDipEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new PickpocketDipEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipEastAddon()
|
||||
{
|
||||
AddComponent( new PickpocketDip( 0x1E2D, 0x1EC3 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public PickpocketDipEastAddon( 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 PickpocketDipEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044337; } } // pickpocket dip (east)
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public PickpocketDipEastDeed( 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 PickpocketDipSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new PickpocketDipSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipSouthAddon()
|
||||
{
|
||||
AddComponent( new PickpocketDip( 0x1E2C, 0x1EC0 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public PickpocketDipSouthAddon( 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 PickpocketDipSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new PickpocketDipSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044338; } } // pickpocket dip (south)
|
||||
|
||||
[Constructable]
|
||||
public PickpocketDipSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public PickpocketDipSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/SandstoneFireplaceEastAddon.cs
Normal file
64
Scripts/Items/Addons/SandstoneFireplaceEastAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SandstoneFireplaceEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SandstoneFireplaceEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SandstoneFireplaceEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x489 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x475 ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public SandstoneFireplaceEastAddon( 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 SandstoneFireplaceEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SandstoneFireplaceEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061844; } } // sandstone fireplace (east)
|
||||
|
||||
[Constructable]
|
||||
public SandstoneFireplaceEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SandstoneFireplaceEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/SandstoneFireplaceSouthAddon.cs
Normal file
64
Scripts/Items/Addons/SandstoneFireplaceSouthAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SandstoneFireplaceSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SandstoneFireplaceSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SandstoneFireplaceSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x482 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x47B ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public SandstoneFireplaceSouthAddon( 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 SandstoneFireplaceSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SandstoneFireplaceSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061845; } } // sandstone fireplace (south)
|
||||
|
||||
[Constructable]
|
||||
public SandstoneFireplaceSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SandstoneFireplaceSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Items/Addons/SandstoneFountainAddon.cs
Normal file
54
Scripts/Items/Addons/SandstoneFountainAddon.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SandstoneFountainAddon : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public SandstoneFountainAddon()
|
||||
{
|
||||
int itemID = 0x19C3;
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, +1, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, +0, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, -2, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, -2, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, +0, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, +0, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, +0, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, -1, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, -2, 0 );
|
||||
AddComponent( new AddonComponent( ++itemID ), -2, -2, 0 );
|
||||
}
|
||||
|
||||
public SandstoneFountainAddon( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/SmallBedEastAddon.cs
Normal file
64
Scripts/Items/Addons/SmallBedEastAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SmallBedEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SmallBedEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallBedEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA5D ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA62 ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
public SmallBedEastAddon( 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 SmallBedEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallBedEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044322; } } // small bed (east)
|
||||
|
||||
[Constructable]
|
||||
public SmallBedEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SmallBedEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/SmallBedSouthAddon.cs
Normal file
64
Scripts/Items/Addons/SmallBedSouthAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SmallBedSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SmallBedSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallBedSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xA63 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xA5C ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public SmallBedSouthAddon( 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 SmallBedSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallBedSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044321; } } // small bed (south)
|
||||
|
||||
[Constructable]
|
||||
public SmallBedSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SmallBedSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
63
Scripts/Items/Addons/SmallForgeAddon.cs
Normal file
63
Scripts/Items/Addons/SmallForgeAddon.cs
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SmallForgeAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SmallForgeDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallForgeAddon()
|
||||
{
|
||||
AddComponent( new ForgeComponent( 0xFB1 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public SmallForgeAddon( 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 SmallForgeDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallForgeAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044330; } } // small forge
|
||||
|
||||
[Constructable]
|
||||
public SmallForgeDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SmallForgeDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
149
Scripts/Items/Addons/SpinningwheelEastAddon.cs
Normal file
149
Scripts/Items/Addons/SpinningwheelEastAddon.cs
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public delegate void SpinCallback( ISpinningWheel sender, Mobile from, Item yarn );
|
||||
|
||||
public interface ISpinningWheel
|
||||
{
|
||||
bool Spinning{ get; }
|
||||
void BeginSpin( SpinCallback callback, Mobile from, Item yarn );
|
||||
}
|
||||
|
||||
public class SpinningwheelEastAddon : BaseAddon, ISpinningWheel
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SpinningwheelEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1019 ), 0, 0, 0 );
|
||||
|
||||
Hue = Utility.RandomHue();
|
||||
}
|
||||
|
||||
public SpinningwheelEastAddon( 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();
|
||||
}
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
public override void OnComponentLoaded( AddonComponent c )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1016:
|
||||
case 0x101A:
|
||||
case 0x101D:
|
||||
case 0x10A5: --c.ItemID; break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Spinning{ get{ return m_Timer != null; } }
|
||||
|
||||
public void BeginSpin( SpinCallback callback, Mobile from, Item yarn )
|
||||
{
|
||||
m_Timer = new SpinTimer( this, callback, from, yarn );
|
||||
m_Timer.Start();
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1015:
|
||||
case 0x1019:
|
||||
case 0x101C:
|
||||
case 0x10A4: ++c.ItemID; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EndSpin( SpinCallback callback, Mobile from, Item yarn )
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1016:
|
||||
case 0x101A:
|
||||
case 0x101D:
|
||||
case 0x10A5: --c.ItemID; break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( callback != null )
|
||||
callback( this, from, yarn );
|
||||
}
|
||||
|
||||
private class SpinTimer : Timer
|
||||
{
|
||||
private SpinningwheelEastAddon m_Wheel;
|
||||
private SpinCallback m_Callback;
|
||||
private Mobile m_From;
|
||||
private Item m_Yarn;
|
||||
|
||||
public SpinTimer( SpinningwheelEastAddon wheel, SpinCallback callback, Mobile from, Item yarn ) : base( TimeSpan.FromSeconds( 3.0 ) )
|
||||
{
|
||||
m_Wheel = wheel;
|
||||
m_Callback = callback;
|
||||
m_From = from;
|
||||
m_Yarn = yarn;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Wheel.EndSpin( m_Callback, m_From, m_Yarn );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SpinningwheelEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044341; } } // spining wheel (east)
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SpinningwheelEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
141
Scripts/Items/Addons/SpinningwheelSouthAddon.cs
Normal file
141
Scripts/Items/Addons/SpinningwheelSouthAddon.cs
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SpinningwheelSouthAddon : BaseAddon, ISpinningWheel
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SpinningwheelSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1015 ), 0, 0, 0 );
|
||||
|
||||
Hue = Utility.RandomHue();
|
||||
}
|
||||
|
||||
public SpinningwheelSouthAddon( 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();
|
||||
}
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
public override void OnComponentLoaded( AddonComponent c )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1016:
|
||||
case 0x101A:
|
||||
case 0x101D:
|
||||
case 0x10A5: --c.ItemID; break;
|
||||
}
|
||||
}
|
||||
|
||||
public bool Spinning{ get{ return m_Timer != null; } }
|
||||
|
||||
public void BeginSpin( SpinCallback callback, Mobile from, Item yarn )
|
||||
{
|
||||
m_Timer = new SpinTimer( this, callback, from, yarn );
|
||||
m_Timer.Start();
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1015:
|
||||
case 0x1019:
|
||||
case 0x101C:
|
||||
case 0x10A4: ++c.ItemID; break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void EndSpin( SpinCallback callback, Mobile from, Item yarn )
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
foreach ( AddonComponent c in Components )
|
||||
{
|
||||
switch ( c.ItemID )
|
||||
{
|
||||
case 0x1016:
|
||||
case 0x101A:
|
||||
case 0x101D:
|
||||
case 0x10A5: --c.ItemID; break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( callback != null )
|
||||
callback( this, from, yarn );
|
||||
}
|
||||
|
||||
private class SpinTimer : Timer
|
||||
{
|
||||
private SpinningwheelSouthAddon m_Wheel;
|
||||
private SpinCallback m_Callback;
|
||||
private Mobile m_From;
|
||||
private Item m_Yarn;
|
||||
|
||||
public SpinTimer( SpinningwheelSouthAddon wheel, SpinCallback callback, Mobile from, Item yarn ) : base( TimeSpan.FromSeconds( 3.0 ) )
|
||||
{
|
||||
m_Wheel = wheel;
|
||||
m_Callback = callback;
|
||||
m_From = from;
|
||||
m_Yarn = yarn;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Wheel.EndSpin( m_Callback, m_From, m_Yarn );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class SpinningwheelSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SpinningwheelSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044342; } } // spining wheel (south)
|
||||
|
||||
[Constructable]
|
||||
public SpinningwheelSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SpinningwheelSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/StoneFireplaceEastAddon.cs
Normal file
64
Scripts/Items/Addons/StoneFireplaceEastAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneFireplaceEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new StoneFireplaceEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneFireplaceEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x959 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x953 ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public StoneFireplaceEastAddon( 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 StoneFireplaceEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneFireplaceEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061848; } } // stone fireplace (east)
|
||||
|
||||
[Constructable]
|
||||
public StoneFireplaceEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public StoneFireplaceEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/StoneFireplaceSouthAddon.cs
Normal file
64
Scripts/Items/Addons/StoneFireplaceSouthAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneFireplaceSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new StoneFireplaceSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneFireplaceSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x967 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x961 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public StoneFireplaceSouthAddon( 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 StoneFireplaceSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneFireplaceSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1061849; } } // stone fireplace (south)
|
||||
|
||||
[Constructable]
|
||||
public StoneFireplaceSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public StoneFireplaceSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
54
Scripts/Items/Addons/StoneFountainAddon.cs
Normal file
54
Scripts/Items/Addons/StoneFountainAddon.cs
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneFountainAddon : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public StoneFountainAddon()
|
||||
{
|
||||
int itemID = 0x1731;
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, +1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, +1, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, +0, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +1, -2, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, -2, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), +0, +0, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, +0, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, +0, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -2, -1, 0 );
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, -1, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( itemID++ ), -1, -2, 0 );
|
||||
AddComponent( new AddonComponent( ++itemID ), -2, -2, 0 );
|
||||
}
|
||||
|
||||
public StoneFountainAddon( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/StoneOvenEastAddon.cs
Normal file
64
Scripts/Items/Addons/StoneOvenEastAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneOvenEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new StoneOvenEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x92C ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x92B ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public StoneOvenEastAddon( 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 StoneOvenEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044345; } } // stone oven (east)
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public StoneOvenEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Items/Addons/StoneOvenSouthAddon.cs
Normal file
64
Scripts/Items/Addons/StoneOvenSouthAddon.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class StoneOvenSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new StoneOvenSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x931 ), -1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x930 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public StoneOvenSouthAddon( 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 StoneOvenSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new StoneOvenSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044346; } } // stone oven (south)
|
||||
|
||||
[Constructable]
|
||||
public StoneOvenSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public StoneOvenSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
237
Scripts/Items/Addons/StretchedHides.cs
Normal file
237
Scripts/Items/Addons/StretchedHides.cs
Normal file
|
|
@ -0,0 +1,237 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class SmallStretchedHideEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SmallStretchedHideEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallStretchedHideEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1069 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public SmallStretchedHideEastAddon( 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 SmallStretchedHideEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallStretchedHideEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049401; } } // a small stretched hide deed facing east
|
||||
|
||||
[Constructable]
|
||||
public SmallStretchedHideEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SmallStretchedHideEastDeed( 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 SmallStretchedHideSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new SmallStretchedHideSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public SmallStretchedHideSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x107A ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public SmallStretchedHideSouthAddon( 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 SmallStretchedHideSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new SmallStretchedHideSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049402; } } // a small stretched hide deed facing south
|
||||
|
||||
[Constructable]
|
||||
public SmallStretchedHideSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public SmallStretchedHideSouthDeed( 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 MediumStretchedHideEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new MediumStretchedHideEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public MediumStretchedHideEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x106B ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public MediumStretchedHideEastAddon( 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 MediumStretchedHideEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new MediumStretchedHideEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049403; } } // a medium stretched hide deed facing east
|
||||
|
||||
[Constructable]
|
||||
public MediumStretchedHideEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public MediumStretchedHideEastDeed( 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 MediumStretchedHideSouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new MediumStretchedHideSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public MediumStretchedHideSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x107C ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public MediumStretchedHideSouthAddon( 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 MediumStretchedHideSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new MediumStretchedHideSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1049404; } } // a medium stretched hide deed facing south
|
||||
|
||||
[Constructable]
|
||||
public MediumStretchedHideSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public MediumStretchedHideSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
106
Scripts/Items/Addons/Telescope.cs
Normal file
106
Scripts/Items/Addons/Telescope.cs
Normal file
|
|
@ -0,0 +1,106 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Telescope : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public Telescope()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1494 ), 0, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x145B ), 0, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x145A ), 0, 7, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1495 ), 1, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x145C ), 1, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x145D ), 1, 8, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1496 ), 2, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1499 ), 2, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x148E ), 2, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1493 ), 2, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x1492 ), 2, 8, 0 );
|
||||
AddComponent( new AddonComponent( 0x145E ), 2, 9, 0 );
|
||||
AddComponent( new AddonComponent( 0x1459 ), 2,10, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1497 ), 3, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x145F ), 3, 9, 0 );
|
||||
AddComponent( new AddonComponent( 0x1461 ), 3,10, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x149A ), 4, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1498 ), 4, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x148F ), 4, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x148D ), 4, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1488 ), 4, 8, 0 );
|
||||
AddComponent( new AddonComponent( 0x1460 ), 4, 9, 0 );
|
||||
AddComponent( new AddonComponent( 0x1462 ), 4,10, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x147D ), 5, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1490 ), 5, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x148B ), 5, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x148A ), 5, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1486 ), 5, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x1485 ), 5, 8, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x147C ), 6, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1491 ), 6, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x148C ), 6, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x1489 ), 6, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1487 ), 6, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x1484 ), 6, 8, 0 );
|
||||
AddComponent( new AddonComponent( 0x1463 ), 6,10, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x147B ), 7, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x147F ), 7, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1480 ), 7, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1482 ), 7, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x1469 ), 7, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1468 ), 7, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x1465 ), 7, 8, 0 );
|
||||
AddComponent( new AddonComponent( 0x1464 ), 7, 9, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x147A ), 8, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1479 ), 8, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1477 ), 8, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x147E ), 8, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1481 ), 8, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1483 ), 8, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x146A ), 8, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x1467 ), 8, 7, 0 );
|
||||
AddComponent( new AddonComponent( 0x1466 ), 8, 8, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1478 ), 9, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1475 ), 9, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1474 ), 9, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x146F ), 9, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x146E ), 9, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x146D ), 9, 6, 0 );
|
||||
AddComponent( new AddonComponent( 0x146B ), 9, 7, 0 );
|
||||
|
||||
AddComponent( new AddonComponent( 0x1476 ),10, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x1473 ),10, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1470 ),10, 4, 0 );
|
||||
AddComponent( new AddonComponent( 0x1471 ),10, 5, 0 );
|
||||
AddComponent( new AddonComponent( 0x1472 ),10, 6, 0 );
|
||||
}
|
||||
|
||||
public Telescope( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
286
Scripts/Items/Addons/TrainingDummies.cs
Normal file
286
Scripts/Items/Addons/TrainingDummies.cs
Normal file
|
|
@ -0,0 +1,286 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable( 0x1070, 0x1074 )]
|
||||
public class TrainingDummy : AddonComponent
|
||||
{
|
||||
private double m_MinSkill;
|
||||
private double m_MaxSkill;
|
||||
|
||||
private Timer m_Timer;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MinSkill
|
||||
{
|
||||
get{ return m_MinSkill; }
|
||||
set{ m_MinSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public double MaxSkill
|
||||
{
|
||||
get{ return m_MaxSkill; }
|
||||
set{ m_MaxSkill = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool Swinging
|
||||
{
|
||||
get{ return ( m_Timer != null ); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummy() : this( 0x1074 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummy( int itemID ) : base( itemID )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
public void UpdateItemID()
|
||||
{
|
||||
int baseItemID = (ItemID / 2) * 2;
|
||||
|
||||
ItemID = baseItemID + (Swinging ? 1 : 0);
|
||||
}
|
||||
|
||||
public void BeginSwing()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = new InternalTimer( this );
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public void EndSwing()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
m_Timer = null;
|
||||
|
||||
UpdateItemID();
|
||||
}
|
||||
|
||||
public void OnHit()
|
||||
{
|
||||
UpdateItemID();
|
||||
Effects.PlaySound( GetWorldLocation(), Map, Utility.RandomList( 0x3A4, 0x3A6, 0x3A9, 0x3AE, 0x3B4, 0x3B6 ) );
|
||||
}
|
||||
|
||||
public void Use( Mobile from, BaseWeapon weapon )
|
||||
{
|
||||
BeginSwing();
|
||||
|
||||
from.Direction = from.GetDirectionTo( GetWorldLocation() );
|
||||
weapon.PlaySwingAnimation( from );
|
||||
|
||||
if ( from is PlayerMobile )
|
||||
from.CheckSkill( weapon.Skill, m_MinSkill, m_MaxSkill );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
BaseWeapon weapon = from.Weapon as BaseWeapon;
|
||||
|
||||
if ( weapon is BaseRanged )
|
||||
SendLocalizedMessageTo( from, 501822 ); // You can't practice ranged weapons on this.
|
||||
else if ( weapon == null || !from.InRange( GetWorldLocation(), weapon.MaxRange ) )
|
||||
SendLocalizedMessageTo( from, 501816 ); // You are too far away to do that.
|
||||
else if ( Swinging )
|
||||
SendLocalizedMessageTo( from, 501815 ); // You have to wait until it stops swinging.
|
||||
else if ( from.Skills[weapon.Skill].Base >= m_MaxSkill && !(from is BaseCreature) )
|
||||
SendLocalizedMessageTo( from, 501828 ); // Your skill cannot improve any further by simply practicing with a dummy.
|
||||
else if ( from.Mounted )
|
||||
SendLocalizedMessageTo( from, 501829 ); // You can't practice on this while on a mount.
|
||||
else
|
||||
Use( from, weapon );
|
||||
}
|
||||
|
||||
public TrainingDummy( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
writer.Write( m_MinSkill );
|
||||
writer.Write( m_MaxSkill );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_MinSkill = reader.ReadDouble();
|
||||
m_MaxSkill = reader.ReadDouble();
|
||||
|
||||
if ( m_MinSkill == 0.0 && m_MaxSkill == 30.0 )
|
||||
{
|
||||
m_MinSkill = -25.0;
|
||||
m_MaxSkill = +25.0;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
UpdateItemID();
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private TrainingDummy m_Dummy;
|
||||
private bool m_Delay = true;
|
||||
|
||||
public InternalTimer( TrainingDummy dummy ) : base( TimeSpan.FromSeconds( 0.25 ), TimeSpan.FromSeconds( 2.75 ) )
|
||||
{
|
||||
m_Dummy = dummy;
|
||||
Priority = TimerPriority.FiftyMS;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( m_Delay )
|
||||
m_Dummy.OnHit();
|
||||
else
|
||||
m_Dummy.EndSwing();
|
||||
|
||||
m_Delay = !m_Delay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class TrainingDummyEastAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new TrainingDummyEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummyEastAddon()
|
||||
{
|
||||
AddComponent( new TrainingDummy( 0x1074 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public TrainingDummyEastAddon( 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 TrainingDummyEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummyEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044335; } } // training dummy (east)
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummyEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public TrainingDummyEastDeed( 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 TrainingDummySouthAddon : BaseAddon
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new TrainingDummySouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummySouthAddon()
|
||||
{
|
||||
AddComponent( new TrainingDummy( 0x1070 ), 0, 0, 0 );
|
||||
}
|
||||
|
||||
public TrainingDummySouthAddon( 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 TrainingDummySouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new TrainingDummySouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044336; } } // training dummy (south)
|
||||
|
||||
[Constructable]
|
||||
public TrainingDummySouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public TrainingDummySouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Items/Addons/WaterTroughEastAddon.cs
Normal file
70
Scripts/Items/Addons/WaterTroughEastAddon.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WaterTroughEastAddon : BaseAddon, IWaterSource
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new WaterTroughEastDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughEastAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xB41 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xB42 ), 0, 1, 0 );
|
||||
}
|
||||
|
||||
public WaterTroughEastAddon( 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 int Quantity
|
||||
{
|
||||
get{ return 500; }
|
||||
set{}
|
||||
}
|
||||
}
|
||||
|
||||
public class WaterTroughEastDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughEastAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044349; } } // water trough (east)
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughEastDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public WaterTroughEastDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Items/Addons/WaterTroughSouthAddon.cs
Normal file
70
Scripts/Items/Addons/WaterTroughSouthAddon.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WaterTroughSouthAddon : BaseAddon, IWaterSource
|
||||
{
|
||||
public override BaseAddonDeed Deed{ get{ return new WaterTroughSouthDeed(); } }
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughSouthAddon()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0xB43 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0xB44 ), 1, 0, 0 );
|
||||
}
|
||||
|
||||
public WaterTroughSouthAddon( 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 int Quantity
|
||||
{
|
||||
get{ return 500; }
|
||||
set{}
|
||||
}
|
||||
}
|
||||
|
||||
public class WaterTroughSouthDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon{ get{ return new WaterTroughSouthAddon(); } }
|
||||
public override int LabelNumber{ get{ return 1044350; } } // water trough (south)
|
||||
|
||||
[Constructable]
|
||||
public WaterTroughSouthDeed()
|
||||
{
|
||||
}
|
||||
|
||||
public WaterTroughSouthDeed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
87
Scripts/Items/Addons/WaterVat.cs
Normal file
87
Scripts/Items/Addons/WaterVat.cs
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class WaterVatEast : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public WaterVatEast()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1558 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x14DE ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1552 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x14DF ), 1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1554 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1559 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1550 ), 1, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1555 ), 3, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x14D7 ), 2, 2, 0 );
|
||||
|
||||
// Blockers
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 2, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 3, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), -1, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 0, 3, 0 );
|
||||
}
|
||||
|
||||
public WaterVatEast( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class WaterVatSouth : BaseAddon
|
||||
{
|
||||
[Constructable]
|
||||
public WaterVatSouth()
|
||||
{
|
||||
AddComponent( new AddonComponent( 0x1558 ), 0, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x14DE ), -1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1552 ), 0, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x14DF ), 1, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1554 ), 1, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x1559 ), 1, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x1551 ), 1, 3, 0 );
|
||||
AddComponent( new AddonComponent( 0x1556 ), 3, 1, 0 );
|
||||
AddComponent( new AddonComponent( 0x14D7 ), 2, 2, 0 );
|
||||
|
||||
// Blockers
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 2, -1, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 3, 0, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), -1, 2, 0 );
|
||||
AddComponent( new AddonComponent( 0x21A4 ), 0, 3, 0 );
|
||||
}
|
||||
|
||||
public WaterVatSouth( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
61
Scripts/Items/Armor/ArmorEnums.cs
Normal file
61
Scripts/Items/Armor/ArmorEnums.cs
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
using System;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum ArmorQuality
|
||||
{
|
||||
Low,
|
||||
Regular,
|
||||
Exceptional
|
||||
}
|
||||
|
||||
public enum ArmorDurabilityLevel
|
||||
{
|
||||
Regular,
|
||||
Durable,
|
||||
Substantial,
|
||||
Massive,
|
||||
Fortified,
|
||||
Indestructible
|
||||
}
|
||||
|
||||
public enum ArmorProtectionLevel
|
||||
{
|
||||
Regular,
|
||||
Defense,
|
||||
Guarding,
|
||||
Hardening,
|
||||
Fortification,
|
||||
Invulnerability,
|
||||
}
|
||||
|
||||
public enum ArmorBodyType
|
||||
{
|
||||
Gorget,
|
||||
Gloves,
|
||||
Helmet,
|
||||
Arms,
|
||||
Legs,
|
||||
Chest,
|
||||
Shield
|
||||
}
|
||||
|
||||
public enum ArmorMaterialType
|
||||
{
|
||||
Cloth,
|
||||
Leather,
|
||||
Studded,
|
||||
Bone,
|
||||
Wood,
|
||||
Ringmail,
|
||||
Chainmail,
|
||||
Plate
|
||||
}
|
||||
|
||||
public enum ArmorMeditationAllowance
|
||||
{
|
||||
All,
|
||||
Half,
|
||||
None
|
||||
}
|
||||
}
|
||||
1179
Scripts/Items/Armor/BaseArmor.cs
Normal file
1179
Scripts/Items/Armor/BaseArmor.cs
Normal file
File diff suppressed because it is too large
Load diff
47
Scripts/Items/Armor/Bone/BoneArms.cs
Normal file
47
Scripts/Items/Armor/Bone/BoneArms.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x144e, 0x1453 )]
|
||||
public class BoneArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 25; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -2; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
public override int RevertArmorBase{ get{ return 4; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
[Constructable]
|
||||
public BoneArms() : base( 0x144E )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public BoneArms( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Bone/BoneChest.cs
Normal file
47
Scripts/Items/Armor/Bone/BoneChest.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x144f, 0x1454 )]
|
||||
public class BoneChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 25; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -6; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
public override int RevertArmorBase{ get{ return 11; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
[Constructable]
|
||||
public BoneChest() : base( 0x144F )
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public BoneChest( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Bone/BoneGloves.cs
Normal file
47
Scripts/Items/Armor/Bone/BoneGloves.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1450, 0x1455 )]
|
||||
public class BoneGloves : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 25; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
public override int RevertArmorBase{ get{ return 2; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
[Constructable]
|
||||
public BoneGloves() : base( 0x1450 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public BoneGloves( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
43
Scripts/Items/Armor/Bone/BoneHelm.cs
Normal file
43
Scripts/Items/Armor/Bone/BoneHelm.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1451, 0x1456 )]
|
||||
public class BoneHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 25; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public BoneHelm() : base( 0x1451 )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public BoneHelm( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Armor/Bone/BoneLegs.cs
Normal file
44
Scripts/Items/Armor/Bone/BoneLegs.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1452, 0x1457 )]
|
||||
public class BoneLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 25; } }
|
||||
public override int InitMaxHits{ get{ return 30; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -4; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
public override int RevertArmorBase{ get{ return 7; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
[Constructable]
|
||||
public BoneLegs() : base( 0x1452 )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public BoneLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/Bone/OrcHelm.cs
Normal file
48
Scripts/Items/Armor/Bone/OrcHelm.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class OrcHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 20; } }
|
||||
|
||||
public override double DefaultWeight { get { return 5; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.None; } }
|
||||
|
||||
[Constructable]
|
||||
public OrcHelm() : base( 0x1F0B )
|
||||
{
|
||||
}
|
||||
|
||||
public OrcHelm( 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();
|
||||
|
||||
if( version == 0 && Weight == 1 )
|
||||
{
|
||||
Weight = 5;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Chain/ChainChest.cs
Normal file
42
Scripts/Items/Armor/Chain/ChainChest.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13bf, 0x13c4 )]
|
||||
public class ChainChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 45; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -5; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 28; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Chainmail; } }
|
||||
|
||||
[Constructable]
|
||||
public ChainChest() : base( 0x13BF )
|
||||
{
|
||||
Weight = 7.0;
|
||||
}
|
||||
|
||||
public ChainChest( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
40
Scripts/Items/Armor/Chain/ChainCoif.cs
Normal file
40
Scripts/Items/Armor/Chain/ChainCoif.cs
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13BB, 0x13C0 )]
|
||||
public class ChainCoif : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 28; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Chainmail; } }
|
||||
|
||||
[Constructable]
|
||||
public ChainCoif() : base( 0x13BB )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public ChainCoif( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Chain/ChainLegs.cs
Normal file
42
Scripts/Items/Armor/Chain/ChainLegs.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13be, 0x13c3 )]
|
||||
public class ChainLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 45; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -3; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 28; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Chainmail; } }
|
||||
|
||||
[Constructable]
|
||||
public ChainLegs() : base( 0x13BE )
|
||||
{
|
||||
Weight = 7.0;
|
||||
}
|
||||
|
||||
public ChainLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/DaemonBone/DaemonArms.cs
Normal file
48
Scripts/Items/Armor/DaemonBone/DaemonArms.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x144e, 0x1453 )]
|
||||
public class DaemonArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -2; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 46; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041371; } } // daemon bone arms
|
||||
|
||||
[Constructable]
|
||||
public DaemonArms() : base( 0x144E )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = 0x648;
|
||||
}
|
||||
|
||||
public DaemonArms( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/DaemonBone/DaemonChest.cs
Normal file
48
Scripts/Items/Armor/DaemonBone/DaemonChest.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x144f, 0x1454 )]
|
||||
public class DaemonChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -6; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 46; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041372; } } // daemon bone armor
|
||||
|
||||
[Constructable]
|
||||
public DaemonChest() : base( 0x144F )
|
||||
{
|
||||
Weight = 6.0;
|
||||
Hue = 0x648;
|
||||
}
|
||||
|
||||
public DaemonChest( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/DaemonBone/DaemonGloves.cs
Normal file
48
Scripts/Items/Armor/DaemonBone/DaemonGloves.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1450, 0x1455 )]
|
||||
public class DaemonGloves : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 46; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041373; } } // daemon bone gloves
|
||||
|
||||
[Constructable]
|
||||
public DaemonGloves() : base( 0x1450 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
Hue = 0x648;
|
||||
}
|
||||
|
||||
public DaemonGloves( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/DaemonBone/DaemonHelm.cs
Normal file
46
Scripts/Items/Armor/DaemonBone/DaemonHelm.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1451, 0x1456 )]
|
||||
public class DaemonHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 46; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041374; } } // daemon bone helmet
|
||||
|
||||
[Constructable]
|
||||
public DaemonHelm() : base( 0x1451 )
|
||||
{
|
||||
Hue = 0x648;
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public DaemonHelm( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/DaemonBone/DaemonLegs.cs
Normal file
46
Scripts/Items/Armor/DaemonBone/DaemonLegs.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1452, 0x1457 )]
|
||||
public class DaemonLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 255; } }
|
||||
public override int InitMaxHits{ get{ return 255; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -4; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 46; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Bone; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041375; } } // daemon bone leggings
|
||||
|
||||
[Constructable]
|
||||
public DaemonLegs() : base( 0x1452 )
|
||||
{
|
||||
Weight = 3.0;
|
||||
Hue = 0x648;
|
||||
}
|
||||
|
||||
public DaemonLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Leather/FemaleLeatherChest.cs
Normal file
45
Scripts/Items/Armor/Leather/FemaleLeatherChest.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c06, 0x1c07 )]
|
||||
public class FemaleLeatherChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 15; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public FemaleLeatherChest() : base( 0x1C06 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public FemaleLeatherChest( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/Leather/LeatherArms.cs
Normal file
46
Scripts/Items/Armor/Leather/LeatherArms.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13cd, 0x13c5 )]
|
||||
public class LeatherArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 15; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherArms() : base( 0x13CD )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public LeatherArms( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Leather/LeatherBustierArms.cs
Normal file
45
Scripts/Items/Armor/Leather/LeatherBustierArms.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c0a, 0x1c0b )]
|
||||
public class LeatherBustierArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 15; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherBustierArms() : base( 0x1C0A )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public LeatherBustierArms( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/Leather/LeatherCap.cs
Normal file
46
Scripts/Items/Armor/Leather/LeatherCap.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1db9, 0x1dba )]
|
||||
public class LeatherCap : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 15; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherCap() : base( 0x1DB9 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public LeatherCap( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/Leather/LeatherChest.cs
Normal file
46
Scripts/Items/Armor/Leather/LeatherChest.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13cc, 0x13d3 )]
|
||||
public class LeatherChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 15; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherChest() : base( 0x13CC )
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public LeatherChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 6.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
132
Scripts/Items/Armor/Leather/LeatherGloves.cs
Normal file
132
Scripts/Items/Armor/Leather/LeatherGloves.cs
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[Flipable]
|
||||
public class LeatherGloves : BaseArmor, IArcaneEquip
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherGloves() : base( 0x13C6 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public LeatherGloves( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
if ( IsArcane )
|
||||
{
|
||||
writer.Write( true );
|
||||
writer.Write( (int) m_CurArcaneCharges );
|
||||
writer.Write( (int) m_MaxArcaneCharges );
|
||||
}
|
||||
else
|
||||
{
|
||||
writer.Write( false );
|
||||
}
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
if ( reader.ReadBool() )
|
||||
{
|
||||
m_CurArcaneCharges = reader.ReadInt();
|
||||
m_MaxArcaneCharges = reader.ReadInt();
|
||||
|
||||
if ( Hue == 2118 )
|
||||
Hue = ArcaneGem.DefaultArcaneHue;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#region Arcane Impl
|
||||
private int m_MaxArcaneCharges, m_CurArcaneCharges;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MaxArcaneCharges
|
||||
{
|
||||
get{ return m_MaxArcaneCharges; }
|
||||
set{ m_MaxArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int CurArcaneCharges
|
||||
{
|
||||
get{ return m_CurArcaneCharges; }
|
||||
set{ m_CurArcaneCharges = value; InvalidateProperties(); Update(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsArcane
|
||||
{
|
||||
get{ return ( m_MaxArcaneCharges > 0 && m_CurArcaneCharges >= 0 ); }
|
||||
}
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if ( IsArcane )
|
||||
ItemID = 0x26B0;
|
||||
else if ( ItemID == 0x26B0 )
|
||||
ItemID = 0x13C6;
|
||||
|
||||
if ( IsArcane && CurArcaneCharges == 0 )
|
||||
Hue = 0;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( IsArcane )
|
||||
list.Add( 1061837, "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ); // arcane charges: ~1_val~ / ~2_val~
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( IsArcane )
|
||||
LabelTo( from, 1061837, String.Format( "{0}\t{1}", m_CurArcaneCharges, m_MaxArcaneCharges ) );
|
||||
}
|
||||
|
||||
public void Flip()
|
||||
{
|
||||
if ( ItemID == 0x13C6 )
|
||||
ItemID = 0x13CE;
|
||||
else if ( ItemID == 0x13CE )
|
||||
ItemID = 0x13C6;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Leather/LeatherGorget.cs
Normal file
42
Scripts/Items/Armor/Leather/LeatherGorget.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LeatherGorget : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherGorget() : base( 0x13C7 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public LeatherGorget( 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/Armor/Leather/LeatherLegs.cs
Normal file
43
Scripts/Items/Armor/Leather/LeatherLegs.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13cb, 0x13d2 )]
|
||||
public class LeatherLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherLegs() : base( 0x13CB )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public LeatherLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Leather/LeatherShorts.cs
Normal file
45
Scripts/Items/Armor/Leather/LeatherShorts.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c00, 0x1c01 )]
|
||||
public class LeatherShorts : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherShorts() : base( 0x1C00 )
|
||||
{
|
||||
Weight = 3.0;
|
||||
}
|
||||
|
||||
public LeatherShorts( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/Leather/LeatherSkirt.cs
Normal file
48
Scripts/Items/Armor/Leather/LeatherSkirt.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c08, 0x1c09 )]
|
||||
public class LeatherSkirt : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 30; } }
|
||||
public override int InitMaxHits{ get{ return 40; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 13; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Leather; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.All; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public LeatherSkirt() : base( 0x1C08 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public LeatherSkirt( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int) 0 );
|
||||
|
||||
if ( Weight == 3.0 )
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Metal/Bascinet.cs
Normal file
42
Scripts/Items/Armor/Metal/Bascinet.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Bascinet : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 40; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 10; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 18; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public Bascinet() : base( 0x140C )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public Bascinet( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Metal/CloseHelm.cs
Normal file
42
Scripts/Items/Armor/Metal/CloseHelm.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class CloseHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 45; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public CloseHelm() : base( 0x1408 )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public CloseHelm( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Metal/Helmet.cs
Normal file
42
Scripts/Items/Armor/Metal/Helmet.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Helmet : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 45; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public Helmet() : base( 0x140A )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public Helmet( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Metal/NorseHelm.cs
Normal file
42
Scripts/Items/Armor/Metal/NorseHelm.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class NorseHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 45; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public NorseHelm() : base( 0x140E )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public NorseHelm( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Plate/FemalePlateChest.cs
Normal file
47
Scripts/Items/Armor/Plate/FemalePlateChest.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c04, 0x1c05 )]
|
||||
public class FemalePlateChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 45; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -5; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 30; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public FemalePlateChest() : base( 0x1C04 )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public FemalePlateChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 4.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Plate/PlateArms.cs
Normal file
45
Scripts/Items/Armor/Plate/PlateArms.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1410, 0x1417 )]
|
||||
public class PlateArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -2; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateArms() : base( 0x1410 )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public PlateArms( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Plate/PlateChest.cs
Normal file
45
Scripts/Items/Armor/Plate/PlateChest.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1415, 0x1416 )]
|
||||
public class PlateChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 60; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -8; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateChest() : base( 0x1415 )
|
||||
{
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public PlateChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 10.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Plate/PlateGloves.cs
Normal file
45
Scripts/Items/Armor/Plate/PlateGloves.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1414, 0x1418 )]
|
||||
public class PlateGloves : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 30; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -2; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateGloves() : base( 0x1414 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public PlateGloves( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Items/Armor/Plate/PlateGorget.cs
Normal file
41
Scripts/Items/Armor/Plate/PlateGorget.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PlateGorget : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 30; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateGorget() : base( 0x1413 )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public PlateGorget( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Armor/Plate/PlateHelm.cs
Normal file
44
Scripts/Items/Armor/Plate/PlateHelm.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class PlateHelm : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 40; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateHelm() : base( 0x1412 )
|
||||
{
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public PlateHelm( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Plate/PlateLegs.cs
Normal file
42
Scripts/Items/Armor/Plate/PlateLegs.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1411, 0x141a )]
|
||||
public class PlateLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 50; } }
|
||||
public override int InitMaxHits{ get{ return 65; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 60; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -6; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 40; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Plate; } }
|
||||
|
||||
[Constructable]
|
||||
public PlateLegs() : base( 0x1411 )
|
||||
{
|
||||
Weight = 7.0;
|
||||
}
|
||||
|
||||
public PlateLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Ranger/RangerArms.cs
Normal file
47
Scripts/Items/Armor/Ranger/RangerArms.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13dc, 0x13d4 )]
|
||||
public class RangerArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 25; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041493; } } // studded sleeves, ranger armor
|
||||
|
||||
[Constructable]
|
||||
public RangerArms() : base( 0x13DC )
|
||||
{
|
||||
Weight = 4.0;
|
||||
Hue = 0x59C;
|
||||
}
|
||||
|
||||
public RangerArms( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 4.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Ranger/RangerChest.cs
Normal file
47
Scripts/Items/Armor/Ranger/RangerChest.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13db, 0x13e2 )]
|
||||
public class RangerChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 35; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041497; } } // studded tunic, ranger armor
|
||||
|
||||
[Constructable]
|
||||
public RangerChest() : base( 0x13DB )
|
||||
{
|
||||
Weight = 8.0;
|
||||
Hue = 0x59C;
|
||||
}
|
||||
|
||||
public RangerChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 8.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
44
Scripts/Items/Armor/Ranger/RangerGloves.cs
Normal file
44
Scripts/Items/Armor/Ranger/RangerGloves.cs
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13d5, 0x13dd )]
|
||||
public class RangerGloves : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 25; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041494; } } // studded gloves, ranger armor
|
||||
|
||||
[Constructable]
|
||||
public RangerGloves() : base( 0x13D5 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x59C;
|
||||
}
|
||||
|
||||
public RangerGloves( 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/Armor/Ranger/RangerGorget.cs
Normal file
43
Scripts/Items/Armor/Ranger/RangerGorget.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RangerGorget : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 25; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041495; } } // studded gorget, ranger armor
|
||||
|
||||
[Constructable]
|
||||
public RangerGorget() : base( 0x13D6 )
|
||||
{
|
||||
Weight = 1.0;
|
||||
Hue = 0x59C;
|
||||
}
|
||||
|
||||
public RangerGorget( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
47
Scripts/Items/Armor/Ranger/RangerLegs.cs
Normal file
47
Scripts/Items/Armor/Ranger/RangerLegs.cs
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13da, 0x13e1 )]
|
||||
public class RangerLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 35; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override int LabelNumber{ get{ return 1041496; } } // studded leggings, ranger armor
|
||||
|
||||
[Constructable]
|
||||
public RangerLegs() : base( 0x13DA )
|
||||
{
|
||||
Weight = 3.0;
|
||||
Hue = 0x59C;
|
||||
}
|
||||
|
||||
public RangerLegs( 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();
|
||||
|
||||
if ( Weight == 3.0 )
|
||||
Weight = 5.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Ring/RingmailArms.cs
Normal file
45
Scripts/Items/Armor/Ring/RingmailArms.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13ee, 0x13ef )]
|
||||
public class RingmailArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 40; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 22; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Ringmail; } }
|
||||
|
||||
[Constructable]
|
||||
public RingmailArms() : base( 0x13EE )
|
||||
{
|
||||
Weight = 15.0;
|
||||
}
|
||||
|
||||
public RingmailArms( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 15.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Ring/RingmailChest.cs
Normal file
45
Scripts/Items/Armor/Ring/RingmailChest.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13ec, 0x13ed )]
|
||||
public class RingmailChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 40; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -2; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 22; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Ringmail; } }
|
||||
|
||||
[Constructable]
|
||||
public RingmailChest() : base( 0x13EC )
|
||||
{
|
||||
Weight = 15.0;
|
||||
}
|
||||
|
||||
public RingmailChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 15.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Ring/RingmailGloves.cs
Normal file
45
Scripts/Items/Armor/Ring/RingmailGloves.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13eb, 0x13f2 )]
|
||||
public class RingmailGloves : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 40; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 22; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Ringmail; } }
|
||||
|
||||
[Constructable]
|
||||
public RingmailGloves() : base( 0x13EB )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public RingmailGloves( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 2.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
42
Scripts/Items/Armor/Ring/RingmailLegs.cs
Normal file
42
Scripts/Items/Armor/Ring/RingmailLegs.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13f0, 0x13f1 )]
|
||||
public class RingmailLegs : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 40; } }
|
||||
public override int InitMaxHits{ get{ return 50; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 20; } }
|
||||
|
||||
public override int UODexBonus{ get{ return -1; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 22; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Ringmail; } }
|
||||
|
||||
[Constructable]
|
||||
public RingmailLegs() : base( 0x13F0 )
|
||||
{
|
||||
Weight = 15.0;
|
||||
}
|
||||
|
||||
public RingmailLegs( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
48
Scripts/Items/Armor/Studded/FemaleStuddedChest.cs
Normal file
48
Scripts/Items/Armor/Studded/FemaleStuddedChest.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c02, 0x1c03 )]
|
||||
public class FemaleStuddedChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 35; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.Half; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public FemaleStuddedChest() : base( 0x1C02 )
|
||||
{
|
||||
Weight = 6.0;
|
||||
}
|
||||
|
||||
public FemaleStuddedChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 6.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/Studded/StuddedArms.cs
Normal file
46
Scripts/Items/Armor/Studded/StuddedArms.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13dc, 0x13d4 )]
|
||||
public class StuddedArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 25; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.Half; } }
|
||||
|
||||
[Constructable]
|
||||
public StuddedArms() : base( 0x13DC )
|
||||
{
|
||||
Weight = 4.0;
|
||||
}
|
||||
|
||||
public StuddedArms( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 4.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Armor/Studded/StuddedBustierArms.cs
Normal file
45
Scripts/Items/Armor/Studded/StuddedBustierArms.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1c0c, 0x1c0d )]
|
||||
public class StuddedBustierArms : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 35; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.Half; } }
|
||||
|
||||
public override bool AllowMaleWearer{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public StuddedBustierArms() : base( 0x1C0C )
|
||||
{
|
||||
Weight = 1.0;
|
||||
}
|
||||
|
||||
public StuddedBustierArms( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
46
Scripts/Items/Armor/Studded/StuddedChest.cs
Normal file
46
Scripts/Items/Armor/Studded/StuddedChest.cs
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x13db, 0x13e2 )]
|
||||
public class StuddedChest : BaseArmor
|
||||
{
|
||||
public override int InitMinHits{ get{ return 35; } }
|
||||
public override int InitMaxHits{ get{ return 45; } }
|
||||
|
||||
public override int UOStrReq{ get{ return 35; } }
|
||||
|
||||
public override int ArmorBase{ get{ return 16; } }
|
||||
|
||||
public override ArmorMaterialType MaterialType{ get{ return ArmorMaterialType.Studded; } }
|
||||
public override CraftResource DefaultResource{ get{ return CraftResource.Leathered; } }
|
||||
|
||||
public override ArmorMeditationAllowance DefMedAllowance{ get{ return ArmorMeditationAllowance.Half; } }
|
||||
|
||||
[Constructable]
|
||||
public StuddedChest() : base( 0x13DB )
|
||||
{
|
||||
Weight = 8.0;
|
||||
}
|
||||
|
||||
public StuddedChest( 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();
|
||||
|
||||
if ( Weight == 1.0 )
|
||||
Weight = 8.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue