RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Help making custom mount ridable with no taming required.

rome1982

Sorceror
Hello guys,i have a problem making some mounts,they require taming skill,for example 59.0.
But when the tamer go to transfer it to another player without taming,they say is not possible transfer.
I need any idea to make it ridable and transferible to anyobody after tamed.
An example,a simple llama with prop poison inmume.
Code:
using System;
using Server.Mobiles;
 
namespace Server.Mobiles
{
    [CorpseName( "a toxic llama corpse" )]
    public class ToxicLlama : BaseMount
    {
        [Constructable]
        public ToxicLlama() : this( "a ridable llama" )
        {
        }
 
        [Constructable]
        public ToxicLlama( string name ) : base( name, 0xDC, 0x3EA6, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
        {
            BaseSoundID = 0x3F3;
                        Name = "A Toxic Llama";
                        Hue = 1094;
            SetStr( 21, 49 );
            SetDex( 56, 75 );
            SetInt( 16, 30 );
                       
            SetHits( 55, 57 );
            SetMana( 0 );
 
            SetDamage( 3, 5 );
 
            SetDamageType( ResistanceType.Physical, 100 );
 
            SetResistance( ResistanceType.Physical, 10, 15 );
            SetResistance( ResistanceType.Fire, 5, 10 );
            SetResistance( ResistanceType.Cold, 5, 10 );
            SetResistance( ResistanceType.Poison, 5, 10 );
            SetResistance( ResistanceType.Energy, 5, 10 );
 
            SetSkill( SkillName.MagicResist, 15.1, 20.0 );
            SetSkill( SkillName.Tactics, 19.2, 29.0 );
            SetSkill( SkillName.Wrestling, 19.2, 29.0 );
 
            Fame = 300;
            Karma = 0;
 
            Tamable = true;
            ControlSlots = 1;
            MinTameSkill = 69.1;
        }
                public override bool AlwaysMurderer{ get{ return true; } }
       
        public override Poison PoisonImmune{ get{ return Poison.Regular; } }
 
        public override int Meat{ get{ return 1; } }
        public override int Hides{ get{ return 12; } }
        public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
 
        public ToxicLlama( 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();
        }
    }
}

It has:

Code:
   Tamable = true;
            ControlSlots = 1;
            MinTameSkill = 69.1;

Im interested on tamers have a bit of difficoult to tame it,but when tamed,they can sell it to other players,and they can ride,like a normal horse,or ridable llama.
Thanks in advance.
 

zerodowned

Sorceror
So you're wanting to make it so that in order to tame it, you need to have the required taming, but after than anyone can use it even if they don't have any taming or lore?
Off the top of my head, I can tell you that it's a pretty big rewrite.

But you might be able to work around it easily by adding something to check and record if a creature has been tamed in the past and if so it jumps past all the checks for taming skill.

Still a lot of rewriting but an interesting idea, gives tamers a good chances to sell pets without requiring other players to have the same level of taming requiring to tame it themselves.
 

rome1982

Sorceror
So you're wanting to make it so that in order to tame it, you need to have the required taming, but after than anyone can use it even if they don't have any taming or lore?
Off the top of my head, I can tell you that it's a pretty big rewrite.

But you might be able to work around it easily by adding something to check and record if a creature has been tamed in the past and if so it jumps past all the checks for taming skill.

Still a lot of rewriting but an interesting idea, gives tamers a good chances to sell pets without requiring other players to have the same level of taming requiring to tame it themselves.


Yes,its the idea,give to tamers chance to sell interesting pets to other players without taming,im developing a custom shard,where the skillgain is going to be hard....very hard...im thinking about to punish players rising up skills afk,a world where a tamer,is worked char,and where if you want special pet,the tamer can sell it.
 

zerodowned

Sorceror
you'll want to remove/block-out the parts for !m_Creature.CanBeControlledBy to allow trading in the section pooka01 mentioned

there may be a problem with the pet accepting orders from the new master though.
 

rome1982

Sorceror
you'll want to remove/block-out the parts for !m_Creature.CanBeControlledBy to allow trading in the section pooka01 mentioned

there may be a problem with the pet accepting orders from the new master though.

I think the right way to get it,is making a "stage" like an evolution pet,example:

Stage 1 = requires taming.
Stage 2 = taming required = 0

Code:
public int m_Stage;
Code:
public bool m_S1;
Code:
public bool S1
        {
            get{ return m_S1; }
            set{ m_S1 = value; }
        }
Code:
[CommandProperty( AccessLevel.GameMaster )]
        public int Stage
        {
            get{ return m_Stage; }
            set{ m_Stage = value; }
        }
Code:
public xxxxxxxx() : base( AIType.AI_xxxx, FightMode.Closest, 10, 1, 0.1, 0.1 )
        {
            Female = Utility.RandomBool();
                       
            Name = "xxxxxxxxxxxx";
            Body = xx;
            Hue = xxxx;
            BaseSoundID = xxxx;
            Stage = 1;
            Tamable = true;
ControlSlots = x;
MinTameSkill = xxxxx
Code:
if (TAMED = TRUE)<--------example,i need to find the code
                {
                    if ( this.S1 == true )
                    {
                        this.S1 = false;
                       taming required = 0;<-----------example
 

rome1982

Sorceror
Fixed i think,with help of code of KP evolution dragon,i mixed stage code with the creature code,example,our PinkLlama,a pink llama with bleed attack:

Required taming : 89.1
Control slots: 1

Now have 2 stages.
Stage 1:
Same taming required,same slots,but when its tamed,it goes to stage 2.

Stage 2:

Required taming : 0
Control slots : 2

(Stage 2 is coming when the tamer transfer it to another player).
Here is the code of the pet:

Code:
using System;
using System.Collections;
using Server.Mobiles;
using Server.Items;
using Server.Network;
using Server.Targeting;
using Server.Gumps;
 
namespace Server.Mobiles
{
    [CorpseName( "a pink llama corpse" )]
    public class PinkLlama : BaseMount
    {
 
        public int m_Stage;   
 
        public bool m_S1;
    public bool m_S2;
 
        public bool S1
        {
            get{ return m_S1; }
            set{ m_S1 = value; }
        }
    public bool S2
        {
            get{ return m_S2; }
            set{ m_S2 = value; }
        }
 
        [CommandProperty( AccessLevel.GameMaster )]
        public int Stage
        {
            get{ return m_Stage; }
            set{ m_Stage = value; }
        }
 
        [Constructable]
        public PinkLlama() : this( "a ridable llama" )
        {
        }
 
        [Constructable]
        public PinkLlama( string name ) : base( name, 0xDC, 0x3EA6, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
        {
            BaseSoundID = 0x3F3;
                        Name = "A Pink Llama";
                        Stage = 1;
                        Hue = 2100;
            SetStr( 51, 89 );
            SetDex( 56, 75 );
            SetInt( 16, 30 );
                        S1 = true;
                        S2 = false;
                       
            SetHits( 95, 107 );
            SetMana( 0 );
 
            SetDamage( 10, 12 );
 
            SetDamageType( ResistanceType.Physical, 100 );
 
            SetResistance( ResistanceType.Physical, 10, 15 );
            SetResistance( ResistanceType.Fire, 5, 10 );
            SetResistance( ResistanceType.Cold, 5, 10 );
            SetResistance( ResistanceType.Poison, 5, 10 );
            SetResistance( ResistanceType.Energy, 5, 10 );
 
            SetSkill( SkillName.MagicResist, 15.1, 20.0 );
            SetSkill( SkillName.Tactics, 19.2, 29.0 );
            SetSkill( SkillName.Wrestling, 19.2, 29.0 );
 
            Fame = 300;
            Karma = 0;
 
            Tamable = true;
            ControlSlots = 1;
            MinTameSkill = 89.1;
        }
 
                public override void OnThink()
                {
                  if ( Controlled == true )
                  {               
                  if ( this.S1 == true )
            {
            this.S1 = false;
                        this.Tamable = true;
                        this.ControlSlots = 2;
                        this.MinTameSkill = 0;
                    }
                }
                }
             
                public override WeaponAbility GetWeaponAbility()
        {
            return WeaponAbility.BleedAttack;
        }
                public override bool AlwaysMurderer{ get{ return true; } }
       
       
 
        public override int Meat{ get{ return 1; } }
        public override int Hides{ get{ return 12; } }
        public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
 
        public PinkLlama( Serial serial ) : base( serial )
        {
        }
 
        public override void Serialize( GenericWriter writer )
        {
            base.Serialize( writer );
                        writer.Write((int) 1);
                        writer.Write( m_S1 );
                        writer.Write( m_S2 );
                        writer.Write( (int) m_Stage );
            writer.Write( (int) 0 ); // version
        }
 
        public override void Deserialize( GenericReader reader )
        {
            base.Deserialize( reader );
 
            int version = reader.ReadInt();
                              {
                            m_S1 = reader.ReadBool();
                            m_S2 = reader.ReadBool();
                            m_Stage = reader.ReadInt();
                              }
                    }
    }
}

All possible credit goes to the creator of evolution dragon working on KP command and all of us trying to help me,ill hope you all see it interesting code and help u.
 
Top