diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json
index 75a20a2..6588c7a 100755
--- a/DataCollection/gamedata.json
+++ b/DataCollection/gamedata.json
@@ -518,7 +518,7 @@
"stat_format":"%BASE%;%COMPAINON%;%TACK%;%MAX%;",
"basic_stat_format":"^AB%HEALTH%;%HUNGER%;%THIRST%;%MOOD%;%ENERGY%;%GROOM%;%SHOES%;",
"horses_here":"HORSES HERE:
",
- "wild_horse":"^I252^T6%NAME%, It's a %BREED%^B3U%RANDOMID%^R1",
+ "wild_horse":"^I252^T6%NAME%, It's a%N% %BREED%^B3U%RANDOMID%^R1",
"cannot_mount_tacked":"Cannot ride horse until fully tacked.",
"dismount_because_tack":"You had to stop riding %HORSENAME% because it no longer had tack.",
"horse_timer":"You have 60 seconds to capture the horse. Good luck!",
diff --git a/Horse Isle Server/HorseIsleServer/Game/Messages.cs b/Horse Isle Server/HorseIsleServer/Game/Messages.cs
index 9132555..dfba98b 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Messages.cs
+++ b/Horse Isle Server/HorseIsleServer/Game/Messages.cs
@@ -12,6 +12,11 @@ namespace HISP.Game
// Mod isle
public static string ModIsleMessage;
+
+ // Auction House
+ public static string AuctionCurrentRunning;
+
+
// Warp Command
public static string SuccessfullyWarpedToLocation;
public static string SuccessfullyWarpedToPlayer;
@@ -1599,9 +1604,9 @@ namespace HISP.Game
}
- public static string FormatWildHorse(string name, string breed, int randomId)
+ public static string FormatWildHorse(string name, string breed, int randomId, bool vowel)
{
- return WildHorseFormat.Replace("%NAME%", name).Replace("%BREED%", breed).Replace("%RANDOMID%", randomId.ToString());
+ return WildHorseFormat.Replace("%NAME%", name).Replace("%BREED%", breed).Replace("%RANDOMID%", randomId.ToString()).Replace("%N%", vowel ? "n" : "");
}
public static string FormatHorseBreedPreview(string name, string description)
{
diff --git a/Horse Isle Server/HorseIsleServer/Game/Meta.cs b/Horse Isle Server/HorseIsleServer/Game/Meta.cs
index c9b7b4d..6774a3e 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Meta.cs
+++ b/Horse Isle Server/HorseIsleServer/Game/Meta.cs
@@ -740,7 +740,8 @@ namespace HISP.Game
message = Messages.HorsesHere;
foreach (WildHorse horse in horses)
{
- message += Messages.FormatWildHorse(horse.Instance.Name, horse.Instance.Breed.Name, horse.Instance.RandomId);
+ bool vowel = (horse.Instance.Breed.Name[0].ToString().ToLower() == "a" || horse.Instance.Breed.Name[0].ToString().ToLower() == "i" || horse.Instance.Breed.Name[0].ToString().ToLower() == "u" || horse.Instance.Breed.Name[0].ToString().ToLower() == "e" || horse.Instance.Breed.Name[0].ToString().ToLower() == "o");
+ message += Messages.FormatWildHorse(horse.Instance.Name, horse.Instance.Breed.Name, horse.Instance.RandomId, vowel);
}
}
return message;
diff --git a/Horse Isle Server/HorseIsleServer/Game/Npc.cs b/Horse Isle Server/HorseIsleServer/Game/Npc.cs
index a1b7152..0f6e0d4 100755
--- a/Horse Isle Server/HorseIsleServer/Game/Npc.cs
+++ b/Horse Isle Server/HorseIsleServer/Game/Npc.cs
@@ -146,31 +146,43 @@ namespace HISP.Game
if (GameServer.GetUsersAt(this.X, this.Y, true, true).Length > 0)
return;
- int direction = GameServer.RandomNumberGenerator.Next(0, 3);
- int tryX = this.X;
- int tryY = this.Y;
-
- switch (direction)
+ int tries = 0;
+ while(true)
{
- case 0:
- tryX += 1;
- break;
- case 1:
- tryX -= 1;
- break;
- case 2:
- tryY += 1;
- break;
- case 3:
- tryY -= 1;
- break;
- }
+ int direction = GameServer.RandomNumberGenerator.Next(0, 3);
+ int tryX = this.X;
+ int tryY = this.Y;
- if (canNpcBeHere(tryX, tryY))
- {
- X = tryX;
- Y = tryY;
+ switch (direction)
+ {
+ case 0:
+ tryX += 1;
+ break;
+ case 1:
+ tryX -= 1;
+ break;
+ case 2:
+ tryY += 1;
+ break;
+ case 3:
+ tryY -= 1;
+ break;
+ }
+
+ if (canNpcBeHere(tryX, tryY))
+ {
+ X = tryX;
+ Y = tryY;
+ break;
+ }
+ tries++;
+ if (tries > 100) // yo stuck lol
+ {
+ Logger.ErrorPrint("NPC: " + this.Name + " is probably stuck (cant move after 100 tries)");
+ break;
+ }
}
+
}
else // Is Scripted.
{
@@ -292,8 +304,7 @@ namespace HISP.Game
Logger.DebugPrint("Making NPC's randomly wander.");
foreach(NpcEntry npc in NpcList)
{
- if(GameServer.RandomNumberGenerator.Next(0,100) > 50)
- npc.RandomWander();
+ npc.RandomWander();
}
}
diff --git a/Horse Isle Server/HorseIsleServer/Server/Database.cs b/Horse Isle Server/HorseIsleServer/Server/Database.cs
index af45f6e..29c4ea2 100755
--- a/Horse Isle Server/HorseIsleServer/Server/Database.cs
+++ b/Horse Isle Server/HorseIsleServer/Server/Database.cs
@@ -1383,7 +1383,7 @@ namespace HISP.Server
{
db.Open();
MySqlCommand sqlCommand = db.CreateCommand();
- sqlCommand.CommandText = "INSERT INTO Horses VALUES(@randomId,@originalOwner,@leaseTime,@leaser,@breed,@name,@description,@sex,@color,@health,@shoes,@hunger,@thirst,@mood,@groom,@tiredness,@experience,@speed,@strength,@conformation,@agility,@endurance,@inteligence,@personality,@height,@saddle,@saddlepad,@bridle,@companion,@autosell,@training,@category,@spoiled,@magicused)";
+ sqlCommand.CommandText = "INSERT INTO Horses VALUES(@randomId,@originalOwner,@leaseTime,@leaser,@breed,@name,@description,@sex,@color,@health,@shoes,@hunger,@thirst,@mood,@groom,@tiredness,@experience,@speed,@strength,@conformation,@agility,@endurance,@inteligence,@personality,@height,@saddle,@saddlepad,@bridle,@companion,@autosell,@training,@category,@spoiled,@magicused,@hidden)";
sqlCommand.Parameters.AddWithValue("@randomId", horse.RandomId);
sqlCommand.Parameters.AddWithValue("@originalOwner", horse.Owner);
@@ -1443,6 +1443,8 @@ namespace HISP.Server
sqlCommand.Parameters.AddWithValue("@spoiled", horse.Spoiled);
sqlCommand.Parameters.AddWithValue("@magicused", horse.MagicUsed);
+ sqlCommand.Parameters.AddWithValue("@hidden", horse.Hidden ? "YES" : "NO");
+
sqlCommand.Prepare();
sqlCommand.ExecuteNonQuery();
@@ -1464,7 +1466,7 @@ namespace HISP.Server
int magicUsed = reader.GetInt32(33);
int autosell = reader.GetInt32(29);
int leaseTime = reader.GetInt32(2);
- bool hidden = reader.GetString(33) == "YES";
+ bool hidden = reader.GetString(34) == "YES";
HorseInstance inst = new HorseInstance(horseBreed, randomId, name, description, spoiled, category, magicUsed, autosell, leaseTime);
inst.Owner = reader.GetInt32(1);