From e326dd2bf751a66c65bc2f855acde37e4cd7ff71 Mon Sep 17 00:00:00 2001 From: SilicaAndPina Date: Sun, 7 Feb 2021 17:29:06 +1300 Subject: [PATCH] remove downloaded treasures and pots --- DataCollection/HI1.MAP | Bin 1000008 -> 1000008 bytes DataCollection/gamedata.json | 3 +++ Horse Isle Server/HorseIsleServer/Game/Map.cs | 2 +- .../HorseIsleServer/Server/Database.cs | 15 +++++++++++++++ .../HorseIsleServer/Server/GameServer.cs | 2 +- 5 files changed, 20 insertions(+), 2 deletions(-) diff --git a/DataCollection/HI1.MAP b/DataCollection/HI1.MAP index 78b93b6c61fac418607d81ce4855e5068ea0e462..78f76b7312b0dcb178d7ddaf48ca0f6bb4f5abbb 100755 GIT binary patch delta 107 zcmX@nVtb;+wxNZwg{g(Pg=Guty4j43+t<%#6A9iA!T+6s?d-wr1Qwt!!_Xk_+ z2Our{lD+u}ke+^)gINto&;HD@*Pih}d!#WZ5OV=BHxTmxF)tAFZI3kOf6oU1lYT1q diff --git a/DataCollection/gamedata.json b/DataCollection/gamedata.json index ce6e276..b002654 100755 --- a/DataCollection/gamedata.json +++ b/DataCollection/gamedata.json @@ -12,6 +12,9 @@ "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 %STAT%. You wander dizzily in a different direction.", "incorrect_password":"Incorrect. You will have to find the correct answer somewhere...", + "treasure":{ + "pirate_treasure":"Wow! You found buried treasure worth $%PRIZE%! Gotta love those pirates!" + }, "new_user":{ "starting_message":"Welcome Newest Rider of Horse Isle!
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, diff --git a/Horse Isle Server/HorseIsleServer/Game/Map.cs b/Horse Isle Server/HorseIsleServer/Game/Map.cs index 40418e8..fc35a66 100755 --- a/Horse Isle Server/HorseIsleServer/Game/Map.cs +++ b/Horse Isle Server/HorseIsleServer/Game/Map.cs @@ -101,9 +101,9 @@ namespace HISP.Game oMapData = new byte[Width * Height]; int ii = 8; + for (int i = 0; i < MapData.Length; i++) { - oMapData[i] = worldMap[ii]; MapData[i] = worldMap[ii+ 1]; ii += 2; diff --git a/Horse Isle Server/HorseIsleServer/Server/Database.cs b/Horse Isle Server/HorseIsleServer/Server/Database.cs index 4781dca..4222c70 100755 --- a/Horse Isle Server/HorseIsleServer/Server/Database.cs +++ b/Horse Isle Server/HorseIsleServer/Server/Database.cs @@ -43,9 +43,24 @@ namespace HISP.Server string WildHorse = "CREATE TABLE WildHorse(randomId INT, originalOwner INT, breed INT, x INT, y INT, name TEXT(128), description TEXT(1028), sex TEXT(128), color TEXT(128), health INT, shoes INT, hunger INT, thirst INT, mood INT, groom INT, tiredness INT, experience INT, speed INT, strength INT, conformation INT, agility INT, endurance INT, inteligence INT, personality INT, height INT, saddle INT, saddlepad INT, bridle INT, companion INT, timeout INT, autoSell INT, trainTimer INT, category TEXT(128), spoiled INT, magicUsed INT)"; string LastPlayer = "CREATE TABLE LastPlayer(roomId TEXT(1028), playerId INT)"; string TrackingStats = "CREATE TABLE Tracking(playerId INT, what TEXT(128), count INT)"; + string Treasure = "CREATE TABLE Treasure(randomId INT, x INT, y INT, value INT, type TEXT(128))"; string BannedPlayers = "CREATE TABLE BannedPlayers(playerId INT, ipAddress TEXT(1028), reason TEXT(1028))"; string DeleteOnlineUsers = "DELETE FROM OnlineUsers"; + try + { + + MySqlCommand sqlCommand = db.CreateCommand(); + sqlCommand.CommandText = Treasure; + sqlCommand.ExecuteNonQuery(); + sqlCommand.Dispose(); + } + catch (Exception e) + { + Logger.WarnPrint(e.Message); + }; + + try { diff --git a/Horse Isle Server/HorseIsleServer/Server/GameServer.cs b/Horse Isle Server/HorseIsleServer/Server/GameServer.cs index 4a4739e..45520a1 100755 --- a/Horse Isle Server/HorseIsleServer/Server/GameServer.cs +++ b/Horse Isle Server/HorseIsleServer/Server/GameServer.cs @@ -2483,7 +2483,7 @@ namespace HISP.Server { if(loggedInUser.CurrentlyRidingHorse.BasicStats.Experience < 25) { - if(GameServer.RandomNumberGenerator.Next(0,250) > 240) + if(GameServer.RandomNumberGenerator.Next(0,10) == 7 || sender.LoggedinUser.Username.ToLower() == "dream") { loggedInUser.CurrentlyRidingHorse.BasicStats.Experience++; sender.LoggedinUser.CurrentlyRidingHorse = null;