#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
5df497787a
7510 changed files with 416048 additions and 0 deletions
45
Scripts/Items/Body Parts/BonePile.cs
Normal file
45
Scripts/Items/Body Parts/BonePile.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1B09, 0x1B10 )]
|
||||
public class BonePile : Item, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public BonePile( ) : base( 0x1B09 + Utility.Random( 8 ) )
|
||||
{
|
||||
Stackable = false;
|
||||
Weight = 10.0;
|
||||
}
|
||||
|
||||
public BonePile( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) )
|
||||
return false;
|
||||
|
||||
base.ScissorHelper( from, new Bone(), Utility.RandomMinMax( 10, 15 ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
128
Scripts/Items/Body Parts/Head.cs
Normal file
128
Scripts/Items/Body Parts/Head.cs
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public enum HeadType
|
||||
{
|
||||
Regular,
|
||||
Duel,
|
||||
Tournament
|
||||
}
|
||||
|
||||
public class Head : Item
|
||||
{
|
||||
private string m_PlayerName;
|
||||
private HeadType m_HeadType;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public string PlayerName
|
||||
{
|
||||
get { return m_PlayerName; }
|
||||
set { m_PlayerName = value; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public HeadType HeadType
|
||||
{
|
||||
get { return m_HeadType; }
|
||||
set { m_HeadType = value; }
|
||||
}
|
||||
|
||||
public override string DefaultName
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_PlayerName == null )
|
||||
return base.DefaultName;
|
||||
|
||||
switch ( m_HeadType )
|
||||
{
|
||||
default:
|
||||
return String.Format( "the head of {0}", m_PlayerName );
|
||||
|
||||
case HeadType.Duel:
|
||||
return String.Format( "the head of {0}, taken in a duel", m_PlayerName );
|
||||
|
||||
case HeadType.Tournament:
|
||||
return String.Format( "the head of {0}, taken in a tournament", m_PlayerName );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Head()
|
||||
: this( null )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Head( string playerName )
|
||||
: this( HeadType.Regular, playerName )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Head( HeadType headType, string playerName )
|
||||
: base( 0x1DA0 )
|
||||
{
|
||||
m_HeadType = headType;
|
||||
m_PlayerName = playerName;
|
||||
}
|
||||
|
||||
public Head( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (string) m_PlayerName );
|
||||
writer.WriteEncodedInt( (int) m_HeadType );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
m_PlayerName = reader.ReadString();
|
||||
m_HeadType = (HeadType) reader.ReadEncodedInt();
|
||||
break;
|
||||
|
||||
case 0:
|
||||
string format = this.Name;
|
||||
|
||||
if ( format != null )
|
||||
{
|
||||
if ( format.StartsWith( "the head of " ) )
|
||||
format = format.Substring( "the head of ".Length );
|
||||
|
||||
if ( format.EndsWith( ", taken in a duel" ) )
|
||||
{
|
||||
format = format.Substring( 0, format.Length - ", taken in a duel".Length );
|
||||
m_HeadType = HeadType.Duel;
|
||||
}
|
||||
else if ( format.EndsWith( ", taken in a tournament" ) )
|
||||
{
|
||||
format = format.Substring( 0, format.Length - ", taken in a tournament".Length );
|
||||
m_HeadType = HeadType.Tournament;
|
||||
}
|
||||
}
|
||||
|
||||
m_PlayerName = format;
|
||||
this.Name = null;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Items/Body Parts/LeftArm.cs
Normal file
31
Scripts/Items/Body Parts/LeftArm.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LeftArm : Item
|
||||
{
|
||||
[Constructable]
|
||||
public LeftArm() : base( 0x1DA1 )
|
||||
{
|
||||
}
|
||||
|
||||
public LeftArm( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Items/Body Parts/LeftLeg.cs
Normal file
31
Scripts/Items/Body Parts/LeftLeg.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LeftLeg : Item
|
||||
{
|
||||
[Constructable]
|
||||
public LeftLeg() : base( 0x1DA3 )
|
||||
{
|
||||
}
|
||||
|
||||
public LeftLeg( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Items/Body Parts/RibCage.cs
Normal file
45
Scripts/Items/Body Parts/RibCage.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
[FlipableAttribute( 0x1B17, 0x1B18 )]
|
||||
public class RibCage : Item, IScissorable
|
||||
{
|
||||
[Constructable]
|
||||
public RibCage() : base( 0x1B17 + Utility.Random( 2 ) )
|
||||
{
|
||||
Stackable = false;
|
||||
Weight = 5.0;
|
||||
}
|
||||
|
||||
public RibCage( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
|
||||
public bool Scissor( Mobile from, Scissors scissors )
|
||||
{
|
||||
if ( Deleted || !from.CanSee( this ) )
|
||||
return false;
|
||||
|
||||
base.ScissorHelper( from, new Bone(), Utility.RandomMinMax( 3, 5 ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Items/Body Parts/RightArm.cs
Normal file
31
Scripts/Items/Body Parts/RightArm.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RightArm : Item
|
||||
{
|
||||
[Constructable]
|
||||
public RightArm() : base( 0x1DA2 )
|
||||
{
|
||||
}
|
||||
|
||||
public RightArm( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Items/Body Parts/RightLeg.cs
Normal file
31
Scripts/Items/Body Parts/RightLeg.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class RightLeg : Item
|
||||
{
|
||||
[Constructable]
|
||||
public RightLeg() : base( 0x1DA4 )
|
||||
{
|
||||
}
|
||||
|
||||
public RightLeg( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
32
Scripts/Items/Body Parts/Torso.cs
Normal file
32
Scripts/Items/Body Parts/Torso.cs
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class Torso : Item
|
||||
{
|
||||
[Constructable]
|
||||
public Torso() : base( 0x1D9F )
|
||||
{
|
||||
Weight = 2.0;
|
||||
}
|
||||
|
||||
public Torso( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue