mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-07 21:55:42 +12:00
Make commands more accurate
This commit is contained in:
parent
997be8573d
commit
55c0f29914
14 changed files with 415 additions and 342 deletions
|
@ -1,5 +1,6 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Globalization;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
|
@ -79,157 +80,31 @@ namespace HISP.Game.Chat
|
||||||
return reasons.ToArray();
|
return reasons.ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static bool ProcessCommand(User user, string message)
|
public static bool ProcessCommand(User user, string message)
|
||||||
{
|
{
|
||||||
if (message.Length < 1)
|
if (message.Length < 1)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
string[] args = message.Split(' ').Skip(1).ToArray();
|
string parsedMessage = message;
|
||||||
|
|
||||||
if (user.Administrator || user.Moderator)
|
parsedMessage = parsedMessage.Trim();
|
||||||
|
char cLetter = parsedMessage[0];
|
||||||
|
parsedMessage = parsedMessage.Substring(1).Trim();
|
||||||
|
|
||||||
|
string messageToGive = parsedMessage;
|
||||||
|
|
||||||
|
|
||||||
|
foreach (CommandRegister cmd in CommandRegister.RegisteredCommands)
|
||||||
{
|
{
|
||||||
if (message[0] == '%')
|
if(cmd.CmdLetter == cLetter)
|
||||||
{
|
{
|
||||||
if (message.ToUpper().StartsWith("%GIVE"))
|
if (parsedMessage.ToUpper(CultureInfo.InvariantCulture).StartsWith(cmd.CmdName))
|
||||||
return Command.Give(message, args, user);
|
{
|
||||||
if (message.ToUpper().StartsWith("%SWF"))
|
string[] args = parsedMessage.Substring(cmd.CmdName.Length).Trim().Split(' ');
|
||||||
return Command.Swf(message, args, user);
|
return cmd.CmdCallback(messageToGive, 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,19 @@
|
||||||
using HISP.Player;
|
using HISP.Player;
|
||||||
using HISP.Server;
|
using HISP.Server;
|
||||||
using HISP.Game.Items;
|
using HISP.Game.Items;
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using HISP.Game.Events;
|
using HISP.Game.Events;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
using System.Linq;
|
|
||||||
using HISP.Game.Inventory;
|
using HISP.Game.Inventory;
|
||||||
using System.Threading;
|
using HISP.Modding;
|
||||||
|
|
||||||
|
using System.Linq;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace HISP.Game.Chat
|
namespace HISP.Game.Chat
|
||||||
{
|
{
|
||||||
public class Command
|
public class Command
|
||||||
{
|
{
|
||||||
|
|
||||||
private static User findNamePartial(string name)
|
private static User findNamePartial(string name)
|
||||||
{
|
{
|
||||||
foreach (GameClient client in GameClient.ConnectedClients)
|
foreach (GameClient client in GameClient.ConnectedClients)
|
||||||
|
@ -31,12 +31,57 @@ namespace HISP.Game.Chat
|
||||||
throw new KeyNotFoundException("name not found");
|
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)
|
public static bool Shutdown(string message, string[] args, User user)
|
||||||
{
|
{
|
||||||
if (!user.Administrator)
|
if (!user.Administrator)
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
GameServer.ShutdownServer();
|
GameServer.ShutdownServer();
|
||||||
|
|
||||||
|
@ -190,7 +235,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
msg:;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -227,7 +272,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -251,7 +296,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -264,7 +309,7 @@ namespace HISP.Game.Chat
|
||||||
user.LoggedinClient.SendPacket(versionPacket);
|
user.LoggedinClient.SendPacket(versionPacket);
|
||||||
|
|
||||||
// Send Command complete message to client.
|
// 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);
|
user.LoggedinClient.SendPacket(versionCommandCompletePacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -297,7 +342,7 @@ namespace HISP.Game.Chat
|
||||||
}
|
}
|
||||||
catch(KeyNotFoundException){};
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
@ -309,7 +354,7 @@ namespace HISP.Game.Chat
|
||||||
|
|
||||||
user.Teleport(Map.ModIsleX, Map.ModIsleY);
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -320,7 +365,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
user.Stealth = !user.Stealth;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -330,7 +375,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
user.NoClip = !user.NoClip;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -356,7 +401,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +427,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
@ -414,7 +459,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -442,7 +487,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -477,7 +522,7 @@ namespace HISP.Game.Chat
|
||||||
return false;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
|
|
||||||
return true;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
|
|
||||||
return true;
|
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);
|
user.LoggedinClient.SendPacket(chatPacket);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -663,7 +708,7 @@ namespace HISP.Game.Chat
|
||||||
public static bool Warp(string message, string[] args, User user)
|
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)
|
if (user.CurrentlyRidingHorse == null)
|
||||||
goto onlyRiddenUnicorn;
|
goto onlyRiddenUnicorn;
|
||||||
|
@ -730,7 +775,11 @@ namespace HISP.Game.Chat
|
||||||
if (!user.Administrator)
|
if (!user.Administrator)
|
||||||
return false;
|
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)];
|
WildHorse horse = WildHorse.WildHorses[GameServer.RandomNumberGenerator.Next(0, WildHorse.WildHorses.Length)];
|
||||||
horse.X = user.X;
|
horse.X = user.X;
|
||||||
|
@ -747,7 +796,7 @@ namespace HISP.Game.Chat
|
||||||
public static bool AutoReply(string message, string[] args, User user)
|
public static bool AutoReply(string message, string[] args, User user)
|
||||||
{
|
{
|
||||||
string replyMessage = string.Join(" ", args);
|
string replyMessage = string.Join(" ", args);
|
||||||
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
|
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
|
||||||
replyMessage = replyMessage.Trim();
|
replyMessage = replyMessage.Trim();
|
||||||
|
|
||||||
if (replyMessage.Length > 1024)
|
if (replyMessage.Length > 1024)
|
||||||
|
@ -776,7 +825,7 @@ namespace HISP.Game.Chat
|
||||||
public static bool Dance(string message, string[] args, User user)
|
public static bool Dance(string message, string[] args, User user)
|
||||||
{
|
{
|
||||||
string moves = string.Join(" ", args).ToLower();
|
string moves = string.Join(" ", args).ToLower();
|
||||||
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
|
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
|
||||||
|
|
||||||
if (user.ActiveDance != null)
|
if (user.ActiveDance != null)
|
||||||
user.ActiveDance.Dispose();
|
user.ActiveDance.Dispose();
|
||||||
|
@ -800,7 +849,7 @@ namespace HISP.Game.Chat
|
||||||
}
|
}
|
||||||
if (quizActive)
|
if (quizActive)
|
||||||
{
|
{
|
||||||
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message.Substring(1));
|
string formattedmessage = Messages.FormatPlayerCommandCompleteMessage(message);
|
||||||
|
|
||||||
RealTimeQuiz.Participent participent = GameServer.QuizEvent.JoinEvent(user);
|
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)
|
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)
|
if (args.Length <= 0)
|
||||||
{
|
{
|
||||||
|
@ -906,7 +955,7 @@ namespace HISP.Game.Chat
|
||||||
|
|
||||||
public static bool UnMute(string message, string[] args, User user)
|
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)
|
if (args.Length <= 0)
|
||||||
{
|
{
|
||||||
|
|
31
HorseIsleServer/LibHISP/Game/Chat/CommandRegister.cs
Normal file
31
HorseIsleServer/LibHISP/Game/Chat/CommandRegister.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -15,7 +15,7 @@ namespace HISP.Game
|
||||||
public const string Binoculars = "BINOCS";
|
public const string Binoculars = "BINOCS";
|
||||||
public const string Rake = "RAKE";
|
public const string Rake = "RAKE";
|
||||||
public const string MagnifyingGlass = "MAGNIFY";
|
public const string MagnifyingGlass = "MAGNIFY";
|
||||||
|
public const int CloudIslesQuest = 1373;
|
||||||
public struct QuestItemInfo
|
public struct QuestItemInfo
|
||||||
{
|
{
|
||||||
public int ItemId;
|
public int ItemId;
|
||||||
|
@ -262,7 +262,7 @@ namespace HISP.Game
|
||||||
user.Awards.AddAward(Award.GetAwardById(4)); // 100% Quest Completion Award.
|
user.Awards.AddAward(Award.GetAwardById(4)); // 100% Quest Completion Award.
|
||||||
|
|
||||||
// Is cloud isles quest?
|
// Is cloud isles quest?
|
||||||
if (quest.Id == 1373)
|
if (quest.Id == CloudIslesQuest)
|
||||||
{
|
{
|
||||||
byte[] swfLoadPacket = PacketBuilder.CreateSwfModulePacket("ballooncutscene", PacketBuilder.PACKET_SWF_CUTSCENE);
|
byte[] swfLoadPacket = PacketBuilder.CreateSwfModulePacket("ballooncutscene", PacketBuilder.PACKET_SWF_CUTSCENE);
|
||||||
user.LoggedinClient.SendPacket(swfLoadPacket);
|
user.LoggedinClient.SendPacket(swfLoadPacket);
|
||||||
|
|
20
HorseIsleServer/LibHISP/Modding/IMod.cs
Normal file
20
HorseIsleServer/LibHISP/Modding/IMod.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
77
HorseIsleServer/LibHISP/Modding/ModLoader.cs
Normal file
77
HorseIsleServer/LibHISP/Modding/ModLoader.cs
Normal 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -7,6 +7,7 @@
|
||||||
# However it is NOT COPYRIGHTED! This software is in the Public Domain!
|
# 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 address the server will bind to (default: 0.0.0.0 ALL INTERFACES)
|
||||||
|
|
||||||
ip=0.0.0.0
|
ip=0.0.0.0
|
||||||
|
|
||||||
# Port the server will bind to defaults: (on beta.horseisle.com: 12321, on pinto.horseisle.com: 443)
|
# 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.
|
# NOTE: This can be a folder or a file.
|
||||||
gamedata=gamedata
|
gamedata=gamedata
|
||||||
|
|
||||||
|
# Folder containing mod .dll's
|
||||||
|
# Mods can extend the server
|
||||||
|
# and add custom features.
|
||||||
|
mods_folder=mods
|
||||||
|
|
||||||
# =======================
|
# =======================
|
||||||
# Security
|
# Security
|
||||||
# =======================
|
# =======================
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace HISP.Server
|
||||||
public static string GameData = "gamedata.json";
|
public static string GameData = "gamedata.json";
|
||||||
public static string CrossDomainPolicyFile = "CrossDomainPolicy.xml";
|
public static string CrossDomainPolicyFile = "CrossDomainPolicy.xml";
|
||||||
|
|
||||||
|
public static string ModsFolder = "mods";
|
||||||
public static int LogLevel = 4;
|
public static int LogLevel = 4;
|
||||||
|
|
||||||
public static bool SqlLite = false;
|
public static bool SqlLite = false;
|
||||||
|
@ -118,6 +119,9 @@ namespace HISP.Server
|
||||||
case "enable_word_filter":
|
case "enable_word_filter":
|
||||||
BadWords = data == "true";
|
BadWords = data == "true";
|
||||||
break;
|
break;
|
||||||
|
case "mods_folder":
|
||||||
|
ModsFolder = data;
|
||||||
|
break;
|
||||||
case "intrest_rate":
|
case "intrest_rate":
|
||||||
IntrestRate = int.Parse(data);
|
IntrestRate = int.Parse(data);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -3,6 +3,7 @@ using HISP.Game.Horse;
|
||||||
using HISP.Game.Items;
|
using HISP.Game.Items;
|
||||||
using HISP.Game.Services;
|
using HISP.Game.Services;
|
||||||
using HISP.Game.SwfModules;
|
using HISP.Game.SwfModules;
|
||||||
|
using HISP.Game.Chat;
|
||||||
using HISP.Security;
|
using HISP.Security;
|
||||||
using System;
|
using System;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
@ -13,7 +14,6 @@ namespace HISP.Server
|
||||||
{
|
{
|
||||||
// "Entry Point"
|
// "Entry Point"
|
||||||
|
|
||||||
|
|
||||||
private static void defaultOnShutdownCallback()
|
private static void defaultOnShutdownCallback()
|
||||||
{
|
{
|
||||||
Process.GetCurrentProcess().Close();
|
Process.GetCurrentProcess().Close();
|
||||||
|
@ -52,6 +52,7 @@ namespace HISP.Server
|
||||||
Auction.LoadAllAuctionRooms();
|
Auction.LoadAllAuctionRooms();
|
||||||
|
|
||||||
Item.DoSpecialCases();
|
Item.DoSpecialCases();
|
||||||
|
Command.RegisterCommands();
|
||||||
|
|
||||||
GameServer.StartServer();
|
GameServer.StartServer();
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,6 +18,7 @@ using HISP.Game.SwfModules;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
using HISP.Game.Events;
|
using HISP.Game.Events;
|
||||||
using HISP.Game.Items;
|
using HISP.Game.Items;
|
||||||
|
using HISP.Modding;
|
||||||
|
|
||||||
namespace HISP.Server
|
namespace HISP.Server
|
||||||
{
|
{
|
||||||
|
@ -8249,12 +8250,16 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
public static void OnShutdown()
|
public static void OnShutdown()
|
||||||
{
|
{
|
||||||
ServerSocket.Dispose();
|
if(ServerSocket != null)
|
||||||
gameTimer.Dispose();
|
ServerSocket.Dispose();
|
||||||
minuteTimer.Dispose();
|
if (gameTimer != null)
|
||||||
|
gameTimer.Dispose();
|
||||||
|
if (minuteTimer != null)
|
||||||
|
minuteTimer.Dispose();
|
||||||
}
|
}
|
||||||
public static void ShutdownServer()
|
public static void ShutdownServer()
|
||||||
{
|
{
|
||||||
|
ModLoader.OnShutdown();
|
||||||
GameClient.OnShutdown();
|
GameClient.OnShutdown();
|
||||||
GameServer.OnShutdown();
|
GameServer.OnShutdown();
|
||||||
Database.OnShutdown();
|
Database.OnShutdown();
|
||||||
|
@ -8272,6 +8277,9 @@ namespace HISP.Server
|
||||||
minuteTimer = new Timer(new TimerCallback(onMinuteTick), null, oneMinute, oneMinute);
|
minuteTimer = new Timer(new TimerCallback(onMinuteTick), null, oneMinute, oneMinute);
|
||||||
Logger.InfoPrint("Binding to ip: " + ConfigReader.BindIP + " On port: " + ConfigReader.Port.ToString());
|
Logger.InfoPrint("Binding to ip: " + ConfigReader.BindIP + " On port: " + ConfigReader.Port.ToString());
|
||||||
|
|
||||||
|
// Load all/any mods
|
||||||
|
ModLoader.ReloadModsFromFilesystem();
|
||||||
|
|
||||||
SocketAsyncEventArgs e = new SocketAsyncEventArgs();
|
SocketAsyncEventArgs e = new SocketAsyncEventArgs();
|
||||||
e.Completed += GameClient.CreateClient;
|
e.Completed += GameClient.CreateClient;
|
||||||
GameClient.CreateClient(null, e);
|
GameClient.CreateClient(null, e);
|
||||||
|
|
|
@ -27,8 +27,6 @@ namespace HISP.Server
|
||||||
return arr;
|
return arr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static double PointsToDistance(int x1, int y1, int x2, int y2)
|
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));
|
return Math.Sqrt(Math.Pow((x2 - x1), 2) + Math.Pow((y2 - y1), 2));
|
||||||
|
|
2
HorseIsleServer/N00BS/LoadingForm.Designer.cs
generated
2
HorseIsleServer/N00BS/LoadingForm.Designer.cs
generated
|
@ -58,7 +58,7 @@
|
||||||
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)));
|
| System.Windows.Forms.AnchorStyles.Right)));
|
||||||
this.StartProgress.Location = new System.Drawing.Point(79, 40);
|
this.StartProgress.Location = new System.Drawing.Point(79, 40);
|
||||||
this.StartProgress.Maximum = 18;
|
this.StartProgress.Maximum = 19;
|
||||||
this.StartProgress.Name = "StartProgress";
|
this.StartProgress.Name = "StartProgress";
|
||||||
this.StartProgress.Size = new System.Drawing.Size(618, 23);
|
this.StartProgress.Size = new System.Drawing.Size(618, 23);
|
||||||
this.StartProgress.Step = 1;
|
this.StartProgress.Step = 1;
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
// Idea is to just be open and play.
|
// Idea is to just be open and play.
|
||||||
|
|
||||||
using HISP.Game;
|
using HISP.Game;
|
||||||
|
using HISP.Game.Chat;
|
||||||
using HISP.Game.Horse;
|
using HISP.Game.Horse;
|
||||||
using HISP.Game.Items;
|
using HISP.Game.Items;
|
||||||
using HISP.Game.Services;
|
using HISP.Game.Services;
|
||||||
|
@ -161,6 +162,9 @@ namespace HISP.Noobs
|
||||||
Auction.LoadAllAuctionRooms();
|
Auction.LoadAllAuctionRooms();
|
||||||
IncrementProgress();
|
IncrementProgress();
|
||||||
|
|
||||||
|
Command.RegisterCommands();
|
||||||
|
IncrementProgress();
|
||||||
|
|
||||||
Item.DoSpecialCases();
|
Item.DoSpecialCases();
|
||||||
IncrementProgress();
|
IncrementProgress();
|
||||||
try
|
try
|
||||||
|
|
Loading…
Add table
Reference in a new issue