bala1412
Member
- ServUO Version
- Publish 57
- Ultima Expansion
- Endless Journey
The above script is my zombie.cs script. When attacking a monster, the monster shouts hi and hello. Can I make this monster not talk hi and hello when the monster is in battle after successful taming? I have another question. Is there a way to get a tame monster to give an answer like "okay" if I shout a command like "all stay / all kill" to a tame monster? I'm curious.using System;
using Server.Items;
namespace Server.Mobiles
{
[CorpseName("a rotting corpse")]
public class Zombie : BaseCreature
{
[Constructable]
public Zombie()
: base(AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4)
{
Name = "a zombie";
Body = 3;
BaseSoundID = 471;
SetStr(46, 70);
SetDex(31, 50);
SetInt(26, 40);
SetHits(68, 92);
SetDamage(3, 7);
SetDamageType(ResistanceType.Physical, 100);
SetResistance(ResistanceType.Physical, 15, 20);
SetResistance(ResistanceType.Cold, 20, 30);
SetResistance(ResistanceType.Poison, 5, 10);
SetSkill(SkillName.MagicResist, 15.1, 40.0);
SetSkill(SkillName.Tactics, 35.1, 50.0);
SetSkill(SkillName.Wrestling, 35.1, 50.0);
Fame = 120;
Karma = -120;
VirtualArmor = 18;
PackBodyPartOrBones();
}
public Zombie(Serial serial)
: base(serial)
{
}
public override bool BleedImmune
{
get
{
return true;
}
}
public override Poison PoisonImmune
{
get
{
return Poison.Regular;
}
}
public override void OnThink()
{
base.OnThink();
if (NextCallout == TimeSpan.Zero)
{
int toRescue = 0;
if(Hits < (HitsMax * 0.10) && Combatant != null)
{
switch(Utility.RandomMinMax( 1, 2 ))
{
case 1: Say("Hi."); break;
case 2: Say("Hello."); break;
default: break;
}
NextCallout = TimeSpan.FromSeconds(Utility.RandomMinMax( 25,30));
}
}
}
private DateTime _nextCallHelp;
[CommandProperty(AccessLevel.Counselor, AccessLevel.Administrator)]
public TimeSpan NextCallout
{
get
{
TimeSpan time = _nextCallHelp - DateTime.Now;
if (time < TimeSpan.Zero)
time = TimeSpan.Zero;
return time;
}
set
{
try { _nextCallHelp = DateTime.Now + value; }
catch { }
}
}
public override TribeType Tribe { get { return TribeType.Undead; } }
public override OppositionGroup OppositionGroup
{
get
{
return OppositionGroup.FeyAndUndead;
}
}
public override void GenerateLoot()
{
AddLoot(LootPack.Meager);
}
public override bool IsEnemy(Mobile m)
{
if(Region.IsPartOf("Haven Island"))
{
return false;
}
return base.IsEnemy(m);
}
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();
}
}
}