UO-Dev Arama


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


Paylaş : Paylaş

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

namespace Server.Spells.Eighth
{
public class ResurrectionSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Resurrection", "An Corp",
245,
9062,
Reagent.Bloodmoss,
Reagent.Garlic,
Reagent.Ginseng
);

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

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

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

public void Target( Mobile m )
{
if ( !Caster.CanSee( m ) )
{
Caster.SendLocalizedMessage( 500237 ); // Target can not be seen.
}
else if ( m == Caster )
{
Caster.SendLocalizedMessage( 501039 ); // Thou can not resurrect thyself.
}
else if ( !Caster.Alive )
{
Caster.SendLocalizedMessage( 501040 ); // The resurrecter must be alive.
}
else if ( m.Alive )
{
Caster.SendLocalizedMessage( 501041 ); // Target is not dead.
}
else if ( !Caster.InRange( m, 1 ) )
{
Caster.SendLocalizedMessage( 501042 ); // Target is not close enough.
}
else if ( !m.Player )
{
Caster.SendLocalizedMessage( 501043 ); // Target is not a being.
}
else if ( m.Map == null || !m.Map.CanFit( m.Location, 16, false, false ) )
{
Caster.SendLocalizedMessage( 501042 ); // Target can not be resurrected at that location.
m.SendLocalizedMessage( 502391 ); // Thou can not be resurrected there!
}
else if ( m.Region != null && m.Region.IsPartOf( "Khaldun" ) )
{
Caster.SendLocalizedMessage( 1010395 ); // The veil of death in this area is too strong and resists thy efforts to restore life.
}
else if ( CheckBSequence( m, true ) )
{
SpellHelper.Turn( Caster, m );

m.PlaySound( 0x214 );
m.FixedEffect( 0x376A, 10, 16 );

m.CloseGump( typeof( ResurrectGump ) );
m.SendGump( new ResurrectGump( m, Caster ) );
}

FinishSequence();
}

private class InternalTarget : Target
{
private ResurrectionSpell m_Owner;

public InternalTarget( ResurrectionSpell owner ) : base( 1, false, TargetFlags.Beneficial )
{
m_Owner = owner;
}

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

protected override void OnTargetFinish( Mobile from )
{
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


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ı,