RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

[RUO ALL] Attackable Items

Vorspire

Knight
M_0_h;831774 said:
In BaseDesItem.cs, look for
Code:
			Update( );
		}

at about line 634. Below the bracket, add

Code:
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }

so in the end it should look like this:

Code:
			Update( );
		}

        public override Poison PoisonImmune { get { return Poison.Lethal; } }

		public override void GetProperties( ObjectPropertyList list )
		{
			base.GetProperties( list );

Hope that helps ;)

It's been so long, it seems I don't even know my own scripts anymore! Thanks for that update. ++[Theoretical Karma]
 

newbie1

Wanderer
Hello all
I know this is a old script but I am starting my server and I like to have this script in my server
first thing is I download it and put it in my server and restart it and it work as in walls that is OK
for walls but I don't need walls is there away that I can add more of this
[Constructable]
public DesCityWallSouth( )
: base( 641, 631, 632 )
{
what I need is to add more level ID's like something like this
[Constructable]
public DesCityWallSouth( )
: base( 0x48e4, 0x4971, 0x4988, 0x498f, 0x499d, 0x49c1, 0x49c2, 0x49c3,
0x4a8e, 0x4a8f, 0x4a90, 0x4a91, 0x4a92, 0x4a93, 0x4a94, 0x4a95,
0x4a96, 0x4a97, 0x4a98, 0x4a99, 0x4a9a, 0x4a9b, 0x4a9c, 0x4a9d,
0x4a9e, 0x4a9f, 0x4aa0, 0x4aa1, 0x4aa2, 0x4aa3, 0x4aa4 )
{

it is giving me this
Errors:
+ cuatoms/Attackable Items/DesCityWall.cs:
CS1501: Line 9: No overload for method 'DamageableItem' takes '31' arguments
I do know that I need to edit BaseDesItem but I don't know where in there.
letting you all know I am new of scripting. Any Idea?
 

newbie1

Wanderer
OK I need help on this now
I am trying to do this on my own but I am getting lot of errors now and I don't know what i am doing
can anyone help me do this working plz

Code:
RunUO - [www.runuo.com] Version 2.1, Build 4272.35047
Core: Running on .NET Framework Version 2.0.50727
Core: Optimizing for 2 processors
Scripts: Compiling C# scripts...failed (1 errors, 0 warnings)
Errors:
+ cuatoms/Attackable Items/BaseDesItem.cs:
    CS1001: Line 938: Identifier expected
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '3' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '4' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '5' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '6' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '7' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '8' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '9' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '10' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '11' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '12' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '13' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '14' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '15' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1041: Line 938: Identifier expected, 'int' is a keyword
    CS1519: Line 938: Invalid token '17' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '18' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '19' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '20' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '21' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '22' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '23' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '24' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '25' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '26' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '27' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '28' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '29' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '30' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ',' in class, struct, or interface member de
claration
    CS1519: Line 938: Invalid token '31' in class, struct, or interface member d
eclaration
    CS1519: Line 938: Invalid token ')' in class, struct, or interface member de
claration
    CS1519: Line 939: Invalid token ')' in class, struct, or interface member de
claration
    CS1519: Line 941: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 942: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 943: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 945: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 945: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 947: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 947: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 948: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 948: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 949: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 949: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 950: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 950: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 951: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 951: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 952: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 952: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 953: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 953: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 954: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 954: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 955: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 955: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 956: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 956: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 957: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 957: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 958: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 958: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 959: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 959: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 960: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 960: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 961: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 961: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 962: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 962: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 963: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 963: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 964: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 964: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 965: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 965: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 966: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 966: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 967: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 967: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 968: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 968: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 969: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 969: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 970: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 970: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 971: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 971: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 972: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 972: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 973: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 973: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 974: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 974: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 975: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 975: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 976: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 976: Invalid token ';' in class, struct, or interface member de
claration
    CS1519: Line 977: Invalid token '=' in class, struct, or interface member de
claration
    CS1519: Line 977: Invalid token ';' in class, struct, or interface member de
claration
    CS1518: Line 982: Expected class, delegate, enum, interface, or struct
    CS1518: Line 987: Expected class, delegate, enum, interface, or struct
    CS1518: Line 992: Expected class, delegate, enum, interface, or struct
    CS1518: Line 997: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1002: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1007: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1160: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1169: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1176: Expected class, delegate, enum, interface, or struct
    CS1518: Line 1184: Expected class, delegate, enum, interface, or struct
    CS0116: Line 1189: A namespace does not directly contain members such as fie
lds or methods
    CS1022: Line 1195: Type or namespace definition, or end-of-file expected
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

Code:
using System;
using System.Collections;
using System.Reflection;
using Server;
using Server.Multis;
using Server.Mobiles;
using Server.Network;
using Server.Targeting;
using Server.Targets;
 
namespace Server.Items
{
    public class DamageableItem : Item
    {
        public enum ItemLevel
        {
            NotSet,
            VeryEasy,
            Easy,
            Average,
            Hard,
            VeryHard,
            Insane
        }
 
        private int m_Hits;
        private int m_HitsMax;
 
        private int m_StartID;
                private int m_2ID;
        private int m_3ID;
                private int m_4ID;
                private int m_5ID;
                private int m_6ID;
        private int m_7ID;
                private int m_8ID;
                private int m_9ID;
                private int m_10ID;
        private int m_11ID;
                private int m_12ID;
                private int m_13ID;
                private int m_14ID;
        private int m_15ID;
                private int m_HalfHitsID;
                private int m_17ID;
                private int m_18ID;
        private int m_19ID;
                private int m_20ID;
                private int m_21ID;
                private int m_22ID;
        private int m_23ID;
                private int m_24ID;
                private int m_25ID;
                private int m_26ID;
        private int m_27ID;
                private int m_28ID;
                private int m_29ID;
                private int m_30ID;
        private int m_DestroyedID;
 
        private bool m_DropsLoot;
        private ItemLevel m_ItemLevel;
        private IDamageableItem m_Child;
 
        [CommandProperty( AccessLevel.GameMaster )]
        public IDamageableItem Link
        {
            get
            {
                return m_Child;
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public bool DropsLoot
        {
            get
            {
                return m_DropsLoot;
            }
            set
            {
                m_DropsLoot = value;
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public ItemLevel Level
        {
            get
            {
                return m_ItemLevel;
            }
            set
            {
                m_ItemLevel = value;
 
                double bonus = ( double )( ( ( int )m_ItemLevel * 100.0 ) * ( ( int )m_ItemLevel * 5 ) );
 
                HitsMax = ( ( int )( 100 + bonus ) );
                Hits = ( ( int )( 100 + bonus ) );
 
                InvalidateProperties( );
            }
        }
 
 
 
 
 
 
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int IDStart
        {
            get
            {
                return m_StartID;
            }
            set
            {
                if( value < 0 )
                    m_StartID = 0;
                else if( value > int.MaxValue )
                    m_StartID = int.MaxValue;
                else
                    m_StartID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_StartID )
                        ItemID = m_StartID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID2
        {
            get
            {
                return m_2ID;
            }
            set
            {
                if( value < 0 )
                    m_2ID = 0;
                else if( value > int.MaxValue )
                    m_2ID = int.MaxValue;
                else
                    m_2ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_2ID )
                        ItemID = m_2ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID3
        {
            get
            {
                return m_3ID;
            }
            set
            {
                if( value < 0 )
                    m_3ID = 0;
                else if( value > int.MaxValue )
                    m_3ID = int.MaxValue;
                else
                    m_3ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_3ID )
                        ItemID = m_3ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID4
        {
            get
            {
                return m_4ID;
            }
            set
            {
                if( value < 0 )
                    m_4ID = 0;
                else if( value > int.MaxValue )
                    m_4ID = int.MaxValue;
                else
                    m_4ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_4ID )
                        ItemID = m_4ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID5
        {
            get
            {
                return m_5ID;
            }
            set
            {
                if( value < 0 )
                    m_5ID = 0;
                else if( value > int.MaxValue )
                    m_5ID = int.MaxValue;
                else
                    m_5ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_5ID )
                        ItemID = m_5ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID6
        {
            get
            {
                return m_6ID;
            }
            set
            {
                if( value < 0 )
                    m_6ID = 0;
                else if( value > int.MaxValue )
                    m_6ID = int.MaxValue;
                else
                    m_6ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_6ID )
                        ItemID = m_6ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID7
        {
            get
            {
                return m_7ID;
            }
            set
            {
                if( value < 0 )
                    m_7ID = 0;
                else if( value > int.MaxValue )
                    m_7ID = int.MaxValue;
                else
                    m_7ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_7ID )
                        ItemID = m_7ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID8
        {
            get
            {
                return m_8ID;
            }
            set
            {
                if( value < 0 )
                    m_8ID = 0;
                else if( value > int.MaxValue )
                    m_8ID = int.MaxValue;
                else
                    m_8ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_8ID )
                        ItemID = m_8ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID9
        {
            get
            {
                return m_9ID;
            }
            set
            {
                if( value < 0 )
                    m_9ID = 0;
                else if( value > int.MaxValue )
                    m_9ID = int.MaxValue;
                else
                    m_9ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_9ID )
                        ItemID = m_9ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID10
        {
            get
            {
                return m_10ID;
            }
            set
            {
                if( value < 0 )
                    m_10ID = 0;
                else if( value > int.MaxValue )
                    m_10ID = int.MaxValue;
                else
                    m_10ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_10ID )
                        ItemID = m_10ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID11
        {
            get
            {
                return m_11ID;
            }
            set
            {
                if( value < 0 )
                    m_11ID = 0;
                else if( value > int.MaxValue )
                    m_11ID = int.MaxValue;
                else
                    m_11ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_11ID )
                        ItemID = m_11ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID12
        {
            get
            {
                return m_12ID;
            }
            set
            {
                if( value < 0 )
                    m_12ID = 0;
                else if( value > int.MaxValue )
                    m_12ID = int.MaxValue;
                else
                    m_12ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_12ID )
                        ItemID = m_12ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID13
        {
            get
            {
                return m_13ID;
            }
            set
            {
                if( value < 0 )
                    m_13ID = 0;
                else if( value > int.MaxValue )
                    m_13ID = int.MaxValue;
                else
                    m_13ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_13ID )
                        ItemID = m_13ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID14
        {
            get
            {
                return m_14ID;
            }
            set
            {
                if( value < 0 )
                    m_14ID = 0;
                else if( value > int.MaxValue )
                    m_14ID = int.MaxValue;
                else
                    m_14ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_14ID )
                        ItemID = m_14ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID15
        {
            get
            {
                return m_15ID;
            }
            set
            {
                if( value < 0 )
                    m_15ID = 0;
                else if( value > int.MaxValue )
                    m_15ID = int.MaxValue;
                else
                    m_15ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_15ID )
                        ItemID = m_15ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int IDHalfHits
        {
            get
            {
                return m_HalfHitsID;
            }
            set
            {
                if( value < 0 )
                    m_HalfHitsID = 0;
                else if( value > int.MaxValue )
                    m_HalfHitsID = int.MaxValue;
                else
                    m_HalfHitsID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_HalfHitsID )
                        ItemID = m_HalfHitsID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID17
        {
            get
            {
                return m_17ID;
            }
            set
            {
                if( value < 0 )
                    m_17ID = 0;
                else if( value > int.MaxValue )
                    m_17ID = int.MaxValue;
                else
                    m_17ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_17ID )
                        ItemID = m_17ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID18
        {
            get
            {
                return m_18ID;
            }
            set
            {
                if( value < 0 )
                    m_18ID = 0;
                else if( value > int.MaxValue )
                    m_18ID = int.MaxValue;
                else
                    m_18ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_18ID )
                        ItemID = m_18ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID19
        {
            get
            {
                return m_19ID;
            }
            set
            {
                if( value < 0 )
                    m_19ID = 0;
                else if( value > int.MaxValue )
                    m_19ID = int.MaxValue;
                else
                    m_19ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_19ID )
                        ItemID = m_19ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID20
        {
            get
            {
                return m_20ID;
            }
            set
            {
                if( value < 0 )
                    m_20ID = 0;
                else if( value > int.MaxValue )
                    m_20ID = int.MaxValue;
                else
                    m_20ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_20ID )
                        ItemID = m_20ID;
                }
 
                InvalidateProperties( );
            }
        }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID21
        {
            get
            {
                return m_21ID;
            }
            set
            {
                if( value < 0 )
                    m_21ID = 0;
                else if( value > int.MaxValue )
                    m_21ID = int.MaxValue;
                else
                    m_21ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_21ID )
                        ItemID = m_21ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID22
        {
            get
            {
                return m_22ID;
            }
            set
            {
                if( value < 0 )
                    m_22ID = 0;
                else if( value > int.MaxValue )
                    m_22ID = int.MaxValue;
                else
                    m_22ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_22ID )
                        ItemID = m_22ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID23
        {
            get
            {
                return m_23ID;
            }
            set
            {
                if( value < 0 )
                    m_23ID = 0;
                else if( value > int.MaxValue )
                    m_23ID = int.MaxValue;
                else
                    m_23ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_23ID )
                        ItemID = m_23ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID24
        {
            get
            {
                return m_24ID;
            }
            set
            {
                if( value < 0 )
                    m_24ID = 0;
                else if( value > int.MaxValue )
                    m_24ID = int.MaxValue;
                else
                    m_24ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_24ID )
                        ItemID = m_24ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID25
        {
            get
            {
                return m_25ID;
            }
            set
            {
                if( value < 0 )
                    m_25ID = 0;
                else if( value > int.MaxValue )
                    m_25ID = int.MaxValue;
                else
                    m_25ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_25ID )
                        ItemID = m_25ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID26
        {
            get
            {
                return m_26ID;
            }
            set
            {
                if( value < 0 )
                    m_26ID = 0;
                else if( value > int.MaxValue )
                    m_26ID = int.MaxValue;
                else
                    m_26ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_26ID )
                        ItemID = m_26ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID27
        {
            get
            {
                return m_27ID;
            }
            set
            {
                if( value < 0 )
                    m_27ID = 0;
                else if( value > int.MaxValue )
                    m_27ID = int.MaxValue;
                else
                    m_27ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_27ID )
                        ItemID = m_27ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int ID28
        {
            get
            {
                return m_28ID;
            }
            set
            {
                if( value < 0 )
                    m_28ID = 0;
                else if( value > int.MaxValue )
                    m_28ID = int.MaxValue;
                else
                    m_28ID = value;
 
                if( m_Hits >= ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_28ID )
                        ItemID = m_28ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID29
        {
            get
            {
                return m_29ID;
            }
            set
            {
                if( value < 0 )
                    m_29ID = 0;
                else if( value > int.MaxValue )
                    m_29ID = int.MaxValue;
                else
                    m_29ID = value;
 
                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_29ID )
                        ItemID = m_29ID;
                }
 
                InvalidateProperties( );
            }
        }
        [CommandProperty( AccessLevel.GameMaster )]
        public int ID30
        {
            get
            {
                return m_30ID;
            }
            set
            {
                if( value < 0 )
                    m_30ID = 0;
                else if( value > int.MaxValue )
                    m_30ID = int.MaxValue;
                else
                    m_30ID = value;
 
                                if( m_Hits < ( m_HitsMax * 0.5 ) )
                {
                    if( ItemID != m_30ID )
                        ItemID = m_30ID;
                }
 
                InvalidateProperties( );
            }
        }
                [CommandProperty( AccessLevel.GameMaster )]
        public int IDDestroyed
        {
            get
            {
                return m_DestroyedID;
            }
            set
            {
                if( value < 0 )
                    m_DestroyedID = 0;
                else if( value > int.MaxValue )
                    m_DestroyedID = int.MaxValue;
                else
                    m_DestroyedID = value;
 
                InvalidateProperties( );
            }
        }
 
 
 
 
 
 
 
 
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int Hits
        {
            get
            {
                return m_Hits;
            }
            set
            {
                if( value > m_HitsMax )
                    m_Hits = m_HitsMax;
                else
                    m_Hits = value;
 
                if( m_Child != null && ( m_Hits > m_Child.Hits || m_Hits < m_Child.Hits ) )
                    UpdateHitsToEntity( );
 
                InvalidateProperties( );
            }
        }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int HitsMax
        {
            get
            {
                return m_HitsMax;
            }
            set
            {
                if( value > int.MaxValue )
                    m_HitsMax = int.MaxValue;
                else
                    m_HitsMax = value;
 
                if( Hits > m_HitsMax )
                    Hits = m_HitsMax;
 
                if( m_Child != null && ( m_HitsMax > m_Child.HitsMax || m_HitsMax < m_Child.HitsMax ) )
                    UpdateMaxHitsToEntity( );
 
                InvalidateProperties( );
            }
        }
 
        [Constructable]
        public DamageableItem( int StartID, int 2ID, int 3ID, int 4ID, int 5ID, int 6ID, int 7ID, int 8ID, int 9ID, int 10ID, int 11ID, int 12ID, int 13ID, int 14ID, int 15ID, int HalfID, int 17ID, int 18ID, int 19ID, int 20ID, int 21ID, int 22ID, int 23ID, int 24ID, int 25ID, int 26ID, int 27ID, int 28ID, int 29ID, int 30ID, int 31ID )
            : base( StartID )
        {
            Name = "Damageable Item";
            Hue = 0;
            Movable = true;
 
            Level = ItemLevel.NotSet;
 
            IDStart = StartID;
            ID2 = 2ID;
            ID3 = 3ID;
                        ID4 = 4ID;
            ID5 = 5ID;
                        ID6 = 6ID;
            ID7 = 7ID;
                        ID8 = 8ID;
            ID9 = 9ID;
                        ID10 = 10ID;
            ID11 = 11ID;
                        ID12 = 12ID;
            ID13 = 13ID;
                        ID14 = 14ID;
            ID15 = 15ID;
                        IDHalfHits = HalfID;
            ID17 = 17ID;
                        ID18 = 18ID;
            ID19 = 19ID;
                        ID20 = 20ID;
            ID21 = 21ID;
                        ID22 = 22ID;
            ID23 = 23ID;
                        ID24 = 24ID;
            ID25 = 25ID;
                        ID26 = 26ID;
            ID27 = 27ID;
                        ID28 = 28ID;
            ID29 = 29ID;
                        ID30 = 30ID;
            IDDestroyed = DestroyID;
 
 
        }
 
        public virtual void OnDamage( int amount, Mobile from, bool willKill )
        {
            return;
        }
 
        public virtual bool OnBeforeDestroyed( )
        {
            return true;
        }
 
        public virtual void OnDestroyed( WoodenBox lootbox )
        {
            return;
        }
 
        public void UpdateMaxHitsToEntity( )
        {
            m_Child.SetHits( HitsMax );
        }
 
        public void UpdateHitsToEntity( )
        {
            m_Child.Hits = Hits;
        }
 
        public void Damage( int amount, Mobile from, bool willKill )
        {
            if( willKill )
            {
                Destroy( );
                return;
            }
 
            Hits -= amount;
 
 
 
 
 
 
 
 
            if( Hits >= ( HitsMax * 0.5 ) )
            {
                ItemID = IDStart;
            }
            else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID2;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID3;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID4;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID5;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID6;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID7;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID8;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID9;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID10;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID11;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID12;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID13;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID14;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID15;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = IDHalfHits;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID17;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID18;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID19;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID20;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID21;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID22;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID23;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID24;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID25;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID26;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID27;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID28;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID29;
            }
                        else if( Hits < ( HitsMax * 0.5 ) )
            {
                ItemID = ID30;
            }
            else if( Hits <= 0 )
            {
                Destroy( );
                return;
            }
 
            OnDamage( amount, from, willKill );
        }
 
 
 
 
 
 
 
 
        public bool Destroy( )
        {
            if( this == null || this.Deleted )
                return false;
 
            if( OnBeforeDestroyed( ) )
            {
                if( m_Child != null && !m_Child.Deleted && !m_Child.Alive )
                {
                    Rubble rubble = new Rubble( m_DestroyedID, this.Name );
 
                    if( rubble != null && !rubble.Deleted && this.Map != null && this.Map != Map.Internal )
                    {
                        rubble.MoveToWorld( this.Location, this.Map );
                    }
 
                    WoodenBox lootbox = new WoodenBox( );
                    lootbox.Name = this.Name + " Loot Box";
 
                    OnDestroyed( lootbox );
 
                    if( lootbox != null && !lootbox.Deleted )
                    {
                        if( DropsLoot )
                            lootbox.MoveToWorld( new Point3D( this.X, this.Y, this.Z ), this.Map );
                        else
                            lootbox.Delete( );
                    }
 
                    if( m_Child != null )
                        m_Child.Delete( );
 
                    Delete( );
 
                    return true;
                }
                else
                {
                    Static rubble = new Static( m_31ID );
 
                    if( rubble != null && !rubble.Deleted && this.Map != null && this.Map != Map.Internal )
                        rubble.MoveToWorld( this.Location, this.Map );
 
                    WoodenBox lootbox = new WoodenBox( );
                    lootbox.Name = this.Name + " Loot Box";
 
                    OnDestroyed( lootbox );
 
                    if( lootbox != null && !lootbox.Deleted )
                    {
                        if( DropsLoot )
                            lootbox.MoveToWorld( new Point3D( this.X, this.Y, this.Z ), this.Map );
                        else
                            lootbox.Delete( );
                    }
 
                    Delete( );
                    return true;
                }
            }
 
            return false;
        }
 
 
        //Provides the Parent Item (this) with a new Entity Link
        private void ProvideEntity( )
        {
            if( m_Child != null )
            {
                m_Child.Delete( );
            }
 
            IDamageableItem Idam = new IDamageableItem( this );
 
            if( Idam != null && !Idam.Deleted && this.Map != null )
            {
                m_Child = Idam;
                m_Child.Update( );
            }
        }
 
        //If the child Link is not at our location, bring it back!
        public override void OnLocationChange( Point3D oldLocation )
        {
            if( this.Location != oldLocation )
            {
                if( m_Child != null && !m_Child.Deleted )
                {
                    if( m_Child.Location == oldLocation )
                        m_Child.Update( );
                }
            }
 
            base.OnLocationChange( oldLocation );
        }
 
        //This Wraps the target and resets the targeted ITEM to it's child BASECREATURE
        //Unfortunately, there is no accessible Array for a player's followers,
        //so we must use the GetMobilesInRage(int range) method for our reference checks!
        public override bool CheckTarget( Mobile from, Target targ, object targeted )
        {
            #region CheckEntity
           
            //Check to see if we have an Entity Link (Child BaseCreature)
            //If not, create one!
            //(Without Combatant Change, since this is for pets)
           
            PlayerMobile pm = from as PlayerMobile;
 
            if( pm != null )
            {
                if( m_Child != null && !m_Child.Deleted )
                {
                    m_Child.Update( );
                }
                else
                {
                    ProvideEntity( );
 
                    if( m_Child != null && !m_Child.Deleted )
                    {
                        m_Child.Update( );
                    }
                }
            }
            #endregion
       
            if( targ is AIControlMobileTarget && targeted == this )
            {
                //Wrap the target
                AIControlMobileTarget t = targ as AIControlMobileTarget;
                //Get the OrderType
                OrderType order = t.Order;
 
                //Search for our controlled pets within screen range
                foreach( Mobile m in from.GetMobilesInRange( 16 ) )
                {
                    if( !( m is BaseCreature ) )
                        continue;
 
                    BaseCreature bc = m as BaseCreature;
 
                    if( from != null && !from.Deleted && from.Alive )
                    {
                        if( bc == null || bc.Deleted || !bc.Alive || !bc.Controlled || bc.ControlMaster != from )
                            continue;
 
                        //Reset the pet's ControlTarget and OrderType.
                        bc.ControlTarget = m_Child;
                        bc.ControlOrder = t.Order;
                    }
                }
            }
 
            return base.CheckTarget( from, targ, targeted );
        }
 
        public override void OnDoubleClick( Mobile from )
        {
            #region CheckEntity
 
            //Check to see if we have an Entity Link (Child BaseCreature)
            //If not, create one!
            //(With Combatant change to simulate Attacking)
 
            PlayerMobile pm = from as PlayerMobile;
 
            if( pm != null )
            {
                if( m_Child != null && !m_Child.Deleted )
                {
                    m_Child.Update( );
                    pm.Warmode = true;
                    pm.Combatant = m_Child;
                }
                else
                {
                    ProvideEntity( );
 
                    if( m_Child != null && !m_Child.Deleted )
                    {
                        m_Child.Update( );
                        pm.Warmode = true;
                        pm.Combatant = m_Child;
                    }
                }
            }
            #endregion
 
            base.OnDoubleClick( from );
        }
 
        public override bool OnDragLift( Mobile from )
        {
            return ( from.AccessLevel >= AccessLevel.Counselor );
        }
 
        public override void Delete( )
        {
            base.Delete( );
 
            if( m_Child != null && !m_Child.Deleted )
            {
                m_Child.Delete( );
                return;
            }
        }
 
        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
 
            ArrayList strings = new ArrayList( );
 
            strings.Add( "-Strength-" );
            strings.Add( m_Hits + "/" + m_HitsMax );
 
            string toAdd = "";
            int amount = strings.Count;
            int current = 1;
 
            foreach( string str in strings )
            {
                toAdd += str;
 
                if( current != amount )
                    toAdd += "\n";
 
                ++current;
            }
 
            if( toAdd != "" )
                list.Add( 1070722, toAdd );
        }
 
        public DamageableItem( Serial serial )
            : base( serial )
        {
        }
 
        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );
 
            writer.Write( ( int )0 ); // version
 
            writer.Write( ( Mobile )m_Child );
 
            writer.Write( ( int )m_StartID );
            writer.Write( ( int )m_2ID );
            writer.Write( ( int )m_3ID );
                        writer.Write( ( int )m_4ID );
                        writer.Write( ( int )m_5ID );
                        writer.Write( ( int )m_6ID );
            writer.Write( ( int )m_7ID );
            writer.Write( ( int )m_8ID );
                        writer.Write( ( int )m_9ID );
                        writer.Write( ( int )m_10ID );
                        writer.Write( ( int )m_11ID );
            writer.Write( ( int )m_12ID );
            writer.Write( ( int )m_13ID );
                        writer.Write( ( int )m_14ID );
                        writer.Write( ( int )m_15ID );
                        writer.Write( ( int )m_HalfHitsID );
            writer.Write( ( int )m_17ID );
            writer.Write( ( int )m_18ID );
                        writer.Write( ( int )m_19ID );
                        writer.Write( ( int )m_20ID );
                        writer.Write( ( int )m_21ID );
            writer.Write( ( int )m_22ID );
            writer.Write( ( int )m_23ID );
                        writer.Write( ( int )m_24ID );
                        writer.Write( ( int )m_25ID );
                        writer.Write( ( int )m_26ID );
            writer.Write( ( int )m_27ID );
            writer.Write( ( int )m_28ID );
                        writer.Write( ( int )m_29ID );
                        writer.Write( ( int )m_30ID );
                        writer.Write( ( int )m_DestroyedID );
 
            writer.Write( ( int )m_ItemLevel );
            writer.Write( ( int )m_Hits );
            writer.Write( ( int )m_HitsMax );
            writer.Write( ( bool )Movable );
        }
 
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
 
            int version = reader.ReadInt( );
 
            m_Child = ( IDamageableItem )reader.ReadMobile( );
 
            m_StartID = ( int )reader.ReadInt( );
            m_2ID = ( int )reader.ReadInt( );
            m_3ID = ( int )reader.ReadInt( );
                        m_4ID = ( int )reader.ReadInt( );
            m_5ID = ( int )reader.ReadInt( );
            m_6ID = ( int )reader.ReadInt( );
                        m_7ID = ( int )reader.ReadInt( );
            m_8ID = ( int )reader.ReadInt( );
            m_9ID = ( int )reader.ReadInt( );
                        m_10ID = ( int )reader.ReadInt( );
            m_11ID = ( int )reader.ReadInt( );
            m_12ID = ( int )reader.ReadInt( );
                        m_13ID = ( int )reader.ReadInt( );
            m_14ID = ( int )reader.ReadInt( );
            m_15ID = ( int )reader.ReadInt( );
                        m_HalfHitsID = ( int )reader.ReadInt( );
            m_17ID = ( int )reader.ReadInt( );
            m_18ID = ( int )reader.ReadInt( );
                        m_19ID = ( int )reader.ReadInt( );
            m_20ID = ( int )reader.ReadInt( );
            m_21ID = ( int )reader.ReadInt( );
                        m_22ID = ( int )reader.ReadInt( );
            m_23ID = ( int )reader.ReadInt( );
            m_24ID = ( int )reader.ReadInt( );
                        m_25ID = ( int )reader.ReadInt( );
            m_26ID = ( int )reader.ReadInt( );
            m_27ID = ( int )reader.ReadInt( );
                        m_28ID = ( int )reader.ReadInt( );
            m_29ID = ( int )reader.ReadInt( );
            m_30ID = ( int )reader.ReadInt( );
                        m_DestroyedID = ( int )reader.ReadInt( );
 
            m_ItemLevel = ( ItemLevel )reader.ReadInt( );
            m_Hits = ( int )reader.ReadInt( );
            m_HitsMax = ( int )reader.ReadInt( );
            Movable = ( bool )reader.ReadBool( );
        }
    }
 
    public class IDamageableItem : BaseCreature
    {
        private DamageableItem1 m_Parent;
 
        [CommandProperty( AccessLevel.GameMaster )]
        public DamageableItem Link
        {
            get
            {
                return m_Parent;
            }
        }
 
        [Constructable]
        public IDamageableItem( DamageableItem parent )
            : base( AIType.AI_Melee, FightMode.None, 1, 1, 0.2, 0.4 )
        {
            if( parent != null && !parent.Deleted )
                m_Parent = parent;
               
            //Nullify the name, so it doeesn't pop up when we come into range
            Name = null;
 
            Body = 803; //Mustache is barely visible!
            BodyValue = 803; //Mustache is barely visible!
            Hue = 0;
            BaseSoundID = 0; //QUIET!!!
            Fame = 0;
            Karma = 0;
            ControlSlots = 0;
            Tamable = false;
 
            Frozen = true;
            Paralyzed = true;
            CantWalk = true;
 
            DamageMin = 0;
            DamageMax = 0;
 
            SetStr( m_Parent.HitsMax );
            SetHits( m_Parent.HitsMax );
            Hits = m_Parent.Hits;
 
            for( int skill = 0; skill < this.Skills.Length; skill++ )
            {
                this.Skills[( SkillName )skill].Cap = 1.0 + ( ( int )m_Parent.Level * 0.05 );
                this.Skills[( SkillName )skill].Base = 1.0 + ( ( int )m_Parent.Level * 0.05 );
            }
 
            Update( );
        }
 
        public override void GetProperties( ObjectPropertyList list )
        {
            base.GetProperties( list );
 
            ArrayList strings = new ArrayList( );
 
            strings.Add( "-Strength-" );
            strings.Add( m_Parent.Hits + "/" + m_Parent.HitsMax );
 
            string toAdd = "";
            int amount = strings.Count;
            int current = 1;
 
            foreach( string str in strings )
            {
                toAdd += str;
 
                if( current != amount )
                    toAdd += "\n";
 
                ++current;
            }
 
            if( toAdd != "" )
                list.Add( 1070722, toAdd );
        }
 
        public void Update( )
        {
            if( this == null || this.Deleted )
                return;
 
            if( m_Parent != null && !m_Parent.Deleted )
            {
                this.Home = m_Parent.Location;
                this.Location = m_Parent.Location;
                this.Map = m_Parent.Map;
 
                return;
            }
 
            if( m_Parent == null || m_Parent.Deleted )
            {
                Delete( );
                return;
            }
        }
 
        public override void Delete( )
        {
            base.Delete( );
        }
 
        public override void OnDamage( int amount, Mobile from, bool willKill )
        {
            base.OnDamage( amount, from, willKill );
 
            if( m_Parent != null && !m_Parent.Deleted )
            {
                m_Parent.Damage( amount, from, willKill );
            }
        }
 
        public override void OnDeath( Container c )
        {
            base.OnDeath( c );
 
            if( m_Parent != null && !m_Parent.Deleted )
                m_Parent.Destroy( );
        }
 
        public IIDamageableItem( Serial serial )
            : base( serial )
        {
        }
 
        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );
            writer.Write( ( int )0 );
 
            writer.Write( ( Item )m_Parent );
            writer.Write( ( bool )Frozen );
            writer.Write( ( bool )Paralyzed );
            writer.Write( ( bool )CantWalk );
            writer.Write( ( int )DamageMin );
            writer.Write( ( int )DamageMax );
            writer.Write( ( int )BodyValue );
        }
 
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
            int version = reader.ReadInt( );
 
            m_Parent = ( DamageableItem )reader.ReadItem( );
            Frozen = ( bool )reader.ReadBool( );
            Paralyzed = ( bool )reader.ReadBool( );
            CantWalk = ( bool )reader.ReadBool( );
            DamageMin = ( int )reader.ReadInt( );
            DamageMax = ( int )reader.ReadInt( );
            BodyValue = ( int )reader.ReadInt( );
        }
    }
}
 

newbie1

Wanderer
Variable/Method names can not start with a number. EG; '4ID' is invalid, use 'id4'

Ok i did what you say and the server started then I [add xmlspawner and add Attackable wall in it
Then I am getting this on the spawner invalid type specification
 

newbie1

Wanderer
Ok the artwork I put in not showing up on the Attackable wall the server start ok and the server see the Scripts no errors but when I add it in the game its not showing up at all then I put it in the xmlspawner then spawn it then the spawner saying this.....invalid type specificatio.... and not spawning it then I test the All the ID's and it show up in game but the Attackable items not working I have looked at the Scripts and it look ok to me.. any idea how to it this working?
 

peepeetree

Sorceror
hmm so this plugged in very easy, the only thing I needed to do to get it to load up with error was change the controled to controlled in 2.2. I can spawn the wall, I can see it, hovering over it shows the HP but you can't attack it because it is yellow. Can anyone direct me to what line would change this? Thanks!
 

peepeetree

Sorceror
hmm so this plugged in very easy, the only thing I needed to do to get it to load up with error was change the controled to controlled in 2.2. I can spawn the wall, I can see it, hovering over it shows the HP but you can't attack it because it is yellow. Can anyone direct me to what line would change this? Thanks!

It looks like it works great, I was using an item that was changing my character to a player but it wasn't quite working correctly. When I used another item I can now attack without any problems. Thanks a lot for the great script! I am running 2.2!
 
Top