mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-12 07:59:48 +12:00
Add 1 million bucks
This commit is contained in:
parent
48c9760599
commit
15eb93ea77
5 changed files with 51 additions and 9 deletions
|
@ -11,6 +11,7 @@
|
||||||
"click_nothing_message":"Nothing interesting here...",
|
"click_nothing_message":"Nothing interesting here...",
|
||||||
"playtime_timeout":"You have run out of playtime for now. In one minute you will be disconnected. You gain one minute of playtime every 8 minutes. Please come back later!",
|
"playtime_timeout":"You have run out of playtime for now. In one minute you will be disconnected. You gain one minute of playtime every 8 minutes. Please come back later!",
|
||||||
"random_movement":"You are sooo <B>%STAT%</B>. You wander dizzily in a different direction.",
|
"random_movement":"You are sooo <B>%STAT%</B>. You wander dizzily in a different direction.",
|
||||||
|
"incorrect_password":"Incorrect. You will have to find the correct answer somewhere...",
|
||||||
"new_user":{
|
"new_user":{
|
||||||
"starting_message":"<B>Welcome Newest Rider of Horse Isle!</B><BR>Start by talking to Welcome Willy in the cabin. Click the TALK button by his name in the right hand window. He will know the location of a buried treasure on this island! Move to the spot he describes using the arrow keys. Then Click the WRENCH Icon at the lower right.",
|
"starting_message":"<B>Welcome Newest Rider of Horse Isle!</B><BR>Start by talking to Welcome Willy in the cabin. Click the TALK button by his name in the right hand window. He will know the location of a buried treasure on this island! Move to the spot he describes using the arrow keys. Then Click the WRENCH Icon at the lower right.",
|
||||||
"starting_x":522,
|
"starting_x":522,
|
||||||
|
@ -54,6 +55,7 @@
|
||||||
"item_deleted":"You Lost an %ITEM%!",
|
"item_deleted":"You Lost an %ITEM%!",
|
||||||
"money_earned":"You Earned $%MONEY%!",
|
"money_earned":"You Earned $%MONEY%!",
|
||||||
"highscore_beaten":"You just beat your best score! New high score: %SCORE%.",
|
"highscore_beaten":"You just beat your best score! New high score: %SCORE%.",
|
||||||
|
"best_highscore_beaten":"<B>CONGRATULATIONS!</B> You just beat the all time top score! BONUS: $2,500",
|
||||||
"best_time_beaten":"Your new best time: %TIME%."
|
"best_time_beaten":"Your new best time: %TIME%."
|
||||||
},
|
},
|
||||||
"dropped_items":{
|
"dropped_items":{
|
||||||
|
@ -233,6 +235,7 @@
|
||||||
"horse_release":"<B>Are you SURE you want to let the horse go?</B>^T2If so, click ^B3X%RANDOMID%^R6",
|
"horse_release":"<B>Are you SURE you want to let the horse go?</B>^T2If so, click ^B3X%RANDOMID%^R6",
|
||||||
"cant_release_currently_riding":"You cannot release the horse you are riding!",
|
"cant_release_currently_riding":"You cannot release the horse you are riding!",
|
||||||
"released_horse":"You released the horse! It now roams Horse Isle freely. It will disappear in an hour.",
|
"released_horse":"You released the horse! It now roams Horse Isle freely. It will disappear in an hour.",
|
||||||
|
"horse_bucked":"Your inexperienced horse has become frustrated and has <B>bucked you off</B>! (Horse gained 1exp)",
|
||||||
"allstats":{
|
"allstats":{
|
||||||
"all_stats_header":"<B>All of your horses' complete stats:</B>",
|
"all_stats_header":"<B>All of your horses' complete stats:</B>",
|
||||||
"horse_name_entry":"<BR><BR><B>%HORSENAME%</B>: <I>%COLOR% %BREEDNAME% %SEX% (%EXP%exp)</I><BR>",
|
"horse_name_entry":"<BR><BR><B>%HORSENAME%</B>: <I>%COLOR% %BREEDNAME% %SEX% (%EXP%exp)</I><BR>",
|
||||||
|
|
|
@ -244,6 +244,7 @@ namespace HISP.Game
|
||||||
public static string HorseEntryFormat;
|
public static string HorseEntryFormat;
|
||||||
public static string ViewBaiscStats;
|
public static string ViewBaiscStats;
|
||||||
public static string ViewAdvancedStats;
|
public static string ViewAdvancedStats;
|
||||||
|
public static string HorseBuckedYou;
|
||||||
|
|
||||||
public static string HorseRidingMessageFormat;
|
public static string HorseRidingMessageFormat;
|
||||||
public static string HorseNameFormat;
|
public static string HorseNameFormat;
|
||||||
|
@ -469,6 +470,7 @@ namespace HISP.Game
|
||||||
public static string YouLostAnItemFormat;
|
public static string YouLostAnItemFormat;
|
||||||
public static string YouEarnedMoneyFormat;
|
public static string YouEarnedMoneyFormat;
|
||||||
public static string BeatHighscoreFormat;
|
public static string BeatHighscoreFormat;
|
||||||
|
public static string BeatBestHighscore;
|
||||||
public static string BeatBestTimeFormat;
|
public static string BeatBestTimeFormat;
|
||||||
|
|
||||||
// Abuse Report
|
// Abuse Report
|
||||||
|
@ -574,6 +576,9 @@ namespace HISP.Game
|
||||||
public static string KickReasonIdleFormat;
|
public static string KickReasonIdleFormat;
|
||||||
public static string KickReasonNoTime;
|
public static string KickReasonNoTime;
|
||||||
|
|
||||||
|
// Password
|
||||||
|
public static string IncorrectPasswordMessage;
|
||||||
|
|
||||||
// Swf
|
// Swf
|
||||||
public static string BoatCutscene;
|
public static string BoatCutscene;
|
||||||
public static string WagonCutscene;
|
public static string WagonCutscene;
|
||||||
|
|
|
@ -73,7 +73,7 @@ namespace HISP.Game
|
||||||
Database.SetWeather(Name, value);
|
Database.SetWeather(Name, value);
|
||||||
foreach(User user in GameServer.GetUsersInIsle(this,true,true))
|
foreach(User user in GameServer.GetUsersInIsle(this,true,true))
|
||||||
{
|
{
|
||||||
GameServer.UpdateWeather(user.LoggedinClient);
|
GameServer.UpdateWorld(user.LoggedinClient);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -788,6 +788,7 @@ namespace HISP.Server
|
||||||
Messages.HorseEntryFormat = gameData.messages.meta.horse.horse_format;
|
Messages.HorseEntryFormat = gameData.messages.meta.horse.horse_format;
|
||||||
Messages.ViewBaiscStats = gameData.messages.meta.horse.view_basic_stats;
|
Messages.ViewBaiscStats = gameData.messages.meta.horse.view_basic_stats;
|
||||||
Messages.ViewAdvancedStats = gameData.messages.meta.horse.view_advanced_stats;
|
Messages.ViewAdvancedStats = gameData.messages.meta.horse.view_advanced_stats;
|
||||||
|
Messages.HorseBuckedYou = gameData.messages.meta.horse.horse_bucked;
|
||||||
|
|
||||||
Messages.HorseRidingMessageFormat = gameData.messages.meta.horse.riding_message;
|
Messages.HorseRidingMessageFormat = gameData.messages.meta.horse.riding_message;
|
||||||
Messages.HorseNameFormat = gameData.messages.meta.horse.horse_inventory.your_horse_format;
|
Messages.HorseNameFormat = gameData.messages.meta.horse.horse_inventory.your_horse_format;
|
||||||
|
@ -1069,6 +1070,9 @@ namespace HISP.Server
|
||||||
Messages.InnCannotAffordService = gameData.messages.inn.cant_afford;
|
Messages.InnCannotAffordService = gameData.messages.inn.cant_afford;
|
||||||
Messages.InnFullyRested = gameData.messages.inn.fully_rested;
|
Messages.InnFullyRested = gameData.messages.inn.fully_rested;
|
||||||
|
|
||||||
|
// Password
|
||||||
|
Messages.IncorrectPasswordMessage = gameData.messages.incorrect_password;
|
||||||
|
|
||||||
// Fountain
|
// Fountain
|
||||||
Messages.FountainMeta = gameData.messages.meta.fountain;
|
Messages.FountainMeta = gameData.messages.meta.fountain;
|
||||||
Messages.FountainDrankYourFull = gameData.messages.fountain.drank_your_fill;
|
Messages.FountainDrankYourFull = gameData.messages.fountain.drank_your_fill;
|
||||||
|
@ -1110,6 +1114,7 @@ namespace HISP.Server
|
||||||
Messages.YouLostAnItemFormat = gameData.messages.sec_code.item_deleted;
|
Messages.YouLostAnItemFormat = gameData.messages.sec_code.item_deleted;
|
||||||
Messages.YouEarnedMoneyFormat = gameData.messages.sec_code.money_earned;
|
Messages.YouEarnedMoneyFormat = gameData.messages.sec_code.money_earned;
|
||||||
Messages.BeatHighscoreFormat = gameData.messages.sec_code.highscore_beaten;
|
Messages.BeatHighscoreFormat = gameData.messages.sec_code.highscore_beaten;
|
||||||
|
Messages.BeatBestHighscore = gameData.messages.sec_code.best_highscore_beaten;
|
||||||
Messages.BeatBestTimeFormat = gameData.messages.sec_code.best_time_beaten;
|
Messages.BeatBestTimeFormat = gameData.messages.sec_code.best_time_beaten;
|
||||||
|
|
||||||
// Inventory
|
// Inventory
|
||||||
|
|
|
@ -1198,7 +1198,11 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Quest.FailQuest(sender.LoggedinUser, Quest.GetQuestById(questId), false);
|
Quest.QuestResult result = Quest.FailQuest(sender.LoggedinUser, Quest.GetQuestById(questId), true);
|
||||||
|
if (result.NpcChat == null || result.NpcChat == "")
|
||||||
|
result.NpcChat = Messages.IncorrectPasswordMessage;
|
||||||
|
byte[] ChatPacket = PacketBuilder.CreateChat(result.NpcChat, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
|
sender.SendPacket(ChatPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -2192,9 +2196,19 @@ namespace HISP.Server
|
||||||
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent correct sec code, but invalid score value");
|
Logger.ErrorPrint(sender.LoggedinUser.Username + " Sent correct sec code, but invalid score value");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Highscore.HighscoreTableEntry[] scores = Database.GetTopScores(gameTitle, 5);
|
||||||
|
bool bestScoreEver = false;
|
||||||
|
if (scores.Length >= 1)
|
||||||
|
bestScoreEver = scores[0].Score <= value;
|
||||||
|
|
||||||
bool newHighscore = sender.LoggedinUser.Highscores.UpdateHighscore(gameTitle, value, time);
|
bool newHighscore = sender.LoggedinUser.Highscores.UpdateHighscore(gameTitle, value, time);
|
||||||
if (newHighscore && !time)
|
if(bestScoreEver && !time)
|
||||||
|
{
|
||||||
|
byte[] bestScoreBeaten = PacketBuilder.CreateChat(Messages.BeatBestHighscore, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
|
sender.SendPacket(bestScoreBeaten);
|
||||||
|
sender.LoggedinUser.Money += 2500;
|
||||||
|
}
|
||||||
|
else if (newHighscore && !time)
|
||||||
{
|
{
|
||||||
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatHighscoreBeatenMessage(value), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
byte[] chatPacket = PacketBuilder.CreateChat(Messages.FormatHighscoreBeatenMessage(value), PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
sender.SendPacket(chatPacket);
|
sender.SendPacket(chatPacket);
|
||||||
|
@ -2464,6 +2478,22 @@ namespace HISP.Server
|
||||||
}
|
}
|
||||||
|
|
||||||
User loggedInUser = sender.LoggedinUser;
|
User loggedInUser = sender.LoggedinUser;
|
||||||
|
|
||||||
|
if(loggedInUser.CurrentlyRidingHorse != null)
|
||||||
|
{
|
||||||
|
if(loggedInUser.CurrentlyRidingHorse.BasicStats.Experience < 25)
|
||||||
|
{
|
||||||
|
if(GameServer.RandomNumberGenerator.Next(0,250) > 240)
|
||||||
|
{
|
||||||
|
loggedInUser.CurrentlyRidingHorse.BasicStats.Experience++;
|
||||||
|
sender.LoggedinUser.CurrentlyRidingHorse = null;
|
||||||
|
sender.LoggedinUser.Facing %= 5;
|
||||||
|
byte[] horseBuckedMessage = PacketBuilder.CreateChat(Messages.HorseBuckedYou, PacketBuilder.CHAT_BOTTOM_RIGHT);
|
||||||
|
sender.SendPacket(horseBuckedMessage);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
byte movementDirection = packet[1];
|
byte movementDirection = packet[1];
|
||||||
|
|
||||||
if (loggedInUser.Thirst <= 0 || loggedInUser.Hunger <= 0 || loggedInUser.Tiredness <= 0)
|
if (loggedInUser.Thirst <= 0 || loggedInUser.Hunger <= 0 || loggedInUser.Tiredness <= 0)
|
||||||
|
@ -2571,7 +2601,7 @@ namespace HISP.Server
|
||||||
newY -= 1;
|
newY -= 1;
|
||||||
|
|
||||||
|
|
||||||
if (loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
if (loggedInUser.Facing == (direction + (onHorse * 5)) && loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
||||||
if (Map.CheckPassable(newX, newY - 1) || loggedInUser.NoClip)
|
if (Map.CheckPassable(newX, newY - 1) || loggedInUser.NoClip)
|
||||||
{
|
{
|
||||||
newY -= 1;
|
newY -= 1;
|
||||||
|
@ -2585,7 +2615,7 @@ namespace HISP.Server
|
||||||
newX -= 1;
|
newX -= 1;
|
||||||
|
|
||||||
|
|
||||||
if (loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
if (loggedInUser.Facing == (direction + (onHorse * 5)) && loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
||||||
if (Map.CheckPassable(newX - 1, newY) || loggedInUser.NoClip)
|
if (Map.CheckPassable(newX - 1, newY) || loggedInUser.NoClip)
|
||||||
{
|
{
|
||||||
newX -= 1;
|
newX -= 1;
|
||||||
|
@ -2599,7 +2629,7 @@ namespace HISP.Server
|
||||||
newX += 1;
|
newX += 1;
|
||||||
|
|
||||||
|
|
||||||
if (loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
if (loggedInUser.Facing == (direction + (onHorse * 5)) && loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
||||||
if (Map.CheckPassable(newX + 1, newY) || loggedInUser.NoClip)
|
if (Map.CheckPassable(newX + 1, newY) || loggedInUser.NoClip)
|
||||||
{
|
{
|
||||||
newX += 1;
|
newX += 1;
|
||||||
|
@ -2613,7 +2643,7 @@ namespace HISP.Server
|
||||||
newY += 1;
|
newY += 1;
|
||||||
|
|
||||||
|
|
||||||
if (loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
if (loggedInUser.Facing == (direction + (onHorse * 5)) && loggedInUser.CurrentlyRidingHorse != null && !World.InTown(loggedInUser.X, loggedInUser.Y)) // Double move
|
||||||
if (Map.CheckPassable(newX, newY + 1) || loggedInUser.NoClip)
|
if (Map.CheckPassable(newX, newY + 1) || loggedInUser.NoClip)
|
||||||
{
|
{
|
||||||
newY += 1;
|
newY += 1;
|
||||||
|
@ -2642,7 +2672,6 @@ namespace HISP.Server
|
||||||
sender.SendPacket(moveResponse);
|
sender.SendPacket(moveResponse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Update(sender);
|
Update(sender);
|
||||||
}
|
}
|
||||||
public static void OnQuitPacket(GameClient sender, byte[] packet)
|
public static void OnQuitPacket(GameClient sender, byte[] packet)
|
||||||
|
@ -4189,7 +4218,7 @@ namespace HISP.Server
|
||||||
if(!nearbyUser.MetaPriority)
|
if(!nearbyUser.MetaPriority)
|
||||||
UpdateArea(nearbyUser.LoggedinClient);
|
UpdateArea(nearbyUser.LoggedinClient);
|
||||||
|
|
||||||
|
UpdateWeather(client);
|
||||||
UpdateUserInfo(client.LoggedinUser);
|
UpdateUserInfo(client.LoggedinUser);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue