Lemke

Member
Hello guys,trying to do an shroud to get players walking in water,loading well,but no results,any advice?
Here the script:

C#:
using System;
using Server.Network;
using Server.Items;
using Server.Targeting;

namespace Server.Items
{
    public class MarineShroud : HoodedShroudOfShadows
  {

        public override int InitMinHits{ get{ return 255; } }
        public override int InitMaxHits{ get{ return 255; } }

      
      [Constructable]
        public MarineShroud()
        {
            Weight = 5;
          Name = "Marine Shroud";
          
        }

        public override bool OnEquip(Mobile m)
          {
            m.CantWalk = true;
            m.CanSwim = true;
            return base.OnEquip(m);
          }
        
        public override void OnRemoved( object parent)
          {
        if (parent is Mobile)
            {
             Mobile m = (Mobile)parent;
             m.CantWalk = false;
             m.CanSwim = false;
            }

             base.OnRemoved(parent);
          }

        public MarineShroud( 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();
        }
    }
}
 
You can't do it. The client has the final decision and it won't allow the human form to move on water no matter what you do on the server side.

The closest you can do to this is make seahorses available (regular and/or ethereal) and players would still require your custom item to be able to move on water. Seahorses can walk on water but can't move an inch once mounted by a player who doesn't have the canswim flag set. Ditch the "cantwalk" part though - you'll find it makes getting into and out of the water much more difficult.
 
You can't do it. The client has the final decision and it won't allow the human form to move on water no matter what you do on the server side.

The closest you can do to this is make seahorses available (regular and/or ethereal) and players would still require your custom item to be able to move on water. Seahorses can walk on water but can't move an inch once mounted by a player who doesn't have the canswim flag set. Ditch the "cantwalk" part though - you'll find it makes getting into and out of the water much more difficult.
Thank you so much!
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back