TwilightRaven
Member
Hey, so I have this script (scripts) I wrote and they work great until I add the following script is added. When its added I lose the ability to use my staffrunebook, it just pops up over the player head. Also, people stopped talking. What is wrong with this script? I can't figure out what it could be.
Code:
namespace Server.Commands
{
public class CastSummonerSpells
{
public static void Initialize()
{
CommandSystem.Prefix = ".";
CommandSystem.Register("SummonAncientWyrm", AccessLevel.Player, new CommandEventHandler(SummonAncientWyrm_OnCommand));
CommandSystem.Register("SummonAbyssalInfernal", AccessLevel.Player, new CommandEventHandler(SummonAbyssalInfernal_OnCommand));
CommandSystem.Register("SummonCrimsonDragon", AccessLevel.Player, new CommandEventHandler(SummonCrimsonDragon_OnCommand));
CommandSystem.Register("SummonBarracoon", AccessLevel.Player, new CommandEventHandler(SummonBarracoon_OnCommand));
CommandSystem.Register("SummonChiefParoxysmus", AccessLevel.Player, new CommandEventHandler(SummonChiefParoxysmus_OnCommand));
CommandSystem.Register("SummonLadyMelisande", AccessLevel.Player, new CommandEventHandler(SummonLadyMelisande_OnCommand));
CommandSystem.Register("SummonMonstrousInterredGrizzle", AccessLevel.Player, new CommandEventHandler(SummonMonstrousInterredGrizzle_OnCommand));
CommandSystem.Register("SummonNeira", AccessLevel.Player, new CommandEventHandler(SummonNeira_OnCommand));
CommandSystem.Register("SummonPrimevalLich", AccessLevel.Player, new CommandEventHandler(SummonPrimevalLich_OnCommand));
CommandSystem.Register("SummonRikktor", AccessLevel.Player, new CommandEventHandler(SummonRikktor_OnCommand));
CommandSystem.Register("SummonSerado", AccessLevel.Player, new CommandEventHandler(SummonSerado_OnCommand));
CommandSystem.Register("SummonShadowKnight", AccessLevel.Player, new CommandEventHandler(SummonShadowKnight_OnCommand));
CommandSystem.Register("SummonShimmeringEffusion", AccessLevel.Player, new CommandEventHandler(SummonShimmeringEffusion_OnCommand));
CommandSystem.Register("SummonSilvani", AccessLevel.Player, new CommandEventHandler(SummonSilvani_OnCommand));
CommandSystem.Register("SummonSirPatrick", AccessLevel.Player, new CommandEventHandler(SummonSirPatrick_OnCommand));
CommandSystem.Register("SummonSkeletalDragonRenowned", AccessLevel.Player, new CommandEventHandler(SummonSkeletalDragonRenowned_OnCommand));
CommandSystem.Register("SummonSlasherOfVeils", AccessLevel.Player, new CommandEventHandler(SummonSlasherOfVeils_OnCommand));
CommandSystem.Register("SummonTempestSpell", AccessLevel.Player, new CommandEventHandler(SummonTempest_OnCommand));
}
public static void Register(string command, AccessLevel access, CommandEventHandler handler)
{
Server.Commands.CommandSystem.Register(command, access, handler);
}
public static bool HasSpell(Mobile from, int spellID)
{
Spellbook book = Spellbook.Find(from, spellID);
return (book != null && book.HasSpell(spellID));
}
[Usage("SummonAncientWyrm")]
[Description("Summons an Ancient Wyrm")]
public static void SummonAncientWyrm_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 800))
{
new AncientWyrmSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonAbyssalInfernal")]
[Description("Summons an Ancient Wyrm")]
public static void SummonAbyssalInfernal_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 801))
{
new AbyssalInfernalSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonCrimsonDragon")]
[Description("Summons a Crimson Dragon")]
public static void SummonCrimsonDragon_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 802))
{
new CrimsonDragonSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonBarracoon")]
[Description("Summons Barracoon")]
public static void SummonBarracoon_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 803))
{
new BarracoonSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonChiefParoxysmus")]
[Description("Summons Chief Paroxysmus")]
public static void SummonChiefParoxysmus_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 804))
{
new ChiefParoxysmusSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonLadyMelisande")]
[Description("Summons Lady Melisande")]
public static void SummonLadyMelisande_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 805))
{
new LadyMelisandeSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonMonstrousInterredGrizzle")]
[Description("Summons MonstrousInterredGrizzle")]
public static void SummonMonstrousInterredGrizzle_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 806))
{
new MonstrousInterredGrizzleSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonNeira")]
[Description("Summons Neira")]
public static void SummonNeira_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 807))
{
new NeiraSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonPrimevalLich")]
[Description("Summons Primeval Lich")]
public static void SummonPrimevalLich_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 808))
{
new PrimevalLichSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonRikktor")]
[Description("Summons Rikktor")]
public static void SummonRikktor_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 809))
{
new RikktorSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonSerados")]
[Description("Summons Serados")]
public static void SummonSerado_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 810))
{
new SeradoSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonShadowKnight")]
[Description("Summons a Shadow Knight")]
public static void SummonShadowKnight_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 811))
{
new ShadowKnightSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonSirPatrick")]
[Description("Summons Sir Patrick")]
public static void SummonSirPatrick_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 814))
{
new SirPatrickSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonSkeletalDragonRenowned")]
[Description("Summons a Powerful Skeletal Dragon")]
public static void SummonSkeletalDragonRenowned_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 815))
{
new SkeletalDragonRenownedSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonSlasherOfVeils")]
[Description("Summons a Slasher of Veils")]
public static void SummonSlasherOfVeils_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 816))
{
new SlasherOfVeilsSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonStygianDragon")]
[Description("Summons a Stygian Dragon")]
public static void SummonStygianDragon_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 817))
{
new StygianDragonSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonTempest")]
[Description("Summons a Tempest")]
public static void SummonTempest_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 818))
{
new TempestSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummonShimmeringEffusion")]
[Description("Summons a Shimmering Effusion")]
public static void SummonShimmeringEffusion_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 812))
{
new ShimmeringEffusionSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
[Usage("SummmonSilvani")]
[Description("Summons Silvani")]
public static void SummonSilvani_OnCommand(CommandEventArgs e)
{
Mobile from = e.Mobile;
if (!Multis.DesignContext.Check(e.Mobile))
return; // They are customizing
if (HasSpell(from, 813))
{
new SilvaniSpell(e.Mobile, null).Cast();
}
else
{
from.SendLocalizedMessage(500015); // You do not have that spell!
}
}
}
}