diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json
index a2aaf04..4e258fb 100755
--- a/DataCollection/gamedata.json
+++ b/DataCollection/gamedata.json
@@ -194,6 +194,10 @@
"venus_flytrap_format":"The Giant Venus Flytrap chomped at you!
OUCH!!
It chomped your pocket, taking $%MONEY% with it!!",
"password_input":"
^PLReply:|^PS14|ANSWER^R1",
"last_poet":"^R1^LLast Player Poet:%USERNAME% ^R1",
+ "horse_games":{
+ "select_a_horse":"
^LSelect a horse to compete with:^R1",
+ "horse_entry":"^I252^T7#%PLACING%:%HORSENAME%^BM%SWF%^R1"
+ },
"mail":{
"mail_received":"A message has been sent to you from another player. It is in your inventory now.",
"mail_ripped":"You permanently ripped up the message.",
diff --git a/Horse Isle Server/HorseIsleServer/Game/Messages.cs b/Horse Isle Server/HorseIsleServer/Game/Messages.cs
index 46b051c..4beb118 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Messages.cs
+++ b/Horse Isle Server/HorseIsleServer/Game/Messages.cs
@@ -16,6 +16,10 @@ namespace HISP.Game
// Click
public static string PlayerHereFormat;
+ // Horse Games
+ public static string HorseGamesSelectHorse;
+ public static string HorseGamesHorseEntryFormat;
+
// City Hall
public static string CityHallMenu;
public static string CityHallMailSendMeta;
@@ -792,6 +796,10 @@ namespace HISP.Game
// Click
public static string NothingInterestingHere;
+ public static string FormatHorseGamesEntry(int placing, string horseName, string Swf)
+ {
+ return HorseGamesHorseEntryFormat.Replace("%PLACING%", placing.ToString()).Replace("%HORSENAME%", horseName).Replace("%SWF%", Swf);
+ }
public static string FormatCityHallCantFindPlayerMessage(string playerName)
{
return CityHallCantFindPlayerMessageFormat.Replace("%PLAYERNAME%", playerName);
diff --git a/Horse Isle Server/HorseIsleServer/Game/Meta.cs b/Horse Isle Server/HorseIsleServer/Game/Meta.cs
index e21590e..8fcadad 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Meta.cs
+++ b/Horse Isle Server/HorseIsleServer/Game/Meta.cs
@@ -1222,6 +1222,18 @@ namespace HISP.Game
message += Messages.MetaTerminator;
return message;
}
+ private static string buildHorseGame(User user, string swf)
+ {
+ string message = Messages.HorseGamesSelectHorse;
+ int placing = 1;
+ foreach(HorseInstance horse in user.HorseInventory.HorseList.OrderBy(o => o.Name).ToArray())
+ {
+ message += Messages.FormatHorseGamesEntry(placing, horse.Name, swf + ".swf?ID=" + horse.RandomId + "&SP=" + horse.AdvancedStats.Speed + "&ST=" + horse.AdvancedStats.Strength + "&CO=" + horse.AdvancedStats.Conformation + "&AG=" + horse.AdvancedStats.Agility + "&EN=" + horse.AdvancedStats.Endurance + "&IN=" + horse.AdvancedStats.Inteligence + "&PE=" + horse.AdvancedStats.Personality + "&");
+ }
+ message += Messages.ExitThisPlace;
+ message += Messages.MetaTerminator;
+ return message;
+ }
public static string BuildMostValuedRanches()
{
string message = Messages.CityHallTop25Ranches;
@@ -2328,6 +2340,10 @@ namespace HISP.Game
{
message += buildPond(user);
}
+ if(TileCode == "HORSES")
+ {
+ message += buildHorseGame(user, TileArg);
+ }
if (TileCode == "WORKSHOP")
{
message += buildWorkshop(user);
diff --git a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs
index 2f48fda..192d2e4 100755
--- a/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs
+++ b/Horse Isle Server/HorseIsleServer/Server/GameDataJson.cs
@@ -746,6 +746,10 @@ namespace HISP.Server
Map.ModIsleX = gameData.messages.commands.mod_isle.x;
Map.ModIsleY = gameData.messages.commands.mod_isle.y;
+ // Horse Games
+ Messages.HorseGamesSelectHorse = gameData.messages.meta.horse_games.select_a_horse;
+ Messages.HorseGamesHorseEntryFormat = gameData.messages.meta.horse_games.horse_entry;
+
// City Hall
Messages.CityHallMenu = gameData.messages.meta.city_hall.menu;
Messages.CityHallMailSendMeta = gameData.messages.meta.city_hall.mail_send_meta;