#W# Source and Scripts added. Added Scripts/Settings.cs to expose some basic tweak able settings.
This commit is contained in:
parent
b51c58f514
commit
3045c83799
3512 changed files with 627673 additions and 0 deletions
43
Scripts/Mobiles/AI/AIControlMobileTarget.cs
Normal file
43
Scripts/Mobiles/AI/AIControlMobileTarget.cs
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Targets
|
||||
{
|
||||
public class AIControlMobileTarget : Target
|
||||
{
|
||||
private List<BaseAI> m_List;
|
||||
private OrderType m_Order;
|
||||
|
||||
public OrderType Order {
|
||||
get {
|
||||
return m_Order;
|
||||
}
|
||||
}
|
||||
|
||||
public AIControlMobileTarget( BaseAI ai, OrderType order ) : base( -1, false, ( order == OrderType.Attack ? TargetFlags.Harmful : TargetFlags.None ) )
|
||||
{
|
||||
m_List = new List<BaseAI>();
|
||||
m_Order = order;
|
||||
|
||||
AddAI( ai );
|
||||
}
|
||||
|
||||
public void AddAI( BaseAI ai )
|
||||
{
|
||||
if ( !m_List.Contains( ai ) )
|
||||
m_List.Add( ai );
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is Mobile ) {
|
||||
Mobile m = (Mobile)o;
|
||||
for ( int i = 0; i < m_List.Count; ++i )
|
||||
m_List[i].EndPickTarget( from, m, m_Order );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
157
Scripts/Mobiles/AI/AnimalAI.cs
Normal file
157
Scripts/Mobiles/AI/AnimalAI.cs
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
// Ideas
|
||||
// When you run on animals the panic
|
||||
// When if ( distance < 8 && Utility.RandomDouble() * Math.Sqrt( (8 - distance) / 6 ) >= incoming.Skills[SkillName.AnimalTaming].Value )
|
||||
// More your close, the more it can panic
|
||||
/*
|
||||
* AnimalHunterAI, AnimalHidingAI, AnimalDomesticAI...
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class AnimalAI : BaseAI
|
||||
{
|
||||
public AnimalAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
// Old:
|
||||
#if false
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, true, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay( "There is something near, I go away" );
|
||||
Action = ActionType.Backoff;
|
||||
}
|
||||
else if ( m_Mobile.IsHurt() || m_Mobile.Combatant != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am hurt or being attacked, I flee" );
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
#endif
|
||||
|
||||
// New, only flee @ 10%
|
||||
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if ( !m_Mobile.Summoned && !m_Mobile.Controlled && hitPercent < 0.1 && m_Mobile.CanFlee ) // Less than 10% health
|
||||
{
|
||||
m_Mobile.DebugSay( "I am low on health!" );
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if ( combatant == null || combatant.Deleted || combatant.Map != m_Mobile.Map )
|
||||
{
|
||||
m_Mobile.DebugSay( "My combatant is gone.." );
|
||||
|
||||
Action = ActionType.Wander;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( WalkMobileRange( combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight ) )
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( combatant );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.GetDistanceToSqrt( combatant ) > m_Mobile.RangePerception + 1 )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I cannot find {0}", combatant.Name );
|
||||
|
||||
Action = ActionType.Wander;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I should be closer to {0}", combatant.Name );
|
||||
}
|
||||
}
|
||||
|
||||
if ( !m_Mobile.Controlled && !m_Mobile.Summoned && m_Mobile.CanFlee )
|
||||
{
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if ( hitPercent < 0.1 )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am low on health!" );
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionBackoff()
|
||||
{
|
||||
double hitPercent = (double)m_Mobile.Hits / m_Mobile.HitsMax;
|
||||
|
||||
if ( !m_Mobile.Summoned && !m_Mobile.Controlled && hitPercent < 0.1 && m_Mobile.CanFlee ) // Less than 10% health
|
||||
{
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception * 2, FightMode.Closest, true, false , true))
|
||||
{
|
||||
if ( WalkMobileRange(m_Mobile.FocusMob, 1, false, m_Mobile.RangePerception, m_Mobile.RangePerception * 2) )
|
||||
{
|
||||
m_Mobile.DebugSay( "Well, here I am safe" );
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay( "I have lost my focus, lets relax" );
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
AcquireFocusMob(m_Mobile.RangePerception * 2, m_Mobile.FightMode, true, false, true);
|
||||
|
||||
if ( m_Mobile.FocusMob == null )
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
|
||||
return base.DoActionFlee();
|
||||
}
|
||||
}
|
||||
}
|
||||
131
Scripts/Mobiles/AI/ArcherAI.cs
Normal file
131
Scripts/Mobiles/AI/ArcherAI.cs
Normal file
|
|
@ -0,0 +1,131 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ArcherAI : BaseAI
|
||||
{
|
||||
public ArcherAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay( "I have no combatant" );
|
||||
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true))
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0} and I will attack", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
return base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
if ( m_Mobile.Combatant == null || m_Mobile.Combatant.Deleted || !m_Mobile.Combatant.Alive || m_Mobile.Combatant.IsDeadBondedPet )
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is deleted");
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
|
||||
if (Core.TickCount - m_Mobile.LastMoveTime > 1000)
|
||||
{
|
||||
if (WalkMobileRange(m_Mobile.Combatant, 1, true, m_Mobile.RangeFight, m_Mobile.Weapon.MaxRange))
|
||||
{
|
||||
// Be sure to face the combatant
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo(m_Mobile.Combatant.Location);
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.Combatant != null )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I am still not in range of {0}", m_Mobile.Combatant.Name);
|
||||
|
||||
if ( (int) m_Mobile.GetDistanceToSqrt( m_Mobile.Combatant ) > m_Mobile.RangePerception + 1 )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have lost {0}", m_Mobile.Combatant.Name);
|
||||
|
||||
m_Mobile.Combatant = null;
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// When we have no ammo, we flee
|
||||
Container pack = m_Mobile.Backpack;
|
||||
|
||||
if ( pack == null || pack.FindItemByType( typeof( Arrow ) ) == null )
|
||||
{
|
||||
Action = ActionType.Flee;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// At 20% we should check if we must leave
|
||||
if ( m_Mobile.Hits < m_Mobile.HitsMax*20/100 && m_Mobile.CanFlee )
|
||||
{
|
||||
bool bFlee = false;
|
||||
// if my current hits are more than my opponent, i don't care
|
||||
if ( m_Mobile.Combatant != null && m_Mobile.Hits < m_Mobile.Combatant.Hits)
|
||||
{
|
||||
int iDiff = m_Mobile.Combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
if ( Utility.Random(0, 100) > 10 + iDiff) // 10% to flee + the diff of hits
|
||||
{
|
||||
bFlee = true;
|
||||
}
|
||||
}
|
||||
else if ( m_Mobile.Combatant != null && m_Mobile.Hits >= m_Mobile.Combatant.Hits)
|
||||
{
|
||||
if ( Utility.Random(0, 100) > 10 ) // 10% to flee
|
||||
{
|
||||
bFlee = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (bFlee)
|
||||
{
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if ( AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
2828
Scripts/Mobiles/AI/BaseAI.cs
Normal file
2828
Scripts/Mobiles/AI/BaseAI.cs
Normal file
File diff suppressed because it is too large
Load diff
87
Scripts/Mobiles/AI/BerserkAI.cs
Normal file
87
Scripts/Mobiles/AI/BerserkAI.cs
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class BerserkAI : BaseAI
|
||||
{
|
||||
public BerserkAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay( "I have No Combatant" );
|
||||
|
||||
if( AcquireFocusMob( m_Mobile.RangePerception, FightMode.Closest, false, true, true) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected " + m_Mobile.FocusMob.Name + " and I will attack" );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
if( m_Mobile.Combatant == null || m_Mobile.Combatant.Deleted )
|
||||
{
|
||||
m_Mobile.DebugSay("My combatant is deleted");
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
|
||||
if( WalkMobileRange( m_Mobile.Combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight ) )
|
||||
{
|
||||
// Be sure to face the combatant
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( m_Mobile.Combatant.Location );
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_Mobile.Combatant != null )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay("I am still not in range of " + m_Mobile.Combatant.Name);
|
||||
|
||||
if( (int) m_Mobile.GetDistanceToSqrt( m_Mobile.Combatant ) > m_Mobile.RangePerception + 1 )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have lost " + m_Mobile.Combatant.Name );
|
||||
|
||||
Action = ActionType.Guard;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if ( AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, true, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
176
Scripts/Mobiles/AI/HealerAI.cs
Normal file
176
Scripts/Mobiles/AI/HealerAI.cs
Normal file
|
|
@ -0,0 +1,176 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
using Server.Spells.First;
|
||||
using Server.Spells.Second;
|
||||
using Server.Spells.Fourth;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class HealerAI : BaseAI
|
||||
{
|
||||
private static NeedDelegate m_Cure = new NeedDelegate( NeedCure );
|
||||
private static NeedDelegate m_GHeal = new NeedDelegate( NeedGHeal );
|
||||
private static NeedDelegate m_LHeal = new NeedDelegate( NeedLHeal );
|
||||
private static NeedDelegate[] m_ACure = new NeedDelegate[] { m_Cure };
|
||||
private static NeedDelegate[] m_AGHeal = new NeedDelegate[] { m_GHeal };
|
||||
private static NeedDelegate[] m_ALHeal = new NeedDelegate[] { m_LHeal };
|
||||
private static NeedDelegate[] m_All = new NeedDelegate[] { m_Cure, m_GHeal, m_LHeal };
|
||||
|
||||
public HealerAI( BaseCreature m ) : base( m )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool Think()
|
||||
{
|
||||
if ( m_Mobile.Deleted )
|
||||
return false;
|
||||
|
||||
Target targ = m_Mobile.Target;
|
||||
|
||||
if ( targ != null )
|
||||
{
|
||||
if ( targ is CureSpell.InternalTarget )
|
||||
{
|
||||
ProcessTarget( targ, m_ACure );
|
||||
}
|
||||
else if ( targ is GreaterHealSpell.InternalTarget )
|
||||
{
|
||||
ProcessTarget( targ, m_AGHeal );
|
||||
}
|
||||
else if ( targ is HealSpell.InternalTarget )
|
||||
{
|
||||
ProcessTarget( targ, m_ALHeal );
|
||||
}
|
||||
else
|
||||
{
|
||||
targ.Cancel( m_Mobile, TargetCancelType.Canceled );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Mobile toHelp = Find( m_All );
|
||||
|
||||
if ( toHelp != null )
|
||||
{
|
||||
if ( NeedCure( toHelp ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} needs a cure", toHelp.Name );
|
||||
|
||||
if ( !(new CureSpell( m_Mobile, null )).Cast() )
|
||||
new CureSpell( m_Mobile, null ).Cast();
|
||||
}
|
||||
else if ( NeedGHeal( toHelp ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} needs a greater heal", toHelp.Name );
|
||||
|
||||
if ( !(new GreaterHealSpell( m_Mobile, null )).Cast() )
|
||||
new HealSpell( m_Mobile, null ).Cast();
|
||||
}
|
||||
else if ( NeedLHeal( toHelp ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} needs a lesser heal", toHelp.Name );
|
||||
|
||||
new HealSpell( m_Mobile, null ).Cast();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, FightMode.Weakest, false, true, false ) )
|
||||
{
|
||||
WalkMobileRange( m_Mobile.FocusMob, 1, false, 4, 7 );
|
||||
}
|
||||
else
|
||||
{
|
||||
WalkRandomInHome( 3, 2, 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private delegate bool NeedDelegate( Mobile m );
|
||||
|
||||
private void ProcessTarget( Target targ, NeedDelegate[] func )
|
||||
{
|
||||
Mobile toHelp = Find( func );
|
||||
|
||||
if ( toHelp != null )
|
||||
{
|
||||
if ( targ.Range != -1 && !m_Mobile.InRange( toHelp, targ.Range ) )
|
||||
{
|
||||
DoMove( m_Mobile.GetDirectionTo( toHelp ) | Direction.Running );
|
||||
}
|
||||
else
|
||||
{
|
||||
targ.Invoke( m_Mobile, toHelp );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
targ.Cancel( m_Mobile, TargetCancelType.Canceled );
|
||||
}
|
||||
}
|
||||
|
||||
private Mobile Find( params NeedDelegate[] funcs )
|
||||
{
|
||||
if ( m_Mobile.Deleted )
|
||||
return null;
|
||||
|
||||
Map map = m_Mobile.Map;
|
||||
|
||||
if ( map != null )
|
||||
{
|
||||
double prio = 0.0;
|
||||
Mobile found = null;
|
||||
|
||||
foreach ( Mobile m in m_Mobile.GetMobilesInRange( m_Mobile.RangePerception ) )
|
||||
{
|
||||
if ( !m_Mobile.CanSee( m ) || !(m is BaseCreature) || ((BaseCreature)m).Team != m_Mobile.Team )
|
||||
continue;
|
||||
|
||||
for ( int i = 0; i < funcs.Length; ++i )
|
||||
{
|
||||
if ( funcs[i]( m ) )
|
||||
{
|
||||
double val = -m_Mobile.GetDistanceToSqrt( m );
|
||||
|
||||
if ( found == null || val > prio )
|
||||
{
|
||||
prio = val;
|
||||
found = m;
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return found;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
private static bool NeedCure( Mobile m )
|
||||
{
|
||||
return m.Poisoned;
|
||||
}
|
||||
|
||||
private static bool NeedGHeal( Mobile m )
|
||||
{
|
||||
return m.Hits < m.HitsMax - 40;
|
||||
}
|
||||
|
||||
private static bool NeedLHeal( Mobile m )
|
||||
{
|
||||
return m.Hits < m.HitsMax - 10;
|
||||
}
|
||||
}
|
||||
}
|
||||
1103
Scripts/Mobiles/AI/MageAI.cs
Normal file
1103
Scripts/Mobiles/AI/MageAI.cs
Normal file
File diff suppressed because it is too large
Load diff
183
Scripts/Mobiles/AI/MeleeAI.cs
Normal file
183
Scripts/Mobiles/AI/MeleeAI.cs
Normal file
|
|
@ -0,0 +1,183 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MeleeAI : BaseAI
|
||||
{
|
||||
public MeleeAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay( "I have no combatant" );
|
||||
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if ( combatant == null || combatant.Deleted || combatant.Map != m_Mobile.Map || !combatant.Alive || combatant.IsDeadBondedPet )
|
||||
{
|
||||
m_Mobile.DebugSay( "My combatant is gone, so my guard is up" );
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( !m_Mobile.InRange( combatant, m_Mobile.RangePerception ) )
|
||||
{
|
||||
// They are somewhat far away, can we find something else?
|
||||
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
m_Mobile.FocusMob = null;
|
||||
}
|
||||
else if ( !m_Mobile.InRange( combatant, m_Mobile.RangePerception * 3 ) )
|
||||
{
|
||||
m_Mobile.Combatant = null;
|
||||
}
|
||||
|
||||
combatant = m_Mobile.Combatant;
|
||||
|
||||
if ( combatant == null )
|
||||
{
|
||||
m_Mobile.DebugSay( "My combatant has fled, so I am on guard" );
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/*if ( !m_Mobile.InLOS( combatant ) )
|
||||
{
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
m_Mobile.Combatant = combatant = m_Mobile.FocusMob;
|
||||
m_Mobile.FocusMob = null;
|
||||
}
|
||||
}*/
|
||||
|
||||
if ( MoveTo( combatant, true, m_Mobile.RangeFight ) )
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( combatant );
|
||||
}
|
||||
else if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "My move is blocked, so I am going to attack {0}", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
|
||||
return true;
|
||||
}
|
||||
else if ( m_Mobile.GetDistanceToSqrt( combatant ) > m_Mobile.RangePerception + 1 )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I cannot find {0}, so my guard is up", combatant.Name );
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I should be closer to {0}", combatant.Name );
|
||||
}
|
||||
|
||||
if ( !m_Mobile.Controlled && !m_Mobile.Summoned && m_Mobile.CanFlee )
|
||||
{
|
||||
if ( m_Mobile.Hits < m_Mobile.HitsMax * 20/100 )
|
||||
{
|
||||
// We are low on health, should we flee?
|
||||
|
||||
bool flee = false;
|
||||
|
||||
if ( m_Mobile.Hits < combatant.Hits )
|
||||
{
|
||||
// We are more hurt than them
|
||||
|
||||
int diff = combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
flee = ( Utility.Random( 0, 100 ) < (10 + diff) ); // (10 + diff)% chance to flee
|
||||
}
|
||||
else
|
||||
{
|
||||
flee = Utility.Random( 0, 100 ) < 10; // 10% chance to flee
|
||||
}
|
||||
|
||||
if ( flee )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I am going to flee from {0}", combatant.Name );
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if ( AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
if ( m_Mobile.Hits > m_Mobile.HitsMax/2 )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am stronger now, so I will continue fighting" );
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
base.DoActionFlee();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
142
Scripts/Mobiles/AI/OppositionGroup.cs
Normal file
142
Scripts/Mobiles/AI/OppositionGroup.cs
Normal file
|
|
@ -0,0 +1,142 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public class OppositionGroup
|
||||
{
|
||||
private Type[][] m_Types;
|
||||
|
||||
public OppositionGroup( Type[][] types )
|
||||
{
|
||||
m_Types = types;
|
||||
}
|
||||
|
||||
public bool IsEnemy( object from, object target )
|
||||
{
|
||||
int fromGroup = IndexOf( from );
|
||||
int targGroup = IndexOf( target );
|
||||
|
||||
return ( fromGroup != -1 && targGroup != -1 && fromGroup != targGroup );
|
||||
}
|
||||
|
||||
public int IndexOf( object obj )
|
||||
{
|
||||
if ( obj == null )
|
||||
return -1;
|
||||
|
||||
Type type = obj.GetType();
|
||||
|
||||
for ( int i = 0; i < m_Types.Length; ++i )
|
||||
{
|
||||
Type[] group = m_Types[i];
|
||||
|
||||
bool contains = false;
|
||||
|
||||
for ( int j = 0; !contains && j < group.Length; ++j )
|
||||
contains = group[j].IsAssignableFrom( type );
|
||||
|
||||
if ( contains )
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
private static OppositionGroup m_TerathansAndOphidians = new OppositionGroup( new Type[][]
|
||||
{
|
||||
new Type[]
|
||||
{
|
||||
typeof( TerathanAvenger ),
|
||||
typeof( TerathanDrone ),
|
||||
typeof( TerathanMatriarch ),
|
||||
typeof( TerathanWarrior )
|
||||
},
|
||||
new Type[]
|
||||
{
|
||||
typeof( OphidianArchmage ),
|
||||
typeof( OphidianKnight ),
|
||||
typeof( OphidianMage ),
|
||||
typeof( OphidianMatriarch ),
|
||||
typeof( OphidianWarrior )
|
||||
}
|
||||
} );
|
||||
|
||||
public static OppositionGroup TerathansAndOphidians
|
||||
{
|
||||
get{ return m_TerathansAndOphidians; }
|
||||
}
|
||||
|
||||
private static OppositionGroup m_SavagesAndOrcs = new OppositionGroup( new Type[][]
|
||||
{
|
||||
new Type[]
|
||||
{
|
||||
typeof( Orc ),
|
||||
typeof( OrcBomber ),
|
||||
typeof( OrcBrute ),
|
||||
typeof( OrcCaptain ),
|
||||
typeof( OrcishLord ),
|
||||
typeof( OrcishMage ),
|
||||
typeof( SpawnedOrcishLord )
|
||||
},
|
||||
new Type[]
|
||||
{
|
||||
typeof( Savage ),
|
||||
typeof( SavageRider ),
|
||||
typeof( SavageRidgeback ),
|
||||
typeof( SavageShaman )
|
||||
}
|
||||
} );
|
||||
|
||||
public static OppositionGroup SavagesAndOrcs
|
||||
{
|
||||
get{ return m_SavagesAndOrcs; }
|
||||
}
|
||||
|
||||
private static OppositionGroup m_FeyAndUndead = new OppositionGroup( new Type[][]
|
||||
{
|
||||
new Type[]
|
||||
{
|
||||
typeof( Centaur ),
|
||||
typeof( EtherealWarrior ),
|
||||
typeof( Kirin ),
|
||||
typeof( LordOaks ),
|
||||
typeof( Pixie ),
|
||||
typeof( Silvani ),
|
||||
typeof( Unicorn ),
|
||||
typeof( Wisp ),
|
||||
typeof( Treefellow ),
|
||||
typeof( MLDryad ),
|
||||
typeof( Satyr )
|
||||
},
|
||||
new Type[]
|
||||
{
|
||||
typeof( AncientLich ),
|
||||
typeof( Bogle ),
|
||||
typeof( LichLord ),
|
||||
typeof( Shade ),
|
||||
typeof( Spectre ),
|
||||
typeof( Wraith ),
|
||||
typeof( BoneKnight ),
|
||||
typeof( Ghoul ),
|
||||
typeof( Mummy ),
|
||||
typeof( SkeletalKnight ),
|
||||
typeof( Skeleton ),
|
||||
typeof( Zombie ),
|
||||
typeof( ShadowKnight ),
|
||||
typeof( DarknightCreeper ),
|
||||
typeof( RevenantLion ),
|
||||
typeof( LadyOfTheSnow ),
|
||||
typeof( RottingCorpse ),
|
||||
typeof( SkeletalDragon ),
|
||||
typeof( Lich )
|
||||
}
|
||||
} );
|
||||
|
||||
public static OppositionGroup FeyAndUndead
|
||||
{
|
||||
get{ return m_FeyAndUndead; }
|
||||
}
|
||||
}
|
||||
}
|
||||
100
Scripts/Mobiles/AI/PredatorAI.cs
Normal file
100
Scripts/Mobiles/AI/PredatorAI.cs
Normal file
|
|
@ -0,0 +1,100 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
|
||||
/*
|
||||
* PredatorAI, its an animal that can attack
|
||||
* Dont flee but dont attack if not hurt or attacked
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class PredatorAI : BaseAI
|
||||
{
|
||||
public PredatorAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
if ( m_Mobile.Combatant != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am hurt or being attacked, I kill him" );
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else if (AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, true, false, true))
|
||||
{
|
||||
m_Mobile.DebugSay( "There is something near, I go away" );
|
||||
Action = ActionType.Backoff;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if ( combatant == null || combatant.Deleted || combatant.Map != m_Mobile.Map )
|
||||
{
|
||||
m_Mobile.DebugSay( "My combatant is gone, so my guard is up" );
|
||||
Action = ActionType.Wander;
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( WalkMobileRange( combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight ) )
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( combatant );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.GetDistanceToSqrt( combatant ) > m_Mobile.RangePerception + 1 )
|
||||
{
|
||||
m_Mobile.DebugSay( "I cannot find {0}", combatant.Name );
|
||||
|
||||
Action = ActionType.Wander;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay( "I should be closer to {0}", combatant.Name );
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionBackoff()
|
||||
{
|
||||
if ( m_Mobile.IsHurt() || m_Mobile.Combatant != null )
|
||||
{
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (AcquireFocusMob(m_Mobile.RangePerception * 2, FightMode.Closest, true, false , true))
|
||||
{
|
||||
if ( WalkMobileRange(m_Mobile.FocusMob, 1, false, m_Mobile.RangePerception, m_Mobile.RangePerception * 2) )
|
||||
{
|
||||
m_Mobile.DebugSay( "Well, here I am safe" );
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay( "I have lost my focus, lets relax" );
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
228
Scripts/Mobiles/AI/SpeedInfo.cs
Normal file
228
Scripts/Mobiles/AI/SpeedInfo.cs
Normal file
|
|
@ -0,0 +1,228 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server
|
||||
{
|
||||
public class SpeedInfo
|
||||
{
|
||||
// Should we use the new method of speeds?
|
||||
private static bool Enabled = true;
|
||||
|
||||
private double m_ActiveSpeed;
|
||||
private double m_PassiveSpeed;
|
||||
private Type[] m_Types;
|
||||
|
||||
public double ActiveSpeed
|
||||
{
|
||||
get{ return m_ActiveSpeed; }
|
||||
set{ m_ActiveSpeed = value; }
|
||||
}
|
||||
|
||||
public double PassiveSpeed
|
||||
{
|
||||
get{ return m_PassiveSpeed; }
|
||||
set{ m_PassiveSpeed = value; }
|
||||
}
|
||||
|
||||
public Type[] Types
|
||||
{
|
||||
get{ return m_Types; }
|
||||
set{ m_Types = value; }
|
||||
}
|
||||
|
||||
public SpeedInfo( double activeSpeed, double passiveSpeed, Type[] types )
|
||||
{
|
||||
m_ActiveSpeed = activeSpeed;
|
||||
m_PassiveSpeed = passiveSpeed;
|
||||
m_Types = types;
|
||||
}
|
||||
|
||||
public static bool Contains( object obj )
|
||||
{
|
||||
if ( !Enabled )
|
||||
return false;
|
||||
|
||||
if ( m_Table == null )
|
||||
LoadTable();
|
||||
|
||||
SpeedInfo sp = null;
|
||||
|
||||
m_Table.TryGetValue(obj.GetType(), out sp);
|
||||
|
||||
return ( sp != null );
|
||||
}
|
||||
|
||||
public static bool GetSpeeds( object obj, ref double activeSpeed, ref double passiveSpeed )
|
||||
{
|
||||
if ( !Enabled )
|
||||
return false;
|
||||
|
||||
if ( m_Table == null )
|
||||
LoadTable();
|
||||
|
||||
SpeedInfo sp = null;
|
||||
|
||||
m_Table.TryGetValue(obj.GetType(), out sp);
|
||||
|
||||
if ( sp == null )
|
||||
return false;
|
||||
|
||||
activeSpeed = sp.ActiveSpeed;
|
||||
passiveSpeed = sp.PassiveSpeed;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
private static void LoadTable()
|
||||
{
|
||||
m_Table = new Dictionary<Type, SpeedInfo>();
|
||||
|
||||
for ( int i = 0; i < m_Speeds.Length; ++i )
|
||||
{
|
||||
SpeedInfo info = m_Speeds[i];
|
||||
Type[] types = info.Types;
|
||||
|
||||
for ( int j = 0; j < types.Length; ++j )
|
||||
m_Table[types[j]] = info;
|
||||
}
|
||||
}
|
||||
|
||||
private static Dictionary<Type, SpeedInfo> m_Table;
|
||||
|
||||
private static SpeedInfo[] m_Speeds = new SpeedInfo[]
|
||||
{
|
||||
/* Slow */
|
||||
new SpeedInfo( 0.3, 0.6, new Type[]
|
||||
{
|
||||
typeof( AntLion ), typeof( ArcticOgreLord ), typeof( BogThing ),
|
||||
typeof( Bogle ), typeof( BoneKnight ), typeof( EarthElemental ),
|
||||
typeof( Ettin ), typeof( FrostOoze ), typeof( FrostTroll ),
|
||||
typeof( GazerLarva ), typeof( Ghoul ), typeof( Golem ),
|
||||
typeof( HeadlessOne ), typeof( Jwilson ), typeof( Mummy ),
|
||||
typeof( Ogre ), typeof( OgreLord ), typeof( PlagueBeast ),
|
||||
typeof( Quagmire ), typeof( Rat ), typeof( RottingCorpse ),
|
||||
typeof( Sewerrat ), typeof( Skeleton ), typeof( Slime ),
|
||||
typeof( Zombie ), typeof( Walrus ), typeof( RestlessSoul ),
|
||||
typeof( CrystalElemental ), typeof( DarknightCreeper ), typeof( MoundOfMaggots ),
|
||||
typeof( Juggernaut ), typeof( Yamandon ), typeof( Serado )
|
||||
} ),
|
||||
/* Fast */
|
||||
new SpeedInfo( 0.2, 0.4, new Type[]
|
||||
{
|
||||
typeof( LordOaks ), typeof( Silvani ), typeof( AirElemental ),
|
||||
typeof( AncientWyrm ), typeof( Balron ), typeof( BladeSpirits ),
|
||||
typeof( DreadSpider ), typeof( Efreet ), typeof( EtherealWarrior ),
|
||||
typeof( Lich ), typeof( Nightmare ), typeof( OphidianArchmage ),
|
||||
typeof( OphidianMage ), typeof( OphidianWarrior ), typeof( OphidianMatriarch ),
|
||||
typeof( OphidianKnight ), typeof( PoisonElemental ), typeof( Revenant ),
|
||||
typeof( SandVortex ), typeof( SavageRider ), typeof( SavageShaman ),
|
||||
typeof( SnowElemental ), typeof( WhiteWyrm ), typeof( Wisp ),
|
||||
typeof( DemonKnight ), typeof( GiantBlackWidow ), typeof( SummonedAirElemental ),
|
||||
typeof( LesserHiryu ), typeof( Hiryu ), typeof( LadyOfTheSnow ),
|
||||
typeof( RaiJu ), typeof( Ronin ), typeof( RuneBeetle ),
|
||||
typeof( Changeling ),
|
||||
#region ML named mobs - before Paragon speedboost
|
||||
typeof( LadyJennifyr ), typeof( LadyMarai ), typeof( MasterJonath ),
|
||||
typeof( MasterMikael ), typeof( MasterTheophilus ), typeof( RedDeath ),
|
||||
typeof( SirPatrick ), typeof( Miasma ), typeof( Rend ),
|
||||
typeof( Grobu ), typeof( Gnaw ), typeof( Guile ),
|
||||
typeof( Irk ), typeof( Spite ), typeof( LadyLissith ),
|
||||
typeof( LadySabrix ), typeof( Malefic ), typeof( Silk ),
|
||||
typeof( Virulent )
|
||||
// TODO: Where to put Lurg, Putrefier, Swoop and Pyre? They seem slower.
|
||||
#endregion
|
||||
} ),
|
||||
/* Very Fast */
|
||||
new SpeedInfo( 0.175, 0.350, new Type[]
|
||||
{
|
||||
typeof( Barracoon ), typeof( Mephitis ), typeof( Neira ),
|
||||
typeof( Rikktor ), typeof( Semidar ), typeof( EnergyVortex ),
|
||||
typeof( EliteNinja ), typeof( Pixie ), typeof( SilverSerpent ),
|
||||
typeof( VorpalBunny ), typeof( FleshRenderer ), typeof( KhaldunRevenant ),
|
||||
typeof( FactionDragoon ), typeof( FactionKnight ), typeof( FactionPaladin ),
|
||||
typeof( FactionHenchman ), typeof( FactionMercenary ), typeof( FactionNecromancer ),
|
||||
typeof( FactionSorceress ), typeof( FactionWizard ), typeof( FactionBerserker ),
|
||||
typeof( FactionPaladin ), typeof( Leviathan ), typeof( FireBeetle ),
|
||||
typeof( FanDancer ), typeof( FactionDeathKnight )
|
||||
} ),
|
||||
/* Medium */
|
||||
new SpeedInfo( 0.25, 0.5, new Type[]
|
||||
{
|
||||
typeof( AcidElemental ), typeof( AgapiteElemental ), typeof( Alligator ),
|
||||
typeof( AncientLich ), typeof( Betrayer ), typeof( Bird ),
|
||||
typeof( BlackBear ), typeof( BlackSolenInfiltratorQueen ), typeof( BlackSolenInfiltratorWarrior ),
|
||||
typeof( BlackSolenQueen ), typeof( BlackSolenWarrior ), typeof( BlackSolenWorker ),
|
||||
typeof( BloodElemental ), typeof( Boar ), typeof( Bogling ),
|
||||
typeof( BoneMagi ), typeof( Brigand ), typeof( BronzeElemental ),
|
||||
typeof( BrownBear ), typeof( Bull ), typeof( BullFrog ),
|
||||
typeof( Cat ), typeof( Centaur ), typeof( ChaosDaemon ),
|
||||
typeof( Chicken ), typeof( GolemController ), typeof( CopperElemental ),
|
||||
typeof( CopperElemental ), typeof( Cougar ), typeof( Cow ),
|
||||
typeof( Cyclops ), typeof( Daemon ), typeof( DeepSeaSerpent ),
|
||||
typeof( DesertOstard ), typeof( DireWolf ), typeof( Dog ),
|
||||
typeof( Dolphin ), typeof( Dragon ), typeof( Drake ),
|
||||
typeof( DullCopperElemental ), typeof( Eagle ), typeof( ElderGazer ),
|
||||
typeof( EvilMage ), typeof( EvilMageLord ), typeof( Executioner ),
|
||||
typeof( Savage ), typeof( FireElemental ), typeof( FireGargoyle ),
|
||||
typeof( FireSteed ), typeof( ForestOstard ), typeof( FrenziedOstard ),
|
||||
typeof( FrostSpider ), typeof( Gargoyle ), typeof( Gazer ),
|
||||
typeof( IceSerpent ), typeof( GiantRat ), typeof( GiantSerpent ),
|
||||
typeof( GiantSpider ), typeof( GiantToad ), typeof( Goat ),
|
||||
typeof( GoldenElemental ), typeof( Gorilla ), typeof( GreatHart ),
|
||||
typeof( GreyWolf ), typeof( GrizzlyBear ), typeof( Guardian ),
|
||||
typeof( Harpy ), typeof( Harrower ), typeof( HellHound ),
|
||||
typeof( Hind ), typeof( HordeMinion ), typeof( Horse ),
|
||||
typeof( Horse ), typeof( IceElemental ), typeof( IceFiend ),
|
||||
typeof( IceSnake ), typeof( Imp ), typeof( JackRabbit ),
|
||||
typeof( Kirin ), typeof( Kraken ), typeof( PredatorHellCat ),
|
||||
typeof( LavaLizard ), typeof( LavaSerpent ), typeof( LavaSnake ),
|
||||
typeof( Lizardman ), typeof( Llama ), typeof( Mongbat ),
|
||||
typeof( StrongMongbat ), typeof( MountainGoat ), typeof( Orc ),
|
||||
typeof( OrcBomber ), typeof( OrcBrute ), typeof( OrcCaptain ),
|
||||
typeof( OrcishLord ), typeof( OrcishMage ), typeof( PackHorse ),
|
||||
typeof( PackLlama ), typeof( Panther ), typeof( Pig ),
|
||||
typeof( PlagueSpawn ), typeof( PolarBear ), typeof( Rabbit ),
|
||||
typeof( Ratman ), typeof( RatmanArcher ), typeof( RatmanMage ),
|
||||
typeof( RedSolenInfiltratorQueen ), typeof( RedSolenInfiltratorWarrior ), typeof( RedSolenQueen ),
|
||||
typeof( RedSolenWarrior ), typeof( RedSolenWorker ), typeof( RidableLlama ),
|
||||
typeof( Ridgeback ), typeof( Scorpion ), typeof( SeaSerpent ),
|
||||
typeof( SerpentineDragon ), typeof( Shade ), typeof( ShadowIronElemental ),
|
||||
typeof( ShadowWisp ), typeof( ShadowWyrm ), typeof( Sheep ),
|
||||
typeof( SilverSteed ), typeof( SkeletalDragon ), typeof( SkeletalMage ),
|
||||
typeof( SkeletalMount ), typeof( HellCat ), typeof( Snake ),
|
||||
typeof( SnowLeopard ), typeof( SpectralArmour ), typeof( Spectre ),
|
||||
typeof( StoneGargoyle ), typeof( StoneHarpy ), typeof( SwampDragon ),
|
||||
typeof( ScaledSwampDragon ), typeof( SwampTentacle ), typeof( TerathanAvenger ),
|
||||
typeof( TerathanDrone ), typeof( TerathanMatriarch ), typeof( TerathanWarrior ),
|
||||
typeof( TimberWolf ), typeof( Titan ), typeof( Troll ),
|
||||
typeof( Unicorn ), typeof( ValoriteElemental ), typeof( VeriteElemental ),
|
||||
typeof( CoMWarHorse ), typeof( MinaxWarHorse ), typeof( SLWarHorse ),
|
||||
typeof( TBWarHorse ), typeof( WaterElemental ), typeof( WhippingVine ),
|
||||
typeof( WhiteWolf ), typeof( Wraith ), typeof( Wyvern ),
|
||||
typeof( KhaldunZealot ), typeof( KhaldunSummoner ), typeof( SavageRidgeback ),
|
||||
typeof( LichLord ), typeof( SkeletalKnight ), typeof( SummonedDaemon ),
|
||||
typeof( SummonedEarthElemental ), typeof( SummonedWaterElemental ), typeof( SummonedFireElemental ),
|
||||
typeof( MeerWarrior ), typeof( MeerEternal ), typeof( MeerMage ),
|
||||
typeof( MeerCaptain ), typeof( JukaLord ), typeof( JukaMage ),
|
||||
typeof( JukaWarrior ), typeof( AbysmalHorror ), typeof( BoneDemon ),
|
||||
typeof( Devourer ), typeof( FleshGolem ), typeof( Gibberling ),
|
||||
typeof( GoreFiend ), typeof( Impaler ), typeof( PatchworkSkeleton ),
|
||||
typeof( Ravager ), typeof( ShadowKnight ), typeof( SkitteringHopper ),
|
||||
typeof( Treefellow ), typeof( VampireBat ), typeof( WailingBanshee ),
|
||||
typeof( WandererOfTheVoid ), typeof( Cursed ), typeof( GrimmochDrummel ),
|
||||
typeof( LysanderGathenwale ), typeof( MorgBergen ), typeof( ShadowFiend ),
|
||||
typeof( SpectralArmour ), typeof( TavaraSewel ), typeof( ArcaneDaemon ),
|
||||
typeof( Doppleganger ), typeof( EnslavedGargoyle ), typeof( ExodusMinion ),
|
||||
typeof( ExodusOverseer ), typeof( GargoyleDestroyer ), typeof( GargoyleEnforcer ),
|
||||
typeof( Moloch ), typeof( BakeKitsune ), typeof( DeathwatchBeetleHatchling ),
|
||||
typeof( Kappa ), typeof( KazeKemono ), typeof( DeathwatchBeetle ),
|
||||
typeof( TsukiWolf ), typeof( YomotsuElder ), typeof( YomotsuPriest ),
|
||||
typeof( YomotsuWarrior ), typeof( RevenantLion ), typeof( Oni ),
|
||||
typeof( Gaman ), typeof( Crane ), typeof( Beetle )
|
||||
} )
|
||||
};
|
||||
}
|
||||
}
|
||||
194
Scripts/Mobiles/AI/ThiefAI.cs
Normal file
194
Scripts/Mobiles/AI/ThiefAI.cs
Normal file
|
|
@ -0,0 +1,194 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class ThiefAI : BaseAI
|
||||
{
|
||||
public ThiefAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
private Item m_toDisarm;
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay( "I have no combatant" );
|
||||
|
||||
if ( AcquireFocusMob( m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionWander();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionCombat()
|
||||
{
|
||||
Mobile combatant = m_Mobile.Combatant;
|
||||
|
||||
if ( combatant == null || combatant.Deleted || combatant.Map != m_Mobile.Map )
|
||||
{
|
||||
m_Mobile.DebugSay( "My combatant is gone, so my guard is up" );
|
||||
|
||||
Action = ActionType.Guard;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( WalkMobileRange( combatant, 1, true, m_Mobile.RangeFight, m_Mobile.RangeFight ) )
|
||||
{
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( combatant );
|
||||
if ( m_toDisarm == null )
|
||||
m_toDisarm = combatant.FindItemOnLayer( Layer.OneHanded );
|
||||
|
||||
if ( m_toDisarm == null )
|
||||
m_toDisarm = combatant.FindItemOnLayer( Layer.TwoHanded );
|
||||
|
||||
if ( m_toDisarm != null && m_toDisarm.IsChildOf( m_Mobile.Backpack ) )
|
||||
{
|
||||
m_toDisarm = combatant.FindItemOnLayer( Layer.OneHanded );
|
||||
if ( m_toDisarm == null )
|
||||
m_toDisarm = combatant.FindItemOnLayer( Layer.TwoHanded );
|
||||
}
|
||||
if ( !Core.AOS && !m_Mobile.DisarmReady && m_Mobile.Skills[SkillName.Wrestling].Value >= 80.0 && m_Mobile.Skills[SkillName.ArmsLore].Value >= 80.0 && m_toDisarm != null )
|
||||
EventSink.InvokeDisarmRequest( new DisarmRequestEventArgs( m_Mobile ) );
|
||||
|
||||
if (m_toDisarm != null && m_toDisarm.IsChildOf(combatant.Backpack) && Core.TickCount - m_Mobile.NextSkillTime >= 0 && (m_toDisarm.LootType != LootType.Blessed && m_toDisarm.LootType != LootType.Newbied))
|
||||
{
|
||||
m_Mobile.DebugSay( "Trying to steal from combatant." );
|
||||
m_Mobile.UseSkill( SkillName.Stealing );
|
||||
if ( m_Mobile.Target != null )
|
||||
m_Mobile.Target.Invoke( m_Mobile, m_toDisarm );
|
||||
}
|
||||
else if (m_toDisarm == null && Core.TickCount - m_Mobile.NextSkillTime >= 0)
|
||||
{
|
||||
Container cpack = combatant.Backpack;
|
||||
|
||||
if ( cpack != null )
|
||||
{
|
||||
Item steala = cpack.FindItemByType( typeof ( Bandage ) );
|
||||
if ( steala != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "Trying to steal from combatant." );
|
||||
m_Mobile.UseSkill( SkillName.Stealing );
|
||||
if ( m_Mobile.Target != null )
|
||||
m_Mobile.Target.Invoke( m_Mobile, steala );
|
||||
}
|
||||
Item stealb = cpack.FindItemByType( typeof ( Nightshade ) );
|
||||
if ( stealb != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "Trying to steal from combatant." );
|
||||
m_Mobile.UseSkill( SkillName.Stealing );
|
||||
if ( m_Mobile.Target != null )
|
||||
m_Mobile.Target.Invoke( m_Mobile, stealb );
|
||||
}
|
||||
Item stealc = cpack.FindItemByType( typeof ( BlackPearl ) );
|
||||
if ( stealc != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "Trying to steal from combatant." );
|
||||
m_Mobile.UseSkill( SkillName.Stealing );
|
||||
if ( m_Mobile.Target != null )
|
||||
m_Mobile.Target.Invoke( m_Mobile, stealc );
|
||||
}
|
||||
|
||||
Item steald = cpack.FindItemByType( typeof ( MandrakeRoot ) );
|
||||
if ( steald != null )
|
||||
{
|
||||
m_Mobile.DebugSay( "Trying to steal from combatant." );
|
||||
m_Mobile.UseSkill( SkillName.Stealing );
|
||||
if ( m_Mobile.Target != null )
|
||||
m_Mobile.Target.Invoke( m_Mobile, steald );
|
||||
}
|
||||
else if ( steala == null && stealb == null && stealc == null && steald == null )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am going to flee from {0}", combatant.Name );
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.DebugSay( "I should be closer to {0}", combatant.Name );
|
||||
}
|
||||
|
||||
if ( m_Mobile.Hits < m_Mobile.HitsMax * 20/100 && m_Mobile.CanFlee )
|
||||
{
|
||||
// We are low on health, should we flee?
|
||||
|
||||
bool flee = false;
|
||||
|
||||
if ( m_Mobile.Hits < combatant.Hits )
|
||||
{
|
||||
// We are more hurt than them
|
||||
|
||||
int diff = combatant.Hits - m_Mobile.Hits;
|
||||
|
||||
flee = ( Utility.Random( 0, 100 ) > (10 + diff) ); // (10 + diff)% chance to flee
|
||||
}
|
||||
else
|
||||
{
|
||||
flee = Utility.Random( 0, 100 ) > 10; // 10% chance to flee
|
||||
}
|
||||
|
||||
if ( flee )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am going to flee from {0}", combatant.Name );
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
if ( AcquireFocusMob(m_Mobile.RangePerception, m_Mobile.FightMode, false, false, true ) )
|
||||
{
|
||||
m_Mobile.DebugSay( "I have detected {0}, attacking", m_Mobile.FocusMob.Name );
|
||||
|
||||
m_Mobile.Combatant = m_Mobile.FocusMob;
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
base.DoActionGuard();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionFlee()
|
||||
{
|
||||
if ( m_Mobile.Hits > m_Mobile.HitsMax/2 )
|
||||
{
|
||||
m_Mobile.DebugSay( "I am stronger now, so I will continue fighting" );
|
||||
Action = ActionType.Combat;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
base.DoActionFlee();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
155
Scripts/Mobiles/AI/VendorAI.cs
Normal file
155
Scripts/Mobiles/AI/VendorAI.cs
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
|
||||
//
|
||||
// This is a first simple AI
|
||||
//
|
||||
//
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class VendorAI : BaseAI
|
||||
{
|
||||
public VendorAI(BaseCreature m) : base (m)
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DoActionWander()
|
||||
{
|
||||
m_Mobile.DebugSay( "I'm fine" );
|
||||
|
||||
if ( m_Mobile.Combatant != null )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} is attacking me", m_Mobile.Combatant.Name );
|
||||
|
||||
m_Mobile.Say( Utility.RandomList( 1005305, 501603 ) );
|
||||
|
||||
Action = ActionType.Flee;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.FocusMob != null )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} has talked to me", m_Mobile.FocusMob.Name );
|
||||
|
||||
Action = ActionType.Interact;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Mobile.Warmode = false;
|
||||
|
||||
base.DoActionWander();
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionInteract()
|
||||
{
|
||||
Mobile customer = m_Mobile.FocusMob;
|
||||
|
||||
if ( m_Mobile.Combatant != null )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} is attacking me", m_Mobile.Combatant.Name );
|
||||
|
||||
m_Mobile.Say( Utility.RandomList( 1005305, 501603 ) );
|
||||
|
||||
Action = ActionType.Flee;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if ( customer == null || customer.Deleted || customer.Map != m_Mobile.Map )
|
||||
{
|
||||
m_Mobile.DebugSay( "My customer have disapeared" );
|
||||
m_Mobile.FocusMob = null;
|
||||
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( customer.InRange( m_Mobile, m_Mobile.RangeFight ) )
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "I am with {0}", customer.Name );
|
||||
|
||||
m_Mobile.Direction = m_Mobile.GetDirectionTo( customer );
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( m_Mobile.Debug )
|
||||
m_Mobile.DebugSay( "{0} is gone", customer.Name );
|
||||
|
||||
m_Mobile.FocusMob = null;
|
||||
|
||||
Action = ActionType.Wander;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool DoActionGuard()
|
||||
{
|
||||
m_Mobile.FocusMob = m_Mobile.Combatant;
|
||||
return base.DoActionGuard();
|
||||
}
|
||||
|
||||
public override bool HandlesOnSpeech( Mobile from )
|
||||
{
|
||||
if ( from.InRange( m_Mobile, 4 ) )
|
||||
return true;
|
||||
|
||||
return base.HandlesOnSpeech( from );
|
||||
}
|
||||
|
||||
// Temporary
|
||||
public override void OnSpeech( SpeechEventArgs e )
|
||||
{
|
||||
base.OnSpeech( e );
|
||||
|
||||
Mobile from = e.Mobile;
|
||||
|
||||
if ( m_Mobile is BaseVendor && from.InRange( m_Mobile, Core.AOS ? 1 : 4 ) && !e.Handled )
|
||||
{
|
||||
if ( e.HasKeyword( 0x14D ) ) // *vendor sell*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
((BaseVendor)m_Mobile).VendorSell( from );
|
||||
m_Mobile.FocusMob = from;
|
||||
}
|
||||
else if ( e.HasKeyword( 0x3C ) ) // *vendor buy*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
((BaseVendor)m_Mobile).VendorBuy( from );
|
||||
m_Mobile.FocusMob = from;
|
||||
}
|
||||
else if ( WasNamed( e.Speech ) )
|
||||
{
|
||||
if ( e.HasKeyword( 0x177 ) ) // *sell*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
((BaseVendor)m_Mobile).VendorSell( from );
|
||||
}
|
||||
else if ( e.HasKeyword( 0x171 ) ) // *buy*
|
||||
{
|
||||
e.Handled = true;
|
||||
|
||||
((BaseVendor)m_Mobile).VendorBuy( from );
|
||||
}
|
||||
|
||||
m_Mobile.FocusMob = from;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Scripts/Mobiles/Animals/Bears/BlackBear.cs
Normal file
69
Scripts/Mobiles/Animals/Bears/BlackBear.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bear corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Bear" )]
|
||||
public class BlackBear : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public BlackBear() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a black bear";
|
||||
Body = 211;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr( 76, 100 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 11, 14 );
|
||||
|
||||
SetHits( 46, 60 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 20.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Bear; } }
|
||||
|
||||
public BlackBear( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Mobiles/Animals/Bears/BrownBear.cs
Normal file
68
Scripts/Mobiles/Animals/Bears/BrownBear.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bear corpse" )]
|
||||
public class BrownBear : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public BrownBear() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a brown bear";
|
||||
Body = 167;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr( 76, 100 );
|
||||
SetDex( 26, 45 );
|
||||
SetInt( 23, 47 );
|
||||
|
||||
SetHits( 46, 60 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 6, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 30 );
|
||||
SetResistance( ResistanceType.Cold, 15, 20 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 35.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 41.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Bear; } }
|
||||
|
||||
public BrownBear( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Bears/GrizzlyBear.cs
Normal file
70
Scripts/Mobiles/Animals/Bears/GrizzlyBear.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a grizzly bear corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Grizzlybear" )]
|
||||
public class GrizzlyBear : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GrizzlyBear() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a grizzly bear";
|
||||
Body = 212;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr( 126, 155 );
|
||||
SetDex( 81, 105 );
|
||||
SetInt( 16, 40 );
|
||||
|
||||
SetHits( 76, 93 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 8, 13 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Cold, 15, 25 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 70.1, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 70.0 );
|
||||
|
||||
Fame = 1000;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 2; } }
|
||||
public override int Hides{ get{ return 16; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Bear; } }
|
||||
|
||||
public GrizzlyBear( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Bears/PolarBear.cs
Normal file
70
Scripts/Mobiles/Animals/Bears/PolarBear.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a polar bear corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Polarbear" )]
|
||||
public class PolarBear : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public PolarBear() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a polar bear";
|
||||
Body = 213;
|
||||
BaseSoundID = 0xA3;
|
||||
|
||||
SetStr( 116, 140 );
|
||||
SetDex( 81, 105 );
|
||||
SetInt( 26, 50 );
|
||||
|
||||
SetHits( 70, 84 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 7, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Cold, 60, 80 );
|
||||
SetResistance( ResistanceType.Poison, 15, 25 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Tactics, 60.1, 90.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 70.0 );
|
||||
|
||||
Fame = 1500;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 2; } }
|
||||
public override int Hides{ get{ return 16; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.FruitsAndVegies | FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Bear; } }
|
||||
|
||||
public PolarBear( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Mobiles/Animals/Birds/Chicken.cs
Normal file
68
Scripts/Mobiles/Animals/Birds/Chicken.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a chicken corpse" )]
|
||||
public class Chicken : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Chicken() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a chicken";
|
||||
Body = 0xD0;
|
||||
BaseSoundID = 0x6E;
|
||||
|
||||
SetStr( 5 );
|
||||
SetDex( 15 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 3 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 1, 5 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 4.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 2;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override MeatType MeatType{ get{ return MeatType.Bird; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.GrainsAndHay; } }
|
||||
public override bool CanFly { get { return true; } }
|
||||
|
||||
public override int Feathers{ get{ return 25; } }
|
||||
|
||||
public Chicken(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Mobiles/Animals/Birds/Crane.cs
Normal file
86
Scripts/Mobiles/Animals/Birds/Crane.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a crane corpse" )]
|
||||
public class Crane : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Crane() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a crane";
|
||||
Body = 254;
|
||||
BaseSoundID = 0x4D7;
|
||||
|
||||
SetStr( 26, 35 );
|
||||
SetDex( 16, 25 );
|
||||
SetInt( 11, 15 );
|
||||
|
||||
SetHits( 26, 35 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 1 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 5 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 4.1, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 10.1, 11.0 );
|
||||
SetSkill( SkillName.Wrestling, 10.1, 11.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 5;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Feathers{ get{ return 25; } }
|
||||
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4D9;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4D8;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4D7;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4DA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4D6;
|
||||
}
|
||||
|
||||
public Crane(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Birds/Eagle.cs
Normal file
72
Scripts/Mobiles/Animals/Birds/Eagle.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an eagle corpse" )]
|
||||
public class Eagle : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Eagle() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "an eagle";
|
||||
Body = 5;
|
||||
BaseSoundID = 0x2EE;
|
||||
|
||||
SetStr( 31, 47 );
|
||||
SetDex( 36, 60 );
|
||||
SetInt( 8, 20 );
|
||||
|
||||
SetHits( 20, 27 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 20, 25 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.3, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 18.1, 37.0 );
|
||||
SetSkill( SkillName.Wrestling, 20.1, 30.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 22;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 17.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override MeatType MeatType{ get{ return MeatType.Bird; } }
|
||||
public override int Feathers{ get{ return 36; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish; } }
|
||||
public override bool CanFly { get { return true; } }
|
||||
|
||||
public Eagle(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Mobiles/Animals/Birds/Phoenix.cs
Normal file
74
Scripts/Mobiles/Animals/Birds/Phoenix.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a phoenix corpse" )]
|
||||
public class Phoenix : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Phoenix() : base( AIType.AI_Mage, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a phoenix";
|
||||
Body = 5;
|
||||
Hue = 0x674;
|
||||
BaseSoundID = 0x8F;
|
||||
|
||||
SetStr( 504, 700 );
|
||||
SetDex( 202, 300 );
|
||||
SetInt( 504, 700 );
|
||||
|
||||
SetHits( 340, 383 );
|
||||
|
||||
SetDamage( 25 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Fire, 50 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 55 );
|
||||
SetResistance( ResistanceType.Fire, 60, 70 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 90.2, 100.0 );
|
||||
SetSkill( SkillName.Magery, 90.2, 100.0 );
|
||||
SetSkill( SkillName.Meditation, 75.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 86.0, 135.0 );
|
||||
SetSkill( SkillName.Tactics, 80.1, 90.0 );
|
||||
SetSkill( SkillName.Wrestling, 90.1, 100.0 );
|
||||
|
||||
Fame = 15000;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 60;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich );
|
||||
AddLoot( LootPack.Rich );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override MeatType MeatType{ get{ return MeatType.Bird; } }
|
||||
public override int Feathers{ get{ return 36; } }
|
||||
public override bool CanFly { get { return true; } }
|
||||
|
||||
public Phoenix( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Canines/DireWolf.cs
Normal file
72
Scripts/Mobiles/Animals/Canines/DireWolf.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a dire wolf corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Direwolf" )]
|
||||
public class DireWolf : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public DireWolf() : base( AIType.AI_Melee,FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a dire wolf";
|
||||
Body = 23;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr( 96, 120 );
|
||||
SetDex( 81, 105 );
|
||||
SetInt( 36, 60 );
|
||||
|
||||
SetHits( 58, 72 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 11, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 10, 20 );
|
||||
SetResistance( ResistanceType.Cold, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 57.6, 75.0 );
|
||||
SetSkill( SkillName.Tactics, 50.1, 70.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 22;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 7; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Canine; } }
|
||||
|
||||
public DireWolf(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Canines/GreyWolf.cs
Normal file
71
Scripts/Mobiles/Animals/Canines/GreyWolf.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a grey wolf corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Greywolf" )]
|
||||
public class GreyWolf : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GreyWolf() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a grey wolf";
|
||||
Body = Utility.RandomList( 25, 27 );
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr( 56, 80 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 31, 55 );
|
||||
|
||||
SetHits( 34, 48 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 7 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 20, 25 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 20.1, 35.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 6; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Canine; } }
|
||||
|
||||
public GreyWolf(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Canines/TimberWolf.cs
Normal file
71
Scripts/Mobiles/Animals/Canines/TimberWolf.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a timber wolf corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Timberwolf" )]
|
||||
public class TimberWolf : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public TimberWolf() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a timber wolf";
|
||||
Body = 225;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr( 56, 80 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 11, 25 );
|
||||
|
||||
SetHits( 34, 48 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 9 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 27.6, 45.0 );
|
||||
SetSkill( SkillName.Tactics, 30.1, 50.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 5; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Canine; } }
|
||||
|
||||
public TimberWolf(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Canines/WhiteWolf.cs
Normal file
71
Scripts/Mobiles/Animals/Canines/WhiteWolf.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a white wolf corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Whitewolf" )]
|
||||
public class WhiteWolf : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public WhiteWolf() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a white wolf";
|
||||
Body = Utility.RandomList( 34, 37 );
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr( 56, 80 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 31, 55 );
|
||||
|
||||
SetHits( 34, 48 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 7 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 20, 25 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 20.1, 35.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 65.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 6; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Canine; } }
|
||||
|
||||
public WhiteWolf( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
70
Scripts/Mobiles/Animals/Cows/Bull.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bull corpse" )]
|
||||
public class Bull : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Bull() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a bull";
|
||||
Body = Utility.RandomList( 0xE8, 0xE9 );
|
||||
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 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 30 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 17.6, 25.0 );
|
||||
SetSkill( SkillName.Tactics, 67.6, 85.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 57.5 );
|
||||
|
||||
Fame = 600;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 28;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 71.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 10; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.GrainsAndHay; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Bull; } }
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
139
Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
139
Scripts/Mobiles/Animals/Cows/Cow.cs
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
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_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a cow";
|
||||
Body = Utility.RandomList( 0xD8, 0xE7 );
|
||||
BaseSoundID = 0x78;
|
||||
|
||||
SetStr( 30 );
|
||||
SetDex( 15 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 18 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.5 );
|
||||
SetSkill( SkillName.Tactics, 5.5 );
|
||||
SetSkill( SkillName.Wrestling, 5.5 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
if ( Core.AOS && Utility.Random( 1000 ) == 0 ) // 0.1% chance to have mad cows
|
||||
FightMode = FightMode.Closest;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 8; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
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.UtcNow )
|
||||
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.UtcNow;
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Scripts/Mobiles/Animals/Felines/Cougar.cs
Normal file
69
Scripts/Mobiles/Animals/Felines/Cougar.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a cougar corpse" )]
|
||||
public class Cougar : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Cougar() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a cougar";
|
||||
Body = 63;
|
||||
BaseSoundID = 0x73;
|
||||
|
||||
SetStr( 56, 80 );
|
||||
SetDex( 66, 85 );
|
||||
SetInt( 26, 50 );
|
||||
|
||||
SetHits( 34, 48 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 60.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 41.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public Cougar(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
77
Scripts/Mobiles/Animals/Felines/HellCat.cs
Normal file
77
Scripts/Mobiles/Animals/Felines/HellCat.cs
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hell cat corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Hellcat" )]
|
||||
public class HellCat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public HellCat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a hell cat";
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomList( 0x647, 0x650, 0x659, 0x662, 0x66B, 0x674);
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr( 51, 100 );
|
||||
SetDex( 52, 150 );
|
||||
SetInt( 13, 85 );
|
||||
|
||||
SetHits( 48, 67 );
|
||||
|
||||
SetDamage( 6, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 40 );
|
||||
SetDamageType( ResistanceType.Fire, 60 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Fire, 80, 90 );
|
||||
SetResistance( ResistanceType.Energy, 15, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 55.0 );
|
||||
SetSkill( SkillName.Wrestling, 30.1, 40.0 );
|
||||
|
||||
Fame = 1000;
|
||||
Karma = -1000;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 71.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public HellCat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Felines/Panther.cs
Normal file
70
Scripts/Mobiles/Animals/Felines/Panther.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a panther corpse" )]
|
||||
public class Panther : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Panther() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a panther";
|
||||
Body = 0xD6;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 0x462;
|
||||
|
||||
SetStr( 61, 85 );
|
||||
SetDex( 86, 105 );
|
||||
SetInt( 26, 50 );
|
||||
|
||||
SetHits( 37, 51 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 50.1, 65.0 );
|
||||
SetSkill( SkillName.Wrestling, 50.1, 65.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public Panther(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Scripts/Mobiles/Animals/Felines/PredatorHellCat.cs
Normal file
75
Scripts/Mobiles/Animals/Felines/PredatorHellCat.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hell cat corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Preditorhellcat" )]
|
||||
public class PredatorHellCat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public PredatorHellCat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a hell cat";
|
||||
Body = 127;
|
||||
BaseSoundID = 0xBA;
|
||||
|
||||
SetStr( 161, 185 );
|
||||
SetDex( 96, 115 );
|
||||
SetInt( 76, 100 );
|
||||
|
||||
SetHits( 97, 131 );
|
||||
|
||||
SetDamage( 5, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Fire, 25 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 5, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 75.1, 90.0 );
|
||||
SetSkill( SkillName.Tactics, 50.1, 65.0 );
|
||||
SetSkill( SkillName.Wrestling, 50.1, 65.0 );
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 89.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Average );
|
||||
}
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public PredatorHellCat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Felines/SnowLeopard.cs
Normal file
71
Scripts/Mobiles/Animals/Felines/SnowLeopard.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a leopard corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Snowleopard" )]
|
||||
public class SnowLeopard : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public SnowLeopard() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a snow leopard";
|
||||
Body = Utility.RandomList( 64, 65 );
|
||||
BaseSoundID = 0x73;
|
||||
|
||||
SetStr( 56, 80 );
|
||||
SetDex( 66, 85 );
|
||||
SetInt( 26, 50 );
|
||||
|
||||
SetHits( 34, 48 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 9 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 10, 20 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 35.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 50.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 53.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 8; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public SnowLeopard(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Mobiles/Animals/Misc/Boar.cs
Normal file
66
Scripts/Mobiles/Animals/Misc/Boar.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a pig corpse" )]
|
||||
public class Boar : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Boar() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a boar";
|
||||
Body = 0x122;
|
||||
BaseSoundID = 0xC4;
|
||||
|
||||
SetStr( 25 );
|
||||
SetDex( 15 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 15 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 6 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 9.0 );
|
||||
SetSkill( SkillName.Tactics, 9.0 );
|
||||
SetSkill( SkillName.Wrestling, 9.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 2; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Boar(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Misc/BullFrog.cs
Normal file
72
Scripts/Mobiles/Animals/Misc/BullFrog.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bull frog corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Bullfrog" )]
|
||||
public class BullFrog : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public BullFrog() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a bull frog";
|
||||
Body = 81;
|
||||
Hue = Utility.RandomList( 0x5AC,0x5A3,0x59A,0x591,0x588,0x57F );
|
||||
BaseSoundID = 0x266;
|
||||
|
||||
SetStr( 46, 70 );
|
||||
SetDex( 6, 25 );
|
||||
SetInt( 11, 20 );
|
||||
|
||||
SetHits( 28, 42 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 2 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 350;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 4; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat; } }
|
||||
|
||||
public BullFrog(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
88
Scripts/Mobiles/Animals/Misc/Dolphin.cs
Normal file
88
Scripts/Mobiles/Animals/Misc/Dolphin.cs
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a dolphin corpse" )]
|
||||
public class Dolphin : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Dolphin()
|
||||
: base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a dolphin";
|
||||
Body = 0x97;
|
||||
BaseSoundID = 0x8A;
|
||||
|
||||
SetStr( 21, 49 );
|
||||
SetDex( 66, 85 );
|
||||
SetInt( 96, 110 );
|
||||
|
||||
SetHits( 15, 27 );
|
||||
|
||||
SetDamage( 3, 6 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 70, 80 );
|
||||
SetResistance( ResistanceType.Cold, 25, 30 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 29.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 29.0 );
|
||||
|
||||
Fame = 500;
|
||||
Karma = 2000;
|
||||
|
||||
VirtualArmor = 16;
|
||||
CanSwim = true;
|
||||
CantWalk = true;
|
||||
}
|
||||
|
||||
public override int Meat { get { return 1; } }
|
||||
|
||||
public Dolphin( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if( from.AccessLevel >= AccessLevel.GameMaster )
|
||||
Jump();
|
||||
}
|
||||
|
||||
public virtual void Jump()
|
||||
{
|
||||
if( Utility.RandomBool() )
|
||||
Animate( 3, 16, 1, true, false, 0 );
|
||||
else
|
||||
Animate( 4, 20, 1, true, false, 0 );
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
if( Utility.RandomDouble() < .005 ) // slim chance to jump
|
||||
Jump();
|
||||
|
||||
base.OnThink();
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
96
Scripts/Mobiles/Animals/Misc/Gaman.cs
Normal file
96
Scripts/Mobiles/Animals/Misc/Gaman.cs
Normal file
|
|
@ -0,0 +1,96 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a gaman corpse" )]
|
||||
public class Gaman : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Gaman() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a gaman";
|
||||
Body = 248;
|
||||
|
||||
SetStr( 146, 175 );
|
||||
SetDex( 111, 150 );
|
||||
SetInt( 46, 60 );
|
||||
|
||||
SetHits( 131, 160 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 6, 11 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 50, 70 );
|
||||
SetResistance( ResistanceType.Fire, 30, 50 );
|
||||
SetResistance( ResistanceType.Cold, 30, 50 );
|
||||
SetResistance( ResistanceType.Poison, 40, 60 );
|
||||
SetResistance( ResistanceType.Energy, 30, 50 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 37.6, 42.5 );
|
||||
SetSkill( SkillName.Tactics, 70.6, 83.0 );
|
||||
SetSkill( SkillName.Wrestling, 50.1, 57.5 );
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 68.7;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4F8;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4F7;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4F6;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4F9;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4F5;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 10; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.GrainsAndHay; } }
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
c.DropItem( new GamanHorns( Utility.RandomBool() ? 1 : 2 ) );
|
||||
}
|
||||
|
||||
public Gaman( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Scripts/Mobiles/Animals/Misc/GiantToad.cs
Normal file
78
Scripts/Mobiles/Animals/Misc/GiantToad.cs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a giant toad corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Gianttoad" )]
|
||||
public class GiantToad : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GiantToad() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a giant toad";
|
||||
Body = 80;
|
||||
BaseSoundID = 0x26B;
|
||||
|
||||
SetStr( 76, 100 );
|
||||
SetDex( 6, 25 );
|
||||
SetInt( 11, 20 );
|
||||
|
||||
SetHits( 46, 60 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 750;
|
||||
Karma = -750;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 77.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat; } }
|
||||
|
||||
public GiantToad(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int) 1);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
if ( version < 1 )
|
||||
{
|
||||
AI = AIType.AI_Melee;
|
||||
FightMode = FightMode.Closest;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Mobiles/Animals/Misc/Goat.cs
Normal file
65
Scripts/Mobiles/Animals/Misc/Goat.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a goat corpse" )]
|
||||
public class Goat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Goat() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a goat";
|
||||
Body = 0xD1;
|
||||
BaseSoundID = 0x99;
|
||||
|
||||
SetStr( 19 );
|
||||
SetDex( 15 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 12 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 2; } }
|
||||
public override int Hides{ get{ return 8; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.GrainsAndHay | FoodType.FruitsAndVegies; } }
|
||||
|
||||
public Goat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Scripts/Mobiles/Animals/Misc/Gorilla.cs
Normal file
67
Scripts/Mobiles/Animals/Misc/Gorilla.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a gorilla corpse" )]
|
||||
public class Gorilla : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Gorilla() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a gorilla";
|
||||
Body = 0x1D;
|
||||
BaseSoundID = 0x9E;
|
||||
|
||||
SetStr( 53, 95 );
|
||||
SetDex( 36, 55 );
|
||||
SetInt( 36, 60 );
|
||||
|
||||
SetHits( 38, 51 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 45.1, 60.0 );
|
||||
SetSkill( SkillName.Tactics, 43.3, 58.0 );
|
||||
SetSkill( SkillName.Wrestling, 43.3, 58.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 20;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 6; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Gorilla(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Mobiles/Animals/Misc/GreatHart.cs
Normal file
81
Scripts/Mobiles/Animals/Misc/GreatHart.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a deer corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Greathart" )]
|
||||
public class GreatHart : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GreatHart() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a great hart";
|
||||
Body = 0xEA;
|
||||
|
||||
SetStr( 41, 71 );
|
||||
SetDex( 47, 77 );
|
||||
SetInt( 27, 57 );
|
||||
|
||||
SetHits( 27, 41 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 9 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Cold, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 26.8, 44.5 );
|
||||
SetSkill( SkillName.Tactics, 29.8, 47.5 );
|
||||
SetSkill( SkillName.Wrestling, 29.8, 47.5 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 6; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public GreatHart(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
80
Scripts/Mobiles/Animals/Misc/Hind.cs
Normal file
80
Scripts/Mobiles/Animals/Misc/Hind.cs
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a deer corpse" )]
|
||||
public class Hind : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Hind() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a hind";
|
||||
Body = 0xED;
|
||||
|
||||
SetStr( 21, 51 );
|
||||
SetDex( 47, 77 );
|
||||
SetInt( 17, 47 );
|
||||
|
||||
SetHits( 15, 29 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 15 );
|
||||
SetResistance( ResistanceType.Cold, 5 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.0 );
|
||||
SetSkill( SkillName.Tactics, 19.0 );
|
||||
SetSkill( SkillName.Wrestling, 26.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 23.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 5; } }
|
||||
public override int Hides{ get{ return 8; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Hind(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x82;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x83;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x84;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Mobiles/Animals/Misc/Llama.cs
Normal file
65
Scripts/Mobiles/Animals/Misc/Llama.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a llama corpse" )]
|
||||
public class Llama : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Llama() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a llama";
|
||||
Body = 0xDC;
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr( 21, 49 );
|
||||
SetDex( 36, 55 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 15, 27 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 5 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 29.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 29.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Llama(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Scripts/Mobiles/Animals/Misc/MountainGoat.cs
Normal file
69
Scripts/Mobiles/Animals/Misc/MountainGoat.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a mountain goat corpse" )]
|
||||
public class MountainGoat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public MountainGoat() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a mountain goat";
|
||||
Body = 88;
|
||||
BaseSoundID = 0x99;
|
||||
|
||||
SetStr( 22, 64 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 20, 33 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 7 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 20 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 20 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 10;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 2; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.GrainsAndHay | FoodType.FruitsAndVegies; } }
|
||||
|
||||
public MountainGoat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
222
Scripts/Mobiles/Animals/Misc/PackHorse.cs
Normal file
222
Scripts/Mobiles/Animals/Misc/PackHorse.cs
Normal file
|
|
@ -0,0 +1,222 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a horse corpse" )]
|
||||
public class PackHorse : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public PackHorse() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a pack horse";
|
||||
Body = 291;
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr( 44, 120 );
|
||||
SetDex( 36, 55 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 61, 80 );
|
||||
SetStam( 81, 100 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 11 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 20, 25 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
pack.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public PackHorse( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if ( !base.OnBeforeDeath() )
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks( this );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor( Item item )
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop( Mobile from )
|
||||
{
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
return false;
|
||||
|
||||
return base.IsSnoop( from );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item item )
|
||||
{
|
||||
if ( CheckFeed( from, item ) )
|
||||
return true;
|
||||
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
{
|
||||
AddToBackpack( item );
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, item );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift( Mobile from, Item item )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PackAnimal.TryPackOpen( this, from );
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
PackAnimal.GetContextMenuEntries( this, from, list );
|
||||
}
|
||||
#endregion
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
public class PackAnimalBackpackEntry : ContextMenuEntry
|
||||
{
|
||||
private BaseCreature m_Animal;
|
||||
private Mobile m_From;
|
||||
|
||||
public PackAnimalBackpackEntry( BaseCreature animal, Mobile from ) : base( 6145, 3 )
|
||||
{
|
||||
m_Animal = animal;
|
||||
m_From = from;
|
||||
|
||||
if ( animal.IsDeadPet )
|
||||
Enabled = false;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
PackAnimal.TryPackOpen( m_Animal, m_From );
|
||||
}
|
||||
}
|
||||
|
||||
public class PackAnimal
|
||||
{
|
||||
public static void GetContextMenuEntries( BaseCreature animal, Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
if ( CheckAccess( animal, from ) )
|
||||
list.Add( new PackAnimalBackpackEntry( animal, from ) );
|
||||
}
|
||||
|
||||
public static bool CheckAccess( BaseCreature animal, Mobile from )
|
||||
{
|
||||
if ( from == animal || from.AccessLevel >= AccessLevel.GameMaster )
|
||||
return true;
|
||||
|
||||
if ( from.Alive && animal.Controlled && !animal.IsDeadPet && ( from == animal.ControlMaster || from == animal.SummonMaster || animal.IsPetFriend( from ) ) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void CombineBackpacks( BaseCreature animal )
|
||||
{
|
||||
if ( Core.AOS )
|
||||
return;
|
||||
|
||||
if ( animal.IsBonded || animal.IsDeadPet )
|
||||
return;
|
||||
|
||||
Container pack = animal.Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
{
|
||||
Container newPack = new Backpack();
|
||||
|
||||
for ( int i = pack.Items.Count - 1; i >= 0; --i )
|
||||
{
|
||||
if ( i >= pack.Items.Count )
|
||||
continue;
|
||||
|
||||
newPack.DropItem( pack.Items[i] );
|
||||
}
|
||||
|
||||
pack.DropItem( newPack );
|
||||
}
|
||||
}
|
||||
|
||||
public static void TryPackOpen( BaseCreature animal, Mobile from )
|
||||
{
|
||||
if ( animal.IsDeadPet )
|
||||
return;
|
||||
|
||||
Container item = animal.Backpack;
|
||||
|
||||
if ( item != null )
|
||||
from.Use( item );
|
||||
}
|
||||
}
|
||||
}
|
||||
143
Scripts/Mobiles/Animals/Misc/PackLlama.cs
Normal file
143
Scripts/Mobiles/Animals/Misc/PackLlama.cs
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a llama corpse")]
|
||||
public class PackLlama : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public PackLlama() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a pack llama";
|
||||
Body = 292;
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr( 52, 80 );
|
||||
SetDex( 36, 55 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 50 );
|
||||
SetStam( 86, 105 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 2, 6 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 29.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 29.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 200;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
pack.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public PackLlama( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if ( !base.OnBeforeDeath() )
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks( this );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor( Item item )
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop( Mobile from )
|
||||
{
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
return false;
|
||||
|
||||
return base.IsSnoop( from );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item item )
|
||||
{
|
||||
if ( CheckFeed( from, item ) )
|
||||
return true;
|
||||
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
{
|
||||
AddToBackpack( item );
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, item );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift( Mobile from, Item item )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PackAnimal.TryPackOpen( this, from );
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
PackAnimal.GetContextMenuEntries( this, from, list );
|
||||
}
|
||||
#endregion
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
64
Scripts/Mobiles/Animals/Misc/Pig.cs
Normal file
64
Scripts/Mobiles/Animals/Misc/Pig.cs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a pig corpse" )]
|
||||
public class Pig : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Pig() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a pig";
|
||||
Body = 0xCB;
|
||||
BaseSoundID = 0xC4;
|
||||
|
||||
SetStr( 20 );
|
||||
SetDex( 20 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 12 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 2, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 12;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Pig(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
111
Scripts/Mobiles/Animals/Misc/Sheep.cs
Normal file
111
Scripts/Mobiles/Animals/Misc/Sheep.cs
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a sheep corpse" )]
|
||||
public class Sheep : BaseCreature, ICarvable
|
||||
{
|
||||
private DateTime m_NextWoolTime;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime NextWoolTime
|
||||
{
|
||||
get{ return m_NextWoolTime; }
|
||||
set{ m_NextWoolTime = value; Body = ( DateTime.UtcNow >= m_NextWoolTime ) ? 0xCF : 0xDF; }
|
||||
}
|
||||
|
||||
public void Carve( Mobile from, Item item )
|
||||
{
|
||||
if ( DateTime.UtcNow < m_NextWoolTime )
|
||||
{
|
||||
// This sheep is not yet ready to be shorn.
|
||||
PrivateOverheadMessage( MessageType.Regular, 0x3B2, 500449, from.NetState );
|
||||
return;
|
||||
}
|
||||
|
||||
from.SendLocalizedMessage( 500452 ); // You place the gathered wool into your backpack.
|
||||
from.AddToBackpack( new Wool( Map == Map.Felucca ? 2 : 1 ) );
|
||||
|
||||
NextWoolTime = DateTime.UtcNow + TimeSpan.FromHours( 3.0 ); // TODO: Proper time delay
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
Body = ( DateTime.UtcNow >= m_NextWoolTime ) ? 0xCF : 0xDF;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Sheep() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a sheep";
|
||||
Body = 0xCF;
|
||||
BaseSoundID = 0xD6;
|
||||
|
||||
SetStr( 19 );
|
||||
SetDex( 25 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 12 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 2 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 6.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 11.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override MeatType MeatType{ get{ return MeatType.LambLeg; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public override int Wool{ get{ return (Body == 0xCF ? 3 : 0); } }
|
||||
|
||||
public Sheep( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 );
|
||||
|
||||
writer.WriteDeltaTime( m_NextWoolTime );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
NextWoolTime = reader.ReadDeltaTime();
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
69
Scripts/Mobiles/Animals/Misc/Walrus.cs
Normal file
69
Scripts/Mobiles/Animals/Misc/Walrus.cs
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a walrus corpse" )]
|
||||
public class Walrus : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Walrus() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a walrus";
|
||||
Body = 0xDD;
|
||||
BaseSoundID = 0xE0;
|
||||
|
||||
SetStr( 21, 29 );
|
||||
SetDex( 46, 55 );
|
||||
SetInt( 16, 20 );
|
||||
|
||||
SetHits( 14, 17 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 20, 25 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 29.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 29.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 35.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish; } }
|
||||
|
||||
public Walrus(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
390
Scripts/Mobiles/Animals/Mounts/BaseMount.cs
Normal file
390
Scripts/Mobiles/Animals/Mounts/BaseMount.cs
Normal file
|
|
@ -0,0 +1,390 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseMount : BaseCreature, IMount
|
||||
{
|
||||
private Mobile m_Rider;
|
||||
private Item m_InternalItem;
|
||||
private DateTime m_NextMountAbility;
|
||||
|
||||
public virtual TimeSpan MountAbilityDelay { get { return TimeSpan.Zero; } }
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public DateTime NextMountAbility
|
||||
{
|
||||
get { return m_NextMountAbility; }
|
||||
set { m_NextMountAbility = value; }
|
||||
}
|
||||
|
||||
protected Item InternalItem { get { return m_InternalItem; } }
|
||||
|
||||
public virtual bool AllowMaleRider{ get{ return true; } }
|
||||
public virtual bool AllowFemaleRider{ get{ return true; } }
|
||||
|
||||
public BaseMount( string name, int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed ) : base ( aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed )
|
||||
{
|
||||
Name = name;
|
||||
Body = bodyID;
|
||||
|
||||
m_InternalItem = new MountItem( this, itemID );
|
||||
}
|
||||
|
||||
[Hue, CommandProperty( AccessLevel.GameMaster )]
|
||||
public override int Hue
|
||||
{
|
||||
get
|
||||
{
|
||||
return base.Hue;
|
||||
}
|
||||
set
|
||||
{
|
||||
base.Hue = value;
|
||||
|
||||
if ( m_InternalItem != null )
|
||||
m_InternalItem.Hue = value;
|
||||
}
|
||||
}
|
||||
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
Rider = null;
|
||||
|
||||
return base.OnBeforeDeath();
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_InternalItem != null )
|
||||
m_InternalItem.Delete();
|
||||
|
||||
m_InternalItem = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
Rider = null;
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public BaseMount( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( ( int )1 ); // version
|
||||
|
||||
writer.Write( m_NextMountAbility );
|
||||
|
||||
writer.Write( m_Rider );
|
||||
writer.Write( m_InternalItem );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_NextMountAbility = reader.ReadDateTime();
|
||||
goto case 0;
|
||||
}
|
||||
case 0:
|
||||
{
|
||||
m_Rider = reader.ReadMobile();
|
||||
m_InternalItem = reader.ReadItem();
|
||||
|
||||
if ( m_InternalItem == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void OnDisallowedRider( Mobile m )
|
||||
{
|
||||
m.SendMessage( "You may not ride this creature." );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( IsDeadPet )
|
||||
return;
|
||||
|
||||
if ( from.IsBodyMod && !from.Body.IsHuman )
|
||||
{
|
||||
if ( Core.AOS ) // You cannot ride a mount in your current form.
|
||||
PrivateOverheadMessage( Network.MessageType.Regular, 0x3B2, 1062061, from.NetState );
|
||||
else
|
||||
from.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !CheckMountAllowed( from ) )
|
||||
return;
|
||||
|
||||
if ( from.Mounted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1005583 ); // Please dismount first.
|
||||
return;
|
||||
}
|
||||
|
||||
if ( from.Female ? !AllowFemaleRider : !AllowMaleRider )
|
||||
{
|
||||
OnDisallowedRider( from );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !Multis.DesignContext.Check( from ) )
|
||||
return;
|
||||
|
||||
if ( from.HasTrade )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042317, "", 0x41 ); // You may not ride at this time
|
||||
return;
|
||||
}
|
||||
|
||||
if ( from.InRange( this, 1 ) )
|
||||
{
|
||||
bool canAccess = ( from.AccessLevel >= AccessLevel.GameMaster )
|
||||
|| ( Controlled && ControlMaster == from )
|
||||
|| ( Summoned && SummonMaster == from );
|
||||
|
||||
if ( canAccess )
|
||||
{
|
||||
if ( this.Poisoned )
|
||||
PrivateOverheadMessage( Network.MessageType.Regular, 0x3B2, 1049692, from.NetState ); // This mount is too ill to ride.
|
||||
else
|
||||
Rider = from;
|
||||
}
|
||||
else if ( !Controlled && !Summoned )
|
||||
{
|
||||
// That mount does not look broken! You would have to tame it to ride it.
|
||||
PrivateOverheadMessage( Network.MessageType.Regular, 0x3B2, 501263, from.NetState );
|
||||
}
|
||||
else
|
||||
{
|
||||
// This isn't your mount; it refuses to let you ride.
|
||||
PrivateOverheadMessage( Network.MessageType.Regular, 0x3B2, 501264, from.NetState );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
from.SendLocalizedMessage( 500206 ); // That is too far away to ride.
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int ItemID
|
||||
{
|
||||
get
|
||||
{
|
||||
if ( m_InternalItem != null )
|
||||
return m_InternalItem.ItemID;
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_InternalItem != null )
|
||||
m_InternalItem.ItemID = value;
|
||||
}
|
||||
}
|
||||
|
||||
public static void Dismount( Mobile m )
|
||||
{
|
||||
IMount mount = m.Mount;
|
||||
|
||||
if ( mount != null )
|
||||
mount.Rider = null;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Rider
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Rider;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ( m_Rider != value )
|
||||
{
|
||||
if ( value == null )
|
||||
{
|
||||
Point3D loc = m_Rider.Location;
|
||||
Map map = m_Rider.Map;
|
||||
|
||||
if ( map == null || map == Map.Internal )
|
||||
{
|
||||
loc = m_Rider.LogoutLocation;
|
||||
map = m_Rider.LogoutMap;
|
||||
}
|
||||
|
||||
Direction = m_Rider.Direction;
|
||||
Location = loc;
|
||||
Map = map;
|
||||
|
||||
if ( m_InternalItem != null )
|
||||
m_InternalItem.Internalize();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_Rider != null )
|
||||
{
|
||||
Dismount( m_Rider );
|
||||
}
|
||||
|
||||
Dismount( value );
|
||||
|
||||
if ( m_InternalItem != null )
|
||||
value.AddItem( m_InternalItem );
|
||||
|
||||
value.Direction = this.Direction;
|
||||
|
||||
Internalize();
|
||||
|
||||
if( value.Target is Bola.BolaTarget )
|
||||
{
|
||||
Target.Cancel( value );
|
||||
}
|
||||
}
|
||||
|
||||
m_Rider = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 1040024 You are still too dazed from being knocked off your mount to ride!
|
||||
// 1062910 You cannot mount while recovering from a bola throw.
|
||||
// 1070859 You cannot mount while recovering from a dismount special maneuver.
|
||||
|
||||
public static bool CheckMountAllowed( Mobile mob )
|
||||
{
|
||||
bool result = true;
|
||||
|
||||
if ((mob is PlayerMobile) && (mob as PlayerMobile).MountBlockReason != BlockMountType.None)
|
||||
{
|
||||
mob.SendLocalizedMessage((int)(mob as PlayerMobile).MountBlockReason);
|
||||
|
||||
result = false;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public virtual void OnRiderDamaged( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
if( m_Rider == null )
|
||||
return;
|
||||
|
||||
Mobile attacker = from;
|
||||
if( attacker == null )
|
||||
attacker = m_Rider.FindMostRecentDamager( true );
|
||||
|
||||
if( !(attacker == this || attacker == m_Rider || willKill || DateTime.UtcNow < m_NextMountAbility) )
|
||||
{
|
||||
if( DoMountAbility( amount, from ) )
|
||||
m_NextMountAbility = DateTime.UtcNow + MountAbilityDelay;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public virtual bool DoMountAbility( int damage, Mobile attacker )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
public class MountItem : Item, IMountItem
|
||||
{
|
||||
private BaseMount m_Mount;
|
||||
|
||||
public override double DefaultWeight { get { return 0; } }
|
||||
|
||||
public MountItem( BaseMount mount, int itemID ) : base( itemID )
|
||||
{
|
||||
Layer = Layer.Mount;
|
||||
Movable = false;
|
||||
|
||||
m_Mount = mount;
|
||||
}
|
||||
|
||||
public MountItem( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnAfterDelete()
|
||||
{
|
||||
if ( m_Mount != null )
|
||||
m_Mount.Delete();
|
||||
|
||||
m_Mount = null;
|
||||
|
||||
base.OnAfterDelete();
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath(Mobile parent)
|
||||
{
|
||||
if ( m_Mount != null )
|
||||
m_Mount.Rider = null;
|
||||
|
||||
return DeathMoveResult.RemainEquiped;
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
|
||||
writer.Write( m_Mount );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
m_Mount = reader.ReadMobile() as BaseMount;
|
||||
|
||||
if ( m_Mount == null )
|
||||
Delete();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public IMount Mount
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Mount;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
178
Scripts/Mobiles/Animals/Mounts/Beetle.cs
Normal file
178
Scripts/Mobiles/Animals/Mounts/Beetle.cs
Normal file
|
|
@ -0,0 +1,178 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a giant beetle corpse" )]
|
||||
public class Beetle : BaseMount
|
||||
{
|
||||
public virtual double BoostedSpeed{ get{ return 0.1; } }
|
||||
|
||||
[Constructable]
|
||||
public Beetle() : this( "a giant beetle" )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool SubdueBeforeTame{ get{ return true; } } // Must be beaten into submission
|
||||
public override bool ReduceSpeedWithDamage{ get{ return false; } }
|
||||
|
||||
[Constructable]
|
||||
public Beetle( string name ) : base( name, 0x317, 0x3EBC, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.25, 0.5 )
|
||||
{
|
||||
SetStr( 300 );
|
||||
SetDex( 100 );
|
||||
SetInt( 500 );
|
||||
|
||||
SetHits( 200 );
|
||||
|
||||
SetDamage( 7, 20 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30, 40 );
|
||||
SetResistance( ResistanceType.Fire, 20, 30 );
|
||||
SetResistance( ResistanceType.Cold, 20, 30 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 80.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.0 );
|
||||
|
||||
Fame = 4000;
|
||||
Karma = -4000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 3;
|
||||
MinTameSkill = 29.1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
pack.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x162;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x163;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x21D;
|
||||
}
|
||||
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
|
||||
public Beetle( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnHarmfulSpell( Mobile from )
|
||||
{
|
||||
if ( !Controlled && ControlMaster == null )
|
||||
CurrentSpeed = BoostedSpeed;
|
||||
}
|
||||
|
||||
public override void OnCombatantChange()
|
||||
{
|
||||
if ( Combatant == null && !Controlled && ControlMaster == null )
|
||||
CurrentSpeed = PassiveSpeed;
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if ( !base.OnBeforeDeath() )
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks( this );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor( Item item )
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop( Mobile from )
|
||||
{
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
return false;
|
||||
|
||||
return base.IsSnoop( from );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item item )
|
||||
{
|
||||
if ( CheckFeed( from, item ) )
|
||||
return true;
|
||||
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
{
|
||||
AddToBackpack( item );
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, item );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift( Mobile from, Item item )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
PackAnimal.GetContextMenuEntries( this, from, list );
|
||||
}
|
||||
#endregion
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Scripts/Mobiles/Animals/Mounts/DesertOstard.cs
Normal file
67
Scripts/Mobiles/Animals/Mounts/DesertOstard.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ostard corpse" )]
|
||||
public class DesertOstard : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public DesertOstard() : this( "a desert ostard" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public DesertOstard( string name ) : base( name, 0xD2, 0x3EA3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
SetStr( 94, 170 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 71, 88 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 11 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 5, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 25.3, 40.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Ostard; } }
|
||||
|
||||
public DesertOstard( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
873
Scripts/Mobiles/Animals/Mounts/Ethereals.cs
Normal file
873
Scripts/Mobiles/Animals/Mounts/Ethereals.cs
Normal file
|
|
@ -0,0 +1,873 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
using Server.Engines.VeteranRewards;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class EtherealMount : Item, IMount, IMountItem, Engines.VeteranRewards.IRewardItem
|
||||
{
|
||||
private int m_MountedID;
|
||||
private int m_RegularID;
|
||||
private Mobile m_Rider;
|
||||
private bool m_IsRewardItem;
|
||||
private bool m_IsDonationItem;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool IsRewardItem
|
||||
{
|
||||
get { return m_IsRewardItem; }
|
||||
set { m_IsRewardItem = value; }
|
||||
}
|
||||
|
||||
public override double DefaultWeight
|
||||
{
|
||||
get { return 1.0; }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster, AccessLevel.Administrator )]
|
||||
public bool IsDonationItem
|
||||
{
|
||||
get { return m_IsDonationItem; }
|
||||
set { m_IsDonationItem = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public EtherealMount( int itemID, int mountID )
|
||||
: base( itemID )
|
||||
{
|
||||
m_MountedID = mountID;
|
||||
m_RegularID = itemID;
|
||||
m_Rider = null;
|
||||
|
||||
Layer = Layer.Invalid;
|
||||
|
||||
LootType = LootType.Blessed;
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if( m_IsDonationItem )
|
||||
{
|
||||
list.Add( "Donation Ethereal" );
|
||||
list.Add( "7.5 sec slower cast time if not a 9mo. Veteran" );
|
||||
}
|
||||
if( Core.ML && m_IsRewardItem )
|
||||
list.Add( RewardSystem.GetRewardYearLabel( this, new object[] { } ) ); // X Year Veteran Reward
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int MountedID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_MountedID;
|
||||
}
|
||||
set
|
||||
{
|
||||
if( m_MountedID != value )
|
||||
{
|
||||
m_MountedID = value;
|
||||
|
||||
if( m_Rider != null )
|
||||
ItemID = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int RegularID
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_RegularID;
|
||||
}
|
||||
set
|
||||
{
|
||||
if( m_RegularID != value )
|
||||
{
|
||||
m_RegularID = value;
|
||||
|
||||
if( m_Rider == null )
|
||||
ItemID = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public EtherealMount( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool DisplayLootType { get { return false; } }
|
||||
|
||||
public virtual int FollowerSlots { get { return 1; } }
|
||||
|
||||
public void RemoveFollowers()
|
||||
{
|
||||
if( m_Rider != null )
|
||||
m_Rider.Followers -= FollowerSlots;
|
||||
|
||||
if( m_Rider != null && m_Rider.Followers < 0 )
|
||||
m_Rider.Followers = 0;
|
||||
}
|
||||
|
||||
public void AddFollowers()
|
||||
{
|
||||
if( m_Rider != null )
|
||||
m_Rider.Followers += FollowerSlots;
|
||||
}
|
||||
|
||||
public virtual bool Validate( Mobile from )
|
||||
{
|
||||
if( Parent == null )
|
||||
{
|
||||
from.SayTo( from, 1010095 ); // This must be on your person to use.
|
||||
return false;
|
||||
}
|
||||
else if( m_IsRewardItem && !RewardSystem.CheckIsUsableBy( from, this, null ) )
|
||||
{
|
||||
// CheckIsUsableBy sends the message
|
||||
return false;
|
||||
}
|
||||
else if( !BaseMount.CheckMountAllowed( from ) )
|
||||
{
|
||||
// CheckMountAllowed sends the message
|
||||
return false;
|
||||
}
|
||||
else if( from.Mounted )
|
||||
{
|
||||
from.SendLocalizedMessage( 1005583 ); // Please dismount first.
|
||||
return false;
|
||||
}
|
||||
else if( from.IsBodyMod && !from.Body.IsHuman )
|
||||
{
|
||||
from.SendLocalizedMessage( 1061628 ); // You can't do that while polymorphed.
|
||||
return false;
|
||||
}
|
||||
else if( from.HasTrade )
|
||||
{
|
||||
from.SendLocalizedMessage( 1042317, "", 0x41 ); // You may not ride at this time
|
||||
return false;
|
||||
}
|
||||
else if( ( from.Followers + FollowerSlots ) > from.FollowersMax )
|
||||
{
|
||||
from.SendLocalizedMessage( 1049679 ); // You have too many followers to summon your mount.
|
||||
return false;
|
||||
}
|
||||
else if( !Multis.DesignContext.Check( from ) )
|
||||
{
|
||||
// Check sends the message
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if( Validate( from ) )
|
||||
new EtherealSpell( this, from ).Cast();
|
||||
}
|
||||
|
||||
public override void OnSingleClick( Mobile from )
|
||||
{
|
||||
base.OnSingleClick( from );
|
||||
|
||||
if ( m_IsDonationItem )
|
||||
LabelTo( from, "Donation Ethereal" );
|
||||
else
|
||||
LabelTo( from, "Veteran Reward" );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int)3 ); // version
|
||||
|
||||
writer.Write( m_IsDonationItem );
|
||||
writer.Write( m_IsRewardItem );
|
||||
|
||||
writer.Write( (int)m_MountedID );
|
||||
writer.Write( (int)m_RegularID );
|
||||
writer.Write( m_Rider );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
LootType = LootType.Blessed;
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 3:
|
||||
{
|
||||
m_IsDonationItem = reader.ReadBool();
|
||||
goto case 2;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
m_IsRewardItem = reader.ReadBool();
|
||||
goto case 0;
|
||||
}
|
||||
case 1: reader.ReadInt(); goto case 0;
|
||||
case 0:
|
||||
{
|
||||
m_MountedID = reader.ReadInt();
|
||||
m_RegularID = reader.ReadInt();
|
||||
m_Rider = reader.ReadMobile();
|
||||
|
||||
if( m_MountedID == 0x3EA2 )
|
||||
m_MountedID = 0x3EAA;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
AddFollowers();
|
||||
|
||||
if( version < 3 && Weight == 0 )
|
||||
Weight = -1;
|
||||
}
|
||||
|
||||
public override DeathMoveResult OnParentDeath( Mobile parent )
|
||||
{
|
||||
Rider = null;//get off, move to pack
|
||||
|
||||
return DeathMoveResult.RemainEquiped;
|
||||
}
|
||||
|
||||
public static void Dismount( Mobile m )
|
||||
{
|
||||
IMount mount = m.Mount;
|
||||
|
||||
if( mount != null )
|
||||
mount.Rider = null;
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile Rider
|
||||
{
|
||||
get
|
||||
{
|
||||
return m_Rider;
|
||||
}
|
||||
set
|
||||
{
|
||||
if( value != m_Rider )
|
||||
{
|
||||
if( value == null )
|
||||
{
|
||||
Internalize();
|
||||
UnmountMe();
|
||||
|
||||
RemoveFollowers();
|
||||
m_Rider = value;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_Rider != null )
|
||||
Dismount( m_Rider );
|
||||
|
||||
Dismount( value );
|
||||
|
||||
RemoveFollowers();
|
||||
m_Rider = value;
|
||||
AddFollowers();
|
||||
|
||||
MountMe();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual int EtherealHue { get { return 0x4001; } }
|
||||
|
||||
public void UnmountMe()
|
||||
{
|
||||
Container bp = m_Rider.Backpack;
|
||||
|
||||
ItemID = m_RegularID;
|
||||
Layer = Layer.Invalid;
|
||||
Movable = true;
|
||||
|
||||
if( Hue == EtherealHue )
|
||||
Hue = 0;
|
||||
|
||||
if( bp != null )
|
||||
{
|
||||
bp.DropItem( this );
|
||||
}
|
||||
else
|
||||
{
|
||||
Point3D loc = m_Rider.Location;
|
||||
Map map = m_Rider.Map;
|
||||
|
||||
if( map == null || map == Map.Internal )
|
||||
{
|
||||
loc = m_Rider.LogoutLocation;
|
||||
map = m_Rider.LogoutMap;
|
||||
}
|
||||
|
||||
MoveToWorld( loc, map );
|
||||
}
|
||||
}
|
||||
|
||||
public void MountMe()
|
||||
{
|
||||
ItemID = m_MountedID;
|
||||
Layer = Layer.Mount;
|
||||
Movable = false;
|
||||
|
||||
if( Hue == 0 )
|
||||
Hue = EtherealHue;
|
||||
|
||||
ProcessDelta();
|
||||
m_Rider.ProcessDelta();
|
||||
m_Rider.EquipItem( this );
|
||||
m_Rider.ProcessDelta();
|
||||
ProcessDelta();
|
||||
}
|
||||
|
||||
public IMount Mount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
public static void StopMounting( Mobile mob )
|
||||
{
|
||||
if( mob.Spell is EtherealSpell )
|
||||
( (EtherealSpell)mob.Spell ).Stop();
|
||||
}
|
||||
|
||||
public void OnRiderDamaged( int amount, Mobile from, bool willKill )
|
||||
{
|
||||
}
|
||||
|
||||
private class EtherealSpell : Spell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo( "Ethereal Mount", "", 230 );
|
||||
|
||||
private EtherealMount m_Mount;
|
||||
private Mobile m_Rider;
|
||||
|
||||
public EtherealSpell( EtherealMount mount, Mobile rider )
|
||||
: base( rider, null, m_Info )
|
||||
{
|
||||
m_Rider = rider;
|
||||
m_Mount = mount;
|
||||
}
|
||||
|
||||
public override bool ClearHandsOnCast { get { return false; } }
|
||||
public override bool RevealOnCast { get { return false; } }
|
||||
|
||||
public override TimeSpan GetCastRecovery()
|
||||
{
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
|
||||
public override double CastDelayFastScalar { get { return 0; } }
|
||||
|
||||
public override TimeSpan CastDelayBase
|
||||
{
|
||||
get
|
||||
{
|
||||
return TimeSpan.FromSeconds( ( ( m_Mount.IsDonationItem && RewardSystem.GetRewardLevel( m_Rider ) < 3 ) ? ( 7.5 + ( Core.AOS ? 3.0 : 2.0 ) ) : ( Core.AOS ? 3.0 : 2.0 ) ) );
|
||||
}
|
||||
}
|
||||
|
||||
public override int GetMana()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
public override bool ConsumeReagents()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool CheckFizzle()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool m_Stop;
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_Stop = true;
|
||||
Disturb( DisturbType.Hurt, false, false );
|
||||
}
|
||||
|
||||
public override bool CheckDisturb( DisturbType type, bool checkFirst, bool resistable )
|
||||
{
|
||||
if( type == DisturbType.EquipRequest || type == DisturbType.UseRequest/* || type == DisturbType.Hurt*/ )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void DoHurtFizzle()
|
||||
{
|
||||
if( !m_Stop )
|
||||
base.DoHurtFizzle();
|
||||
}
|
||||
|
||||
public override void DoFizzle()
|
||||
{
|
||||
if( !m_Stop )
|
||||
base.DoFizzle();
|
||||
}
|
||||
|
||||
public override void OnDisturb( DisturbType type, bool message )
|
||||
{
|
||||
if( message && !m_Stop )
|
||||
Caster.SendLocalizedMessage( 1049455 ); // You have been disrupted while attempting to summon your ethereal mount!
|
||||
|
||||
//m_Mount.UnmountMe();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if( !m_Mount.Deleted && m_Mount.Rider == null && m_Mount.Validate( m_Rider ) )
|
||||
m_Mount.Rider = m_Rider;
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealHorse : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1041298; } } // Ethereal Horse Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealHorse()
|
||||
: base( 0x20DD, 0x3EAA )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealHorse( 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( Name == "an ethereal horse" )
|
||||
Name = null;
|
||||
|
||||
if( ItemID == 0x2124 )
|
||||
ItemID = 0x20DD;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealLlama : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1041300; } } // Ethereal Llama Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealLlama()
|
||||
: base( 0x20F6, 0x3EAB )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealLlama( 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( Name == "an ethereal llama" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealOstard : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1041299; } } // Ethereal Ostard Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealOstard()
|
||||
: base( 0x2135, 0x3EAC )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealOstard( 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( Name == "an ethereal ostard" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealRidgeback : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1049747; } } // Ethereal Ridgeback Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealRidgeback()
|
||||
: base( 0x2615, 0x3E9A )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealRidgeback( 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( Name == "an ethereal ridgeback" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealUnicorn : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1049745; } } // Ethereal Unicorn Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealUnicorn()
|
||||
: base( 0x25CE, 0x3E9B )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealUnicorn( 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( Name == "an ethereal unicorn" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealBeetle : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1049748; } } // Ethereal Beetle Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealBeetle()
|
||||
: base( 0x260F, 0x3E97 )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealBeetle( 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( Name == "an ethereal beetle" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealKirin : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1049746; } } // Ethereal Ki-Rin Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealKirin()
|
||||
: base( 0x25A0, 0x3E9C )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealKirin( 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( Name == "an ethereal kirin" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealSwampDragon : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1049749; } } // Ethereal Swamp Dragon Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealSwampDragon()
|
||||
: base( 0x2619, 0x3E98 )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealSwampDragon( 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( Name == "an ethereal swamp dragon" )
|
||||
Name = null;
|
||||
}
|
||||
}
|
||||
|
||||
public class RideablePolarBear : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1076159; } } // Rideable Polar Bear
|
||||
public override int EtherealHue { get { return 0; } }
|
||||
|
||||
[Constructable]
|
||||
public RideablePolarBear()
|
||||
: base( 0x20E1, 0x3EC5 )
|
||||
{
|
||||
}
|
||||
|
||||
public RideablePolarBear( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealCuSidhe : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1080386; } } // Ethereal Cu Sidhe Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealCuSidhe()
|
||||
: base( 0x2D96, 0x3E91 )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealCuSidhe( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealHiryu : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1113813; } } // Ethereal Hiryu Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealHiryu()
|
||||
: base( 0x276A, 0x3E94 )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealHiryu( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class EtherealReptalon : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1113812; } } // Ethereal Reptalon Statuette
|
||||
|
||||
[Constructable]
|
||||
public EtherealReptalon()
|
||||
: base( 0x2d95, 0x3e90 )
|
||||
{
|
||||
}
|
||||
|
||||
public EtherealReptalon( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
|
||||
public class ChargerOfTheFallen : EtherealMount
|
||||
{
|
||||
public override int LabelNumber { get { return 1074816; } } // Charger of the Fallen Statuette
|
||||
|
||||
[Constructable]
|
||||
public ChargerOfTheFallen()
|
||||
: base( 0x2D9C, 0x3E92 )
|
||||
{
|
||||
}
|
||||
|
||||
public override int EtherealHue { get { return 0; } }
|
||||
|
||||
public ChargerOfTheFallen( 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( version <= 1 && Hue != 0 )
|
||||
{
|
||||
Hue = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
93
Scripts/Mobiles/Animals/Mounts/FireSteed.cs
Normal file
93
Scripts/Mobiles/Animals/Mounts/FireSteed.cs
Normal file
|
|
@ -0,0 +1,93 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a fire steed corpse" )]
|
||||
public class FireSteed : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public FireSteed() : this( "a fire steed" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FireSteed( string name ) : base( name, 0xBE, 0x3E9E, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr( 376, 400 );
|
||||
SetDex( 91, 120 );
|
||||
SetInt( 291, 300 );
|
||||
|
||||
SetHits( 226, 240 );
|
||||
|
||||
SetDamage( 11, 30 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 20 );
|
||||
SetDamageType( ResistanceType.Fire, 80 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30, 40 );
|
||||
SetResistance( ResistanceType.Fire, 70, 80 );
|
||||
SetResistance( ResistanceType.Cold, 20, 30 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 100.0, 120.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.0 );
|
||||
|
||||
Fame = 20000;
|
||||
Karma = -20000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 106.0;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
PackItem( new SulfurousAsh( Utility.RandomMinMax( 151, 300 ) ) );
|
||||
PackItem( new Ruby( Utility.RandomMinMax( 16, 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 FireSteed( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( BaseSoundID <= 0 )
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
if( version < 1 )
|
||||
{
|
||||
for ( int i = 0; i < Skills.Length; ++i )
|
||||
{
|
||||
Skills[i].Cap = Math.Max( 100.0, Skills[i].Cap * 0.9 );
|
||||
|
||||
if ( Skills[i].Base > Skills[i].Cap )
|
||||
{
|
||||
Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
68
Scripts/Mobiles/Animals/Mounts/ForestOstard.cs
Normal file
68
Scripts/Mobiles/Animals/Mounts/ForestOstard.cs
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ostard corpse" )]
|
||||
public class ForestOstard : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public ForestOstard() : this( "a forest ostard" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ForestOstard( string name ) : base( name, 0xDB, 0x3EA5, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = Utility.RandomSlimeHue() | 0x8000;
|
||||
|
||||
BaseSoundID = 0x270;
|
||||
|
||||
SetStr( 94, 170 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 71, 88 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 8, 14 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 27.1, 32.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 450;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Ostard; } }
|
||||
|
||||
public ForestOstard( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Mounts/FrenziedOstard.cs
Normal file
71
Scripts/Mobiles/Animals/Mounts/FrenziedOstard.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ostard corpse" )]
|
||||
public class FrenziedOstard : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public FrenziedOstard() : this( "a frenzied ostard" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public FrenziedOstard( string name ) : base( name, 0xDA, 0x3EA4, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = Utility.RandomHairHue() | 0x8000;
|
||||
|
||||
BaseSoundID = 0x275;
|
||||
|
||||
SetStr( 94, 170 );
|
||||
SetDex( 96, 115 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 71, 110 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 11, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 30 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 20, 25 );
|
||||
SetResistance( ResistanceType.Energy, 20, 25 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 75.1, 80.0 );
|
||||
SetSkill( SkillName.Tactics, 79.3, 94.0 );
|
||||
SetSkill( SkillName.Wrestling, 79.3, 94.0 );
|
||||
|
||||
Fame = 1500;
|
||||
Karma = -1500;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 77.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish | FoodType.Eggs | FoodType.FruitsAndVegies; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Ostard; } }
|
||||
|
||||
public FrenziedOstard( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Scripts/Mobiles/Animals/Mounts/HellSteed.cs
Normal file
67
Scripts/Mobiles/Animals/Mounts/HellSteed.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hellsteed corpse" )]
|
||||
public class HellSteed : BaseMount
|
||||
{
|
||||
public override bool HasBreath { get { return true; } }
|
||||
public override int BreathChaosDamage { get { return 100; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
|
||||
[Constructable]
|
||||
public HellSteed() : this( "a hellsteed" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public HellSteed( string name ) : base( name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
SetStats( this );
|
||||
}
|
||||
|
||||
public static void SetStats( BaseCreature steed )
|
||||
{
|
||||
steed.SetStr( 201, 210 );
|
||||
steed.SetDex( 101, 110 );
|
||||
steed.SetInt( 101, 115 );
|
||||
|
||||
steed.SetHits( 201, 220 );
|
||||
|
||||
steed.SetDamage( 20, 24 );
|
||||
|
||||
steed.SetDamageType( ResistanceType.Physical, 25 );
|
||||
steed.SetDamageType( ResistanceType.Fire, 75 );
|
||||
|
||||
steed.SetResistance( ResistanceType.Physical, 60, 70 );
|
||||
steed.SetResistance( ResistanceType.Fire, 90 );
|
||||
steed.SetResistance( ResistanceType.Poison, 100 );
|
||||
|
||||
steed.SetSkill( SkillName.MagicResist, 90.1, 110.0 );
|
||||
steed.SetSkill( SkillName.Tactics, 50.0 );
|
||||
steed.SetSkill( SkillName.Wrestling, 90.1, 110.0 );
|
||||
|
||||
steed.Fame = 0;
|
||||
steed.Karma = 0;
|
||||
}
|
||||
|
||||
public HellSteed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
259
Scripts/Mobiles/Animals/Mounts/Hiryu.cs
Normal file
259
Scripts/Mobiles/Animals/Mounts/Hiryu.cs
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hiryu corpse" )]
|
||||
public class Hiryu : BaseMount
|
||||
{
|
||||
public override double WeaponAbilityChance { get { return 0.07; } } /* 1 in 15 chance of using per landed hit */
|
||||
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.Dismount;
|
||||
}
|
||||
|
||||
public override bool StatLossAfterTame { get { return true; } }
|
||||
|
||||
private static int GetHue()
|
||||
{
|
||||
int rand = Utility.Random( 1075 );
|
||||
|
||||
/*
|
||||
1000 1075 No Hue Color 93.02% 0x0
|
||||
*
|
||||
10 1075 Ice Green 0.93% 0x847F
|
||||
10 1075 Light Blue 0.93% 0x848D
|
||||
10 1075 Strong Cyan 0.93% 0x8495
|
||||
10 1075 Agapite 0.93% 0x8899
|
||||
10 1075 Gold 0.93% 0x8032
|
||||
*
|
||||
8 1075 Blue and Yellow 0.74% 0x8487
|
||||
*
|
||||
5 1075 Ice Blue 0.47% 0x8482
|
||||
*
|
||||
3 1075 Cyan 0.28% 0x8123
|
||||
3 1075 Light Green 0.28% 0x8295
|
||||
*
|
||||
2 1075 Strong Yellow 0.19% 0x8037
|
||||
2 1075 Green 0.19% 0x8030 //this one is an approximation
|
||||
*
|
||||
1 1075 Strong Purple 0.09% 0x8490
|
||||
1 1075 Strong Green 0.09% 0x855C
|
||||
* */
|
||||
|
||||
if( rand <= 0 )
|
||||
return 0x855C;
|
||||
else if( rand <= 1 )
|
||||
return 0x8490;
|
||||
else if( rand <= 3 )
|
||||
return 0x8030;
|
||||
else if( rand <= 5 )
|
||||
return 0x8037;
|
||||
else if( rand <= 8 )
|
||||
return 0x8295;
|
||||
else if( rand <= 11 )
|
||||
return 0x8123;
|
||||
else if( rand <= 16 )
|
||||
return 0x8482;
|
||||
else if( rand <= 24 )
|
||||
return 0x8487;
|
||||
else if( rand <= 34 )
|
||||
return 0x8032;
|
||||
else if( rand <= 44 )
|
||||
return 0x8899;
|
||||
else if( rand <= 54 )
|
||||
return 0x8495;
|
||||
else if( rand <= 64 )
|
||||
return 0x848D;
|
||||
else if( rand <= 74 )
|
||||
return 0x847F;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Hiryu()
|
||||
: base( "a hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = GetHue();
|
||||
|
||||
SetStr( 1201, 1410 );
|
||||
SetDex( 171, 270 );
|
||||
SetInt( 301, 325 );
|
||||
|
||||
SetHits( 901, 1100 );
|
||||
SetMana( 60 );
|
||||
|
||||
SetDamage( 20, 30 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 70 );
|
||||
SetResistance( ResistanceType.Fire, 70, 90 );
|
||||
SetResistance( ResistanceType.Cold, 15, 25 );
|
||||
SetResistance( ResistanceType.Poison, 40, 50 );
|
||||
SetResistance( ResistanceType.Energy, 40, 50 );
|
||||
|
||||
SetSkill( SkillName.Anatomy, 75.1, 80.0 );
|
||||
SetSkill( SkillName.MagicResist, 85.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 100.1, 110.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.1, 120.0 );
|
||||
|
||||
Fame = 18000;
|
||||
Karma = -18000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 4;
|
||||
MinTameSkill = 98.7;
|
||||
|
||||
if( Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
|
||||
|
||||
if ( Core.ML && Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomPeculiarSeed(3) );
|
||||
}
|
||||
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4FE;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4FD;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4FC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4FF;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4FB;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich, 3 );
|
||||
AddLoot( LootPack.Gems, 4 );
|
||||
}
|
||||
|
||||
public override int TreasureMapLevel { get { return 5; } }
|
||||
public override int Meat { get { return 16; } }
|
||||
public override int Hides { get { return 60; } }
|
||||
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if( 0.1 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
|
||||
if( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
defender.SendLocalizedMessage( 1070836 ); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );
|
||||
|
||||
defender.FixedEffect( 0x37B9, 10, 5 );
|
||||
defender.AddResistanceMod( mod );
|
||||
|
||||
timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 5.0 ) );
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
|
||||
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay )
|
||||
: base( delay )
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Mod = mod;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
public void DoExpire()
|
||||
{
|
||||
m_Mobile.RemoveResistanceMod( m_Mod );
|
||||
Stop();
|
||||
m_Table.Remove( m_Mobile );
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage( 1070838 ); // Your resistance to physical attacks has returned.
|
||||
DoExpire();
|
||||
}
|
||||
}
|
||||
|
||||
public Hiryu( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int)2 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 )
|
||||
Timer.DelayCall( TimeSpan.Zero, delegate { Hue = GetHue(); } );
|
||||
|
||||
if( version <= 1 )
|
||||
Timer.DelayCall( TimeSpan.Zero, delegate { if( InternalItem != null ) { InternalItem.Hue = this.Hue; } } );
|
||||
|
||||
if( version < 2 )
|
||||
{
|
||||
for ( int i = 0; i < Skills.Length; ++i )
|
||||
{
|
||||
Skills[i].Cap = Math.Max( 100.0, Skills[i].Cap * 0.9 );
|
||||
|
||||
if ( Skills[i].Base > Skills[i].Cap )
|
||||
{
|
||||
Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
79
Scripts/Mobiles/Animals/Mounts/Horse.cs
Normal file
79
Scripts/Mobiles/Animals/Mounts/Horse.cs
Normal file
|
|
@ -0,0 +1,79 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a horse corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.BrownHorse", "Server.Mobiles.DirtyHorse", "Server.Mobiles.GrayHorse", "Server.Mobiles.TanHorse" )]
|
||||
public class Horse : BaseMount
|
||||
{
|
||||
private static int[] m_IDs = new int[]
|
||||
{
|
||||
0xC8, 0x3E9F,
|
||||
0xE2, 0x3EA0,
|
||||
0xE4, 0x3EA1,
|
||||
0xCC, 0x3EA2
|
||||
};
|
||||
|
||||
[Constructable]
|
||||
public Horse() : this( "a horse" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Horse( string name ) : base( name, 0xE2, 0x3EA0, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
int random = Utility.Random( 4 );
|
||||
|
||||
Body = m_IDs[random * 2];
|
||||
ItemID = m_IDs[random * 2 + 1];
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
SetStr( 22, 98 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 28, 45 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 300;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Horse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
133
Scripts/Mobiles/Animals/Mounts/Kirin.cs
Normal file
133
Scripts/Mobiles/Animals/Mounts/Kirin.cs
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a ki-rin corpse" )]
|
||||
public class Kirin : BaseMount
|
||||
{
|
||||
public override bool AllowFemaleRider{ get{ return false; } }
|
||||
public override bool AllowFemaleTamer{ get{ return false; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override TimeSpan MountAbilityDelay { get { return TimeSpan.FromHours( 1.0 ); } }
|
||||
|
||||
public override void OnDisallowedRider( Mobile m )
|
||||
{
|
||||
m.SendLocalizedMessage( 1042319 ); // The Ki-Rin refuses your attempts to mount it.
|
||||
}
|
||||
|
||||
public override bool DoMountAbility( int damage, Mobile attacker )
|
||||
{
|
||||
if( Rider == null || attacker == null ) //sanity
|
||||
return false;
|
||||
|
||||
if( (Rider.Hits - damage) < 30 && Rider.Map == attacker.Map && Rider.InRange( attacker, 18 ) ) //Range and map checked here instead of other base fuction because of abiliites that don't need to check this
|
||||
{
|
||||
attacker.BoltEffect( 0 );
|
||||
// 35~100 damage, unresistable, by the Ki-rin.
|
||||
attacker.Damage( Utility.RandomMinMax( 35, 100 ), this, false ); //Don't inform mount about this damage, Still unsure wether or not it's flagged as the mount doing damage or the player. If changed to player, without the extra bool it'd be an infinite loop
|
||||
|
||||
Rider.LocalOverheadMessage( MessageType.Regular, 0x3B2, 1042534 ); // Your mount calls down the forces of nature on your opponent.
|
||||
Rider.FixedParticles( 0, 0, 0, 0x13A7, EffectLayer.Waist );
|
||||
Rider.PlaySound( 0xA9 ); // Ki-rin's whinny.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Kirin() : this( "a ki-rin" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Kirin( string name ) : base( name, 132, 0x3EAD, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x3C5;
|
||||
|
||||
SetStr( 296, 325 );
|
||||
SetDex( 86, 105 );
|
||||
SetInt( 186, 225 );
|
||||
|
||||
SetHits( 191, 210 );
|
||||
|
||||
SetDamage( 16, 22 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 70 );
|
||||
SetDamageType( ResistanceType.Fire, 10 );
|
||||
SetDamageType( ResistanceType.Cold, 10 );
|
||||
SetDamageType( ResistanceType.Energy, 10 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 65 );
|
||||
SetResistance( ResistanceType.Fire, 35, 45 );
|
||||
SetResistance( ResistanceType.Cold, 25, 35 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
SetResistance( ResistanceType.Energy, 25, 35 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 80.1, 90.0 );
|
||||
SetSkill( SkillName.Magery, 60.4, 100.0 );
|
||||
SetSkill( SkillName.Meditation, 90.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 85.3, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 20.1, 22.5 );
|
||||
SetSkill( SkillName.Wrestling, 80.5, 92.5 );
|
||||
|
||||
Fame = 9000;
|
||||
Karma = 9000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.LowScrolls );
|
||||
AddLoot( LootPack.Potions );
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
|
||||
if ( Utility.RandomDouble() < 0.35 )
|
||||
c.DropItem( new KirinBrains() );
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Horned; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Kirin( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if ( version == 0 )
|
||||
AI = AIType.AI_Mage;
|
||||
}
|
||||
}
|
||||
}
|
||||
259
Scripts/Mobiles/Animals/Mounts/LesserHiryu.cs
Normal file
259
Scripts/Mobiles/Animals/Mounts/LesserHiryu.cs
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hiryu corpse" )]
|
||||
public class LesserHiryu : BaseMount
|
||||
{
|
||||
public override double WeaponAbilityChance { get { return 0.07; } } /* 1 in 15 chance of using; 1 in 5 chance of success */
|
||||
|
||||
public override WeaponAbility GetWeaponAbility()
|
||||
{
|
||||
return WeaponAbility.Dismount;
|
||||
}
|
||||
|
||||
public override bool StatLossAfterTame { get { return true; } }
|
||||
|
||||
private static int GetHue()
|
||||
{
|
||||
int rand = Utility.Random( 527 );
|
||||
|
||||
/*
|
||||
|
||||
500 527 No Hue Color 94.88% 0
|
||||
10 527 Green 1.90% 0x8295
|
||||
10 527 Green 1.90% 0x8163 (Very Close to Above Green) //this one is an approximation
|
||||
5 527 Dark Green 0.95% 0x87D4
|
||||
1 527 Valorite 0.19% 0x88AB
|
||||
1 527 Midnight Blue 0.19% 0x8258
|
||||
|
||||
* */
|
||||
|
||||
if( rand <= 0 )
|
||||
return 0x8258;
|
||||
else if( rand <= 1 )
|
||||
return 0x88AB;
|
||||
else if( rand <= 6 )
|
||||
return 0x87D4;
|
||||
else if( rand <= 16 )
|
||||
return 0x8163;
|
||||
else if( rand <= 26 )
|
||||
return 0x8295;
|
||||
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public LesserHiryu()
|
||||
: base( "a lesser hiryu", 243, 0x3E94, AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = GetHue();
|
||||
|
||||
SetStr( 301, 410 );
|
||||
SetDex( 171, 270 );
|
||||
SetInt( 301, 325 );
|
||||
|
||||
SetHits( 401, 600 );
|
||||
SetMana( 60 );
|
||||
|
||||
SetDamage( 18, 23 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 45, 70 );
|
||||
SetResistance( ResistanceType.Fire, 60, 80 );
|
||||
SetResistance( ResistanceType.Cold, 5, 15 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.Anatomy, 75.1, 80.0 );
|
||||
SetSkill( SkillName.MagicResist, 85.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 100.1, 110.0 );
|
||||
SetSkill( SkillName.Wrestling, 100.1, 120.0 );
|
||||
|
||||
Fame = 10000;
|
||||
Karma = -10000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 3;
|
||||
MinTameSkill = 98.7;
|
||||
|
||||
if( Utility.RandomDouble() < .33 )
|
||||
PackItem( Engines.Plants.Seed.RandomBonsaiSeed() );
|
||||
}
|
||||
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
if ( ControlMaster.Skills[SkillName.Bushido].Base >= 90.0 )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x4FE;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x4FD;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x4FC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x4FF;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x4FB;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.FilthyRich, 2 );
|
||||
AddLoot( LootPack.Gems, 4 );
|
||||
}
|
||||
|
||||
public override double GetControlChance( Mobile m, bool useBaseSkill )
|
||||
{
|
||||
double tamingChance = base.GetControlChance( m, useBaseSkill );
|
||||
|
||||
if( tamingChance >= 0.95 )
|
||||
{
|
||||
return tamingChance;
|
||||
}
|
||||
|
||||
double skill = (useBaseSkill? m.Skills.Bushido.Base : m.Skills.Bushido.Value);
|
||||
|
||||
if( skill < 90.0 )
|
||||
{
|
||||
return tamingChance;
|
||||
}
|
||||
|
||||
double bushidoChance = ( skill - 30.0 ) / 100;
|
||||
|
||||
if( m.Skills.Bushido.Base >= 120 )
|
||||
bushidoChance += 0.05;
|
||||
|
||||
return bushidoChance > tamingChance ? bushidoChance : tamingChance;
|
||||
}
|
||||
|
||||
public override int TreasureMapLevel { get { return 3; } }
|
||||
public override int Meat { get { return 16; } }
|
||||
public override int Hides { get { return 60; } }
|
||||
public override FoodType FavoriteFood { get { return FoodType.Meat; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
|
||||
public override void OnGaveMeleeAttack( Mobile defender )
|
||||
{
|
||||
base.OnGaveMeleeAttack( defender );
|
||||
|
||||
if( 0.1 > Utility.RandomDouble() )
|
||||
{
|
||||
/* Grasping Claw
|
||||
* Start cliloc: 1070836
|
||||
* Effect: Physical resistance -15% for 5 seconds
|
||||
* End cliloc: 1070838
|
||||
* Effect: Type: "3" - From: "0x57D4F5B" (player) - To: "0x0" - ItemId: "0x37B9" - ItemIdName: "glow" - FromLocation: "(1149 808, 32)" - ToLocation: "(1149 808, 32)" - Speed: "10" - Duration: "5" - FixedDirection: "True" - Explode: "False"
|
||||
*/
|
||||
|
||||
ExpireTimer timer = (ExpireTimer)m_Table[defender];
|
||||
|
||||
if( timer != null )
|
||||
{
|
||||
timer.DoExpire();
|
||||
defender.SendLocalizedMessage( 1070837 ); // The creature lands another blow in your weakened state.
|
||||
}
|
||||
else
|
||||
defender.SendLocalizedMessage( 1070836 ); // The blow from the creature's claws has made you more susceptible to physical attacks.
|
||||
|
||||
int effect = -(defender.PhysicalResistance * 15 / 100);
|
||||
|
||||
ResistanceMod mod = new ResistanceMod( ResistanceType.Physical, effect );
|
||||
|
||||
defender.FixedEffect( 0x37B9, 10, 5 );
|
||||
defender.AddResistanceMod( mod );
|
||||
|
||||
timer = new ExpireTimer( defender, mod, TimeSpan.FromSeconds( 5.0 ) );
|
||||
timer.Start();
|
||||
m_Table[defender] = timer;
|
||||
}
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
private class ExpireTimer : Timer
|
||||
{
|
||||
private Mobile m_Mobile;
|
||||
private ResistanceMod m_Mod;
|
||||
|
||||
public ExpireTimer( Mobile m, ResistanceMod mod, TimeSpan delay )
|
||||
: base( delay )
|
||||
{
|
||||
m_Mobile = m;
|
||||
m_Mod = mod;
|
||||
Priority = TimerPriority.TwoFiftyMS;
|
||||
}
|
||||
|
||||
public void DoExpire()
|
||||
{
|
||||
m_Mobile.RemoveResistanceMod( m_Mod );
|
||||
Stop();
|
||||
m_Table.Remove( m_Mobile );
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
m_Mobile.SendLocalizedMessage( 1070838 ); // Your resistance to physical attacks has returned.
|
||||
DoExpire();
|
||||
}
|
||||
}
|
||||
|
||||
public LesserHiryu( Serial serial )
|
||||
: base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
writer.Write( (int)2 );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
int version = reader.ReadInt();
|
||||
|
||||
if( version == 0 )
|
||||
Timer.DelayCall( TimeSpan.Zero, delegate { Hue = GetHue(); } );
|
||||
|
||||
if( version <= 1 )
|
||||
Timer.DelayCall( TimeSpan.Zero, delegate { if( InternalItem != null ) { InternalItem.Hue = this.Hue; } } );
|
||||
|
||||
if( version < 2 )
|
||||
{
|
||||
for ( int i = 0; i < Skills.Length; ++i )
|
||||
{
|
||||
Skills[i].Cap = Math.Max( 100.0, Skills[i].Cap * 0.9 );
|
||||
|
||||
if ( Skills[i].Base > Skills[i].Cap )
|
||||
{
|
||||
Skills[i].Base = Skills[i].Cap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
125
Scripts/Mobiles/Animals/Mounts/Nightmare.cs
Normal file
125
Scripts/Mobiles/Animals/Mounts/Nightmare.cs
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a nightmare corpse" )]
|
||||
public class Nightmare : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public Nightmare() : this( "a nightmare" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Nightmare( string name ) : base( name, 0x74, 0x3EA7, AIType.AI_Mage, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = Core.AOS ? 0xA8 : 0x16A;
|
||||
|
||||
SetStr( 496, 525 );
|
||||
SetDex( 86, 105 );
|
||||
SetInt( 86, 125 );
|
||||
|
||||
SetHits( 298, 315 );
|
||||
|
||||
SetDamage( 16, 22 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 40 );
|
||||
SetDamageType( ResistanceType.Fire, 40 );
|
||||
SetDamageType( ResistanceType.Energy, 20 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 65 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 20, 30 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 10.4, 50.0 );
|
||||
SetSkill( SkillName.Magery, 10.4, 50.0 );
|
||||
SetSkill( SkillName.MagicResist, 85.3, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 97.6, 100.0 );
|
||||
SetSkill( SkillName.Wrestling, 80.5, 92.5 );
|
||||
|
||||
Fame = 14000;
|
||||
Karma = -14000;
|
||||
|
||||
VirtualArmor = 60;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
BodyValue = 116;
|
||||
ItemID = 16039;
|
||||
break;
|
||||
}
|
||||
case 1:
|
||||
{
|
||||
BodyValue = 178;
|
||||
ItemID = 16041;
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
BodyValue = 179;
|
||||
ItemID = 16055;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
PackItem( new SulfurousAsh( Utility.RandomMinMax( 3, 5 ) ) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.Average );
|
||||
AddLoot( LootPack.LowScrolls );
|
||||
AddLoot( LootPack.Potions );
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
if ( !Controlled )
|
||||
return 0x16A;
|
||||
|
||||
return base.GetAngerSound();
|
||||
}
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Meat{ get{ return 5; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Barbed; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
|
||||
public Nightmare( 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 ( Core.AOS && BaseSoundID == 0x16A )
|
||||
BaseSoundID = 0xA8;
|
||||
else if ( !Core.AOS && BaseSoundID == 0xA8 )
|
||||
BaseSoundID = 0x16A;
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Mounts/RidableLlama.cs
Normal file
70
Scripts/Mobiles/Animals/Mounts/RidableLlama.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a llama corpse" )]
|
||||
public class RidableLlama : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public RidableLlama() : this( "a ridable llama" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RidableLlama( string name ) : base( name, 0xDC, 0x3EA6, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr( 21, 49 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 15, 27 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 5 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 29.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 29.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public RidableLlama( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Mobiles/Animals/Mounts/Ridgeback.cs
Normal file
81
Scripts/Mobiles/Animals/Mounts/Ridgeback.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a ridgeback corpse" )]
|
||||
public class Ridgeback : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public Ridgeback() : this( "a ridgeback" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Ridgeback( string name ) : base( name, 187, 0x3EBA, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr( 58, 100 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 41, 54 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 5 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 25 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.3, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 35.1, 45.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance( Mobile m, bool useBaseSkill )
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Ridgeback( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Mobiles/Animals/Mounts/SavageRidgeback.cs
Normal file
81
Scripts/Mobiles/Animals/Mounts/SavageRidgeback.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a savage ridgeback corpse" )]
|
||||
public class SavageRidgeback : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public SavageRidgeback() : this( "a savage ridgeback" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SavageRidgeback( string name ) : base( name, 188, 0x3EB8, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x3F3;
|
||||
|
||||
SetStr( 58, 100 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 41, 54 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 3, 5 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 15, 20 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.3, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 35.1, 45.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 83.1;
|
||||
}
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance( Mobile m, bool useBaseSkill )
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public SavageRidgeback( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Scripts/Mobiles/Animals/Mounts/ScaledSwampDragon.cs
Normal file
78
Scripts/Mobiles/Animals/Mounts/ScaledSwampDragon.cs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a swamp dragon corpse" )]
|
||||
public class ScaledSwampDragon : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public ScaledSwampDragon() : this( "a swamp dragon" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public ScaledSwampDragon( string name ) : base( name, 0x31F, 0x3EBE, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
SetStr( 201, 300 );
|
||||
SetDex( 66, 85 );
|
||||
SetInt( 61, 100 );
|
||||
|
||||
SetHits( 121, 180 );
|
||||
|
||||
SetDamage( 3, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Poison, 25 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 40 );
|
||||
SetResistance( ResistanceType.Fire, 20, 30 );
|
||||
SetResistance( ResistanceType.Cold, 20, 40 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.Anatomy, 45.1, 55.0 );
|
||||
SetSkill( SkillName.MagicResist, 45.1, 55.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 55.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 55.0 );
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 93.9;
|
||||
}
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override double GetControlChance( Mobile m, bool useBaseSkill )
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override bool AutoDispel{ get{ return !Controlled; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
|
||||
public ScaledSwampDragon( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
41
Scripts/Mobiles/Animals/Mounts/SeaHorse.cs
Normal file
41
Scripts/Mobiles/Animals/Mounts/SeaHorse.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a sea horse corpse" )]
|
||||
public class SeaHorse : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public SeaHorse() : this( "a sea horse" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SeaHorse( string name ) : base( name, 0x90, 0x3EB3, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( Utility.Random( 50, 30 ), Utility.Random( 50, 30 ), 10 );
|
||||
Skills[SkillName.MagicResist].Base = 25.0 + (Utility.RandomDouble() * 5.0);
|
||||
Skills[SkillName.Wrestling].Base = 35.0 + (Utility.RandomDouble() * 10.0);
|
||||
Skills[SkillName.Tactics].Base = 30.0 + (Utility.RandomDouble() * 15.0);
|
||||
}
|
||||
|
||||
public SeaHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
45
Scripts/Mobiles/Animals/Mounts/SilverSteed.cs
Normal file
45
Scripts/Mobiles/Animals/Mounts/SilverSteed.cs
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a silver steed corpse" )]
|
||||
public class SilverSteed : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public SilverSteed() : this( "a silver steed" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SilverSteed( string name ) : base( name, 0x75, 0x3EA8, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
InitStats( Utility.Random( 50, 30 ), Utility.Random( 50, 30 ), 10 );
|
||||
Skills[SkillName.MagicResist].Base = 25.0 + (Utility.RandomDouble() * 5.0);
|
||||
Skills[SkillName.Wrestling].Base = 35.0 + (Utility.RandomDouble() * 10.0);
|
||||
Skills[SkillName.Tactics].Base = 30.0 + (Utility.RandomDouble() * 15.0);
|
||||
|
||||
ControlSlots = 1;
|
||||
Tamable = true;
|
||||
MinTameSkill = 103.1;
|
||||
}
|
||||
|
||||
public SilverSteed( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
74
Scripts/Mobiles/Animals/Mounts/SkeletalMount.cs
Normal file
74
Scripts/Mobiles/Animals/Mounts/SkeletalMount.cs
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an undead horse corpse" )]
|
||||
public class SkeletalMount : BaseMount
|
||||
{
|
||||
[Constructable]
|
||||
public SkeletalMount() : this( "a skeletal steed" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SkeletalMount( string name ) : base( name, 793, 0x3EBB, AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
SetStr( 91, 100 );
|
||||
SetDex( 46, 55 );
|
||||
SetInt( 46, 60 );
|
||||
|
||||
SetHits( 41, 50 );
|
||||
|
||||
SetDamage( 5, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Cold, 50 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 50, 60 );
|
||||
SetResistance( ResistanceType.Cold, 90, 95 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 50.0 );
|
||||
SetSkill( SkillName.Wrestling, 70.1, 80.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 0;
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override bool BleedImmune{ get{ return true; } }
|
||||
|
||||
public SkeletalMount( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch( version )
|
||||
{
|
||||
case 0:
|
||||
{
|
||||
Name = "a skeletal steed";
|
||||
Tamable = false;
|
||||
MinTameSkill = 0.0;
|
||||
ControlSlots = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
215
Scripts/Mobiles/Animals/Mounts/SwampDragon.cs
Normal file
215
Scripts/Mobiles/Animals/Mounts/SwampDragon.cs
Normal file
|
|
@ -0,0 +1,215 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a swamp dragon corpse" )]
|
||||
public class SwampDragon : BaseMount
|
||||
{
|
||||
private bool m_BardingExceptional;
|
||||
private Mobile m_BardingCrafter;
|
||||
private int m_BardingHP;
|
||||
private bool m_HasBarding;
|
||||
private CraftResource m_BardingResource;
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public Mobile BardingCrafter
|
||||
{
|
||||
get{ return m_BardingCrafter; }
|
||||
set{ m_BardingCrafter = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool BardingExceptional
|
||||
{
|
||||
get{ return m_BardingExceptional; }
|
||||
set{ m_BardingExceptional = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int BardingHP
|
||||
{
|
||||
get{ return m_BardingHP; }
|
||||
set{ m_BardingHP = value; InvalidateProperties(); }
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public bool HasBarding
|
||||
{
|
||||
get{ return m_HasBarding; }
|
||||
set
|
||||
{
|
||||
m_HasBarding = value;
|
||||
|
||||
if ( m_HasBarding )
|
||||
{
|
||||
Hue = CraftResources.GetHue( m_BardingResource );
|
||||
BodyValue = 0x31F;
|
||||
ItemID = 0x3EBE;
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = 0x851;
|
||||
BodyValue = 0x31A;
|
||||
ItemID = 0x3EBD;
|
||||
}
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public CraftResource BardingResource
|
||||
{
|
||||
get{ return m_BardingResource; }
|
||||
set
|
||||
{
|
||||
m_BardingResource = value;
|
||||
|
||||
if ( m_HasBarding )
|
||||
Hue = CraftResources.GetHue( value );
|
||||
|
||||
InvalidateProperties();
|
||||
}
|
||||
}
|
||||
|
||||
[CommandProperty( AccessLevel.GameMaster )]
|
||||
public int BardingMaxHP
|
||||
{
|
||||
get{ return m_BardingExceptional ? 2500 : 1000; }
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SwampDragon() : this( "a swamp dragon" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public SwampDragon( string name ) : base( name, 0x31A, 0x3EBD, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x16A;
|
||||
|
||||
SetStr( 201, 300 );
|
||||
SetDex( 66, 85 );
|
||||
SetInt( 61, 100 );
|
||||
|
||||
SetHits( 121, 180 );
|
||||
|
||||
SetDamage( 3, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Poison, 25 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 40 );
|
||||
SetResistance( ResistanceType.Fire, 20, 30 );
|
||||
SetResistance( ResistanceType.Cold, 20, 40 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.Anatomy, 45.1, 55.0 );
|
||||
SetSkill( SkillName.MagicResist, 45.1, 55.0 );
|
||||
SetSkill( SkillName.Tactics, 45.1, 55.0 );
|
||||
SetSkill( SkillName.Wrestling, 45.1, 55.0 );
|
||||
|
||||
Fame = 2000;
|
||||
Karma = -2000;
|
||||
|
||||
Hue = 0x851;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 93.9;
|
||||
}
|
||||
|
||||
public override bool OverrideBondingReqs()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x2CE;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x2CC;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x2D1;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x2C8;
|
||||
}
|
||||
|
||||
public override double GetControlChance( Mobile m, bool useBaseSkill )
|
||||
{
|
||||
return 1.0;
|
||||
}
|
||||
|
||||
public override bool ReacquireOnMovement{ get{ return true; } }
|
||||
public override bool AutoDispel{ get{ return !Controlled; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override int Meat{ get{ return 19; } }
|
||||
public override int Hides{ get{ return 20; } }
|
||||
public override int Scales{ get{ return 5; } }
|
||||
public override ScaleType ScaleType{ get{ return ScaleType.Green; } }
|
||||
public override bool CanAngerOnTame { get { return true; } }
|
||||
|
||||
public SwampDragon( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void GetProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.GetProperties( list );
|
||||
|
||||
if ( m_HasBarding && m_BardingExceptional && m_BardingCrafter != null )
|
||||
list.Add( 1060853, m_BardingCrafter.Name ); // armor exceptionally crafted by ~1_val~
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 1 ); // version
|
||||
|
||||
writer.Write( (bool) m_BardingExceptional );
|
||||
writer.Write( (Mobile) m_BardingCrafter );
|
||||
writer.Write( (bool) m_HasBarding );
|
||||
writer.Write( (int) m_BardingHP );
|
||||
writer.Write( (int) m_BardingResource );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
|
||||
switch ( version )
|
||||
{
|
||||
case 1:
|
||||
{
|
||||
m_BardingExceptional = reader.ReadBool();
|
||||
m_BardingCrafter = reader.ReadMobile();
|
||||
m_HasBarding = reader.ReadBool();
|
||||
m_BardingHP = reader.ReadInt();
|
||||
m_BardingResource = (CraftResource) reader.ReadInt();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( Hue == 0 && !m_HasBarding )
|
||||
Hue = 0x851;
|
||||
|
||||
if ( BaseSoundID == -1 )
|
||||
BaseSoundID = 0x16A;
|
||||
}
|
||||
}
|
||||
}
|
||||
141
Scripts/Mobiles/Animals/Mounts/Unicorn.cs
Normal file
141
Scripts/Mobiles/Animals/Mounts/Unicorn.cs
Normal file
|
|
@ -0,0 +1,141 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a unicorn corpse" )]
|
||||
public class Unicorn : BaseMount
|
||||
{
|
||||
public override bool AllowMaleRider{ get{ return false; } }
|
||||
public override bool AllowMaleTamer{ get{ return false; } }
|
||||
|
||||
public override bool InitialInnocent{ get{ return true; } }
|
||||
|
||||
public override TimeSpan MountAbilityDelay { get { return TimeSpan.FromHours( 1.0 ); } }
|
||||
|
||||
public override void OnDisallowedRider( Mobile m )
|
||||
{
|
||||
m.SendLocalizedMessage( 1042318 ); // The unicorn refuses to allow you to ride it.
|
||||
}
|
||||
|
||||
public override bool DoMountAbility( int damage, Mobile attacker )
|
||||
{
|
||||
if( Rider == null || attacker == null ) //sanity
|
||||
return false;
|
||||
|
||||
if( Rider.Poisoned && ((Rider.Hits - damage) < 40) )
|
||||
{
|
||||
Poison p = Rider.Poison;
|
||||
|
||||
if( p != null )
|
||||
{
|
||||
int chanceToCure = 10000 + (int)(this.Skills[SkillName.Magery].Value * 75) - ((p.Level + 1) * (Core.AOS ? (p.Level < 4 ? 3300 : 3100) : 1750));
|
||||
chanceToCure /= 100;
|
||||
|
||||
if( chanceToCure > Utility.Random( 100 ) )
|
||||
{
|
||||
if( Rider.CurePoison( this ) ) //TODO: Confirm if mount is the one flagged for curing it or the rider is
|
||||
{
|
||||
Rider.LocalOverheadMessage( Server.Network.MessageType.Regular, 0x3B2, true, "Your mount senses you are in danger and aids you with magic." );
|
||||
Rider.FixedParticles( 0x373A, 10, 15, 5012, EffectLayer.Waist );
|
||||
Rider.PlaySound( 0x1E0 ); // Cure spell effect.
|
||||
Rider.PlaySound( 0xA9 ); // Unicorn's whinny.
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Unicorn() : this( "a unicorn" )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public Unicorn( string name ) : base( name, 0x7A, 0x3EB4, AIType.AI_Mage, FightMode.Evil, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
BaseSoundID = 0x4BC;
|
||||
|
||||
SetStr( 296, 325 );
|
||||
SetDex( 96, 115 );
|
||||
SetInt( 186, 225 );
|
||||
|
||||
SetHits( 191, 210 );
|
||||
|
||||
SetDamage( 16, 22 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 75 );
|
||||
SetDamageType( ResistanceType.Energy, 25 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 55, 65 );
|
||||
SetResistance( ResistanceType.Fire, 25, 40 );
|
||||
SetResistance( ResistanceType.Cold, 25, 40 );
|
||||
SetResistance( ResistanceType.Poison, 55, 65 );
|
||||
SetResistance( ResistanceType.Energy, 25, 40 );
|
||||
|
||||
SetSkill( SkillName.EvalInt, 80.1, 90.0 );
|
||||
SetSkill( SkillName.Magery, 60.2, 80.0 );
|
||||
SetSkill( SkillName.Meditation, 50.1, 60.0 );
|
||||
SetSkill( SkillName.MagicResist, 75.3, 90.0 );
|
||||
SetSkill( SkillName.Tactics, 20.1, 22.5 );
|
||||
SetSkill( SkillName.Wrestling, 80.5, 92.5 );
|
||||
|
||||
Fame = 9000;
|
||||
Karma = 9000;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 2;
|
||||
MinTameSkill = 95.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Rich );
|
||||
AddLoot( LootPack.LowScrolls );
|
||||
AddLoot( LootPack.Potions );
|
||||
}
|
||||
|
||||
public override void OnDeath( Container c )
|
||||
{
|
||||
base.OnDeath( c );
|
||||
|
||||
if ( Utility.RandomDouble() < 0.35 )
|
||||
c.DropItem( new UnicornRibs() );
|
||||
}
|
||||
|
||||
public override OppositionGroup OppositionGroup
|
||||
{
|
||||
get{ return OppositionGroup.FeyAndUndead; }
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override int Meat{ get{ return 3; } }
|
||||
public override int Hides{ get{ return 10; } }
|
||||
public override HideType HideType{ get{ return HideType.Horned; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Unicorn( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
65
Scripts/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs
Normal file
65
Scripts/Mobiles/Animals/Mounts/War Horses/BaseWarHorse.cs
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a war horse corpse" )]
|
||||
public abstract class BaseWarHorse : BaseMount
|
||||
{
|
||||
public BaseWarHorse( int bodyID, int itemID, AIType aiType, FightMode fightMode, int rangePerception, int rangeFight, double activeSpeed, double passiveSpeed ) : base ( "a war horse", bodyID, itemID, aiType, fightMode, rangePerception, rangeFight, activeSpeed, passiveSpeed )
|
||||
{
|
||||
BaseSoundID = 0xA8;
|
||||
|
||||
InitStats( Utility.Random( 300, 100 ), 125, 60 );
|
||||
|
||||
SetStr( 400 );
|
||||
SetDex( 125 );
|
||||
SetInt( 51, 55 );
|
||||
|
||||
SetHits( 240 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 8 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Cold, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = 300;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public BaseWarHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs
Normal file
31
Scripts/Mobiles/Animals/Mounts/War Horses/CoMWarHorse.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class CoMWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructable]
|
||||
public CoMWarHorse() : base( 0x77, 0x3EB1, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
}
|
||||
|
||||
public CoMWarHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs
Normal file
31
Scripts/Mobiles/Animals/Mounts/War Horses/MinaxWarHorse.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class MinaxWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructable]
|
||||
public MinaxWarHorse() : base( 0x78, 0x3EAF, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
}
|
||||
|
||||
public MinaxWarHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs
Normal file
31
Scripts/Mobiles/Animals/Mounts/War Horses/SLWarHorse.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class SLWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructable]
|
||||
public SLWarHorse() : base( 0x79, 0x3EB0, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
}
|
||||
|
||||
public SLWarHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
31
Scripts/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs
Normal file
31
Scripts/Mobiles/Animals/Mounts/War Horses/TBWarHorse.cs
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public class TBWarHorse : BaseWarHorse
|
||||
{
|
||||
[Constructable]
|
||||
public TBWarHorse() : base( 0x76, 0x3EB2, AIType.AI_Melee, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
}
|
||||
|
||||
public TBWarHorse( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Reptiles/Alligator.cs
Normal file
72
Scripts/Mobiles/Animals/Reptiles/Alligator.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an alligator corpse" )]
|
||||
public class Alligator : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Alligator() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "an alligator";
|
||||
Body = 0xCA;
|
||||
BaseSoundID = 660;
|
||||
|
||||
SetStr( 76, 100 );
|
||||
SetDex( 6, 25 );
|
||||
SetInt( 11, 20 );
|
||||
|
||||
SetHits( 46, 60 );
|
||||
SetStam( 46, 65 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 15 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 25, 35 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.1, 60.0 );
|
||||
SetSkill( SkillName.Wrestling, 40.1, 60.0 );
|
||||
|
||||
Fame = 600;
|
||||
Karma = -600;
|
||||
|
||||
VirtualArmor = 30;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 47.1;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish; } }
|
||||
|
||||
public Alligator(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();
|
||||
|
||||
if ( BaseSoundID == 0x5A )
|
||||
BaseSoundID = 660;
|
||||
}
|
||||
}
|
||||
}
|
||||
86
Scripts/Mobiles/Animals/Reptiles/GiantSerpent.cs
Normal file
86
Scripts/Mobiles/Animals/Reptiles/GiantSerpent.cs
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a giant serpent corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Serpant" )]
|
||||
public class GiantSerpent : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GiantSerpent() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a giant serpent";
|
||||
Body = 0x15;
|
||||
Hue = Utility.RandomSnakeHue();
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr( 186, 215 );
|
||||
SetDex( 56, 80 );
|
||||
SetInt( 66, 85 );
|
||||
|
||||
SetHits( 112, 129 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 7, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 40 );
|
||||
SetDamageType( ResistanceType.Poison, 60 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30, 35 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 10, 20 );
|
||||
SetResistance( ResistanceType.Poison, 70, 90 );
|
||||
SetResistance( ResistanceType.Energy, 10, 20 );
|
||||
|
||||
SetSkill( SkillName.Poisoning, 70.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 65.1, 70.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 2500;
|
||||
Karma = -2500;
|
||||
|
||||
VirtualArmor = 32;
|
||||
|
||||
PackItem( new Bone() );
|
||||
// TODO: Body parts
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Average );
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune{ get{ return Poison.Greater; } }
|
||||
public override Poison HitPoison{ get{ return (0.8 >= Utility.RandomDouble() ? Poison.Greater : Poison.Deadly); } }
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override int Meat{ get{ return 4; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
|
||||
public GiantSerpent(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();
|
||||
|
||||
if ( BaseSoundID == -1 )
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
97
Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs
Normal file
97
Scripts/Mobiles/Animals/Reptiles/IceSerpent.cs
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ice serpent corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Iceserpant" )]
|
||||
public class IceSerpent : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public IceSerpent() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a giant ice serpent";
|
||||
Body = 89;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr( 216, 245 );
|
||||
SetDex( 26, 50 );
|
||||
SetInt( 66, 85 );
|
||||
|
||||
SetHits( 130, 147 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 7, 17 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 10 );
|
||||
SetDamageType( ResistanceType.Cold, 90 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 30, 35 );
|
||||
SetResistance( ResistanceType.Cold, 80, 90 );
|
||||
SetResistance( ResistanceType.Poison, 15, 25 );
|
||||
SetResistance( ResistanceType.Energy, 10, 20 );
|
||||
|
||||
SetSkill( SkillName.Anatomy, 27.5, 50.0 );
|
||||
SetSkill( SkillName.MagicResist, 25.1, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 75.1, 80.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 3500;
|
||||
Karma = -3500;
|
||||
|
||||
VirtualArmor = 32;
|
||||
|
||||
PackItem( Loot.RandomArmorOrShieldOrWeapon() );
|
||||
|
||||
switch ( Utility.Random( 10 ))
|
||||
{
|
||||
case 0: PackItem( new LeftArm() ); break;
|
||||
case 1: PackItem( new RightArm() ); break;
|
||||
case 2: PackItem( new Torso() ); break;
|
||||
case 3: PackItem( new Bone() ); break;
|
||||
case 4: PackItem( new RibCage() ); break;
|
||||
case 5: PackItem( new RibCage() ); break;
|
||||
case 6: PackItem( new BonePile() ); break;
|
||||
case 7: PackItem( new BonePile() ); break;
|
||||
case 8: PackItem( new BonePile() ); break;
|
||||
case 9: PackItem( new BonePile() ); break;
|
||||
}
|
||||
|
||||
if ( 0.025 > Utility.RandomDouble() )
|
||||
PackItem( new GlacialStaff() );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override int Meat{ get{ return 4; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
|
||||
public IceSerpent(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();
|
||||
|
||||
if ( BaseSoundID == -1 )
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Reptiles/IceSnake.cs
Normal file
72
Scripts/Mobiles/Animals/Reptiles/IceSnake.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "an ice snake corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Icesnake" )]
|
||||
public class IceSnake : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public IceSnake() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "an ice snake";
|
||||
Body = 52;
|
||||
Hue = 0x480;
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr( 42, 54 );
|
||||
SetDex( 36, 45 );
|
||||
SetInt( 26, 30 );
|
||||
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 12 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 25 );
|
||||
SetDamageType( ResistanceType.Cold, 25 );
|
||||
SetDamageType( ResistanceType.Poison, 50 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Cold, 80, 90 );
|
||||
SetResistance( ResistanceType.Poison, 60, 70 );
|
||||
SetResistance( ResistanceType.Energy, 30, 40 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 39.3, 54.0 );
|
||||
SetSkill( SkillName.Wrestling, 39.3, 54.0 );
|
||||
|
||||
Fame = 900;
|
||||
Karma = -900;
|
||||
|
||||
VirtualArmor = 30;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
|
||||
public IceSnake(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
78
Scripts/Mobiles/Animals/Reptiles/LavaLizard.cs
Normal file
78
Scripts/Mobiles/Animals/Reptiles/LavaLizard.cs
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a lava lizard corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Lavalizard" )]
|
||||
public class LavaLizard : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public LavaLizard() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a lava lizard";
|
||||
Body = 0xCE;
|
||||
Hue = Utility.RandomList( 0x647, 0x650, 0x659, 0x662, 0x66B, 0x674 );
|
||||
BaseSoundID = 0x5A;
|
||||
|
||||
SetStr( 126, 150 );
|
||||
SetDex( 56, 75 );
|
||||
SetInt( 11, 20 );
|
||||
|
||||
SetHits( 76, 90 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 6, 24 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 45 );
|
||||
SetResistance( ResistanceType.Fire, 30, 45 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
SetResistance( ResistanceType.Energy, 25, 35 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 55.1, 70.0 );
|
||||
SetSkill( SkillName.Tactics, 60.1, 80.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 3000;
|
||||
Karma = -3000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 80.7;
|
||||
|
||||
PackItem( new SulfurousAsh( Utility.Random( 4, 10 ) ) );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Meager );
|
||||
}
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Hides{ get{ return 12; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
|
||||
public LavaLizard(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
83
Scripts/Mobiles/Animals/Reptiles/LavaSerpent.cs
Normal file
83
Scripts/Mobiles/Animals/Reptiles/LavaSerpent.cs
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a lava serpent corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Lavaserpant" )]
|
||||
public class LavaSerpent : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public LavaSerpent() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a lava serpent";
|
||||
Body = 90;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr( 386, 415 );
|
||||
SetDex( 56, 80 );
|
||||
SetInt( 66, 85 );
|
||||
|
||||
SetHits( 232, 249 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 10, 22 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 20 );
|
||||
SetDamageType( ResistanceType.Fire, 80 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 45 );
|
||||
SetResistance( ResistanceType.Fire, 70, 80 );
|
||||
SetResistance( ResistanceType.Poison, 30, 40 );
|
||||
SetResistance( ResistanceType.Energy, 10, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.3, 70.0 );
|
||||
SetSkill( SkillName.Tactics, 65.1, 70.0 );
|
||||
SetSkill( SkillName.Wrestling, 60.1, 80.0 );
|
||||
|
||||
Fame = 4500;
|
||||
Karma = -4500;
|
||||
|
||||
VirtualArmor = 40;
|
||||
|
||||
PackItem( new SulfurousAsh( 3 ) );
|
||||
PackItem( new Bone() );
|
||||
// TODO: body parts, armour
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Average );
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Meat{ get{ return 4; } }
|
||||
public override int Hides{ get{ return 15; } }
|
||||
public override HideType HideType{ get{ return HideType.Spined; } }
|
||||
|
||||
public LavaSerpent(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();
|
||||
|
||||
if ( BaseSoundID == -1 )
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
75
Scripts/Mobiles/Animals/Reptiles/LavaSnake.cs
Normal file
75
Scripts/Mobiles/Animals/Reptiles/LavaSnake.cs
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
using System;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a lava snake corpse")]
|
||||
[TypeAlias( "Server.Mobiles.Lavasnake" )]
|
||||
public class LavaSnake : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public LavaSnake() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a lava snake";
|
||||
Body = 52;
|
||||
Hue = Utility.RandomList( 0x647, 0x650, 0x659, 0x662, 0x66B, 0x674 );
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr( 43, 55 );
|
||||
SetDex( 16, 25 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 28, 32 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 8 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 20, 25 );
|
||||
SetResistance( ResistanceType.Fire, 30, 40 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
SetResistance( ResistanceType.Energy, 10, 20 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.3, 34.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.3, 34.0 );
|
||||
|
||||
Fame = 600;
|
||||
Karma = -600;
|
||||
|
||||
VirtualArmor = 24;
|
||||
|
||||
PackItem( new SulfurousAsh() );
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override bool HasBreath{ get{ return true; } } // fire breath enabled
|
||||
public override int Meat{ get{ return 1; } }
|
||||
|
||||
public LavaSnake(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Scripts/Mobiles/Animals/Reptiles/SilverSerpent.cs
Normal file
82
Scripts/Mobiles/Animals/Reptiles/SilverSerpent.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Factions;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a silver serpent corpse")]
|
||||
[TypeAlias( "Server.Mobiles.Silverserpant" )]
|
||||
public class SilverSerpent : BaseCreature
|
||||
{
|
||||
public override Faction FactionAllegiance { get { return TrueBritannians.Instance; } }
|
||||
public override Ethics.Ethic EthicAllegiance { get { return Ethics.Ethic.Hero; } }
|
||||
|
||||
[Constructable]
|
||||
public SilverSerpent() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Body = 92;
|
||||
Name = "a silver serpent";
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr( 161, 360 );
|
||||
SetDex( 151, 300 );
|
||||
SetInt( 21, 40 );
|
||||
|
||||
SetHits( 97, 216 );
|
||||
|
||||
SetDamage( 5, 21 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 50 );
|
||||
SetDamageType( ResistanceType.Poison, 50 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 35, 45 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Cold, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.Poisoning, 90.1, 100.0 );
|
||||
SetSkill( SkillName.MagicResist, 95.1, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 80.1, 95.0 );
|
||||
SetSkill( SkillName.Wrestling, 85.1, 100.0 );
|
||||
|
||||
Fame = 7000;
|
||||
Karma = -7000;
|
||||
|
||||
VirtualArmor = 40;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Average );
|
||||
AddLoot( LootPack.Gems, 2 );
|
||||
}
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override Poison HitPoison{ get{ return Poison.Lethal; } }
|
||||
|
||||
public SilverSerpent(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();
|
||||
|
||||
if ( BaseSoundID == -1 )
|
||||
BaseSoundID = 219;
|
||||
}
|
||||
}
|
||||
}
|
||||
72
Scripts/Mobiles/Animals/Reptiles/Snake.cs
Normal file
72
Scripts/Mobiles/Animals/Reptiles/Snake.cs
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a snake corpse" )]
|
||||
public class Snake : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Snake() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a snake";
|
||||
Body = 52;
|
||||
Hue = Utility.RandomSnakeHue();
|
||||
BaseSoundID = 0xDB;
|
||||
|
||||
SetStr( 22, 34 );
|
||||
SetDex( 16, 25 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 15, 19 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Poison, 20, 30 );
|
||||
|
||||
SetSkill( SkillName.Poisoning, 50.1, 70.0 );
|
||||
SetSkill( SkillName.MagicResist, 15.1, 20.0 );
|
||||
SetSkill( SkillName.Tactics, 19.3, 34.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.3, 34.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 16;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 59.1;
|
||||
}
|
||||
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lesser; } }
|
||||
public override Poison HitPoison{ get{ return Poison.Lesser; } }
|
||||
|
||||
public override bool DeathAdderCharmable{ get{ return true; } }
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Eggs; } }
|
||||
|
||||
public Snake(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Scripts/Mobiles/Animals/Rodents/GiantRat.cs
Normal file
73
Scripts/Mobiles/Animals/Rodents/GiantRat.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a giant rat corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Giantrat" )]
|
||||
public class GiantRat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public GiantRat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a giant rat";
|
||||
Body = 0xD7;
|
||||
BaseSoundID = 0x188;
|
||||
|
||||
SetStr( 32, 74 );
|
||||
SetDex( 46, 65 );
|
||||
SetInt( 16, 30 );
|
||||
|
||||
SetHits( 26, 39 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 8 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 15, 20 );
|
||||
SetResistance( ResistanceType.Fire, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 25, 35 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 25.1, 30.0 );
|
||||
SetSkill( SkillName.Tactics, 29.3, 44.0 );
|
||||
SetSkill( SkillName.Wrestling, 29.3, 44.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 18;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 29.1;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 6; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Fish | FoodType.Meat | FoodType.FruitsAndVegies | FoodType.Eggs; } }
|
||||
|
||||
public GiantRat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
81
Scripts/Mobiles/Animals/Rodents/JackRabbit.cs
Normal file
81
Scripts/Mobiles/Animals/Rodents/JackRabbit.cs
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a jack rabbit corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Jackrabbit" )]
|
||||
public class JackRabbit : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public JackRabbit() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a jack rabbit";
|
||||
Body = 0xCD;
|
||||
Hue = 0x1BB;
|
||||
|
||||
SetStr( 15 );
|
||||
SetDex( 25 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 9 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 2 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 2, 5 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 4;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies; } }
|
||||
|
||||
public JackRabbit(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Scripts/Mobiles/Animals/Rodents/Rabbit.cs
Normal file
82
Scripts/Mobiles/Animals/Rodents/Rabbit.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a hare corpse" )]
|
||||
public class Rabbit : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Rabbit() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a rabbit";
|
||||
Body = 205;
|
||||
|
||||
if ( 0.5 >= Utility.RandomDouble() )
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
|
||||
SetStr( 6, 10 );
|
||||
SetDex( 26, 38 );
|
||||
SetInt( 6, 14 );
|
||||
|
||||
SetHits( 4, 6 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -18.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Hides{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies; } }
|
||||
|
||||
public Rabbit(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0xC9;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0xCA;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0xCB;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Rodents/SewerRat.cs
Normal file
71
Scripts/Mobiles/Animals/Rodents/SewerRat.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a sewer rat corpse" )]
|
||||
public class Sewerrat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Sewerrat() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a sewer rat";
|
||||
Body = 238;
|
||||
BaseSoundID = 0xCC;
|
||||
|
||||
SetStr( 9 );
|
||||
SetDex( 25 );
|
||||
SetInt( 6, 10 );
|
||||
|
||||
SetHits( 6 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 2 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 15, 25 );
|
||||
SetResistance( ResistanceType.Energy, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 5.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 300;
|
||||
Karma = -300;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Eggs | FoodType.FruitsAndVegies; } }
|
||||
|
||||
public Sewerrat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
71
Scripts/Mobiles/Animals/Slimes/Jwilson.cs
Normal file
71
Scripts/Mobiles/Animals/Slimes/Jwilson.cs
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a jwilson corpse" )]
|
||||
public class Jwilson : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Jwilson() : base( AIType.AI_Melee, FightMode.Closest, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = Utility.RandomList(0x89C,0x8A2,0x8A8,0x8AE);
|
||||
this.Body = 0x33;
|
||||
this.Name = ("a jwilson");
|
||||
this.VirtualArmor = 8;
|
||||
|
||||
this.InitStats(Utility.Random(22,13),Utility.Random(16,6),Utility.Random(16,5));
|
||||
|
||||
this.Skills[SkillName.Wrestling].Base = Utility.Random(24,17);
|
||||
this.Skills[SkillName.Tactics].Base = Utility.Random(18,14);
|
||||
this.Skills[SkillName.MagicResist].Base = Utility.Random(15,6);
|
||||
this.Skills[SkillName.Poisoning].Base = Utility.Random(31,20);
|
||||
|
||||
this.Fame = Utility.Random(0,1249);
|
||||
this.Karma = Utility.Random(0,-624);
|
||||
}
|
||||
|
||||
public Jwilson(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x1C8;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1C9;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1CA;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1CB;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1CC;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
73
Scripts/Mobiles/Animals/Town Critters/(UO 3D Only) Parrot.cs
Normal file
73
Scripts/Mobiles/Animals/Town Critters/(UO 3D Only) Parrot.cs
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName("a parrot corpse")]
|
||||
public class Parrot : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Parrot() : base(AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
this.Body = 831;
|
||||
this.Name = ("a parrot");
|
||||
this.VirtualArmor = Utility.Random(0,6);
|
||||
|
||||
this.InitStats((10),Utility.Random(25,16),(10));
|
||||
|
||||
this.Skills[SkillName.Wrestling].Base = (6);
|
||||
this.Skills[SkillName.Tactics].Base = (6);
|
||||
this.Skills[SkillName.MagicResist].Base = (5);
|
||||
|
||||
this.Fame = Utility.Random(0,1249);
|
||||
this.Karma = Utility.Random(0,-624);
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = 0.0;
|
||||
}
|
||||
|
||||
public Parrot(Serial serial) : base(serial)
|
||||
{
|
||||
}
|
||||
|
||||
public override int GetAngerSound()
|
||||
{
|
||||
return 0x1B;
|
||||
}
|
||||
|
||||
public override int GetIdleSound()
|
||||
{
|
||||
return 0x1C;
|
||||
}
|
||||
|
||||
public override int GetAttackSound()
|
||||
{
|
||||
return 0x1D;
|
||||
}
|
||||
|
||||
public override int GetHurtSound()
|
||||
{
|
||||
return 0x1E;
|
||||
}
|
||||
|
||||
public override int GetDeathSound()
|
||||
{
|
||||
return 0x1F;
|
||||
}
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
139
Scripts/Mobiles/Animals/Town Critters/Bird.cs
Normal file
139
Scripts/Mobiles/Animals/Town Critters/Bird.cs
Normal file
|
|
@ -0,0 +1,139 @@
|
|||
using System;
|
||||
using Server;
|
||||
using Server.Misc;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a bird corpse" )]
|
||||
public class Bird : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Bird() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
if ( Utility.RandomBool() )
|
||||
{
|
||||
Hue = 0x901;
|
||||
|
||||
switch ( Utility.Random( 3 ) )
|
||||
{
|
||||
case 0: Name = "a crow"; break;
|
||||
case 2: Name = "a raven"; break;
|
||||
case 1: Name = "a magpie"; break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Hue = Utility.RandomBirdHue();
|
||||
Name = NameList.RandomName( "bird" );
|
||||
}
|
||||
|
||||
Body = 6;
|
||||
BaseSoundID = 0x1B;
|
||||
|
||||
VirtualArmor = Utility.RandomMinMax( 0, 6 );
|
||||
|
||||
SetStr( 10 );
|
||||
SetDex( 25, 35 );
|
||||
SetInt( 10 );
|
||||
|
||||
SetDamage( 0 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 4.2, 6.4 );
|
||||
SetSkill( SkillName.Tactics, 4.0, 6.0 );
|
||||
SetSkill( SkillName.MagicResist, 4.0, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -6.9;
|
||||
}
|
||||
|
||||
public override MeatType MeatType{ get{ return MeatType.Bird; } }
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Feathers{ get{ return 25; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Bird( 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();
|
||||
|
||||
if ( Hue == 0 )
|
||||
Hue = Utility.RandomBirdHue();
|
||||
}
|
||||
}
|
||||
|
||||
[CorpseName( "a bird corpse" )]
|
||||
public class TropicalBird : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public TropicalBird() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Hue = Utility.RandomBirdHue();
|
||||
Name = "a tropical bird";
|
||||
|
||||
Body = 6;
|
||||
BaseSoundID = 0xBF;
|
||||
|
||||
VirtualArmor = Utility.RandomMinMax( 0, 6 );
|
||||
|
||||
SetStr( 10 );
|
||||
SetDex( 25, 35 );
|
||||
SetInt( 10 );
|
||||
|
||||
SetDamage( 0 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 4.2, 6.4 );
|
||||
SetSkill( SkillName.Tactics, 4.0, 6.0 );
|
||||
SetSkill( SkillName.MagicResist, 4.0, 5.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = 0;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -6.9;
|
||||
}
|
||||
|
||||
public override MeatType MeatType{ get{ return MeatType.Bird; } }
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override int Feathers{ get{ return 25; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.FruitsAndVegies | FoodType.GrainsAndHay; } }
|
||||
|
||||
public TropicalBird( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Scripts/Mobiles/Animals/Town Critters/Cat.cs
Normal file
67
Scripts/Mobiles/Animals/Town Critters/Cat.cs
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a cat corpse" )]
|
||||
[TypeAlias( "Server.Mobiles.Housecat" )]
|
||||
public class Cat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Cat() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a cat";
|
||||
Body = 0xC9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x69;
|
||||
|
||||
SetStr( 9 );
|
||||
SetDex( 35 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 6 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 5.0 );
|
||||
SetSkill( SkillName.Tactics, 4.0 );
|
||||
SetSkill( SkillName.Wrestling, 5.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 150;
|
||||
|
||||
VirtualArmor = 8;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Feline; } }
|
||||
|
||||
public Cat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
Scripts/Mobiles/Animals/Town Critters/Dog.cs
Normal file
66
Scripts/Mobiles/Animals/Town Critters/Dog.cs
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a dog corpse" )]
|
||||
public class Dog : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Dog() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a dog";
|
||||
Body = 0xD9;
|
||||
Hue = Utility.RandomAnimalHue();
|
||||
BaseSoundID = 0x85;
|
||||
|
||||
SetStr( 27, 37 );
|
||||
SetDex( 28, 43 );
|
||||
SetInt( 29, 37 );
|
||||
|
||||
SetHits( 17, 22 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 4, 7 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 22.1, 47.0 );
|
||||
SetSkill( SkillName.Tactics, 19.2, 31.0 );
|
||||
SetSkill( SkillName.Wrestling, 19.2, 31.0 );
|
||||
|
||||
Fame = 0;
|
||||
Karma = 300;
|
||||
|
||||
VirtualArmor = 12;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -15.3;
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat; } }
|
||||
public override PackInstinct PackInstinct{ get{ return PackInstinct.Canine; } }
|
||||
|
||||
public Dog(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
70
Scripts/Mobiles/Animals/Town Critters/Rat.cs
Normal file
70
Scripts/Mobiles/Animals/Town Critters/Rat.cs
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
using System;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a rat corpse" )]
|
||||
public class Rat : BaseCreature
|
||||
{
|
||||
[Constructable]
|
||||
public Rat() : base( AIType.AI_Animal, FightMode.Aggressor, 10, 1, 0.2, 0.4 )
|
||||
{
|
||||
Name = "a rat";
|
||||
Body = 238;
|
||||
BaseSoundID = 0xCC;
|
||||
|
||||
SetStr( 9 );
|
||||
SetDex( 35 );
|
||||
SetInt( 5 );
|
||||
|
||||
SetHits( 6 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 2 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 5, 10 );
|
||||
SetResistance( ResistanceType.Poison, 5, 10 );
|
||||
|
||||
SetSkill( SkillName.MagicResist, 4.0 );
|
||||
SetSkill( SkillName.Tactics, 4.0 );
|
||||
SetSkill( SkillName.Wrestling, 4.0 );
|
||||
|
||||
Fame = 150;
|
||||
Karma = -150;
|
||||
|
||||
VirtualArmor = 6;
|
||||
|
||||
Tamable = true;
|
||||
ControlSlots = 1;
|
||||
MinTameSkill = -0.9;
|
||||
}
|
||||
|
||||
public override void GenerateLoot()
|
||||
{
|
||||
AddLoot( LootPack.Poor );
|
||||
}
|
||||
|
||||
public override int Meat{ get{ return 1; } }
|
||||
public override FoodType FavoriteFood{ get{ return FoodType.Meat | FoodType.Fish | FoodType.Eggs | FoodType.GrainsAndHay; } }
|
||||
|
||||
public Rat(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
5877
Scripts/Mobiles/BaseCreature.cs
Normal file
5877
Scripts/Mobiles/BaseCreature.cs
Normal file
File diff suppressed because it is too large
Load diff
184
Scripts/Mobiles/Familiars/BaseFamiliar.cs
Normal file
184
Scripts/Mobiles/Familiars/BaseFamiliar.cs
Normal file
|
|
@ -0,0 +1,184 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
public abstract class BaseFamiliar : BaseCreature
|
||||
{
|
||||
public BaseFamiliar()
|
||||
: base( AIType.AI_Melee, FightMode.Closest, 10, 1, .1, .1 )
|
||||
{
|
||||
}
|
||||
|
||||
public override bool BardImmune{ get{ return true; } }
|
||||
public override Poison PoisonImmune{ get{ return Poison.Lethal; } }
|
||||
public override bool Commandable{ get{ return false; } }
|
||||
|
||||
public override bool PlayerRangeSensitive { get { return false; } }
|
||||
|
||||
private bool m_LastHidden;
|
||||
|
||||
public virtual void RangeCheck()
|
||||
{
|
||||
if( !Deleted && ControlMaster != null && !ControlMaster.Deleted )
|
||||
{
|
||||
int range = ( RangeHome - 2 );
|
||||
|
||||
if( !InRange( ControlMaster.Location, RangeHome ) )
|
||||
{
|
||||
Mobile master = ControlMaster;
|
||||
|
||||
Point3D m_Loc = Point3D.Zero;
|
||||
|
||||
if( Map == master.Map )
|
||||
{
|
||||
int x = ( X > master.X ) ? ( master.X + range ) : ( master.X - range );
|
||||
int y = ( Y > master.Y ) ? ( master.Y + range ) : ( master.Y - range );
|
||||
|
||||
for( int i = 0; i < 10; i++ )
|
||||
{
|
||||
m_Loc.X = x + Utility.RandomMinMax( -1, 1 );
|
||||
m_Loc.Y = y + Utility.RandomMinMax( -1, 1 );
|
||||
|
||||
m_Loc.Z = Map.GetAverageZ( m_Loc.X, m_Loc.Y );
|
||||
|
||||
if( Map.CanSpawnMobile( m_Loc ) )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
m_Loc = master.Location;
|
||||
}
|
||||
|
||||
if( !Deleted )
|
||||
{
|
||||
SetLocation( m_Loc, true );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
Mobile master = ControlMaster;
|
||||
|
||||
if( Deleted )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if( master == null || master.Deleted )
|
||||
{
|
||||
DropPackContents();
|
||||
EndRelease( null );
|
||||
return;
|
||||
}
|
||||
|
||||
RangeCheck();
|
||||
|
||||
if( m_LastHidden != master.Hidden )
|
||||
Hidden = m_LastHidden = master.Hidden;
|
||||
|
||||
if( AIObject != null && AIObject.WalkMobileRange( master, 5, true, 1, 1 ))
|
||||
{
|
||||
Warmode = master.Warmode;
|
||||
Combatant = master.Combatant;
|
||||
|
||||
CurrentSpeed = 0.10;
|
||||
}
|
||||
else
|
||||
{
|
||||
Warmode = false;
|
||||
FocusMob = Combatant = null;
|
||||
|
||||
CurrentSpeed = .01;
|
||||
}
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
if ( from.Alive && Controlled && from == ControlMaster && from.InRange( this, 14 ) )
|
||||
list.Add( new ReleaseEntry( from, this ) );
|
||||
}
|
||||
|
||||
public virtual void BeginRelease( Mobile from )
|
||||
{
|
||||
if ( !Deleted && Controlled && from == ControlMaster && from.CheckAlive() )
|
||||
EndRelease( from );
|
||||
}
|
||||
|
||||
public virtual void EndRelease( Mobile from )
|
||||
{
|
||||
if ( from == null || (!Deleted && Controlled && from == ControlMaster && from.CheckAlive()) )
|
||||
{
|
||||
Effects.SendLocationParticles( EffectItem.Create( Location, Map, EffectItem.DefaultDuration ), 0x3728, 1, 13, 2100, 3, 5042, 0 );
|
||||
PlaySound( 0x201 );
|
||||
Delete();
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void DropPackContents()
|
||||
{
|
||||
Map map = this.Map;
|
||||
Container pack = this.Backpack;
|
||||
|
||||
if ( map != null && map != Map.Internal && pack != null )
|
||||
{
|
||||
List<Item> list = new List<Item>( pack.Items );
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
list[i].MoveToWorld( Location, map );
|
||||
}
|
||||
}
|
||||
|
||||
public BaseFamiliar( 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();
|
||||
|
||||
ValidationQueue<BaseFamiliar>.Add( this );
|
||||
}
|
||||
|
||||
public void Validate()
|
||||
{
|
||||
DropPackContents();
|
||||
Delete();
|
||||
}
|
||||
|
||||
private class ReleaseEntry : ContextMenuEntry
|
||||
{
|
||||
private Mobile m_From;
|
||||
private BaseFamiliar m_Familiar;
|
||||
|
||||
public ReleaseEntry( Mobile from, BaseFamiliar familiar ) : base( 6118, 14 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Familiar = familiar;
|
||||
}
|
||||
|
||||
public override void OnClick()
|
||||
{
|
||||
if ( !m_Familiar.Deleted && m_Familiar.Controlled && m_From == m_Familiar.ControlMaster && m_From.CheckAlive() )
|
||||
m_Familiar.BeginRelease( m_From );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
82
Scripts/Mobiles/Familiars/DarkWolf.cs
Normal file
82
Scripts/Mobiles/Familiars/DarkWolf.cs
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a dark wolf corpse" )]
|
||||
public class DarkWolfFamiliar : BaseFamiliar
|
||||
{
|
||||
public DarkWolfFamiliar()
|
||||
{
|
||||
Name = "a dark wolf";
|
||||
Body = 99;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 0xE5;
|
||||
|
||||
SetStr( 100 );
|
||||
SetDex( 90 );
|
||||
SetInt( 90 );
|
||||
|
||||
SetHits( 60 );
|
||||
SetStam( 90 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 40, 50 );
|
||||
SetResistance( ResistanceType.Fire, 25, 40 );
|
||||
SetResistance( ResistanceType.Cold, 25, 40 );
|
||||
SetResistance( ResistanceType.Poison, 25, 40 );
|
||||
SetResistance( ResistanceType.Energy, 25, 40 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 85.1, 90.0 );
|
||||
SetSkill( SkillName.Tactics, 50.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
private DateTime m_NextRestore;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.UtcNow < m_NextRestore )
|
||||
return;
|
||||
|
||||
m_NextRestore = DateTime.UtcNow + TimeSpan.FromSeconds( 2.0 );
|
||||
|
||||
Mobile caster = ControlMaster;
|
||||
|
||||
if ( caster == null )
|
||||
caster = SummonMaster;
|
||||
|
||||
if ( caster != null )
|
||||
++caster.Stam;
|
||||
}
|
||||
|
||||
public DarkWolfFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
58
Scripts/Mobiles/Familiars/DeathAdder.cs
Normal file
58
Scripts/Mobiles/Familiars/DeathAdder.cs
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a death adder corpse" )]
|
||||
public class DeathAdder : BaseFamiliar
|
||||
{
|
||||
public DeathAdder()
|
||||
{
|
||||
Name = "a death adder";
|
||||
Body = 0x15;
|
||||
Hue = 0x455;
|
||||
BaseSoundID = 219;
|
||||
|
||||
SetStr( 70 );
|
||||
SetDex( 150 );
|
||||
SetInt( 100 );
|
||||
|
||||
SetHits( 50 );
|
||||
SetStam( 150 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 1, 4 );
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10 );
|
||||
SetResistance( ResistanceType.Poison, 100 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 90.0 );
|
||||
SetSkill( SkillName.Tactics, 50.0 );
|
||||
SetSkill( SkillName.MagicResist, 100.0 );
|
||||
SetSkill( SkillName.Poisoning, 150.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
public override Poison HitPoison{ get{ return (0.8 >= Utility.RandomDouble() ? Poison.Greater : Poison.Deadly); } }
|
||||
|
||||
public DeathAdder( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.WriteEncodedInt( 0 ); // version
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadEncodedInt();
|
||||
}
|
||||
}
|
||||
}
|
||||
202
Scripts/Mobiles/Familiars/HordeMinion.cs
Normal file
202
Scripts/Mobiles/Familiars/HordeMinion.cs
Normal file
|
|
@ -0,0 +1,202 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
using Server.ContextMenus;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a horde minion corpse" )]
|
||||
public class HordeMinionFamiliar : BaseFamiliar
|
||||
{
|
||||
public override bool DisplayWeight{ get { return true; } }
|
||||
|
||||
public HordeMinionFamiliar()
|
||||
{
|
||||
Name = "a horde minion";
|
||||
Body = 776;
|
||||
BaseSoundID = 0x39D;
|
||||
|
||||
SetStr( 100 );
|
||||
SetDex( 110 );
|
||||
SetInt( 100 );
|
||||
|
||||
SetHits( 70 );
|
||||
SetStam( 110 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 50, 60 );
|
||||
SetResistance( ResistanceType.Fire, 50, 55 );
|
||||
SetResistance( ResistanceType.Poison, 25, 30 );
|
||||
SetResistance( ResistanceType.Energy, 25, 30 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 70.1, 75.0 );
|
||||
SetSkill( SkillName.Tactics, 50.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if ( pack != null )
|
||||
pack.Delete();
|
||||
|
||||
pack = new Backpack();
|
||||
pack.Movable = false;
|
||||
pack.Weight = 13.0;
|
||||
|
||||
AddItem( pack );
|
||||
}
|
||||
|
||||
private DateTime m_NextPickup;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.UtcNow < m_NextPickup )
|
||||
return;
|
||||
|
||||
m_NextPickup = DateTime.UtcNow + TimeSpan.FromSeconds( Utility.RandomMinMax( 5, 10 ) );
|
||||
|
||||
Container pack = this.Backpack;
|
||||
|
||||
if ( pack == null )
|
||||
return;
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
foreach ( Item item in this.GetItemsInRange( 2 ) )
|
||||
{
|
||||
if ( item.Movable && item.Stackable )
|
||||
list.Add( item );
|
||||
}
|
||||
|
||||
int pickedUp = 0;
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
Item item = (Item)list[i];
|
||||
|
||||
if ( !pack.CheckHold( this, item, false, true ) )
|
||||
return;
|
||||
|
||||
bool rejected;
|
||||
LRReason reject;
|
||||
|
||||
NextActionTime = Core.TickCount;
|
||||
|
||||
Lift( item, item.Amount, out rejected, out reject );
|
||||
|
||||
if ( rejected )
|
||||
continue;
|
||||
|
||||
Drop( this, Point3D.Zero );
|
||||
|
||||
if ( ++pickedUp == 3 )
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
private void ConfirmRelease_Callback( Mobile from, bool okay, object state )
|
||||
{
|
||||
if ( okay )
|
||||
EndRelease( from );
|
||||
}
|
||||
|
||||
public override void BeginRelease( Mobile from )
|
||||
{
|
||||
Container pack = this.Backpack;
|
||||
|
||||
if ( pack != null && pack.Items.Count > 0 )
|
||||
from.SendGump( new WarningGump( 1060635, 30720, 1061672, 32512, 420, 280, new WarningGumpCallback( ConfirmRelease_Callback ), null ) );
|
||||
else
|
||||
EndRelease( from );
|
||||
}
|
||||
|
||||
#region Pack Animal Methods
|
||||
public override bool OnBeforeDeath()
|
||||
{
|
||||
if ( !base.OnBeforeDeath() )
|
||||
return false;
|
||||
|
||||
PackAnimal.CombineBackpacks( this );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override DeathMoveResult GetInventoryMoveResultFor( Item item )
|
||||
{
|
||||
return DeathMoveResult.MoveToCorpse;
|
||||
}
|
||||
|
||||
public override bool IsSnoop( Mobile from )
|
||||
{
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
return false;
|
||||
|
||||
return base.IsSnoop( from );
|
||||
}
|
||||
|
||||
public override bool OnDragDrop( Mobile from, Item item )
|
||||
{
|
||||
if ( CheckFeed( from, item ) )
|
||||
return true;
|
||||
|
||||
if ( PackAnimal.CheckAccess( this, from ) )
|
||||
{
|
||||
AddToBackpack( item );
|
||||
return true;
|
||||
}
|
||||
|
||||
return base.OnDragDrop( from, item );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalDrop( Mobile from, Item item, Item target )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override bool CheckNonlocalLift( Mobile from, Item item )
|
||||
{
|
||||
return PackAnimal.CheckAccess( this, from );
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
PackAnimal.TryPackOpen( this, from );
|
||||
}
|
||||
|
||||
public override void GetContextMenuEntries( Mobile from, List<ContextMenuEntry> list )
|
||||
{
|
||||
base.GetContextMenuEntries( from, list );
|
||||
|
||||
PackAnimal.GetContextMenuEntries( this, from, list );
|
||||
}
|
||||
#endregion
|
||||
|
||||
public HordeMinionFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
116
Scripts/Mobiles/Familiars/ShadowWisp.cs
Normal file
116
Scripts/Mobiles/Familiars/ShadowWisp.cs
Normal file
|
|
@ -0,0 +1,116 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.Mobiles
|
||||
{
|
||||
[CorpseName( "a shadow wisp corpse" )]
|
||||
public class ShadowWispFamiliar : BaseFamiliar
|
||||
{
|
||||
public ShadowWispFamiliar()
|
||||
{
|
||||
Name = "a shadow wisp";
|
||||
Body = 165;
|
||||
Hue = 0x901;
|
||||
BaseSoundID = 466;
|
||||
|
||||
SetStr( 50 );
|
||||
SetDex( 60 );
|
||||
SetInt( 100 );
|
||||
|
||||
SetHits( 50 );
|
||||
SetStam( 60 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 5, 10 );
|
||||
|
||||
SetDamageType( ResistanceType.Energy, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 99 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
}
|
||||
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.UtcNow < m_NextFlare )
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.UtcNow + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) );
|
||||
|
||||
this.FixedEffect( 0x37C4, 1, 12, 1109, 6 );
|
||||
this.PlaySound( 0x1D3 );
|
||||
|
||||
Timer.DelayCall( TimeSpan.FromSeconds( 0.5 ), new TimerCallback( Flare ) );
|
||||
}
|
||||
|
||||
private void Flare()
|
||||
{
|
||||
Mobile caster = this.ControlMaster;
|
||||
|
||||
if ( caster == null )
|
||||
caster = this.SummonMaster;
|
||||
|
||||
if ( caster == null )
|
||||
return;
|
||||
|
||||
ArrayList list = new ArrayList();
|
||||
|
||||
foreach ( Mobile m in this.GetMobilesInRange( 5 ) )
|
||||
{
|
||||
if ( m.Player && m.Alive && !m.IsDeadBondedPet && m.Karma <= 0 && m.AccessLevel < AccessLevel.Counselor )
|
||||
list.Add( m );
|
||||
}
|
||||
|
||||
for ( int i = 0; i < list.Count; ++i )
|
||||
{
|
||||
Mobile m = (Mobile)list[i];
|
||||
bool friendly = true;
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressors.Count; ++j )
|
||||
friendly = ( caster.Aggressors[j].Attacker != m );
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j )
|
||||
friendly = ( caster.Aggressed[j].Defender != m );
|
||||
|
||||
if ( friendly )
|
||||
{
|
||||
m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player
|
||||
m.Mana += 1 - (m.Karma / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public ShadowWispFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue