Overwrite
Complete Overwrite of the Folder with the free shard. ServUO 57.3 has been added.
This commit is contained in:
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName( "a hell hound corpse" )]
|
||||
public class HellHoundFamiliar : BaseFamiliar
|
||||
{
|
||||
public HellHoundFamiliar()
|
||||
{
|
||||
Name = "a hell hound";
|
||||
Body = 98;
|
||||
Hue = 1161;
|
||||
BaseSoundID = 229;
|
||||
|
||||
SetStr( 100 );
|
||||
SetDex( 90 );
|
||||
SetInt( 50 );
|
||||
|
||||
SetHits( 80 );
|
||||
SetStam( 70 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 15, 30 );
|
||||
|
||||
SetDamageType( ResistanceType.Fire, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
SetResistance( ResistanceType.Fire, 99 );
|
||||
SetResistance( ResistanceType.Cold, 10, 15 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 60.0 );
|
||||
SetSkill( SkillName.Tactics, 60.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
AddItem( new LightSource() );
|
||||
SetSpecialAbility(SpecialAbility.DragonBreath);
|
||||
}
|
||||
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.Now < m_NextFlare )
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) );
|
||||
|
||||
this.FixedEffect( 0x37C4, 1, 12, 1109, 6 );
|
||||
this.PlaySound( 230 );
|
||||
|
||||
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 )
|
||||
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 = ( ((AggressorInfo)caster.Aggressors[j]).Attacker != m );
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j )
|
||||
friendly = ( ((AggressorInfo)caster.Aggressed[j]).Defender != m );
|
||||
|
||||
if ( friendly )
|
||||
{
|
||||
m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player
|
||||
m.Mana += 1 - (m.Karma / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public HellHoundFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName( "an ice hound corpse" )]
|
||||
public class IceHoundFamiliar : BaseFamiliar
|
||||
{
|
||||
public IceHoundFamiliar()
|
||||
{
|
||||
Name = "an ice hound";
|
||||
Body = 98;
|
||||
Hue = 1152;
|
||||
BaseSoundID = 229;
|
||||
|
||||
SetStr( 80 );
|
||||
SetDex( 70 );
|
||||
SetInt( 30 );
|
||||
|
||||
SetHits( 50 );
|
||||
SetStam( 60 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 8, 15 );
|
||||
|
||||
SetDamageType( ResistanceType.Cold, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 10, 15 );
|
||||
SetResistance( ResistanceType.Fire, 10, 15 );
|
||||
SetResistance( ResistanceType.Cold, 99 );
|
||||
SetResistance( ResistanceType.Poison, 10, 15 );
|
||||
SetResistance( ResistanceType.Energy, 10, 15 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 40.0 );
|
||||
SetSkill( SkillName.Tactics, 40.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
AddItem( new LightSource() );
|
||||
SetSpecialAbility(SpecialAbility.DragonBreath);
|
||||
}
|
||||
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.Now < m_NextFlare )
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) );
|
||||
|
||||
this.FixedEffect( 0x37C4, 1, 12, 1109, 6 );
|
||||
this.PlaySound( 230 );
|
||||
|
||||
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 )
|
||||
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 = ( ((AggressorInfo)caster.Aggressors[j]).Attacker != m );
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j )
|
||||
friendly = ( ((AggressorInfo)caster.Aggressed[j]).Defender != m );
|
||||
|
||||
if ( friendly )
|
||||
{
|
||||
m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player
|
||||
m.Mana += 1 - (m.Karma / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public IceHoundFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,205 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using Server;
|
||||
using Server.ContextMenus;
|
||||
using Server.Items;
|
||||
using Server.Gumps;
|
||||
using Server.Mobiles;
|
||||
using Server.Network;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName("a pack rat corpse")]
|
||||
public class PackRatFamiliar : BaseFamiliar
|
||||
{
|
||||
public PackRatFamiliar()
|
||||
{
|
||||
Name = "a pack 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;
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
Container pack = Backpack;
|
||||
|
||||
if (pack != null)
|
||||
pack.Delete();
|
||||
|
||||
pack = new StrongBackpack();
|
||||
pack.Movable = false;
|
||||
|
||||
AddItem(pack);
|
||||
}
|
||||
|
||||
private DateTime m_NextPickup;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if (DateTime.Now < m_NextPickup)
|
||||
return;
|
||||
|
||||
m_NextPickup = DateTime.Now + 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 PackRatFamiliar(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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName( "a thunder hound corpse" )]
|
||||
public class ThunderHoundFamiliar : BaseFamiliar
|
||||
{
|
||||
public ThunderHoundFamiliar()
|
||||
{
|
||||
Name = "a thunder hound";
|
||||
Body = 98;
|
||||
Hue = 1176;
|
||||
BaseSoundID = 229;
|
||||
|
||||
SetStr( 90 );
|
||||
SetDex( 80 );
|
||||
SetInt( 40 );
|
||||
|
||||
SetHits( 70 );
|
||||
SetStam( 70 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 10, 20 );
|
||||
|
||||
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, 50.0 );
|
||||
SetSkill( SkillName.Tactics, 50.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
AddItem( new LightSource() );
|
||||
SetSpecialAbility(SpecialAbility.DragonBreath);
|
||||
}
|
||||
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.Now < m_NextFlare )
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) );
|
||||
|
||||
this.FixedEffect( 0x37C4, 1, 12, 1109, 6 );
|
||||
this.PlaySound( 230 );
|
||||
|
||||
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 )
|
||||
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 = ( ((AggressorInfo)caster.Aggressors[j]).Attacker != m );
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j )
|
||||
friendly = ( ((AggressorInfo)caster.Aggressed[j]).Defender != m );
|
||||
|
||||
if ( friendly )
|
||||
{
|
||||
m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player
|
||||
m.Mana += 1 - (m.Karma / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public ThunderHoundFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName( "a saber tooth tiger corpse" )]
|
||||
public class TigerFamiliar : BaseFamiliar
|
||||
{
|
||||
public TigerFamiliar()
|
||||
{
|
||||
Name = "a saber tooth tiger";
|
||||
Body = 251;
|
||||
Hue = 2213;
|
||||
BaseSoundID = 229;
|
||||
|
||||
SetStr( 120, 135 );
|
||||
SetDex( 110 );
|
||||
SetInt( 60 );
|
||||
|
||||
SetHits( 100, 120 );
|
||||
SetStam( 70 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 20, 35 );
|
||||
|
||||
SetDamageType( ResistanceType.Physical, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 50 );
|
||||
SetResistance( ResistanceType.Fire, 50 );
|
||||
SetResistance( ResistanceType.Cold, 50 );
|
||||
SetResistance( ResistanceType.Poison, 50 );
|
||||
SetResistance( ResistanceType.Energy, 50 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 100.0 );
|
||||
SetSkill( SkillName.Tactics, 100.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public TigerFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,120 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
using Server.Mobiles;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
[CorpseName( "a vampire wolf corpse" )]
|
||||
public class VampireWolfFamiliar : BaseFamiliar
|
||||
{
|
||||
public VampireWolfFamiliar()
|
||||
{
|
||||
Name = "a vampire wolf";
|
||||
Body = 98;
|
||||
Hue = 137;
|
||||
BaseSoundID = 229;
|
||||
|
||||
SetStr( 110, 115 );
|
||||
SetDex( 100 );
|
||||
SetInt( 60 );
|
||||
|
||||
SetHits( 80, 105 );
|
||||
SetStam( 70 );
|
||||
SetMana( 0 );
|
||||
|
||||
SetDamage( 15, 30 );
|
||||
|
||||
SetDamageType( ResistanceType.Fire, 100 );
|
||||
|
||||
SetResistance( ResistanceType.Physical, 70 );
|
||||
SetResistance( ResistanceType.Fire, 70 );
|
||||
SetResistance( ResistanceType.Cold, 70 );
|
||||
SetResistance( ResistanceType.Poison, 70 );
|
||||
SetResistance( ResistanceType.Energy, 70 );
|
||||
|
||||
SetSkill( SkillName.Wrestling, 70.0 );
|
||||
SetSkill( SkillName.Tactics, 70.0 );
|
||||
|
||||
ControlSlots = 1;
|
||||
|
||||
AddItem( new LightSource() );
|
||||
SetSpecialAbility(SpecialAbility.DragonBreath);
|
||||
}
|
||||
|
||||
private DateTime m_NextFlare;
|
||||
|
||||
public override void OnThink()
|
||||
{
|
||||
base.OnThink();
|
||||
|
||||
if ( DateTime.Now < m_NextFlare )
|
||||
return;
|
||||
|
||||
m_NextFlare = DateTime.Now + TimeSpan.FromSeconds( 5.0 + (25.0 * Utility.RandomDouble()) );
|
||||
|
||||
this.FixedEffect( 0x37C4, 1, 12, 1109, 6 );
|
||||
this.PlaySound( 230 );
|
||||
|
||||
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 )
|
||||
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 = ( ((AggressorInfo)caster.Aggressors[j]).Attacker != m );
|
||||
|
||||
for ( int j = 0; friendly && j < caster.Aggressed.Count; ++j )
|
||||
friendly = ( ((AggressorInfo)caster.Aggressed[j]).Defender != m );
|
||||
|
||||
if ( friendly )
|
||||
{
|
||||
m.FixedEffect( 0x37C4, 1, 12, 1109, 3 ); // At player
|
||||
m.Mana += 1 - (m.Karma / 1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public override Poison HitPoison{ get{ return Poison.Greater; } }
|
||||
|
||||
public VampireWolfFamiliar( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerBag : ScrollBag
|
||||
{
|
||||
[Constructable]
|
||||
public RangerBag()
|
||||
{
|
||||
Hue = 2001;
|
||||
PlaceItemIn( 30, 35, new RangerFireBowScroll() );
|
||||
PlaceItemIn( 50, 35, new RangerPhoenixFlightScroll() );
|
||||
PlaceItemIn( 70, 35, new RangerHuntersAimScroll() );
|
||||
PlaceItemIn( 90, 35, new RangerIceBowScroll() );
|
||||
PlaceItemIn( 30, 55, new RangerLightningBowScroll() );
|
||||
PlaceItemIn( 50, 55, new RangerFamiliarScroll() );
|
||||
PlaceItemIn( 70, 55, new RangerNoxBowScroll() );
|
||||
PlaceItemIn( 90, 55, new RangerSummonMountScroll() );
|
||||
}
|
||||
|
||||
public RangerBag( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using Server;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerList : BaseInitializer
|
||||
{
|
||||
public static void Configure()
|
||||
{
|
||||
Register( typeof( RangerHuntersAimSpell ), "Hunter's Aim", "Increases the Rangers archery, and tactics for a short period of time.", "Nightshade; Spring Water; Bloodmoss", "Mana: 25; Skill: 50", 2244, 5054, School.Ranger );
|
||||
Register( typeof( RangerPhoenixFlightSpell ), "Phoenix Flight", "Calls Forth a Phoenix who will carry you to the location of your choice.", "Sulfurous Ash; Petrafied Wood", "Mana: 10; Skill: 15", 20736, 5054, School.Ranger );
|
||||
Register( typeof( RangerFamiliarSpell ), "Animal Companion", "The Ranger summons an animal companion (baised on skill level) to aid him in his quests.", "Destroying Angel; Spring Water; Petrafied Wood", "Mana: 17; Skill: 30", 20491, 5054, School.Ranger );
|
||||
Register( typeof( RangerFireBowSpell ), "Fire Bow", "The Ranger uses his knowlage of archery and hunting, to craft a temparary fire elemental bow, that last for a short duration.", "Kindling; Sulfurous Ash", "Mana: 30; Skill: 85", 2257, 5054, School.Ranger );
|
||||
Register( typeof( RangerIceBowSpell ), "Ice Bow", "The Ranger uses his knowlage of archery and hunting, to craft a temparary ice elemental bow, that last for a short duration.", "Kindling; Spring Water", "Mana: 30; Skill: 85", 21001, 5054, School.Ranger );
|
||||
Register( typeof( RangerLightningBowSpell ), "Lightning Bow", "The Ranger uses his knowlage of archery and hunting, to craft a temparary lightning elemental bow, that last for a short duration.", "Kindling; Black Pearl", "Mana: 30; Skill: 90", 2281, 5054, School.Ranger );
|
||||
Register( typeof( RangerNoxBowSpell ), "Nox Bow", "The Ranger uses his knowlage of archery and hunting, to craft a temparary poison elemental bow, that last for a short duration.", "Kindling; Nightshade", "Mana: 30; Skill: 95", 20488, 5054, School.Ranger );
|
||||
Register( typeof( RangerSummonMountSpell ), "Call Mount", "The Ranger calls to the Wilds, summoning a speedy mount to his side.", "Spring Water; Black Pearl; Sulfurous Ash", "Mana: 15; Skill: 30", 20745, 5054, School.Ranger );
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public abstract class RangerSpell : CSpell
|
||||
{
|
||||
public RangerSpell( Mobile caster, Item scroll, SpellInfo info ) : base( caster, scroll, info )
|
||||
{
|
||||
}
|
||||
|
||||
public abstract SpellCircle Circle { get; }
|
||||
|
||||
public override TimeSpan CastDelayBase { get { return TimeSpan.FromSeconds(3 * CastDelaySecondsPerTick); } }
|
||||
public override SkillName CastSkill { get { return SkillName.Archery; } }
|
||||
public override SkillName DamageSkill { get { return SkillName.Tactics; } }
|
||||
|
||||
public override bool ClearHandsOnCast { get { return false; } }
|
||||
|
||||
public override void GetCastSkills( out double min, out double max )
|
||||
{
|
||||
min = RequiredSkill;
|
||||
max = RequiredSkill;
|
||||
}
|
||||
|
||||
public override int GetMana()
|
||||
{
|
||||
return RequiredMana;
|
||||
}
|
||||
|
||||
public override TimeSpan GetCastDelay()
|
||||
{
|
||||
return TimeSpan.FromSeconds( CastDelay );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
using System;
|
||||
using Server.Items;
|
||||
using Server.Spells;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerSpellbook : CSpellbook
|
||||
{
|
||||
public override School School{ get{ return School.Ranger; } }
|
||||
|
||||
[Constructable]
|
||||
public RangerSpellbook() : this( (ulong)0, CSSettings.FullSpellbooks )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerSpellbook( bool full ) : this( (ulong)0, full )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerSpellbook( ulong content, bool full ) : base( content, 0xEFA, full )
|
||||
{
|
||||
Hue = 2001;
|
||||
Name = "Ranger Survival Guide";
|
||||
}
|
||||
|
||||
public override void OnDoubleClick( Mobile from )
|
||||
{
|
||||
if ( from.AccessLevel == AccessLevel.Player )
|
||||
{
|
||||
Container pack = from.Backpack;
|
||||
if( !(Parent == from || (pack != null && Parent == pack)) )
|
||||
{
|
||||
from.SendMessage( "The spellbook must be in your backpack [and not in a container within] to open." );
|
||||
return;
|
||||
}
|
||||
else if( SpellRestrictions.UseRestrictions && !SpellRestrictions.CheckRestrictions( from, this.School ) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
from.CloseGump( typeof( RangerSpellbookGump ) );
|
||||
from.SendGump( new RangerSpellbookGump( this ) );
|
||||
}
|
||||
|
||||
public RangerSpellbook( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerSpellbookGump : CSpellbookGump
|
||||
{
|
||||
public override string TextHue { get{ return "336633"; } }
|
||||
public override int BGImage { get{ return 2203; } }
|
||||
public override int SpellBtn { get{ return 2362; } }
|
||||
public override int SpellBtnP{ get{ return 2361; } }
|
||||
public override string Label1 { get{ return "Ranger"; } }
|
||||
public override string Label2 { get{ return "Spells"; } }
|
||||
public override Type GumpType { get{ return typeof( RangerSpellbookGump ); } }
|
||||
|
||||
public RangerSpellbookGump( CSpellbook book ) : base( book )
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerFireBowScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerFireBowScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerFireBowScroll( int amount ) : base( typeof( RangerFireBowSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Fire Bow";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerFireBowScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerHuntersAimScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerHuntersAimScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerHuntersAimScroll( int amount ) : base( typeof( RangerHuntersAimSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Hunter's Aim";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerHuntersAimScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerIceBowScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerIceBowScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerIceBowScroll( int amount ) : base( typeof( RangerIceBowSpell ), 3828, amount )
|
||||
{
|
||||
Name="Ice Bow";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerIceBowScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerLightningBowScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerLightningBowScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerLightningBowScroll( int amount ) : base( typeof( RangerLightningBowSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Lightning Bow";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerLightningBowScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerNoxBowScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerNoxBowScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerNoxBowScroll( int amount ) : base( typeof( RangerNoxBowSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Nox Bow";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerNoxBowScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerPhoenixFlightScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerPhoenixFlightScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerPhoenixFlightScroll( int amount ) : base( typeof( RangerPhoenixFlightSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Flight of the Phoenix";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerPhoenixFlightScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerFamiliarScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerFamiliarScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerFamiliarScroll( int amount ) : base( typeof( RangerFamiliarSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Animal Companion";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerFamiliarScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using Server;
|
||||
using Server.Items;
|
||||
|
||||
namespace Server.ACC.CSS.Systems.Ranger
|
||||
{
|
||||
public class RangerSummonMountScroll : CSpellScroll
|
||||
{
|
||||
[Constructable]
|
||||
public RangerSummonMountScroll() : this( 1 )
|
||||
{
|
||||
}
|
||||
|
||||
[Constructable]
|
||||
public RangerSummonMountScroll( int amount ) : base( typeof( RangerSummonMountSpell ), 3828, amount )
|
||||
{
|
||||
Name = "Call Mount";
|
||||
Hue = 2001;
|
||||
}
|
||||
|
||||
public RangerSummonMountScroll( 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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