This is really cool script. But too powerful. so, I add the map check.
[code:1]
using System;
using System.Collections;
using Server.Mobiles;
using Server.Gumps;
using Server.Targeting;
using Server.Items;
using Server.Prompts;
namespace Server
{
public class ClericCommands
{
public static void Initialize()
{
EventSink.Speech += new SpeechEventHandler( Speech_Event );
}
public static void Speech_Event( SpeechEventArgs e )
{
if ( e.Speech.ToLower().IndexOf( "i pray to the gods" ) != -1 )
{
bool DoMapCheck = true; // If you don't want the map check, set this value to false
if ((DoMapCheck) && (e.Mobile.Map.Name != "Ilshenar"
&& (e.Mobile.Map.Name != "Malas"
)
{
if (e.Mobile.Language == "CHT"
{
e.Mobile.SendMessage("你的神並不存在於這個世界!"
;
}
else
{
e.Mobile.SendMessage("Your God not exist in this world !"
;
}
}
else
{
if ( !e.Mobile.CheckAlive() )
{
e.Mobile.SendMessage( "You cannot pray while dead." );
}
else
{
e.Mobile.CloseGump( typeof ( ClericGump ) );
e.Mobile.SendGump( new ClericGump( e.Mobile ) );
}
}
}
}
}
}
[/code:1]
I only allow player to use this spell in Ilshenar and Malas. Enjoy it. My player love it. :twisted: