Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,210 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Network;
|
||||
using Server.Items;
|
||||
using Server.Targeting;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerFamiliarSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Animal Companion", "Sinta Kurwa Ner Arda Moina",
|
||||
//SpellCircle.Sixth,
|
||||
203,
|
||||
9031,
|
||||
CReagent.DestroyingAngel,
|
||||
CReagent.SpringWater,
|
||||
CReagent.PetrafiedWood
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Sixth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 3.0; } }
|
||||
public override double RequiredSkill{ get{ return 30.0; } }
|
||||
public override int RequiredMana{ get{ return 17; } }
|
||||
|
||||
public RangerFamiliarSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
public static Hashtable Table{ get{ return m_Table; } }
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
BaseCreature check = (BaseCreature)m_Table[Caster];
|
||||
|
||||
if ( check != null && !check.Deleted )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1061605 ); // You already have a familiar.
|
||||
return false;
|
||||
}
|
||||
|
||||
return base.CheckCast();
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Caster.CloseGump( typeof( RangerFamiliarGump ) );
|
||||
Caster.SendGump( new RangerFamiliarGump( Caster, m_Entries ) );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
private static RangerFamiliarEntry[] m_Entries = new RangerFamiliarEntry[]
|
||||
{
|
||||
new RangerFamiliarEntry( typeof( PackRatFamiliar ), "Pack Rat", 30.0, 30.0 ),
|
||||
new RangerFamiliarEntry( typeof( IceHoundFamiliar ), "Ice Hound", 50.0, 50.0 ),
|
||||
new RangerFamiliarEntry( typeof( ThunderHoundFamiliar ), "Thunder Hound", 60.0, 60.0 ),
|
||||
new RangerFamiliarEntry( typeof( HellHoundFamiliar ), "Hell Hound", 80.0, 80.0 ),
|
||||
new RangerFamiliarEntry( typeof( VampireWolfFamiliar ), "Vampire Wolf", 100.0, 100.0 ),
|
||||
new RangerFamiliarEntry( typeof( TigerFamiliar ), "Saber Tooth Tiger", 115.0, 115.0 )
|
||||
|
||||
};
|
||||
|
||||
public static RangerFamiliarEntry[] Entries{ get{ return m_Entries; } }
|
||||
}
|
||||
|
||||
public class RangerFamiliarEntry
|
||||
{
|
||||
private Type m_Type;
|
||||
private object m_Name;
|
||||
private double m_ReqAnimalLore;
|
||||
private double m_ReqAnimalTaming;
|
||||
|
||||
public Type Type{ get{ return m_Type; } }
|
||||
public object Name{ get{ return m_Name; } }
|
||||
public double ReqAnimalLore{ get{ return m_ReqAnimalLore; } }
|
||||
public double ReqAnimalTaming{ get{ return m_ReqAnimalTaming; } }
|
||||
|
||||
public RangerFamiliarEntry( Type type, object name, double reqAnimalLore, double reqAnimalTaming )
|
||||
{
|
||||
m_Type = type;
|
||||
m_Name = name;
|
||||
m_ReqAnimalLore = reqAnimalLore;
|
||||
m_ReqAnimalTaming = reqAnimalTaming;
|
||||
}
|
||||
}
|
||||
|
||||
public class RangerFamiliarGump : Gump
|
||||
{
|
||||
private Mobile m_From;
|
||||
private RangerFamiliarEntry[] m_Entries;
|
||||
|
||||
private const int EnabledColor16 = 0x0F20;
|
||||
private const int DisabledColor16 = 0x262A;
|
||||
|
||||
private const int EnabledColor32 = 0x18CD00;
|
||||
private const int DisabledColor32 = 0x4A8B52;
|
||||
|
||||
public RangerFamiliarGump( Mobile from, RangerFamiliarEntry[] entries ) : base( 200, 100 )
|
||||
{
|
||||
m_From = from;
|
||||
m_Entries = entries;
|
||||
|
||||
AddPage( 0 );
|
||||
|
||||
AddBackground( 10, 10, 250, 178, 9270 );
|
||||
AddAlphaRegion( 20, 20, 230, 158 );
|
||||
|
||||
AddImage( 220, 20, 10464 );
|
||||
AddImage( 220, 72, 10464 );
|
||||
AddImage( 220, 124, 10464 );
|
||||
|
||||
AddItem( 188, 16, 6883 );
|
||||
AddItem( 198, 168, 6881 );
|
||||
AddItem( 8, 15, 6882 );
|
||||
AddItem( 2, 168, 6880 );
|
||||
|
||||
AddHtmlLocalized( 30, 26, 200, 20, 1060147, EnabledColor16, false, false ); // Chose thy familiar...
|
||||
|
||||
double lore = from.Skills[SkillName.AnimalLore].Base;
|
||||
double taming = from.Skills[SkillName.AnimalTaming].Base;
|
||||
|
||||
for ( int i = 0; i < entries.Length; ++i )
|
||||
{
|
||||
object name = entries[i].Name;
|
||||
|
||||
bool enabled = ( lore >= entries[i].ReqAnimalLore && taming >= entries[i].ReqAnimalTaming );
|
||||
|
||||
AddButton( 27, 53 + (i * 21), 9702, 9703, i + 1, GumpButtonType.Reply, 0 );
|
||||
|
||||
if ( name is int )
|
||||
AddHtmlLocalized( 50, 51 + (i * 21), 150, 20, (int)name, enabled ? EnabledColor16 : DisabledColor16, false, false );
|
||||
else if ( name is string )
|
||||
AddHtml( 50, 51 + (i * 21), 150, 20, String.Format( "<BASEFONT COLOR=#{0:X6}>{1}</BASEFONT>", enabled ? EnabledColor32 : DisabledColor32, name ), false, false );
|
||||
}
|
||||
}
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
public override void OnResponse( NetState sender, RelayInfo info )
|
||||
{
|
||||
int index = info.ButtonID - 1;
|
||||
|
||||
if ( index >= 0 && index < m_Entries.Length )
|
||||
{
|
||||
RangerFamiliarEntry entry = m_Entries[index];
|
||||
|
||||
double lore = m_From.Skills[SkillName.AnimalLore].Base;
|
||||
double taming = m_From.Skills[SkillName.AnimalTaming].Base;
|
||||
|
||||
BaseCreature check = (BaseCreature)RangerFamiliarSpell.Table[m_From];
|
||||
|
||||
if ( check != null && !check.Deleted )
|
||||
{
|
||||
m_From.SendLocalizedMessage( 1061605 ); // You already have a familiar.
|
||||
}
|
||||
else if ( lore < entry.ReqAnimalLore || taming < entry.ReqAnimalTaming )
|
||||
{
|
||||
// That familiar requires ~1_NECROMANCY~ Necromancy and ~2_SPIRIT~ Spirit Speak.
|
||||
m_From.SendMessage( String.Format( "That familiar requires {0:F1} Animal Lore and {1:F1} Animal Taming.", entry.ReqAnimalLore, entry.ReqAnimalTaming ) );
|
||||
|
||||
m_From.CloseGump( typeof( RangerFamiliarGump ) );
|
||||
m_From.SendGump( new RangerFamiliarGump( m_From, RangerFamiliarSpell.Entries ) );
|
||||
}
|
||||
else if ( entry.Type == null )
|
||||
{
|
||||
m_From.SendMessage( "That familiar has not yet been defined." );
|
||||
|
||||
m_From.CloseGump( typeof( RangerFamiliarGump ) );
|
||||
m_From.SendGump( new RangerFamiliarGump( m_From, RangerFamiliarSpell.Entries ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
try
|
||||
{
|
||||
BaseCreature bc = (BaseCreature)Activator.CreateInstance( entry.Type );
|
||||
|
||||
bc.Skills.MagicResist = m_From.Skills.MagicResist;
|
||||
|
||||
if ( BaseCreature.Summon( bc, m_From, m_From.Location, -1, TimeSpan.FromDays( 1.0 ) ) )
|
||||
{
|
||||
m_From.FixedParticles( 0x3728, 1, 10, 9910, EffectLayer.Head );
|
||||
bc.PlaySound( bc.GetIdleSound() );
|
||||
RangerFamiliarSpell.Table[m_From] = bc;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_From.SendLocalizedMessage( 1061825 ); // You decide not to summon a familiar.
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,190 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerFireBowSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Bow of Fire", "Kurwa Naur Cu",
|
||||
//SpellCircle.Fifth,
|
||||
212,
|
||||
9041,
|
||||
CReagent.Kindling,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fifth; }
|
||||
}
|
||||
|
||||
public override double CastDelay { get { return 7.0; } }
|
||||
public override double RequiredSkill { get { return 85.0; } }
|
||||
public override int RequiredMana { get { return 30; } }
|
||||
|
||||
public RangerFireBowSpell(Mobile caster, Item scroll)
|
||||
: base(caster, scroll, m_Info)
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if (CheckSequence())
|
||||
{
|
||||
if (this.Scroll != null)
|
||||
Scroll.Consume();
|
||||
|
||||
Item weap = new RangerFireBow(Caster);
|
||||
|
||||
Caster.AddToBackpack(weap);
|
||||
Caster.SendMessage("You create a magical bow and place it in your backpack.");
|
||||
|
||||
Caster.PlaySound(0x212);
|
||||
Caster.PlaySound(0x206);
|
||||
|
||||
Effects.SendLocationParticles(EffectItem.Create(Caster.Location, Caster.Map, EffectItem.DefaultDuration), 0x376A, 1, 29, 0x47D, 2, 9962, 0);
|
||||
Effects.SendLocationParticles(EffectItem.Create(new Point3D(Caster.X, Caster.Y, Caster.Z - 7), Caster.Map, EffectItem.DefaultDuration), 0x37C4, 1, 29, 0x47D, 2, 9502, 0);
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute(0x13B2, 0x13B1)]
|
||||
public class RangerFireBow : BaseRanged
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_Expire;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override int EffectID { get { return 0xF42; } }
|
||||
public override Type AmmoType { get { return typeof(Arrow); } }
|
||||
public override Item Ammo { get { return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility { get { return WeaponAbility.ParalyzingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility { get { return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq { get { return 30; } }
|
||||
public override int AosMinDamage { get { return 16; } }
|
||||
public override int AosMaxDamage { get { return 18; } }
|
||||
public override int AosSpeed { get { return 25; } }
|
||||
|
||||
public override int OldStrengthReq { get { return 20; } }
|
||||
public override int OldMinDamage { get { return 9; } }
|
||||
public override int OldMaxDamage { get { return 41; } }
|
||||
public override int OldSpeed { get { return 20; } }
|
||||
|
||||
public override int DefMaxRange { get { return 10; } }
|
||||
|
||||
public override int InitMinHits { get { return 31; } }
|
||||
public override int InitMaxHits { get { return 60; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation { get { return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public RangerFireBow(Mobile owner)
|
||||
: base(0x13B2)
|
||||
{
|
||||
WeaponAttributes.HitFireArea = 50;
|
||||
WeaponAttributes.HitFireball = 50;
|
||||
m_Owner = owner;
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
Hue = 1161;
|
||||
BlessedFor = owner;
|
||||
Name = "Bow of Fire";
|
||||
|
||||
double time = (owner.Skills[SkillName.Archery].Value / 20.0) * RangerHuntersAimSpell.GetScalar(owner);
|
||||
m_Expire = DateTime.Now + TimeSpan.FromMinutes((int)time);
|
||||
m_Timer = new InternalTimer(this, m_Expire);
|
||||
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
|
||||
{
|
||||
phys = cold = pois = nrgy = chaos = direct = 0;
|
||||
fire = 100;
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if (m_Timer != null)
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override bool CanEquip(Mobile m)
|
||||
{
|
||||
if (m != m_Owner)
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
m_Owner.SendMessage("Your bow slowly dissipates.");
|
||||
Delete();
|
||||
}
|
||||
|
||||
public RangerFireBow(Serial serial)
|
||||
: base(serial)
|
||||
{
|
||||
}
|
||||
public override void AddNameProperties(ObjectPropertyList list)
|
||||
{
|
||||
base.AddNameProperties(list);
|
||||
|
||||
list.Add(1049644, "Temparary Spell Enchantment");
|
||||
}
|
||||
|
||||
public override void Serialize(GenericWriter writer)
|
||||
{
|
||||
base.Serialize(writer);
|
||||
|
||||
writer.Write((int)0); // version
|
||||
writer.Write(m_Owner);
|
||||
writer.Write(m_Expire);
|
||||
}
|
||||
|
||||
public override void Deserialize(GenericReader reader)
|
||||
{
|
||||
base.Deserialize(reader);
|
||||
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_Expire = reader.ReadDeltaTime();
|
||||
|
||||
m_Timer = new InternalTimer(this, m_Expire);
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private RangerFireBow m_Bow;
|
||||
private DateTime m_Expire;
|
||||
|
||||
public InternalTimer(RangerFireBow bow, DateTime expire)
|
||||
: base(TimeSpan.Zero, TimeSpan.FromSeconds(0.1))
|
||||
{
|
||||
m_Bow = bow;
|
||||
m_Expire = expire;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if (DateTime.Now >= m_Expire)
|
||||
{
|
||||
m_Bow.Remove();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,151 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
using Server.Spells.Seventh;
|
||||
using Server.Gumps;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerHuntersAimSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Hunter's Aim", "Cu Ner Sinta",
|
||||
//SpellCircle.Fourth,
|
||||
212,
|
||||
9041,
|
||||
Reagent.Nightshade,
|
||||
CReagent.SpringWater,
|
||||
Reagent.Bloodmoss
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fourth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 3.0; } }
|
||||
public override int RequiredMana{ get{ return 25; } }
|
||||
public override double RequiredSkill{ get{ return 50; } }
|
||||
|
||||
private static Hashtable m_Table = new Hashtable();
|
||||
|
||||
public RangerHuntersAimSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public static double GetScalar( Mobile m )
|
||||
{
|
||||
double val = 1.0;
|
||||
|
||||
if ( m.CanBeginAction( typeof( RangerHuntersAimSpell ) ) )
|
||||
val = 1.5;
|
||||
|
||||
return val;
|
||||
}
|
||||
public static bool HasEffect( Mobile m )
|
||||
{
|
||||
return ( m_Table[m] != null );
|
||||
}
|
||||
|
||||
public static void RemoveEffect( Mobile m )
|
||||
{
|
||||
object[] mods = (object[])m_Table[m];
|
||||
|
||||
if ( mods != null )
|
||||
{
|
||||
m.RemoveStatMod( ((StatMod)mods[0]).Name );
|
||||
m.RemoveStatMod( ((StatMod)mods[1]).Name );
|
||||
m.RemoveSkillMod( (SkillMod)mods[2] );
|
||||
m.RemoveSkillMod( (SkillMod)mods[3] );
|
||||
}
|
||||
|
||||
m_Table.Remove( m );
|
||||
|
||||
m.EndAction( typeof( RangerHuntersAimSpell ) );
|
||||
|
||||
m.BodyMod = 0;
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
else if ( !Caster.CanBeginAction( typeof( RangerHuntersAimSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005559 );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( !Caster.CanBeginAction( typeof( RangerHuntersAimSpell ) ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005559 );
|
||||
}
|
||||
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
object[] mods = new object[]
|
||||
{
|
||||
new StatMod( StatType.Dex, "[Ranger] Dex Offset", 5, TimeSpan.Zero ),
|
||||
new StatMod( StatType.Str, "[Ranger] Str Offset", 5, TimeSpan.Zero ),
|
||||
new DefaultSkillMod( SkillName.Archery, true, 20 ),
|
||||
new DefaultSkillMod( SkillName.Tactics, true, 20 ),
|
||||
|
||||
};
|
||||
|
||||
m_Table[Caster] = mods;
|
||||
|
||||
Caster.AddStatMod( (StatMod)mods[0] );
|
||||
Caster.AddStatMod( (StatMod)mods[1] );
|
||||
Caster.AddSkillMod( (SkillMod)mods[2] );
|
||||
Caster.AddSkillMod( (SkillMod)mods[3] );
|
||||
|
||||
double span = 1.0 * RangerHuntersAimSpell.GetScalar( Caster );
|
||||
new InternalTimer( Caster, TimeSpan.FromMinutes( (int)span ) ).Start();
|
||||
|
||||
IMount mount = Caster.Mount;
|
||||
|
||||
if ( mount != null )
|
||||
mount.Rider = null;
|
||||
|
||||
|
||||
Caster.BeginAction( typeof( RangerHuntersAimSpell ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_Expire;
|
||||
|
||||
public InternalTimer( Mobile owner, TimeSpan duration ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
|
||||
{
|
||||
m_Owner = owner;
|
||||
m_Expire = DateTime.Now + duration;
|
||||
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( DateTime.Now >= m_Expire )
|
||||
{
|
||||
RangerHuntersAimSpell.RemoveEffect( m_Owner );
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,186 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerIceBowSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Bow of Ice", "Kurwa Khelek Cu",
|
||||
//SpellCircle.Fifth,
|
||||
212,
|
||||
9041,
|
||||
CReagent.Kindling,
|
||||
CReagent.SpringWater
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fifth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 7.0; } }
|
||||
public override double RequiredSkill{ get{ return 85.0; } }
|
||||
public override int RequiredMana{ get{ return 30; } }
|
||||
|
||||
public RangerIceBowSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
if(this.Scroll!=null)
|
||||
Scroll.Consume();
|
||||
|
||||
Item weap = new RangerIceBow( Caster );
|
||||
|
||||
Caster.AddToBackpack( weap );
|
||||
Caster.SendMessage( "You create a magical bow and place it in your backpack." );
|
||||
|
||||
Caster.PlaySound( 466 );
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 1, 29, 1266, 2, 9962, 0 );
|
||||
Effects.SendLocationParticles( EffectItem.Create( new Point3D( Caster.X, Caster.Y, Caster.Z - 7 ), Caster.Map, EffectItem.DefaultDuration ), 0x37C4, 1, 29, 1266, 2, 9502, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class RangerIceBow : BaseRanged
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_Expire;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return 16; } }
|
||||
public override int AosMaxDamage{ get{ return 18; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 20; } }
|
||||
public override int OldMinDamage{ get{ return 9; } }
|
||||
public override int OldMaxDamage{ get{ return 41; } }
|
||||
public override int OldSpeed{ get{ return 20; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public RangerIceBow( Mobile owner ) : base( 0x13B2 )
|
||||
|
||||
{
|
||||
WeaponAttributes.HitColdArea = 50;
|
||||
WeaponAttributes.HitHarm = 50;
|
||||
m_Owner = owner;
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
Hue = 1266;
|
||||
BlessedFor = owner;
|
||||
Name = "Bow of Ice";
|
||||
|
||||
double time = ( owner.Skills[SkillName.Archery].Value / 20.0 ) * RangerHuntersAimSpell.GetScalar( owner );
|
||||
m_Expire = DateTime.Now + TimeSpan.FromMinutes( (int)time );
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
|
||||
{
|
||||
phys = fire = pois = nrgy = chaos = direct = 0;
|
||||
cold = 100;
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile m )
|
||||
{
|
||||
if ( m != m_Owner )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
m_Owner.SendMessage( "Your bow slowly dissipates." );
|
||||
Delete();
|
||||
}
|
||||
|
||||
public RangerIceBow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1049644, "Temparary Spell Enchantment" );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( m_Owner );
|
||||
writer.Write( m_Expire );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_Expire = reader.ReadDeltaTime();
|
||||
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private RangerIceBow m_Bow;
|
||||
private DateTime m_Expire;
|
||||
|
||||
public InternalTimer( RangerIceBow bow, DateTime expire ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
|
||||
{
|
||||
m_Bow = bow;
|
||||
m_Expire = expire;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( DateTime.Now >= m_Expire )
|
||||
{
|
||||
m_Bow.Remove();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,183 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerLightningBowSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Bow of Lightning", "Kurwa Vilya Cu",
|
||||
//SpellCircle.Fifth,
|
||||
212,
|
||||
9041,
|
||||
CReagent.Kindling,
|
||||
Reagent.BlackPearl
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fifth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 7.0; } }
|
||||
public override double RequiredSkill{ get{ return 90.0; } }
|
||||
public override int RequiredMana{ get{ return 30; } }
|
||||
|
||||
public RangerLightningBowSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Item weap = new RangerLightningBow( Caster );
|
||||
|
||||
Caster.AddToBackpack( weap );
|
||||
Caster.SendMessage( "You create a magical bow and place it in your backpack." );
|
||||
|
||||
Caster.PlaySound( 518 );
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 1, 29, 1278, 2, 9962, 0 );
|
||||
Effects.SendLocationParticles( EffectItem.Create( new Point3D( Caster.X, Caster.Y, Caster.Z - 7 ), Caster.Map, EffectItem.DefaultDuration ), 0x37C4, 1, 29, 1278, 2, 9502, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class RangerLightningBow : BaseRanged
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_Expire;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.ParalyzingBlow; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return 16; } }
|
||||
public override int AosMaxDamage{ get{ return 18; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 20; } }
|
||||
public override int OldMinDamage{ get{ return 9; } }
|
||||
public override int OldMaxDamage{ get{ return 41; } }
|
||||
public override int OldSpeed{ get{ return 20; } }
|
||||
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public RangerLightningBow( Mobile owner ) : base( 0x13B2 )
|
||||
|
||||
{
|
||||
WeaponAttributes.HitEnergyArea = 50;
|
||||
WeaponAttributes.HitLightning = 50;
|
||||
m_Owner = owner;
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
Hue = 1278;
|
||||
BlessedFor = owner;
|
||||
Name = "Bow of Lightning";
|
||||
|
||||
double time = ( owner.Skills[SkillName.Archery].Value / 20.0 ) * RangerHuntersAimSpell.GetScalar( owner );
|
||||
m_Expire = DateTime.Now + TimeSpan.FromMinutes( (int)time );
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
|
||||
{
|
||||
phys = fire = cold = pois = chaos = direct = 0;
|
||||
nrgy = 100;
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile m )
|
||||
{
|
||||
if ( m != m_Owner )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
m_Owner.SendMessage( "Your bow slowly dissipates." );
|
||||
Delete();
|
||||
}
|
||||
|
||||
public RangerLightningBow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
|
||||
list.Add( 1049644, "Temparary Spell Enchantment" );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( m_Owner );
|
||||
writer.Write( m_Expire );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_Expire = reader.ReadDeltaTime();
|
||||
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private RangerLightningBow m_Bow;
|
||||
private DateTime m_Expire;
|
||||
|
||||
public InternalTimer( RangerLightningBow bow, DateTime expire ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
|
||||
{
|
||||
m_Bow = bow;
|
||||
m_Expire = expire;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( DateTime.Now >= m_Expire )
|
||||
{
|
||||
m_Bow.Remove();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,189 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server.Targeting;
|
||||
using Server.Network;
|
||||
using Server.Mobiles;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerNoxBowSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Nox Bow", "Kurwa Kshapsa Cu",
|
||||
//SpellCircle.Fifth,
|
||||
212,
|
||||
9041,
|
||||
CReagent.Kindling,
|
||||
Reagent.Nightshade
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fifth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 7.0; } }
|
||||
public override double RequiredSkill{ get{ return 95.0; } }
|
||||
public override int RequiredMana{ get{ return 30; } }
|
||||
|
||||
public RangerNoxBowSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
Item weap = new RangerNoxBow( Caster );
|
||||
|
||||
Caster.AddToBackpack( weap );
|
||||
Caster.SendMessage( "You create a magical bow and place it in your backpack." );
|
||||
|
||||
Caster.PlaySound( 481 );
|
||||
|
||||
Effects.SendLocationParticles( EffectItem.Create( Caster.Location, Caster.Map, EffectItem.DefaultDuration ), 0x376A, 1, 29, 1278, 2, 9962, 0 );
|
||||
Effects.SendLocationParticles( EffectItem.Create( new Point3D( Caster.X, Caster.Y, Caster.Z - 7 ), Caster.Map, EffectItem.DefaultDuration ), 0x37C4, 1, 29, 1278, 2, 9502, 0 );
|
||||
}
|
||||
}
|
||||
|
||||
[FlipableAttribute( 0x13B2, 0x13B1 )]
|
||||
public class RangerNoxBow : BaseRanged
|
||||
{
|
||||
private Mobile m_Owner;
|
||||
private DateTime m_Expire;
|
||||
private Timer m_Timer;
|
||||
|
||||
public override int EffectID{ get{ return 0xF42; } }
|
||||
public override Type AmmoType{ get{ return typeof( Arrow ); } }
|
||||
public override Item Ammo{ get{ return new Arrow(); } }
|
||||
|
||||
public override WeaponAbility PrimaryAbility{ get{ return WeaponAbility.InfectiousStrike; } }
|
||||
public override WeaponAbility SecondaryAbility{ get{ return WeaponAbility.MortalStrike; } }
|
||||
|
||||
public override int AosStrengthReq{ get{ return 30; } }
|
||||
public override int AosMinDamage{ get{ return 16; } }
|
||||
public override int AosMaxDamage{ get{ return 18; } }
|
||||
public override int AosSpeed{ get{ return 25; } }
|
||||
|
||||
public override int OldStrengthReq{ get{ return 20; } }
|
||||
public override int OldMinDamage{ get{ return 9; } }
|
||||
public override int OldMaxDamage{ get{ return 41; } }
|
||||
public override int OldSpeed{ get{ return 20; } }
|
||||
public override float MlSpeed { get { return 4.25f; } }
|
||||
public override int DefMaxRange{ get{ return 10; } }
|
||||
|
||||
public override int InitMinHits{ get{ return 31; } }
|
||||
public override int InitMaxHits{ get{ return 60; } }
|
||||
|
||||
public override WeaponAnimation DefAnimation{ get{ return WeaponAnimation.ShootBow; } }
|
||||
|
||||
[Constructable]
|
||||
public RangerNoxBow( Mobile owner ) : base( 0x13B2 )
|
||||
|
||||
{
|
||||
WeaponAttributes.HitPoisonArea = 50;
|
||||
m_Owner = owner;
|
||||
Weight = 6.0;
|
||||
Layer = Layer.TwoHanded;
|
||||
Hue = 1272;
|
||||
BlessedFor = owner;
|
||||
Name = "Nox Bow";
|
||||
|
||||
double time = ( owner.Skills[SkillName.Archery].Value / 20.0 ) * RangerHuntersAimSpell.GetScalar( owner );
|
||||
m_Expire = DateTime.Now + TimeSpan.FromMinutes( (int)time );
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
|
||||
m_Timer.Start();
|
||||
}
|
||||
|
||||
public override void OnHit(Mobile attacker, IDamageable defender, double damageBonus)
|
||||
{
|
||||
if ( 0.1 > Utility.RandomDouble() )
|
||||
attacker.ApplyPoison( attacker, Poison.Lesser );
|
||||
|
||||
base.OnHit( attacker, defender, damageBonus );
|
||||
}
|
||||
|
||||
public override void GetDamageTypes(Mobile wielder, out int phys, out int fire, out int cold, out int pois, out int nrgy, out int chaos, out int direct)
|
||||
{
|
||||
phys = cold = fire = nrgy = chaos = direct = 0;
|
||||
pois = 100;
|
||||
}
|
||||
|
||||
public override void OnDelete()
|
||||
{
|
||||
if ( m_Timer != null )
|
||||
m_Timer.Stop();
|
||||
|
||||
base.OnDelete();
|
||||
}
|
||||
|
||||
public override bool CanEquip( Mobile m )
|
||||
{
|
||||
if ( m != m_Owner )
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public void Remove()
|
||||
{
|
||||
m_Owner.SendMessage( "Your bow slowly dissipates." );
|
||||
Delete();
|
||||
}
|
||||
|
||||
public RangerNoxBow( Serial serial ) : base( serial )
|
||||
{
|
||||
}
|
||||
public override void AddNameProperties( ObjectPropertyList list )
|
||||
{
|
||||
base.AddNameProperties( list );
|
||||
list.Add( 1049644, "Temparary Spell Enchantment" );
|
||||
}
|
||||
|
||||
public override void Serialize( GenericWriter writer )
|
||||
{
|
||||
base.Serialize( writer );
|
||||
|
||||
writer.Write( (int) 0 ); // version
|
||||
writer.Write( m_Owner );
|
||||
writer.Write( m_Expire );
|
||||
}
|
||||
|
||||
public override void Deserialize( GenericReader reader )
|
||||
{
|
||||
base.Deserialize( reader );
|
||||
|
||||
int version = reader.ReadInt();
|
||||
m_Owner = reader.ReadMobile();
|
||||
m_Expire = reader.ReadDeltaTime();
|
||||
|
||||
m_Timer = new InternalTimer( this, m_Expire );
|
||||
m_Timer.Start();
|
||||
}
|
||||
}
|
||||
|
||||
private class InternalTimer : Timer
|
||||
{
|
||||
private RangerNoxBow m_Bow;
|
||||
private DateTime m_Expire;
|
||||
|
||||
public InternalTimer( RangerNoxBow bow, DateTime expire ) : base( TimeSpan.Zero, TimeSpan.FromSeconds( 0.1 ) )
|
||||
{
|
||||
m_Bow = bow;
|
||||
m_Expire = expire;
|
||||
}
|
||||
|
||||
protected override void OnTick()
|
||||
{
|
||||
if ( DateTime.Now >= m_Expire )
|
||||
{
|
||||
m_Bow.Remove();
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,185 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Multis;
|
||||
using Server.Network;
|
||||
using Server.Targeting;
|
||||
using Server.Regions;
|
||||
using Server.Mobiles;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerPhoenixFlightSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Flight of the Phoenix", "Kurwa Vilya Thoron",
|
||||
//SpellCircle.Fourth,
|
||||
239,
|
||||
9031,
|
||||
CReagent.PetrafiedWood,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fourth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 0.5; } }
|
||||
public override double RequiredSkill{ get{ return 15.0; } }
|
||||
public override int RequiredMana{ get{ return 10; } }
|
||||
private RunebookEntry m_Entry;
|
||||
private Runebook m_Book;
|
||||
|
||||
public RangerPhoenixFlightSpell( Mobile caster, Item scroll ) : this( caster, scroll, null, null )
|
||||
{
|
||||
}
|
||||
|
||||
public RangerPhoenixFlightSpell( Mobile caster, Item scroll, RunebookEntry entry, Runebook book ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
m_Entry = entry;
|
||||
m_Book = book;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( m_Entry == null )
|
||||
Caster.Target = new InternalTarget( this );
|
||||
else
|
||||
Effect( m_Entry.Location, m_Entry.Map, true );
|
||||
}
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( Caster.Criminal )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
|
||||
return false;
|
||||
}
|
||||
else if ( SpellHelper.CheckCombat( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
|
||||
return false;
|
||||
}
|
||||
else if ( Server.Misc.WeightOverloading.IsOverloaded( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502359, "", 0x22 ); // Thou art too encumbered to move.
|
||||
return false;
|
||||
}
|
||||
|
||||
return SpellHelper.CheckTravel( Caster, TravelCheckType.RecallFrom );
|
||||
}
|
||||
|
||||
public void Effect( Point3D loc, Map map, bool checkMulti )
|
||||
{
|
||||
if ( map == null || (!Core.AOS && Caster.Map != map) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005569 ); // You can not recall to another facet.
|
||||
}
|
||||
else if ( !SpellHelper.CheckTravel( Caster, TravelCheckType.RecallFrom ) )
|
||||
{
|
||||
}
|
||||
else if ( !SpellHelper.CheckTravel( Caster, map, loc, TravelCheckType.RecallTo ) )
|
||||
{
|
||||
}
|
||||
else if ( Caster.Kills >= 5 && map != Map.Felucca )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1019004 ); // You are not allowed to travel there.
|
||||
}
|
||||
else if ( Caster.Criminal )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005561, "", 0x22 ); // Thou'rt a criminal and cannot escape so easily.
|
||||
}
|
||||
else if ( SpellHelper.CheckCombat( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1005564, "", 0x22 ); // Wouldst thou flee during the heat of battle??
|
||||
}
|
||||
else if ( Server.Misc.WeightOverloading.IsOverloaded( Caster ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502359, "", 0x22 ); // Thou art too encumbered to move.
|
||||
}
|
||||
else if ( !map.CanSpawnMobile( loc.X, loc.Y, loc.Z ) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
|
||||
}
|
||||
else if ( (checkMulti && SpellHelper.CheckMulti( loc, map )) )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
|
||||
}
|
||||
else if ( m_Book != null && m_Book.CurCharges <= 0 )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 502412 ); // There are no charges left on that item.
|
||||
}
|
||||
else if ( CheckSequence() )
|
||||
{
|
||||
BaseCreature.TeleportPets( Caster, loc, map, true );
|
||||
if ( m_Book != null )
|
||||
--m_Book.CurCharges;
|
||||
|
||||
Caster.PlaySound( 143 );
|
||||
Caster.Map = map;
|
||||
Caster.Location = loc;
|
||||
Caster.FixedParticles( 0x3779, 1, 30, 9964, 3, 3, EffectLayer.Waist );
|
||||
|
||||
IEntity from = new Entity( Serial.Zero, new Point3D( Caster.X, Caster.Y, Caster.Z ), Caster.Map );
|
||||
IEntity to = new Entity( Serial.Zero, new Point3D( Caster.X, Caster.Y, Caster.Z + 50 ), Caster.Map );
|
||||
Effects.SendMovingParticles( from, to, 0x20F2, 2, 1, false, false, 0, 3, 9501, 1, 0, EffectLayer.Head, 0x100 );
|
||||
Caster.PlaySound( 144 );
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
|
||||
private class InternalTarget : Target
|
||||
{
|
||||
private RangerPhoenixFlightSpell m_Owner;
|
||||
|
||||
public InternalTarget( RangerPhoenixFlightSpell owner ) : base( 12, false, TargetFlags.None )
|
||||
{
|
||||
m_Owner = owner;
|
||||
|
||||
owner.Caster.LocalOverheadMessage( MessageType.Regular, 0x3B2, 501029 ); // Select Marked item.
|
||||
}
|
||||
|
||||
protected override void OnTarget( Mobile from, object o )
|
||||
{
|
||||
if ( o is RecallRune )
|
||||
{
|
||||
RecallRune rune = (RecallRune)o;
|
||||
|
||||
if ( rune.Marked )
|
||||
m_Owner.Effect( rune.Target, rune.TargetMap, true );
|
||||
else
|
||||
from.SendLocalizedMessage( 501805 ); // That rune is not yet marked.
|
||||
}
|
||||
else if ( o is Runebook )
|
||||
{
|
||||
RunebookEntry e = ((Runebook)o).Default;
|
||||
|
||||
if ( e != null )
|
||||
m_Owner.Effect( e.Location, e.Map, true );
|
||||
else
|
||||
from.SendLocalizedMessage( 502354 ); // Target is not marked.
|
||||
}
|
||||
else if ( o is Key && ((Key)o).KeyValue != 0 && ((Key)o).Link is BaseBoat )
|
||||
{
|
||||
BaseBoat boat = ((Key)o).Link as BaseBoat;
|
||||
|
||||
if ( !boat.Deleted && boat.CheckKey( ((Key)o).KeyValue ) )
|
||||
m_Owner.Effect( boat.GetMarkedLocation(), boat.Map, false );
|
||||
else
|
||||
from.Send( new MessageLocalized( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "" ) ); // I can not recall from that object.
|
||||
}
|
||||
else
|
||||
{
|
||||
from.Send( new MessageLocalized( from.Serial, from.Body, MessageType.Regular, 0x3B2, 3, 502357, from.Name, "" ) ); // I can not recall from that object.
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnTargetFinish( Mobile from )
|
||||
{
|
||||
m_Owner.FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
using Server.Spells;
|
||||
using Server.Targeting;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerSummonMountSpell : RangerSpell
|
||||
{
|
||||
private static SpellInfo m_Info = new SpellInfo(
|
||||
"Call Mount", "*Blows Decreative Flute*",
|
||||
//SpellCircle.Fifth,
|
||||
266,
|
||||
9040,
|
||||
CReagent.SpringWater,
|
||||
Reagent.BlackPearl,
|
||||
Reagent.SulfurousAsh
|
||||
);
|
||||
|
||||
public override SpellCircle Circle
|
||||
{
|
||||
get { return SpellCircle.Fifth; }
|
||||
}
|
||||
|
||||
public override double CastDelay{ get{ return 2.0; } }
|
||||
public override int RequiredMana{ get{ return 15; } }
|
||||
public override double RequiredSkill{ get{ return 30; } }
|
||||
|
||||
public RangerSummonMountSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
|
||||
{
|
||||
}
|
||||
|
||||
private static Type[] m_Types = new Type[]
|
||||
{
|
||||
typeof( ForestOstard ),
|
||||
typeof( DesertOstard ),
|
||||
typeof( Ridgeback ),
|
||||
typeof( ForestOstard ),
|
||||
typeof( Horse ),
|
||||
typeof( DesertOstard ),
|
||||
typeof( Horse ),
|
||||
typeof( Ridgeback ),
|
||||
typeof( SwampDragon ),
|
||||
typeof( RidableLlama ),
|
||||
typeof( RidableLlama ),
|
||||
typeof( Horse )
|
||||
};
|
||||
|
||||
public override bool CheckCast()
|
||||
{
|
||||
if ( !base.CheckCast() )
|
||||
return false;
|
||||
|
||||
if ( (Caster.Followers + 1) > Caster.FollowersMax )
|
||||
{
|
||||
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
|
||||
return false;
|
||||
}
|
||||
Caster.PlaySound( 0x3D );
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void OnCast()
|
||||
{
|
||||
if ( CheckSequence() )
|
||||
{
|
||||
try
|
||||
{
|
||||
BaseCreature creature = (BaseCreature)Activator.CreateInstance( m_Types[Utility.Random( m_Types.Length )] );
|
||||
|
||||
creature.ControlSlots = 1;
|
||||
|
||||
TimeSpan duration;
|
||||
|
||||
if ( Core.AOS )
|
||||
duration = TimeSpan.FromSeconds( (2 * Caster.Skills.AnimalLore.Fixed) / 5 );
|
||||
else
|
||||
duration = TimeSpan.FromSeconds( 4.0 * Caster.Skills[SkillName.AnimalLore].Value );
|
||||
|
||||
SpellHelper.Summon( creature, Caster, 0x215, duration, false, false );
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
FinishSequence();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user