Full Version : BleedAttack And MortalStrike on mount
xmlspawner >>Scripting Support >>BleedAttack And MortalStrike on mount
<< Prev | Next >>
Erica- 07-13-2006
Hi ok i got this script a bloodsteed ok but he makes any body or any monster bleed alot meaning he attacks keeps hitting you with bleed attack and mortal strike seconds by seconds heres the script

CODE
using System; using Server.Items; using Server.Mobiles; namespace Server.Mobiles {
[CorpseName( "a blood steed corpse" )]
public class BloodSteed : BaseMount
{
public override WeaponAbility GetWeaponAbility()
{
switch ( Utility.Random( 2 ) )
{
default:
case 0: return WeaponAbility.MortalStrike;
case 1: return WeaponAbility.BleedAttack;
}
}
[Constructable]
public BloodSteed() : this( "a blood steed" )
{
}
[Constructable]
public BloodSteed( string name ) : base( name, 0xBE, 0x3E9E, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
{
BaseSoundID = 0x116;
SetStr( 925, 960 );
SetDex( 300, 385 );
SetInt( 550, 575 );
SetHits( 900, 915 );
SetDamage( 30, 35 );
SetDamageType( ResistanceType.Physical, 55 );
SetDamageType( ResistanceType.Fire, 45 );
SetResistance( ResistanceType.Physical, 80 );
SetResistance( ResistanceType.Fire, 65 );
SetResistance( ResistanceType.Cold, 65 );
SetResistance( ResistanceType.Poison, 55 );
SetResistance( ResistanceType.Energy, 70 );
SetSkill( SkillName.MagicResist, 250.0, 260.0 );
SetSkill( SkillName.Tactics, 200.0, 210.0 );
SetSkill( SkillName.Wrestling, 200.0, 210.0 );
SetSkill( SkillName.EvalInt, 110.0, 120.0 );
SetSkill( SkillName.Magery, 110.0, 120.0 );
SetSkill( SkillName.Meditation, 400.0, 450.0 );
SetSkill( SkillName.Anatomy, 275.0, 300.0 );
Fame = 20000;
Karma = -20000;
VirtualArmor = 100;
Tamable = true;
ControlSlots = 4;
MinTameSkill = 115.0;
switch ( Utility.Random( 3 ) )
{
case 0:
{
BodyValue = 116;
ItemID = 16039;
Hue = 2118;
break;
}
case 1:
{
BodyValue = 178;
ItemID = 16041;
Hue = 2998;
break;
}
case 2:
{
BodyValue = 179;
ItemID = 16055;
Hue = 1157;
break;
}
}
PackGold( 1000 );
PackItem( new SulfurousAsh( Utility.RandomMinMax( 100, 250 ) ) );
PackItem( new Ruby( Utility.RandomMinMax( 10, 30 ) ) );
}
public override bool HasBreath{ get{ return true; } } // fire breath enabled
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
public override PackInstinct PackInstinct{ get{ return PackInstinct.Daemon | PackInstinct.Equine; } }
public override bool AutoDispel{ get{ return true; } }
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
public override Poison HitPoison{ get{ return Poison.Lethal; } }
public BloodSteed( 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();
if ( BaseSoundID <= 0 )
BaseSoundID = 0xA8;
}
}
}

now this part here

CODE
public override WeaponAbility GetWeaponAbility() { switch ( Utility.Random( 2 ) ) { default:
case 0: return WeaponAbility.MortalStrike;
case 1: return WeaponAbility.BleedAttack;
}
}

im thinking maybe if i change the random 2 to a 4 or 5 might not do it a lot like this

CODE
public override WeaponAbility GetWeaponAbility() { switch ( Utility.Random( 5 ) ) { default:
case 0: return WeaponAbility.MortalStrike;
case 1: return WeaponAbility.BleedAttack;
}
}

would this do the trick ? im trying to make him not use those ability every second on a hit or is there a better way to do this thanks.
ArteGordon- 07-14-2006
you would want it to be like this

CODE
public override WeaponAbility GetWeaponAbility() { switch ( Utility.Random( 5 ) ) { default: return null;
case 0: return WeaponAbility.MortalStrike;
case 1: return WeaponAbility.BleedAttack;
}
}

then, 3 out of 5 times it would return null and no special attack would be used.