Ok, so I'm looking to create an item, that is when it is throw at a target and hits the target it causes the target to freeze. I also want to make a rope that when double clicked ( it checks skill on some level on the PM ) then when selecting an animal it will 'Cage' the animal. I guess this may end up using some of the shrink scripts for pets. Anyone know an item I can reference to help me going on this? An item that causes stuff to happen to a target once hit. (Note: Area of effect items are not what im looking for, I did consider the explosion potion as a reference but that was a dead end for me).
 
Here is an example of a throwable item that gives XP so you can see how a throwable item might work...

Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using System.Collections;
namespace Server.Items
{
    public class ExpBall : Item
    {
        [Constructable]
        public ExpBall() : base( 6249 )
        {
            Name = "500 EXP Ball";
            Movable = true;
            Hue = 1153;
            Stackable = false;
                Weight = 0.0;
            LootType = LootType.Newbied;
        }
   
        private static void PlaceItemIn( Container parent, int x, int y, Item item )
        {
            parent.AddItem( item );
            item.Location = new Point3D( x, y, 0 );
        }
   
        public override void OnDoubleClick( Mobile from )
        {
            PlayerMobile pm = from as PlayerMobile;          //Because of this, it knows to give exp to
            PlayerModule module = pm.PlayerModule;        // the player's module.
       
            if ( from.Backpack == null || from.BankBox == null )
            {
                from.SendMessage( "Attention: You are missing a backpack or bankbox and must report this problem to a staff member right away." );
                return;
            }
            else
            {
                Container pack = from.Backpack;
                BankBox box = from.BankBox;
           
                from.PlaySound( 0x1F7 );
                from.SendMessage( "You have been awarded 500 experience points." );
       
                module.Experience += 500;    //Here, the experience points are given.
           
                this.Delete();
            }
        }
   
        public ExpBall( 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();
        }
    }
}
 
Though it's late, thank you for your response. As a side project I've been working on a pet caging system where you throw trap items at an untamed animal and the chances of it staying in the cage vary depending on x skills. I plan to release this once completed. So far it looks like a pokemon system.. LOL
 
Back