void LoadMessage()
{
//Wrap function inside our catcher
try
{
//If the character logs in for first time (bool is false).
if (!Character.Information.WelcomeMessage)
{
//Load new ini
Framework.Ini ini;
ini = new Framework.Ini(Environment.CurrentDirectory + @"\Settings\Settings.ini");
//Get servername from the ini file
string servername = ini.GetValue("Custom", "Welcome", "Srx Revo").ToString();
//Set welcome information
string welcome = "Welcome to " + servername + " Programmed by: http://www.xfsgames.com.ar";
//Send notice packet
client.Send(sendnoticecon(7, 0, welcome, ""));
//Set bool to true so when teleporting user wont receive the message
Character.Information.WelcomeMessage = true;
}
}
catch (Exception ex)
{
Console.WriteLine("Welcome message error {0}", ex);
Systems.Debugger.Write(ex);
}
}