Adding custom mobs

Dezzie

Well-Known Member
Oct 26, 2013
89
9
57
Shard Name
Darkness Forsaken
Donate
Donate money to this user
I'm trying to add a tribe of people that ride tigers. They spawn ok but when he spawns, the tiger is invisible. However, if I spawn the tiger separately it is visible when I ride it.

My rider script is as follows:

using System;
using Server;
using Server.Misc;
using Server.Network;
using Server.Items;
using Server.Spells;

namespace Server.Mobiles
{
[CorpseName( "a tribal chief corpse" )]
public class TribalChief : BaseCreature
{
private bool m_Stunning;

public override WeaponAbility GetWeaponAbility()
{
return Utility.RandomBool() ? WeaponAbility.MortalStrike : WeaponAbility.Dismount;
}

[Constructable]
public TribalChief() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
Name = NameList.RandomName("savage rider");

Name = "Tribal Chief";
Hue = 1745;
Body = 185;
BaseSoundID = 609;

SetStr( 836, 885 );
SetDex( 326, 345 );
SetInt( 281, 305 );

SetHits( 1450, 21500 );

SetDamage( 40, 90 );

SetDamageType( ResistanceType.Physical, 75 );
SetDamageType( ResistanceType.Energy, 75 );

SetResistance(ResistanceType.Physical, 75, 95);
SetResistance(ResistanceType.Fire, 75, 95);
SetResistance(ResistanceType.Cold, 75, 95);
SetResistance(ResistanceType.Poison, 75, 95);
SetResistance(ResistanceType.Energy, 75, 95);

SetSkill( SkillName.Anatomy, 115.1, 130.0 );
SetSkill(SkillName.Fencing, 115.1, 130.0);
SetSkill(SkillName.MagicResist, 115.1, 130.0);
SetSkill(SkillName.Tactics, 115.1, 130.0);
SetSkill(SkillName.Wrestling, 115.1, 130.0);

Fame = 21500;
Karma = -21500;

VirtualArmor = 70;

new TribalTiger().Rider = this;


Utility.AssignRandomHair(this);
}

public override bool BardImmune { get { return !Core.AOS; } }
public override bool BleedImmune { get { return true; } }
public override Poison PoisonImmune { get { return Poison.Lethal; } }


public override void GenerateLoot()
{
AddLoot( LootPack.FilthyRich );
AddLoot( LootPack.Average );
AddLoot( LootPack.MedScrolls );
}


public TribalChief( Serial serial ) : base( serial )
{
}

public override void Serialize( GenericWriter writer )
{
base.Serialize( writer );
writer.Write( (int) 0 );
}

public override void Deserialize( GenericReader reader )
{
base.Deserialize( reader );
int version = reader.ReadInt();
}
}
}


And the tiger script is as follows:


using System;
using Server.Mobiles;

namespace Server.Mobiles
{
[CorpseName("a TribalTiger corpse")]
public class TribalTiger : BaseMount
{
[Constructable]
public TribalTiger() : this( "a TribalTiger" )
{
}

[Constructable]
public TribalTiger( string name ) : base(name, 0x4E6, 0x3EC7, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a TribalTiger";

SetStr(600, 800);
SetDex(150, 180);
SetInt(250, 285);

SetHits(600, 900);

SetDamage(12, 24);

SetDamageType(ResistanceType.Physical, 100);

SetResistance(ResistanceType.Physical, 50, 65);
SetResistance(ResistanceType.Fire, 20, 60);
SetResistance(ResistanceType.Cold, 25, 45);
SetResistance(ResistanceType.Poison, 30, 50);
SetResistance(ResistanceType.Energy, 36, 65);

SetSkill(SkillName.Anatomy, 75.1, 110.0);
SetSkill(SkillName.MagicResist, 85.1, 100.0);
SetSkill(SkillName.Tactics, 100.1, 120.0);
SetSkill(SkillName.Wrestling, 100.1, 120.0);

this.Fame = 10000;
this.Karma = -10000;

Tamable = true;
ControlSlots = 4;
MinTameSkill = 118.7;

switch ( Utility.Random( 2 ) )
{
case 0:
{
BodyValue = 1254;
ItemID = 16071;
break;
}
case 1:
{
BodyValue = 1255;
ItemID = 16072;
break;
}

}
}

public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override PackInstinct PackInstinct{ get{ return PackInstinct.Daemon | PackInstinct.Feline; } }

public override bool CanAngerOnTame
{
get
{
return true;
}
}

public override bool StatLossAfterTame
{
get
{
return true;
}
}

public override int Meat
{
get
{
return 3;
}
}

public override int Hides
{
get
{
return 10;
}
}

/* public override void GenerateLoot()
{
this.AddLoot(LootPack.AosFilthyRich, 5);
}

public override WeaponAbility GetWeaponAbility()
{
return WeaponAbility.BleedAttack;
}*/

public override bool BleedImmune
{
get
{
return true;
}
}

public override Poison PoisonImmune
{
get
{
return Poison.Greater;
}
}

public override int GetAngerSound()
{
return 0x518;
}

public override int GetIdleSound()
{
return 0x517;
}

public override int GetAttackSound()
{
return 0x516;
}

public override int GetHurtSound()
{
return 0x519;
}

public override int GetDeathSound()
{
return 0x515;
}

public TribalTiger( Serial serial ) : base( serial )
{
}

public override void Serialize(GenericWriter writer)
{
base.Serialize(writer);
writer.Write((int)0);
}

public override void Deserialize(GenericReader reader)
{
base.Deserialize(reader);
int version = reader.ReadInt();
}
}
}


Can anyone tell me why it isn't visible when I spawn the chief? Thanks in advance.
 

Dezzie

Well-Known Member
Oct 26, 2013
89
9
57
Shard Name
Darkness Forsaken
Donate
Donate money to this user
It looks like the client doesn't like the 185 bodyvalue to ride the tiger. Changing it to 400 (regular human) makes it work perfectly.
Doh, I must have had a moment. Thank you very much, that worked perfectly!!! Appreciate the help.