Lemke

Member
Hello guys i see a custom tile to dont permess people entering while mounted,and it works great,now im interested on a tile cant permess to cast "x" spell,its possible?
I tryed to do with Customs regions in a box,but only do the "can enter or not" changes.
Here the full code of the "no mount tile":

Code:
using Server.Gumps;
using Server.Network;
using Server.Menus;
using Server.Mobiles;
using Server.Menus.Questions;
using Server.Spells;
using System.Xml;

namespace Server.Items
{
    public class NoMountTile : Item
    {

        [Constructable]
        public NoMountTile() : base( 6108 )
        {
            Movable = false;
            Name = "No Mount Tile";
            Visible = false;
        }

        public override bool OnMoveOver( Mobile from )
        {
            if (from.Mounted)
            {
                //if (from.AccessLevel > AccessLevel.Player)
                    from.SendMessage("You can not be Mounted to Enter Here.");
                    return false;
            }
            else
            {
                return true;
            }
            return base.OnMoveOver( from );
        }
        public NoMountTile( 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();
        }
    }
}

Thank you!!!
 
Or have the check be in the spell casting itself on cast and maybe when you target.

How to implement this is open to whatever is desired
 

Active Shards

Donations

Total amount
$0.00
Goal
$500.00
Back