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

  • Unchained
    Custom (Classic)
    • Players
    • 151 Online
    • 273 Peak
  • The Crossroads
    Mondain's Legacy
    • Players
    • 84 Online
    • 190 Peak
  • UO Eventine
    Custom (Classic)
    • Players
    • 84 Online
    • 137 Peak
  • Insane UO
    Endless Journey
    • Players
    • 68 Online
    • 105 Peak
  • UO: New Renaissance
    Custom (Classic)
    • Players
    • 29 Online
    • 85 Peak
  • CALYPSO
    Custom (Modern)
    • Players
    • 28 Online
    • 30 Peak
  • Pandora
    Custom (Modern)
    • Players
    • 21 Online
    • 32 Peak
  • UO Enigma
    Custom (Modern)
    • Players
    • 19 Online
    • 172 Peak
  • Arth
    Custom (Modern)
    • Players
    • 19 Online
    • 34 Peak
  • UO Phoenix
    Custom (Classic)
    • Players
    • 18 Online
    • 48 Peak

Donations

Total amount
$0.00
Goal
$500.00
Back