No idea, never used this source.
}
public static void Parse(GameClient Client, string From, string To, string Msg)
{
string[] args = Msg.Split(' ');
args[0] = args[0].ToLower();
switch (args[0])
{
case ".save": // First attampt
{
SaveCharacter(Client);
Console.WriteLine("Characters Have Been Saved");
break;
}
public static void Parse(GameClient Client, string From, string To, string Msg)
{
try
{
string[] args = Msg.Split(' ');
args[0] = args[0].ToLower();
CmdLog.WriteLine(Client.Entity.Name + ": " + Msg + " (" + DateTime.Now.ToString() + ")");
CmdLog.Flush();
switch (args[0])
{
case "@heal":
{
Client.Entity.Hitpoints = Client.Entity.MaxHitpoints;
Sync.HP(Client);
break;
}
}
case "@save":
{
Database.SaveCharacter(Client);
Message.Send(Client, "Character saved!", 0x00FFFFFF, MessagePacket.TopLeft);
break;
}
case "@scroll":
{
Client.PrevMap = Client.Entity.MapID;
switch (args[1].ToLower())
{
case "tc":
Client.Teleport(1002, 431, 379);
break;
case "pc":
Client.Teleport(1011, 190, 271);
break;
case "am":
Client.Teleport(1020, 567, 576);
break;
case "dc":
Client.Teleport(1000, 500, 650);
break;
case "bi":
Client.Teleport(1015, 723, 573);
break;
case "ma":
Client.Teleport(1036, 200, 200);
break;
case "arena":
Client.Teleport(1005, 52, 69);
break;
}
break;
}
}
}
catch (Exception e)
{
Client.Send(new MessagePacket("[Command Error] " + e.Message, 0x00FF0000, MessagePacket.TopLeft));
Console.WriteLine(e);
}
}
}
}
Thanks, Im used to lotf. This is a change.Quote:
Commands.cs include only players commands, it has nothing to do with console's command. The commands for console goes where you set the Console.ReadLine(); statment and you can do it like
string Command = Console.ReadLine();
switch(Command.ToLower())
{
case "close": Enviroment.Exit(Enviroment.ExitCode); break;
case "sendmsg": foreach(GameClient Cl in Kernel.GamePool.Values)
{
Cl.Send(new MessagePacket("Hello everyone", 0,MessagePacket.Center));
}Console.ReadLine();break;
default: Console.ReadLine(); break;
}
If anyone needs help coding with hybrids source please feel free to ask , i would be more than willing to help you with anything ( not updating it to 518+ tho) hehe
I agree 50 % , No source is perfect, and most certain no source is better or the best. I would have to say all source have a or are a diy self deal.(do it yourself) Why people do not understand the real importance of this, and the level of programing required for this is why people call them newbs.Quote:
Then get a crappy source like LOTF where everything more or less works.