UO-Dev Arama


Yazar: runuo.com
Tarih: 23-09-2009 17:49


Paylaş : Paylaş

Kod:
using System;
using Server.Mobiles;
using Server.Network;
using Server.Targeting;

namespace Server.Spells.Eighth
{
public class EnergyVortexSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Energy Vortex", "Vas Corp Por",
260,
9032,
false,
Reagent.Bloodmoss,
Reagent.BlackPearl,
Reagent.MandrakeRoot,
Reagent.Nightshade
);

public override SpellCircle Circle { get { return SpellCircle.Eighth; } }

public EnergyVortexSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}

public override bool CheckCast()
{
if ( !base.CheckCast() )
return false;

if ( (Caster.Followers + (Core.SE ? 2 : 1)) > Caster.FollowersMax )
{
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
return false;
}

return true;
}

public override void OnCast()
{
Caster.Target = new InternalTarget( this );
}

public void Target( IPoint3D p )
{
Map map = Caster.Map;

SpellHelper.GetSurfaceTop( ref p );

if ( map == null || !map.CanSpawnMobile( p.X, p.Y, p.Z ) )
{
Caster.SendLocalizedMessage( 501942 ); // That location is blocked.
}
else if ( SpellHelper.CheckTown( p, Caster ) && CheckSequence() )
{
TimeSpan duration;

if ( Core.AOS )
duration = TimeSpan.FromSeconds( 90.0 );
else
duration = TimeSpan.FromSeconds( Utility.Random( 80, 40 ) );

BaseCreature.Summon( new EnergyVortex(), false, Caster, new Point3D( p ), 0x212, duration );
}

FinishSequence();
}

private class InternalTarget : Target
{
private EnergyVortexSpell m_Owner;

public InternalTarget( EnergyVortexSpell owner ) : base( Core.ML ? 10 : 12, true, TargetFlags.None )
{
m_Owner = owner;
}

protected override void OnTarget( Mobile from, object o )
{
if ( o is IPoint3D )
m_Owner.Target( (IPoint3D)o );
}

protected override void OnTargetOutOfLOS( Mobile from, object o )
{
from.SendLocalizedMessage( 501943 ); // Target cannot be seen. Try again.
from.Target = new InternalTarget( m_Owner );
from.Target.BeginTimeout( from, TimeoutTime - DateTime.Now );
m_Owner = null;
}

protected override void OnTargetFinish( Mobile from )
{
if ( m_Owner != null )
m_Owner.FinishSequence();
}
}
}
}



Yorumlar

Henüz yorum yapılmamıştır.

Oylamalar

Oylama :
Üyelerin oylama ortalaması (10 dışında) : Henüz Oylanmamış   
Oylar: 0

Benzer Sayfalar

SayfalarYorumlarGönderenTarih
Robe of Energy0Amesron18-08-2009
Sand Vortex0Amesron05-08-2009
Energy Vortex0TheRaskol05-08-2009


Keywords:

ultima online, RunUO, ultima online download, sphere scripting, role play, uo grafik, second age ultima, uo loop, macroman, pvp server, server kurulumu, sphere, multool, ml mulls, 56b 55r 55i, htmlgumps, client 4x, client edit, sphere release, osi, rp server, sunucular, ghost mouse, inside uo, kingdom reborn, stygian abyss, uo nasıl oynanır, mondain's legacy, age of shadows, world build, grandmaster, ultima online pvp, player dosyaları, ultima online indir, frp game, RunUO 1.0.0, razor, uo rice, hue editör, skill tools, ultima online patch, axis, world build, verdata, verdata patcher, map editör, gump editör, mul patcher, aos mulls, scriptler, anim edit, anim publish, hues mul, hosting vps, event dialog, account sistemi, skill gain, static yapımı,