Make commands more accurate

This commit is contained in:
Li 2022-05-07 12:58:22 +12:00
parent 997be8573d
commit 55c0f29914
14 changed files with 415 additions and 342 deletions

View file

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using HISP.Player;
@ -79,157 +80,31 @@ namespace HISP.Game.Chat
return reasons.ToArray();
}
}
public static bool ProcessCommand(User user, string message)
{
if (message.Length < 1)
return false;
string[] args = message.Split(' ').Skip(1).ToArray();
if (user.Administrator || user.Moderator)
{
if (message[0] == '%')
{
if (message.ToUpper().StartsWith("%GIVE"))
return Command.Give(message, args, user);
if (message.ToUpper().StartsWith("%SWF"))
return Command.Swf(message, args, user);
if (message.ToUpper().StartsWith("%GOTO"))
return Command.Goto(message, args, user);
if (message.ToUpper().StartsWith("%JUMP"))
return Command.Jump(message, args, user);
if (message.ToUpper().StartsWith("%KICK"))
return Command.Kick(message, args, user);
if (message.ToUpper().StartsWith("%RULES"))
return Command.Rules(message, args, user);
if (message.ToUpper().StartsWith("%PRISON"))
return Command.Prison(message, args, user);
if (message.ToUpper().StartsWith("%NOCLIP"))
return Command.NoClip(message, args, user);
if (message.ToUpper().StartsWith("%STEALTH"))
return Command.Stealth(message, args, user);
if (message.ToUpper().StartsWith("%BAN"))
return Command.Ban(message, args, user);
if (message.ToUpper().StartsWith("%UNBAN"))
return Command.UnBan(message, args, user);
if (message.ToUpper().StartsWith("%ESCAPE"))
return Command.Escape(message, args, user);
if (message.ToUpper().StartsWith("%MODHORSE"))
return Command.ModHorse(message, args, user);
if (message.ToUpper().StartsWith("%DELITEM"))
return Command.DelItem(message, args, user);
if (message.ToUpper().StartsWith("%SHUTDOWN"))
return Command.Shutdown(message, args, user);
if (message.ToUpper().StartsWith("%CALL HORSE"))
return Command.CallHorse(message, args, user);
return false;
}
}
if (message[0] == '!')
{
// Alias for !MUTE
if (message.ToUpper().StartsWith("!MUTEALL"))
return Command.Mute(message, new string[] { "ALL" }, user);
else if (message.ToUpper().StartsWith("!MUTEADS"))
return Command.Mute(message, new string[] { "ADS" }, user);
else if (message.ToUpper().StartsWith("!MUTEGLOBAL"))
return Command.Mute(message, new string[] { "GLOBAL" }, user);
else if (message.ToUpper().StartsWith("!MUTEISLAND"))
return Command.Mute(message, new string[] { "ISLAND" }, user);
else if (message.ToUpper().StartsWith("!MUTENEAR"))
return Command.Mute(message, new string[] { "NEAR" }, user);
else if (message.ToUpper().StartsWith("!MUTEHERE"))
return Command.Mute(message, new string[] { "HERE" }, user);
else if (message.ToUpper().StartsWith("!MUTEBUDDY"))
return Command.Mute(message, new string[] { "BUDDY" }, user);
else if (message.ToUpper().StartsWith("!MUTEPM"))
return Command.Mute(message, new string[] { "PM" }, user);
else if (message.ToUpper().StartsWith("!MUTEBR"))
return Command.Mute(message, new string[] { "BR" }, user);
else if (message.ToUpper().StartsWith("!MUTESOCIALS"))
return Command.Mute(message, new string[] { "SOCIALS" }, user);
else if (message.ToUpper().StartsWith("!MUTELOGINS"))
return Command.Mute(message, new string[] { "LOGINS" }, user);
else if (message.ToUpper().StartsWith("!MUTE"))
return Command.Mute(message, args, user);
// Alias for !UNMUTE
else if (message.ToUpper().StartsWith("!UNMUTEALL"))
return Command.UnMute(message, new string[] { "ALL" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEADS"))
return Command.UnMute(message, new string[] { "ADS" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEGLOBAL"))
return Command.UnMute(message, new string[] { "GLOBAL" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEISLAND"))
return Command.UnMute(message, new string[] { "ISLAND" }, user);
else if (message.ToUpper().StartsWith("!UNMUTENEAR"))
return Command.UnMute(message, new string[] { "NEAR" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEHERE"))
return Command.UnMute(message, new string[] { "HERE" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEBUDDY"))
return Command.UnMute(message, new string[] { "BUDDY" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEPM"))
return Command.UnMute(message, new string[] { "PM" }, user);
else if (message.ToUpper().StartsWith("!UNMUTEBR"))
return Command.UnMute(message, new string[] { "BR" }, user);
else if (message.ToUpper().StartsWith("!UNMUTESOCIALS"))
return Command.UnMute(message, new string[] { "SOCIALS" }, user);
else if (message.ToUpper().StartsWith("!UNMUTELOGINS"))
return Command.UnMute(message, new string[] { "LOGINS" }, user);
else if (message.ToUpper().StartsWith("!UNMUTE"))
return Command.UnMute(message, args, user);
// Alias for !HEAR
else if (message.ToUpper().StartsWith("!HEARALL"))
return Command.UnMute(message, new string[] { "ALL" }, user);
else if (message.ToUpper().StartsWith("!HEARADS"))
return Command.UnMute(message, new string[] { "ADS" }, user);
else if (message.ToUpper().StartsWith("!HEARGLOBAL"))
return Command.UnMute(message, new string[] { "GLOBAL" }, user);
else if (message.ToUpper().StartsWith("!HEARISLAND"))
return Command.UnMute(message, new string[] { "ISLAND" }, user);
else if (message.ToUpper().StartsWith("!HEARNEAR"))
return Command.UnMute(message, new string[] { "NEAR" }, user);
else if (message.ToUpper().StartsWith("!HEARHERE"))
return Command.UnMute(message, new string[] { "HERE" }, user);
else if (message.ToUpper().StartsWith("!HEARBUDDY"))
return Command.UnMute(message, new string[] { "BUDDY" }, user);
else if (message.ToUpper().StartsWith("!HEARPM"))
return Command.UnMute(message, new string[] { "PM" }, user);
else if (message.ToUpper().StartsWith("!HEARBR"))
return Command.UnMute(message, new string[] { "BR" }, user);
else if (message.ToUpper().StartsWith("!HEARSOCIALS"))
return Command.UnMute(message, new string[] { "SOCIALS" }, user);
else if (message.ToUpper().StartsWith("!HEARLOGINS"))
return Command.UnMute(message, new string[] { "LOGINS" }, user);
else if (message.ToUpper().StartsWith("!HEAR"))
return Command.UnMute(message, args, user);
else if (message.ToUpper().StartsWith("!AUTOREPLY"))
return Command.AutoReply(message, args, user);
else if (message.ToUpper().StartsWith("!QUIZ"))
return Command.Quiz(message, args, user);
else if (message.ToUpper().StartsWith("!WARP")) // some stupid handling on this one.
{
string placeName = message.Substring("!WARP".Length);
placeName = placeName.Trim();
return Command.Warp(message, placeName.Split(' '), user);
}
else if (message.ToUpper().StartsWith("!DANCE"))
return Command.Dance(message, args, user);
else if (message.ToUpper().StartsWith("!VERSION"))
return Command.Version(message, args, user);
return false;
string parsedMessage = message;
parsedMessage = parsedMessage.Trim();
char cLetter = parsedMessage[0];
parsedMessage = parsedMessage.Substring(1).Trim();
string messageToGive = parsedMessage;
foreach (CommandRegister cmd in CommandRegister.RegisteredCommands)
{
if(cmd.CmdLetter == cLetter)
{
if (parsedMessage.ToUpper(CultureInfo.InvariantCulture).StartsWith(cmd.CmdName))
{
string[] args = parsedMessage.Substring(cmd.CmdName.Length).Trim().Split(' ');
return cmd.CmdCallback(messageToGive, args, user);
}
}
}
return false;
}

View file

@ -1,19 +1,19 @@
using HISP.Player;
using HISP.Server;
using HISP.Game.Items;
using System;
using System.Collections.Generic;
using HISP.Game.Events;
using HISP.Game.Horse;
using System.Linq;
using HISP.Game.Inventory;
using System.Threading;
using HISP.Modding;
using System.Linq;
using System;
using System.Collections.Generic;
namespace HISP.Game.Chat
{
public class Command
{
private static User findNamePartial(string name)
{
foreach (GameClient client in GameClient.ConnectedClients)
@ -29,14 +29,59 @@ namespace HISP.Game.Chat
}
}
throw new KeyNotFoundException("name not found");
}
public static void RegisterCommands()
{
// Admin Commands
new CommandRegister('%', "GIVE", Command.Give);
new CommandRegister('%', "SWF", Command.Swf);
new CommandRegister('%', "GOTO", Command.Goto);
new CommandRegister('%', "JUMP", Command.Jump);
new CommandRegister('%', "KICK", Command.Kick);
new CommandRegister('%', "NOCLIP", Command.NoClip);
new CommandRegister('%', "MODHORSE", Command.ModHorse);
new CommandRegister('%', "DELITEM", Command.DelItem);
new CommandRegister('%', "SHUTDOWN", Command.Shutdown);
new CommandRegister('%', "RELOAD", Command.Reload);
new CommandRegister('%', "CALL", Command.CallHorse);
// Moderator commands
new CommandRegister('%', "RULES", Command.Rules);
new CommandRegister('%', "PRISON", Command.Prison);
new CommandRegister('%', "STEALTH", Command.Stealth);
new CommandRegister('%', "BAN", Command.Ban);
new CommandRegister('%', "UNBAN", Command.UnBan);
new CommandRegister('%', "ESCAPE", Command.Escape);
// User commands
new CommandRegister('!', "MUTE", Command.Mute);
new CommandRegister('!', "UNMUTE", Command.UnMute);
new CommandRegister('!', "HEAR", Command.UnMute);
new CommandRegister('!', "AUTOREPLY", Command.AutoReply);
new CommandRegister('!', "QUIZ", Command.Quiz);
new CommandRegister('!', "WARP", Command.Warp);
new CommandRegister('!', "DANCE", Command.Dance);
new CommandRegister('!', "VERSION", Command.Version);
}
public static bool Reload(string message, string[] args, User user)
{
if (!user.Administrator)
return false;
ModLoader.ReloadModsFromFilesystem();
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
public static bool Shutdown(string message, string[] args, User user)
{
if (!user.Administrator)
return false;
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
GameServer.ShutdownServer();
@ -190,7 +235,7 @@ namespace HISP.Game.Chat
return false;
}
msg:;
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -227,7 +272,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -251,7 +296,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -264,7 +309,7 @@ namespace HISP.Game.Chat
user.LoggedinClient.SendPacket(versionPacket);
// Send Command complete message to client.
byte[] versionCommandCompletePacket = PacketBuilder.CreateChat(Messages.FormatPlayerCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] versionCommandCompletePacket = PacketBuilder.CreateChat(Messages.FormatPlayerCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(versionCommandCompletePacket);
return true;
}
@ -297,7 +342,7 @@ namespace HISP.Game.Chat
}
catch(KeyNotFoundException){};
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -309,7 +354,7 @@ namespace HISP.Game.Chat
user.Teleport(Map.ModIsleX, Map.ModIsleY);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)) + Messages.ModIsleMessage, PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message) + Messages.ModIsleMessage, PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -320,7 +365,7 @@ namespace HISP.Game.Chat
return false;
user.Stealth = !user.Stealth;
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -330,7 +375,7 @@ namespace HISP.Game.Chat
return false;
user.NoClip = !user.NoClip;
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -356,7 +401,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1))+Messages.FormatRulesCommandMessage(args[0]), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message)+Messages.FormatRulesCommandMessage(args[0]), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -382,7 +427,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)) + Messages.FormatPrisonCommandMessage(args[0]), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message) + Messages.FormatPrisonCommandMessage(args[0]), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -414,7 +459,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -442,7 +487,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -477,7 +522,7 @@ namespace HISP.Game.Chat
return false;
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -575,7 +620,7 @@ namespace HISP.Game.Chat
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
@ -655,7 +700,7 @@ namespace HISP.Game.Chat
}
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT);
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message), PacketBuilder.CHAT_BOTTOM_LEFT);
user.LoggedinClient.SendPacket(chatPacket);
return true;
}
@ -663,7 +708,7 @@ namespace HISP.Game.Chat
public static bool Warp(string message, string[] args, User user)
{
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
if (user.CurrentlyRidingHorse == null)
goto onlyRiddenUnicorn;
@ -730,7 +775,11 @@ namespace HISP.Game.Chat
if (!user.Administrator)
return false;
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
if (args.Length >= 1)
if (args[1].ToUpper() != "HORSE")
return false;
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
WildHorse horse = WildHorse.WildHorses[GameServer.RandomNumberGenerator.Next(0, WildHorse.WildHorses.Length)];
horse.X = user.X;
@ -747,7 +796,7 @@ namespace HISP.Game.Chat
public static bool AutoReply(string message, string[] args, User user)
{
string replyMessage = string.Join(" ", args);
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
replyMessage = replyMessage.Trim();
if (replyMessage.Length > 1024)
@ -776,7 +825,7 @@ namespace HISP.Game.Chat
public static bool Dance(string message, string[] args, User user)
{
string moves = string.Join(" ", args).ToLower();
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
if (user.ActiveDance != null)
user.ActiveDance.Dispose();
@ -800,7 +849,7 @@ namespace HISP.Game.Chat
}
if (quizActive)
{
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
RealTimeQuiz.Participent participent = GameServer.QuizEvent.JoinEvent(user);
@ -832,7 +881,7 @@ namespace HISP.Game.Chat
public static bool Mute(string message, string[] args, User user)
{
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
if (args.Length <= 0)
{
@ -906,7 +955,7 @@ namespace HISP.Game.Chat
public static bool UnMute(string message, string[] args, User user)
{
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
if (args.Length <= 0)
{

View file

@ -0,0 +1,31 @@
using HISP.Player;
using System;
using System.Collections.Generic;
using System.Globalization;
namespace HISP.Game.Chat
{
public class CommandRegister
{
private static List<CommandRegister> registeredComamnds = new List<CommandRegister>();
public static CommandRegister[] RegisteredCommands
{
get
{
return registeredComamnds.ToArray();
}
}
public char CmdLetter;
public string CmdName;
public Func<string,string[],User, bool> CmdCallback;
public CommandRegister(char cmdLetter, string cmdName, Func<string, string[], User, bool> cmdCallback)
{
CmdLetter = cmdLetter;
CmdName = cmdName.ToUpper(CultureInfo.InvariantCulture);
CmdCallback = cmdCallback;
registeredComamnds.Add(this);
}
}
}

View file

@ -15,7 +15,7 @@ namespace HISP.Game
public const string Binoculars = "BINOCS";
public const string Rake = "RAKE";
public const string MagnifyingGlass = "MAGNIFY";
public const int CloudIslesQuest = 1373;
public struct QuestItemInfo
{
public int ItemId;
@ -262,7 +262,7 @@ namespace HISP.Game
user.Awards.AddAward(Award.GetAwardById(4)); // 100% Quest Completion Award.
// Is cloud isles quest?
if (quest.Id == 1373)
if (quest.Id == CloudIslesQuest)
{
byte[] swfLoadPacket = PacketBuilder.CreateSwfModulePacket("ballooncutscene", PacketBuilder.PACKET_SWF_CUTSCENE);
user.LoggedinClient.SendPacket(swfLoadPacket);

View file

@ -0,0 +1,20 @@
namespace HISP.Modding
{
public interface IMod
{
public void OnModLoad();
public void OnModUnload();
public string ModName
{
get;
}
public string ModVersion
{
get;
}
public string ModId
{
get;
}
}
}

View file

@ -0,0 +1,77 @@
using HISP.Server;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
namespace HISP.Modding
{
public class ModLoader
{
private static List<IMod> modList = new List<IMod>();
public static IMod[] ModList
{
get
{
return modList.ToArray();
}
}
public static void LoadMod(IMod mod)
{
mod.OnModLoad(); // Call OnModLoad();
modList.Add(mod); // add to the list of mods
Logger.InfoPrint("Loaded mod: "+mod.ModName + " v" + mod.ModVersion + " SUCCESS.");
}
public static void UnloadMod(IMod mod)
{
mod.OnModUnload();
modList.Remove(mod);
Logger.InfoPrint("Unloading mod: " + mod.ModName);
}
public static void UnloadAllMods()
{
foreach (IMod loadedMod in ModList)
{
UnloadMod(loadedMod);
}
}
public static void LoadModFromFilesystem(string dllfile)
{
try
{
Assembly assembly = Assembly.LoadFile(dllfile);
Type[] types = assembly.GetTypes();
// Search for classes that implement IMod
foreach (Type type in types)
{
if (type.GetInterfaces().Contains(typeof(IMod)))
{
IMod mod = (IMod)Activator.CreateInstance(type); // Crate an instance of the class
LoadMod(mod); // Load it into memory
}
}
}
catch (Exception e)
{
Logger.ErrorPrint("Failed to load mod: " + dllfile + " - [EXCEPTION]" + e.Message + " " + e.InnerException + "\n" + e.StackTrace);
}
}
public static void OnShutdown()
{
UnloadAllMods();
}
public static void ReloadModsFromFilesystem()
{
UnloadAllMods();
if (Directory.Exists(ConfigReader.ModsFolder))
{
string[] filelist = Directory.GetFiles(ConfigReader.ModsFolder, "*.dll", SearchOption.TopDirectoryOnly);
foreach (string file in filelist)
{
LoadModFromFilesystem(file);
}
}
}
}
}

View file

@ -7,6 +7,7 @@
# However it is NOT COPYRIGHTED! This software is in the Public Domain!
#
# Ip address the server will bind to (default: 0.0.0.0 ALL INTERFACES)
ip=0.0.0.0
# Port the server will bind to defaults: (on beta.horseisle.com: 12321, on pinto.horseisle.com: 443)
@ -35,6 +36,11 @@ map=HI1.MAP
# NOTE: This can be a folder or a file.
gamedata=gamedata
# Folder containing mod .dll's
# Mods can extend the server
# and add custom features.
mods_folder=mods
# =======================
# Security
# =======================

View file

@ -21,6 +21,7 @@ namespace HISP.Server
public static string GameData = "gamedata.json";
public static string CrossDomainPolicyFile = "CrossDomainPolicy.xml";
public static string ModsFolder = "mods";
public static int LogLevel = 4;
public static bool SqlLite = false;
@ -117,6 +118,9 @@ namespace HISP.Server
break;
case "enable_word_filter":
BadWords = data == "true";
break;
case "mods_folder":
ModsFolder = data;
break;
case "intrest_rate":
IntrestRate = int.Parse(data);

View file

@ -3,6 +3,7 @@ using HISP.Game.Horse;
using HISP.Game.Items;
using HISP.Game.Services;
using HISP.Game.SwfModules;
using HISP.Game.Chat;
using HISP.Security;
using System;
using System.Diagnostics;
@ -13,7 +14,6 @@ namespace HISP.Server
{
// "Entry Point"
private static void defaultOnShutdownCallback()
{
Process.GetCurrentProcess().Close();
@ -52,6 +52,7 @@ namespace HISP.Server
Auction.LoadAllAuctionRooms();
Item.DoSpecialCases();
Command.RegisterCommands();
GameServer.StartServer();
}

View file

@ -18,7 +18,8 @@ using HISP.Game.SwfModules;
using HISP.Game.Horse;
using HISP.Game.Events;
using HISP.Game.Items;
using HISP.Modding;
namespace HISP.Server
{
public class GameServer
@ -8249,12 +8250,16 @@ namespace HISP.Server
}
public static void OnShutdown()
{
ServerSocket.Dispose();
gameTimer.Dispose();
minuteTimer.Dispose();
if(ServerSocket != null)
ServerSocket.Dispose();
if (gameTimer != null)
gameTimer.Dispose();
if (minuteTimer != null)
minuteTimer.Dispose();
}
public static void ShutdownServer()
{
{
ModLoader.OnShutdown();
GameClient.OnShutdown();
GameServer.OnShutdown();
Database.OnShutdown();
@ -8271,6 +8276,9 @@ namespace HISP.Server
gameTimer = new Timer(new TimerCallback(onGameTick), null, gameTickSpeed, gameTickSpeed);
minuteTimer = new Timer(new TimerCallback(onMinuteTick), null, oneMinute, oneMinute);
Logger.InfoPrint("Binding to ip: " + ConfigReader.BindIP + " On port: " + ConfigReader.Port.ToString());
// Load all/any mods
ModLoader.ReloadModsFromFilesystem();
SocketAsyncEventArgs e = new SocketAsyncEventArgs();
e.Completed += GameClient.CreateClient;

View file

@ -27,8 +27,6 @@ namespace HISP.Server
return arr;
}
public static double PointsToDistance(int x1, int y1, int x2, int y2)
{
return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));

View file

@ -55,10 +55,10 @@
//
// StartProgress
//
this.StartProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
this.StartProgress.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.StartProgress.Location = new System.Drawing.Point(79, 40);
this.StartProgress.Maximum = 18;
this.StartProgress.Maximum = 19;
this.StartProgress.Name = "StartProgress";
this.StartProgress.Size = new System.Drawing.Size(618, 23);
this.StartProgress.Step = 1;

View file

@ -1,154 +1,154 @@
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhOgBEAIYAAAAAAP///0kBPZyEmPsA7tEAxs8AxMoAv8gAv8EAuaEAmp8AmIoAhDIALzAALiUF
I7cAtKAAmp4AmJ4AmpcAlJUAkpEAjZAAjYUAgIQAgHkAd1gAVVcAVFUAUlMAUE8ATUkARz0APDUAMzEA
MC4ALf8n96gAposAioMAgWsAa0QAQzUANZkAnZUAmI4AkXMAdWEAZF8AYS8AMIgAjn4Ag3sAf1sAXlcA
WzcAOWhAeE0wWKaJsZF4m35Lk6mpqXZ2dkBAQP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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MQbyVxEMT6e8IJKLTsMgggELtuvf4SCzMEEKxcM8nxInQSThMLoDLLLrcMs8w6UEvz
BzaDgLPOHwxEckI//xQ0sSqo8MILLLCggQZZ92xQ1iaY8LUKBk3tM2RSP5z11l2frYLYBZFtNtgI0W0S
21cLwxBCCC64MMMMKaQQgkMhtNBC4YcfpDdbSxWkduCDM4644oUn9PhAP0techAj0EBDDDHg4BAOMMCw
AkObC9Q5QWqDLjrpD6Guet7cUh1532LLUEMNI0C0gg02yIB7QzG1HbvvwAtPvOO5O5R87AKRcMMNwTtE
OgnHy4sSyp9Xf332DOGw/WPfUx+EA9c3cDrx3Ms0ffjrt/++DfEnpf4IAwwgwun9yx9Q1BeE/v3PIQEs
zEFEYLqHjMABCjQIAyHyQJUEBAA7
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGyAAAAEAIAAoDgAAFgAAACgAAAAbAAAAQAAAAAEAIAAAAAAAgA0AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAPQFJAD0BSQo9AUkpPQFJGj0BSQBJHk0AWzZePT8NQLwyADALOAA3AAAAAAAAAAAAnZCiAMrK
0AVCGUSsMAMyVC8CMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAIQEg/Hj0D
STw9AUnoPQFJljYAPQAZABsQcEpyul0yX8sLAA0KMwA1AAAAAAAAAAAAgl2EAF8vX2JvSXH0Nws4UTMH
NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAtQEFArT0LSEs9AUn9PQFJpDQA
OQAoACofSwVK6UcER8wYAB4KLwAyAAAAAAAAAAAAWwdZAEcDRZBUBlL/MgEzUDABMQA9AUkAPQFJAD0B
SQE9AUkAPQFJAAAAAAAAAAAAAAAAAAAAAABAQEBcQEE/iz0JSEg9AUn8PQFJvT4BSyQmACYeTwBN6UoA
ScwVABgK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A4AAAAOCAAAHggAAD4IAAA+DAAAPgwAAD4MAAA+DgAAPg4AAD4OAAA+DwAAPg+MACAP/4
AgD/+AAA//wAAP/8AAD//AAA//4AAP/+ACD//gBg//8A4P//gOD//8Tg///H4A==
</value>
</data>
<root>
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
R0lGODlhOgBEAIYAAAAAAP///0kBPZyEmPsA7tEAxs8AxMoAv8gAv8EAuaEAmp8AmIoAhDIALzAALiUF
I7cAtKAAmp4AmJ4AmpcAlJUAkpEAjZAAjYUAgIQAgHkAd1gAVVcAVFUAUlMAUE8ATUkARz0APDUAMzEA
MC4ALf8n96gAposAioMAgWsAa0QAQzUANZkAnZUAmI4AkXMAdWEAZF8AYS8AMIgAjn4Ag3sAf1sAXlcA
WzcAOWhAeE0wWKaJsZF4m35Lk6mpqXZ2dkBAQP///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
AABBACwAAAAAOgBEAAAI/wCDCBxIsKDBgwgLbkjIsKHDhwIXQpxIkWGJEhskVtxY8WJGjiAnFijwoCAQ
ICFTEtww8oHLlydVytygoKbNlzJTPsho86bLnCF30lQwcmTNj0ApAnHJk2jRoxqTP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332DOGw/WPfUx+EA9c3cDrx3Ms0ffjrt/++DfEnpf4IAwwgwun9yx9Q1BeE/v3PIQEs
zEFEYLqHjMABCjQIAyHyQJUEBAA7
</value>
</data>
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAGyAAAAEAIAAoDgAAFgAAACgAAAAbAAAAQAAAAAEAIAAAAAAAgA0AAAAAAAAAAAAAAAAAAAAA
AAAAAAAAPQFJAD0BSQo9AUkpPQFJGj0BSQBJHk0AWzZePT8NQLwyADALOAA3AAAAAAAAAAAAnZCiAMrK
0AVCGUSsMAMyVC8CMQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAIQEg/Hj0D
STw9AUnoPQFJljYAPQAZABsQcEpyul0yX8sLAA0KMwA1AAAAAAAAAAAAgl2EAF8vX2JvSXH0Nws4UTMH
NAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAQEAtQEFArT0LSEs9AUn9PQFJpDQA
OQAoACofSwVK6UcER8wYAB4KLwAyAAAAAAAAAAAAWwdZAEcDRZBUBlL/MgEzUDABMQA9AUkAPQFJAD0B
SQE9AUkAPQFJAAAAAAAAAAAAAAAAAAAAAABAQEBcQEE/iz0JSEg9AUn8PQFJvT4BSyQmACYeTwBN6UoA
ScwVABgKLwAwAAAAAAAAAAAAXgBcAE8ATT9RAE/hRQBEbxQAGQA8AUcAPQFJEz0BSX89AUkTPQFJAD0B
SQAAAAAAAAAAAAAAAAA8ODzzKxYsUj8ATCY9AUnDPQFJ/z0BSY8gAB8bYABd6GAAXtxKAEklXwBeADcA
MwAAAAAAYQBfAJgAkQBGAESiUwBR7DUAMzEzADQAPQFJBj0BSVE9AUmLPQFJED0BSQA9AUkAAAAAAAAA
AAA7NTv/KBAqcUUSUAA9AUlNPQFJ/zwBSJduAGxEdQBx8HIAb/9OAE6lAAAAAzoAOgAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACMzoIBKxksgTIENfFuAHL/rwC3/8cA
0v+fAKf/cQB2/V8AYoJKAEwRUQBTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGC0YBjcDOYZxAHbxngCm/6EAqf9pAm//OAU71UMH
RRxKB00AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAjBSUAXABfAAAAAAWZAaCliQOQ+0gDS7MyBDWiMigzxUBBPzk/QD8AAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAOsf9ADyIPtdoxGp8koATF9NBFAAQUNBHkBBQBBAQEAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAKYV
qgClFKkjdAh4fVEAVBRXAFoAAAAAAAAAAAAAAAAAAAAAAAAAAADGPH/gBDx/4AQ8d+AAPGPgAD4h4CAe
MOAADBjgAAAA4AAAAOCAAAHggAAD4IAAA+DAAAPgwAAD4MAAA+DgAAPg4AAD4OAAA+DwAAPg+MACAP/4
AgD/+AAA//wAAP/8AAD//AAA//4AAP/+ACD//gBg//8A4P//gOD//8Tg///H4A==
</value>
</data>
</root>

View file

@ -2,6 +2,7 @@
// Idea is to just be open and play.
using HISP.Game;
using HISP.Game.Chat;
using HISP.Game.Horse;
using HISP.Game.Items;
using HISP.Game.Services;
@ -161,6 +162,9 @@ namespace HISP.Noobs
Auction.LoadAllAuctionRooms();
IncrementProgress();
Command.RegisterCommands();
IncrementProgress();
Item.DoSpecialCases();
IncrementProgress();
try