Announcement

Collapse
No announcement yet.

How to disable mark/recall/gate in towns?

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to disable mark/recall/gate in towns?

    Question:

    How to disable mark/recall/gate spells in towns on a runuo server?

    Answer:

    Scripts/Regions/TownRegion.cs

    public override bool OnBeginSpellCast( Mobile from, ISpell s )
    {
    if ( from.AccessLevel == AccessLevel.Player && !s.OnCastInTown( this ))
    from.SendLocalizedMessage( 502629 ); // You cannot cast spells here.

    return ( from.AccessLevel > AccessLevel.Player );
    }

    Scripts/Spells/(SPELL SCRIPT).cs

    override the OnCastInTown() method
    return true = allow town cast
    return false = disallow town cast
    RunUO - Ultima Online Emulator - www.runuo.net
Working...
X