#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
107
Scripts/Items/Home/LadderEastAddon.cs
Normal file
107
Scripts/Items/Home/LadderEastAddon.cs
Normal file
|
|
@ -0,0 +1,107 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Network;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Server.Items
|
||||
{
|
||||
public class LadderEastAddon : BaseAddon
|
||||
{
|
||||
private static int[,] m_AddOnSimpleComponents = new int[,] {
|
||||
{8249, 0, 0, 0}, {1109, 0, 0, 22}
|
||||
};
|
||||
|
||||
public override BaseAddonDeed Deed
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderEastAddonDeed();
|
||||
}
|
||||
}
|
||||
|
||||
[ Constructable ]
|
||||
public LadderEastAddon()
|
||||
{
|
||||
for (int i = 0; i < m_AddOnSimpleComponents.Length / 4; i++)
|
||||
AddComponent( new AddonComponent( m_AddOnSimpleComponents[i,0] ), m_AddOnSimpleComponents[i,1], m_AddOnSimpleComponents[i,2], m_AddOnSimpleComponents[i,3] );
|
||||
}
|
||||
|
||||
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 ( c.ItemID == 1109 )
|
||||
{
|
||||
from.Z = c.Z-22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Z = c.Z+22;
|
||||
from.X = c.X;
|
||||
from.Y = c.Y;
|
||||
from.PlaySound( 234 );
|
||||
}
|
||||
}
|
||||
|
||||
public LadderEastAddon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class LadderEastAddonDeed : BaseAddonDeed
|
||||
{
|
||||
public override BaseAddon Addon
|
||||
{
|
||||
get
|
||||
{
|
||||
return new LadderEastAddon();
|
||||
}
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LadderEastAddonDeed()
|
||||
{
|
||||
Name = "ladder deed (east)";
|
||||
}
|
||||
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add( 1070722, "Used to Access Upper Floor");
|
||||
list.Add( 1049644, "To Be Placed In Your Home");
|
||||
}
|
||||
|
||||
public LadderEastAddonDeed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( 0 ); // Version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue