#W# Initial Commit: Avatars Conquest
This commit is contained in:
commit
8eae46895e
7512 changed files with 416187 additions and 0 deletions
59
Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
59
Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bull corpse" )]
|
||||
public class Bull : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Bull() : base( AIType.AI_Timid, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a bull";
|
||||
Body = Utility.RandomList( 232, 233 );
|
||||
BaseSoundID = 0x64;
|
||||
|
||||
if ( 0.5 >= Utility.RandomDouble() )
|
||||
Hue = 0x901;
|
||||
|
||||
SetStr( 77, 111 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 47, 75 );
|
||||
|
||||
SetHits( 50, 64 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 9 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 17.6, 25.0 );
|
||||
SetSkill( SkillName.Tactics, 67.6, 85.0 );
|
||||
SetSkill( SkillName.HandToHand, 40.1, 57.5 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 600;
|
||||
|
||||
VirtualArmor = 28;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 10; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
|
||||
public Bull(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
127
Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
127
Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a cow corpse" )]
|
||||
public class Cow : BaseCreature
|
||||
{
|
||||
private DateTime m_MilkedOn;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime MilkedOn
|
||||
{
|
||||
get { return m_MilkedOn; }
|
||||
set { m_MilkedOn = value; }
|
||||
}
|
||||
|
||||
private int m_Milk;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int Milk
|
||||
{
|
||||
get { return m_Milk; }
|
||||
set { m_Milk = value; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Cow() : base( AIType.AI_Timid, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a cow";
|
||||
Body = Utility.RandomList( 216, 231 );
|
||||
BaseSoundID = 0x78;
|
||||
|
||||
SetStr( 30 );
|
||||
SetDex( 15 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 18 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.5 );
|
||||
SetSkill( SkillName.Tactics, 5.5 );
|
||||
SetSkill( SkillName.HandToHand, 5.5 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 300;
|
||||
|
||||
VirtualArmor = 10;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 8; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
base.OnDoubleClick( from );
|
||||
|
||||
int random = Utility.Random( 100 );
|
||||
|
||||
if ( random < 5 )
|
||||
Tip();
|
||||
else if ( random < 20 )
|
||||
PlaySound( 120 );
|
||||
else if ( random < 40 )
|
||||
PlaySound( 121 );
|
||||
}
|
||||
|
||||
public void Tip()
|
||||
{
|
||||
PlaySound( 121 );
|
||||
Animate( 8, 0, 3, true, false, 0 );
|
||||
}
|
||||
|
||||
public bool TryMilk( Mobile from )
|
||||
{
|
||||
if ( !from.InLOS( this ) || !from.InRange( Location, 2 ) )
|
||||
from.SendLocalizedMessage( 1080400 ); // You can not milk the cow from this location.
|
||||
if ( Controlled && ControlMaster != from )
|
||||
from.SendLocalizedMessage( 1071182 ); // The cow nimbly escapes your attempts to milk it.
|
||||
if ( m_Milk == 0 && m_MilkedOn + TimeSpan.FromDays( 1 ) > DateTime.Now )
|
||||
from.SendLocalizedMessage( 1080198 ); // This cow can not be milked now. Please wait for some time.
|
||||
else
|
||||
{
|
||||
if ( m_Milk == 0 )
|
||||
m_Milk = 4;
|
||||
|
||||
m_MilkedOn = DateTime.Now;
|
||||
m_Milk--;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public Cow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
|
||||
writer.Write( (DateTime) m_MilkedOn );
|
||||
writer.Write( (int) m_Milk );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version > 0 )
|
||||
{
|
||||
m_MilkedOn = reader.ReadDateTime();
|
||||
m_Milk = reader.ReadInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue