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!

Monster (creatures behavior code) basics

Mastajim

Traveler
Here is a short list of lines you can add to create a more *complete* monster / creature (to be updated with more info)

public override bool HasBreath{ get{ return true; } } // fire breath enabled
public override bool AutoDispel{ get{ return !Controlled; } } //good against summon fey or abuse of summoned spells
public override int TreasureMapLevel{ get{ return 4; } } // add treasure map + choice of level
public override int Meat{ get{ return 19; } }
public override Poison PoisonImmune{ get{ return Poison.Deadly; } }
public override Poison HitPoison{ get{ return Poison.Deadly; } }
public override bool BleedImmune{ get{ return true; } } // against these bleeding special moves
public override bool ReacquireOnMovement{ get{ return !Controlled; } } // ??
public override int Hides{ get{ return 20; } }
public override HideType HideType{ get{ return HideType.Barbed; } }
public override int Scales{ get{ return 7; } }
public override ScaleType ScaleType{ get{ return ( Body == 12 ? ScaleType.Yellow : ScaleType.Red ); } } // obvious
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override bool CanAngerOnTame { get { return true; } }
public override void AlterMeleeDamageFrom( Mobile from, ref int damage )
{
if ( from is BaseCreature )
{
BaseCreature bc = (BaseCreature)from;
if ( bc.Controlled || bc.BardTarget == this )
damage = 0; // Immune to pets and provoked creatures
}
} // this one is good against abuse of pets ;) like on my server. They all have tamers hehe.

See where you should put those line:

****
Exemple of a script:

[CorpseName( "a dragon corpse" )]
public class DragonDestard : BaseCreature
{
[Constructable]
public DragonDestard () : base( AIType.AI_Mage, FightMode.Weakest, 10, 1, 0.2, 0.4 )
{
Name = "a dragon of destard";
Body = Utility.RandomList( 12, 59 );
BaseSoundID = 362;

SetStr( 796, 825 );
SetDex( 86, 105 );
SetInt( 436, 475 );

SetHits( 478, 495 );

SetDamage( 16, 22 );

SetDamageType( ResistanceType.Physical, 100 );

SetResistance( ResistanceType.Physical, 55, 65 );
SetResistance( ResistanceType.Fire, 60, 70 );
SetResistance( ResistanceType.Cold, 30, 40 );
SetResistance( ResistanceType.Poison, 25, 35 );
SetResistance( ResistanceType.Energy, 35, 45 );

SetSkill( SkillName.EvalInt, 30.1, 40.0 );
SetSkill( SkillName.Magery, 90.1, 100.0 );
SetSkill( SkillName.MagicResist, 99.1, 100.0 );
SetSkill( SkillName.Tactics, 97.6, 100.0 );
SetSkill( SkillName.Wrestling, 90.1, 92.5 );

Fame = 15000;
Karma = -15000;

VirtualArmor = 60;

Tamable = true;
ControlSlots = 3;
MinTameSkill = 93.9;

switch ( Utility.Random( 24 ) )
{
case 0: PackItem( new Blight() ); break;
case 1: PackItem( new Corruption() ); break;
case 2: PackItem( new Muculent() ); break;
case 3: PackItem( new Putrefication() ); break;
case 4: PackItem( new Scourge() ); break;
case 5: PackItem( new Taint() ); break;
case 6: PackItem( new CapturedEssence () ); break;
case 7: PackItem( new DiseasedBark() ); break;
case 8: PackItem( new DreadHornMane() ); break;
case 9: PackItem( new EyeOfTheTravesty() ); break;
case 10: PackItem( new GrizzledBones() ); break;
case 11: PackItem( new LardOfParoxysmus() ); break;
}
}

public override void GenerateLoot()
{
AddLoot( LootPack.AosSuperBoss, 1 );
AddLoot( LootPack.Gems, 12 );
}

********* CODE GOES HERE **************
public override bool ReacquireOnMovement{ get{ return !Controlled; } }
public override bool HasBreath{ get{ return true; } } // fire breath enabled
public override bool AutoDispel{ get{ return !Controlled; } }
public override int TreasureMapLevel{ get{ return 4; } }

//END


Hopes it help some newbs out there like me.
 

peepeetree

Sorceror
This is great thanks you so much! Is it also possible to say make a ice dragon and instead of having it shoot fire maybe use mind blast or harm? It just seems odd to see an ice dragon spitting fire when it should be breathing cold.
 
Top