Lemke

Member
Hello!I used this code to raise up skill when mount:

Code:
public override void OnDoubleClick(Mobile from)
            {
            from.Skills.Wrestling.Base += 10;
            base.OnDoubleClick( from );
            }

How can i do to remove this skill on dismount?Thanks in advance!
 
This is what I've used in the past. This was used for an ethereal mount.
Code:
        public override void OnAdded( object parent )
        {
            base.OnAdded( parent );
            if( parent is Mobile )
            {
                Mobile from = (Mobile)parent;
                from.Skills.Wrestling.Base += 10;

            }
        }
        public override void OnRemoved( object parent )
        {
            base.OnRemoved( parent );
            if( parent is Mobile )
            {
                Mobile from = (Mobile)parent;
                from.Skills.Wrestling.Base -= 10;

            }
           
        }
 
This is what I've used in the past. This was used for an ethereal mount.
Code:
        public override void OnAdded( object parent )
        {
            base.OnAdded( parent );
            if( parent is Mobile )
            {
                Mobile from = (Mobile)parent;
                from.Skills.Wrestling.Base += 10;

            }
        }
        public override void OnRemoved( object parent )
        {
            base.OnRemoved( parent );
            if( parent is Mobile )
            {
                Mobile from = (Mobile)parent;
                from.Skills.Wrestling.Base -= 10;

            }
          
        }

I have a problem,if i use an ethereal mount,your code is correct,but if the mount is a normal mount (alive)
the code:

  1. public override void OnRemoved( object parent )
  2. {
  3. base.OnRemoved( parent );
  4. if( parent is Mobile )
Here the picture:
ai63.tinypic.com_jhd7hk.png
 
As I said, it was used for ethereal mounts. What you would need for a reg mount would be more along the lines of Dismount instead of OnRemoved.
 

Active Shards

Donations

Total amount
$50.00
Goal
$1,000.00
Back