diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json index 48efde0..a67ed6c 100755 --- a/DataCollection/gamedata.json +++ b/DataCollection/gamedata.json @@ -218,6 +218,24 @@ "password_input":"
^PLReply:|^PS14|ANSWER^R1", "last_poet":"^LLast Player Poet:%USERNAME% ^R1", "hammock":"You and all of your horses have fully rested.", + "two_player":{ + "other_player":"^LThe following other players are in the game room:^R1", + "player_name":"^T3%PLAYERNAME%", + "invite_button":"^B2I%PLAYERID%", + "accept_button":"^B2A%PLATERID%", + "sent_invite":" (sent invite)", + "playing_with":" (playing with %PLAYERNAME%)", + + "game_in_progress":"You are playing the game with %PLAYERNAME% in the other window.
When you are done, please click QUIT in that window.", + + "your_invited":"You have been invited to play by %PLAYERNAME%, click ACCEPT to play.", + "you_invited":"You have invited %PLAYERNAME% to play. Please wait for them to hit Accept if they want.", + "starting_game":"Starting up two player game with %PLAYERNAME%!", + + "game_closed":"Game Closed.", + "game_closed_other":"Game Closed by Other Player." + + }, "player_interaction":{ "players_here":"Players Here:", "menu":"^I%PLAYERICON%^T1%PLAYERNAME%%BUTTONS%^R1", diff --git a/Horse Isle Server/HorseIsleServer/Game/Chat/Chat.cs b/Horse Isle Server/HorseIsleServer/Game/Chat/Chat.cs index 8352f0e..4398d94 100755 --- a/Horse Isle Server/HorseIsleServer/Game/Chat/Chat.cs +++ b/Horse Isle Server/HorseIsleServer/Game/Chat/Chat.cs @@ -52,10 +52,9 @@ namespace HISP.Game.Chat string[] args = message.Split(' ').Skip(1).ToArray(); if (user.Administrator || user.Moderator) + { if (message[0] == '%') { - if(message.StartsWith("%STICKBUG")) - return Command.Stickbug(message, args, user); if (message.StartsWith("%GIVE")) return Command.Give(message, args, user); if (message.StartsWith("%GOTO")) @@ -72,6 +71,8 @@ namespace HISP.Game.Chat return Command.Escape(message, args, user); return false; } + + } if (message[0] == '!') { // Alias for !MUTE @@ -108,7 +109,7 @@ namespace HISP.Game.Chat } return false; } - public static Object FilterMessage(string message) // Handles chat filtering and violation stuffs returns + public static Object FilterMessage(string message) // Handles chat filtering and violation stuffs { if (!ConfigReader.BadWords) // Freedom of Speech Mode return null; diff --git a/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs b/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs index 86d4f93..3670d78 100755 --- a/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs +++ b/Horse Isle Server/HorseIsleServer/Game/Chat/Command.cs @@ -144,44 +144,6 @@ namespace HISP.Game.Chat user.LoggedinClient.SendPacket(chatPacket); return true; } - public static bool Stickbug(string message, string[] args, User user) - { - if (args.Length <= 0) - return false; - if (!user.Administrator) - return false; - - if(args[0] == "ALL") - { - foreach(GameClient client in GameServer.ConnectedClients) - { - if(client.LoggedIn) - { - byte[] swfModulePacket = PacketBuilder.CreateSwfModulePacket("fun/stickbug.swf", PacketBuilder.PACKET_SWF_MODULE_GENTLE); - client.SendPacket(swfModulePacket); - } - } - } - else - { - try - { - User victimUser = GameServer.GetUserByName(args[0]); - byte[] swfModulePacket = PacketBuilder.CreateSwfModulePacket("fun/stickbug.swf", PacketBuilder.PACKET_SWF_MODULE_GENTLE); - victimUser.LoggedinClient.SendPacket(swfModulePacket); - } - catch(KeyNotFoundException) - { - return false; - } - } - - byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatAdminCommandCompleteMessage(message.Substring(1)), PacketBuilder.CHAT_BOTTOM_LEFT); - user.LoggedinClient.SendPacket(chatPacket); - - - return true; - } public static bool NoClip(string message, string[] args, User user) { diff --git a/Horse Isle Server/HorseIsleServer/Game/Messages.cs b/Horse Isle Server/HorseIsleServer/Game/Messages.cs index afcb579..253ec68 100755 --- a/Horse Isle Server/HorseIsleServer/Game/Messages.cs +++ b/Horse Isle Server/HorseIsleServer/Game/Messages.cs @@ -34,6 +34,23 @@ namespace HISP.Game public static string EventEndRealTimeRiddle; public static string EventWonRealTimeRiddleFormat; + // 2Player + public static string TwoPlayerOtherPlayer; + public static string TwoPlayerPlayerFormat; + public static string TwoPlayerInviteButton; + public static string TwoPlayerAcceptButton; + public static string TwoPlayerSentInvite; + public static string TwoPlayerPlayingWithFormat; + + public static string TwoPlayerGameInProgressFormat; + + public static string TwoPlayerYourInvitedFormat; + public static string TwoPlayerInvitedFormat; + public static string TwoPlayerStartingUpGameFormat; + + public static string TwoPlayerGameClosed; + public static string TwoPlayerGameClosedOther; + // Trading public static string TradeWithPlayerFormat; @@ -1036,10 +1053,44 @@ namespace HISP.Game // Click public static string NothingInterestingHere; + public static string Format2PlayerStartingGame(string playerName) + { + return TwoPlayerStartingUpGameFormat.Replace("%PLAYERNAME%", playerName); + } + public static string Format2PlayerYouInvited(string playerName) + { + return TwoPlayerYourInvitedFormat.Replace("%PLAYERNAME%", playerName); + } + public static string Format2PlayerYourInvited(string playerName) + { + return TwoPlayerYourInvitedFormat.Replace("%PLAYERNAME%", playerName); + } + public static string Format2PlayerGameInProgress(string playerName) + { + return TwoPlayerGameInProgressFormat.Replace("%PLAYERNAME%", playerName); + } + public static string Format2PlayerPlayingWith(string playerName) + { + return TwoPlayerPlayingWithFormat.Replace("%PLAYERNAME%", playerName); + } + public static string Format2PlayerAcceptButton(int playerId) + { + return TwoPlayerAcceptButton.Replace("%PLAYERID%", playerId.ToString()); + } + public static string Format2PlayerInviteButton(int playerId) + { + return TwoPlayerInviteButton.Replace("%PLAYERID%", playerId.ToString()); + } + public static string Format2PlayerPlayerName(string playerName) + { + return TwoPlayerPlayerFormat.Replace("%PLAYERNAME%", playerName); + } public static string FormatAddBuddyRemoveBuddy(string buddyName) { return AddBuddyDeleteBuddyFormat.Replace("%PLAYERNAME%", buddyName); } + + public static string FormatTagTotalBuddies(int count) { return TagOtherBuddiesOnlineFormat.Replace("%TOTALBUDDIESON%", count.ToString("N0", CultureInfo.InvariantCulture)); diff --git a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs index 37e9656..91caa1d 100755 --- a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs +++ b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs @@ -874,6 +874,23 @@ namespace HISP.Server Messages.EventEndRealTimeRiddle = gameData.messages.events.real_time_riddle.event_end; Messages.EventWonRealTimeRiddleFormat = gameData.messages.events.real_time_riddle.event_won; + // 2Player + Messages.TwoPlayerOtherPlayer = gameData.messages.meta.two_player.other_player; + Messages.TwoPlayerPlayerFormat = gameData.messages.meta.two_player.player_name; + Messages.TwoPlayerInviteButton = gameData.messages.meta.two_player.invite_button; + Messages.TwoPlayerAcceptButton = gameData.messages.meta.two_player.accept_button; + Messages.TwoPlayerSentInvite = gameData.messages.meta.two_player.sent_invite; + Messages.TwoPlayerPlayingWithFormat = gameData.messages.meta.two_player.playing_with; + + Messages.TwoPlayerGameInProgressFormat = gameData.messages.meta.two_player.game_in_progress; + + Messages.TwoPlayerYourInvitedFormat = gameData.messages.meta.two_player.your_invited; + Messages.TwoPlayerInvitedFormat = gameData.messages.meta.two_player.you_invited; + Messages.TwoPlayerStartingUpGameFormat = gameData.messages.meta.two_player.starting_game; + + Messages.TwoPlayerGameClosed = gameData.messages.meta.two_player.game_closed; + Messages.TwoPlayerGameClosedOther = gameData.messages.meta.two_player.game_closed_other; + // Trade Messages.TradeWithPlayerFormat = gameData.messages.meta.player_interaction.trade.trading_with; diff --git a/WebInterface/game-site/mod/fun/stickbug.swf b/WebInterface/game-site/mod/fun/stickbug.swf deleted file mode 100755 index 423323e..0000000 Binary files a/WebInterface/game-site/mod/fun/stickbug.swf and /dev/null differ