[RUO 2.0 - SVN 269] Summoned Ore Elementals Spell
Posted: Wed Dec 12, 2007 4:52 pm
[RunUO 2.0 - SVN 269]
This is a replacement for the Summon Earth Elemental spell. This spell allows the caster to summon random ore elementals based on the casters magery and level of ore elemental. Lower level ore elementals will get summoned more often if the right amount of caster magery is met.
Let me know if there are any problems or questions. It seems like a pretty straight forward and simple script.
Installation
In the following default location RunUO/Scripts/Spells/Eighth/
Find the file named EarthElemental.cs
Rename or backup that file.
Replace that script with this information:
Extra, but not required step:
Open up your Ore Elemental files and add the a controlslots line to add balance to how many can be summoned.
I would suggest leaving the earth elemental at 2 slots. Make all the rest except the valorite 3 slots. Make the valorite 4 or 5 slots.
Archived topic from AOV, old topic ID:1863, old post ID:12098
This is a replacement for the Summon Earth Elemental spell. This spell allows the caster to summon random ore elementals based on the casters magery and level of ore elemental. Lower level ore elementals will get summoned more often if the right amount of caster magery is met.
Let me know if there are any problems or questions. It seems like a pretty straight forward and simple script.
Installation
In the following default location RunUO/Scripts/Spells/Eighth/
Find the file named EarthElemental.cs
Rename or backup that file.
Replace that script with this information:
Code: Select all
using System;
using Server.Mobiles;
using Server.Network;
using Server.Targeting;
namespace Server.Spells.Eighth
{
public class EarthElementalSpell : MagerySpell
{
private static SpellInfo m_Info = new SpellInfo(
"Earth Elemental", "Kal Vas Xen Ylem",
269,
9020,
false,
Reagent.Bloodmoss,
Reagent.MandrakeRoot,
Reagent.SpidersSilk
);
public override SpellCircle Circle { get { return SpellCircle.Eighth; } }
public EarthElementalSpell( Mobile caster, Item scroll ) : base( caster, scroll, m_Info )
{
}
public override bool CheckCast()
{
if ( !base.CheckCast() )
return false;
if ( (Caster.Followers + 2) > Caster.FollowersMax )
{
Caster.SendLocalizedMessage( 1049645 ); // You have too many followers to summon that creature.
return false;
}
return true;
}
public override void OnCast()
{
if ( CheckSequence() )
{
TimeSpan duration = TimeSpan.FromSeconds( (2 * Caster.Skills.Magery.Fixed) / 5 );
double chance = Utility.RandomDouble();
if (chance <= .60)
SpellHelper.Summon(new SummonedEarthElemental(), Caster, 0x217, duration, false, false);
else if (chance <= .65)
{
if (Caster.Skills.Magery.Value >= 85)
SpellHelper.Summon(new DullCopperElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .70)
{
if (Caster.Skills.Magery.Value >= 90)
SpellHelper.Summon(new ShadowIronElemental(), Caster, 0x217, duration, true, true);
}
else if (chance <= .75)
{
if (Caster.Skills.Magery.Value >= 95)
SpellHelper.Summon(new CopperElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .80)
{
if (Caster.Skills.Magery.Value >= 100)
SpellHelper.Summon(new BronzeElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .85)
{
if (Caster.Skills.Magery.Value >= 105)
SpellHelper.Summon(new GoldenElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .90)
{
if (Caster.Skills.Magery.Value >= 110)
SpellHelper.Summon(new AgapiteElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .95)
{
if (Caster.Skills.Magery.Value >= 115)
SpellHelper.Summon(new VeriteElemental(), Caster, 0x217, duration, false, false);
}
else if (chance <= .98)
{
if (Caster.Skills.Magery.Value >= 120)
SpellHelper.Summon(new ValoriteElemental(), Caster, 0x217, duration, false, false);
}
}
FinishSequence();
}
}
}
Extra, but not required step:
Open up your Ore Elemental files and add the a controlslots line to add balance to how many can be summoned.
Code: Select all
ControlSlots = 3;
Archived topic from AOV, old topic ID:1863, old post ID:12098