-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
i get an error once i start it :
Connecting to database...
Hang.Storage.DatabaseException: Failed to open connection for database client 0,
exception message: Unable to connect to any of the specified MySQL hosts.
at Hang.Storage.DatabaseClient.Connect()
at Hang.Storage.DatabaseManager.GetClient()
at Hang.Storage.DatabaseManager.GetClient()
at Hang.HabboHotel.Game..ctor(Int32 conns)
at Hang.HangEnvironment.Initialize()
at Hang.Program.Main()
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
iZoom
i get an error once i start it :
Connecting to database...
Hang.Storage.DatabaseException: Failed to open connection for database client 0,
exception message: Unable to connect to any of the specified MySQL hosts.
at Hang.Storage.DatabaseClient.Connect()
at Hang.Storage.DatabaseManager.GetClient()
at Hang.Storage.DatabaseManager.GetClient()
at Hang.HabboHotel.Game..ctor(Int32 conns)
at Hang.HangEnvironment.Initialize()
at Hang.Program.Main()
Did you fill in your database details in the config file?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Of course i did here it is :
## uberEmulator System Configuration File
## Must be edited for the server to work
## MySQL Configuration
db.hostname=localhost
db.port=3306
db.username=root
db.password=despicable1
db.name=uber
## MySQL pooling setup (controls amount of connections)
db.pool.minsize=5
db.pool.maxsize=100
## Game TCP/IP Configuration
game.tcp.bindip=-----------
game.tcp.port=30000
game.tcp.conlimit=11000
game.tcp.conperip=100
game.tcp.enablenagles=false
## MUS TCP/IP Configuration
mus.tcp.bindip=----------
mus.tcp.port=30001
mus.tcp.allowedaddr=-------------
## Client configuration
client.ping.enabled=1
client.ping.interval=30000
#IRC
irc.enabled=false
irc.server=irc.website-service.org
irc.port=6667
irc.user=USER CSharpBot 8 * :I'm a C# irc bot
irc.nick=[VG]Nigger
irc.channel=#habbovg_servermod
irc.password=changeme
group.enabled=true
auth.ssodisabled=false
#Says wether the users should receive pixels each X seconds, how much and when (When in seconds)
game.pixel.enabled=false
game.pixel.amount=15
game.pixel.time=10
#Says wether the users should receive pixels each X seconds, how much and when (When in seconds)
game.credits.enabled=false
game.credits.amount=50
game.credits.time=15
game.login.credits.receiveamount=0
game.login.pixel.receiveamount=0
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
bot
Yeah its just a temp fix till I can fully look at it for more than 5 minutes.
Replace your whole AchievementManager.cs with this.
Code:
using System;
using System.Collections.Generic;
using System.Data;
using Hang.HabboHotel.GameClients;
using Hang.HabboHotel.Users.Badges;
using Hang.Messages;
using Hang.Storage;
// namespace Hang.HabboHotel.Achievements
// {
// class AchievementManager
// {
// private Dictionary<uint, Achievement> Achievements;
// internal AchievementManager()
// {
// this.Achievements = new Dictionary<uint, Achievement>();
// }
// internal void LoadAchievements(DatabaseClient MySQL)
// {
// Achievements.Clear();
// DataTable Data = new DataTable();
// Data = MySQL.query_read("SELECT * FROM achievements");
// if (Data == null)
// {
// return;
// }
// foreach (DataRow Row in Data.Rows)
// {
// Achievements.Add((uint)Row["id"], new Achievement((uint)Row["id"], (int)Row["levels"], (string)Row["badge"], (int)Row["pixels_base"], (double)Row["pixels_multiplier"], Convert.ToString(Row["category"]), HangEnvironment.EnumToBool(Row["dynamic_badgelevel"].ToString())));
// }
// }
// internal static Boolean UserHasAchievement(GameClient Session, uint Id, int MinLevel)
// {
// if (!Session.GetHabbo().Achievements.ContainsKey(Id))
// {
// return false;
// }
// if (Session.GetHabbo().Achievements[Id] >= MinLevel)
// {
// return true;
// }
// return false;
// }
// internal ServerMessage SerializeAchievementList(GameClient Session)
// {
// List<Achievement> AchievementsToList = new List<Achievement>();
// Dictionary<uint, int> NextAchievementLevels = new Dictionary<uint, int>();
// using (TimedLock.Lock(Achievements))
// {
// foreach (Achievement Achievement in Achievements.Values)
// {
// if (!Session.GetHabbo().Achievements.ContainsKey(Achievement.Id))
// {
// AchievementsToList.Add(Achievement);
// NextAchievementLevels.Add(Achievement.Id, 1);
// }
// else
// {
// if (Session.GetHabbo().Achievements[Achievement.Id] >= Achievement.Levels)
// {
// continue;
// }
// AchievementsToList.Add(Achievement);
// NextAchievementLevels.Add(Achievement.Id, Session.GetHabbo().Achievements[Achievement.Id] + 1);
// }
// }
// }
// ServerMessage Message = new ServerMessage(436);
// Message.AppendInt32(AchievementsToList.Count);
// foreach (Achievement Achievement in AchievementsToList)
// {
// int Level = NextAchievementLevels[Achievement.Id];
// int Pixels = CalculateAchievementValue(Achievement.PixelBase, Level);
//Fix achivements 90%
// Achievement.Serialize(Message, Pixels, Level, FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel), Achievement.category, Achievement.Levels);
// }
// return Message;
// }
// internal void UnlockAchievement(GameClient Session, uint AchievementId, int Level)
// {
// // Get the achievement
// Achievement Achievement = Achievements[AchievementId];
// Make sure the achievement is valid and has not already been unlocked
// if (Achievement == null || UserHasAchievement(Session, Achievement.Id, Level) || Level < 1 || Level > Achievement.Levels)
// {
// return;
// }
// Calculate the pixel value for this achievement
// int Value = CalculateAchievementValue(Achievement.PixelBase, Level);
// Remove any previous badges for this achievement (old levels)
// using (TimedLock.Lock(Session.GetHabbo().GetBadgeComponent().BadgeList))
// {
// List<string> BadgesToRemove = new List<string>();
// foreach (Badge Badge in Session.GetHabbo().GetBadgeComponent().BadgeList)
// {
// if (Badge.Code.StartsWith(Achievement.BadgeCode))
// {
// BadgesToRemove.Add(Badge.Code);
// }
// }
// foreach (string Badge in BadgesToRemove)
// {
// Session.GetHabbo().GetBadgeComponent().RemoveBadge(Badge);
// }
// }
// Give the user the new badge
// Session.GetHabbo().GetBadgeComponent().GiveBadge(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel), true);
// Update or set the achievement level for the user
// if (Session.GetHabbo().Achievements.ContainsKey(Achievement.Id))
// {
// Session.GetHabbo().Achievements[Achievement.Id] = Level;
// using (DatabaseClient MySQL = HangEnvironment.GetDatabase().GetClient())
// {
// MySQL.query("UPDATE user_achievements SET achievement_level = '" + Level + "' WHERE user_id = '" + Session.GetHabbo().Id + "' AND achievement_id = '" + Achievement.Id + "' LIMIT 1");
// }
// }
// else
// {
// Session.GetHabbo().Achievements.Add(Achievement.Id, Level);
// using (DatabaseClient MySQL = HangEnvironment.GetDatabase().GetClient())
// {
// MySQL.query("INSERT INTO user_achievements (user_id,achievement_id,achievement_level) VALUES ('" + Session.GetHabbo().Id + "','" + Achievement.Id + "','" + Level + "')");
// }
// }
// Notify the user of the achievement gain
// ServerMessage Message = new ServerMessage(437);
// Message.AppendUInt(Achievement.Id); //id del achivements
// Message.AppendInt32(Level); //nivel
// string L = "";
// if (Achievement.Levels > 1)
// L = Achievement.Levels.ToString(); //niveles
// Message.AppendInt32(182); // ?
// Message.AppendStringWithBreak(FormatBadgeCode(Achievement.BadgeCode, Level, Achievement.DynamicBadgeLevel) + L); // datos de la placa
// Message.AppendInt32(0); // Puntos de recompensas
// Message.AppendInt32(Value); //valor
// Message.AppendBoolean(false); //progreso
// Message.AppendInt32(0); // puntos extras de facebook
// Message.AppendInt32(-1);
// Message.AppendByte(2);
// Message.AppendStringWithBreak(Achievement.category); // categoria de la placa
// Session.GetConnection().SendMessage(Message);
// Give the user the pixels he deserves
// Session.GetHabbo().ActivityPoints += Value; //valor de los pixeles
// Session.GetHabbo().UpdateActivityPointsBalance(true); // Pixeles
// Give the user the pixels he deserves
// Session.GetHabbo().ActivityPoints += Value;
// Session.GetHabbo().UpdateActivityPointsBalance(Value);
// [13-12-2009 17:03:34 from 62.50.35.181:30000]
// FvXXDRB
// [13-12-2009 17:03:34 from 62.50.35.181:30000]
// FuQBIACH_Motto1
// FuPBJACH_RoomEntry2ACH_RoomEntry1
// }
// internal static int CalculateAchievementValue(int BaseValue, int Level)
// {
// return (BaseValue + (50 * Level));
// }
// internal static string FormatBadgeCode(string BadgeTemplate, int Level, bool Dyn)
// {
// if (!Dyn)
// {
// return BadgeTemplate;
// }
// return BadgeTemplate + Level;
// }
// }
//}
^may be wrong but shurgs couldn't care.
Just a place holder for now makes the achievements none existent and you can't click them inside the client. Theres probably just a small problem with the code and thats why its throwing an error inside the emu.
tbh its not a horrible source at all been fun exploring it more and more.
bot
That would just cause more errors in the emu because of the Achievement.cs, and the error still occurs.
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
hello can anyone help me with my problem please?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Or you can take the original source and quote or delete
Code:
//HangEnvironment.GetGame().GetAchievementManager().UnlockAchievement(this, 11, 1);
Because the 11 is the z63 badge which is already given by connecting for the first time.
And i think it's will be work.
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
iZoom
hello can anyone help me with my problem please?
Depends what problem...
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
Facebook
That would just cause more errors in the emu because of the Achievement.cs, and the error still occurs.
This is just something I just did, it wasn't really much tbh.. Just changed it to + 1, so you can add the achievement.
Line 62:
Quote:
if (!Session.GetHabbo().Achievements.ContainsKey(Achievement.Id))
{
AchievementsToList.Add(Achievement);
NextAchievementLevels.Add(Achievement.Id, + 1);
}
in AchievementManager.cs
(NOT TESTED) but quite sure it'll pass through.
Thanks Facebook.
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Here is my very very little edit. Room creation fully working and Floorsize, Wallsize too, with DB. If this can help or something, here we go:
http://www.mirorii.com/fichier/22/61...eBorn-zip.html
Multiupload.nl - upload your files to multiple file hosting sites!
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Did any one fix achievements?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
[url=http://d.pr/i/9xG9]Droplr
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
DylanDylan
[url=http://d.pr/i/9xG9]Droplr
I get the same error. Anyone have any ideas how to fix?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
DylanDylan
Also same error?
http://d.pr/i/9xG9+
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Anyone know a fix? Would be very thankful..
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Quote:
Originally Posted by
Bjork
The WinRar wont open it, re-upload please!
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Use 7zip. Just downloaded for testing and i can open it.
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Is this working with PhoenixDB?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
LOVE IT, First Butterfly emulator i use and it works perfectly. What swf's work for this? !!!
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
How can i fix the archievements?
and did you have an normal catalog and is battle banzai fixed?
-
Re: Hang Glider - 2.0 [Butterfly, R63, MySQL]
Mine just keeps dropping the connection :/ im using phoenixcms. Anyone help?