• Unfortunately, we have experienced significant hard drive damage that requires urgent maintenance and rebuilding. The forum will be a state of read only until we install our new drives and rebuild all the configurations needed. Please follow our Facebook pagefor updates, or we will be back up shortly! (The forum could go offline at any given time due to the nature of the failed drives whilst awaiting the upgrades.)

[ADDON]Anti-AFK by Sicily94

Junior Spellweaver
Joined
Jul 15, 2012
Messages
102
Reaction score
21

Sicily94 - [ADDON]Anti-AFK by Sicily94 - RaGEZONE Forums


Go to Navicat->your_db->user_stats (right click mouse and select Design Table) insert new line with this settings and save!
Name: time_afk
Type: int
Lenght: 11
Decimal: 0
Not null: clicked
Default: 0

Go to Plus->Habbo Hotel->Users->Process->ProcessComponent.cs and isert this!

Search: this._player.TimeAFK += 1

and bottom this insert

PHP:
DataRow TimeAfk = null;
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.RunQuery("UPDATE `user_stats` SET `time_afk` = '" + this._player.TimeAFK + "' WHERE `id` = '" + this._player.Id + "'");
TimeAfk = dbClient.GetRow();
}
if (this._player.TimeAFK == 10)
{
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
this._player.GetClient().Disconnect();
this._player.GetClient().SendPacket(new RoomNotificationComposer("Sistema Anti-AFK", "Il nostro sistema Anti-AFK ha rilevato che sei stato/a AFK per piu di: " + this._player.TimeAFK + " minuti e ti ha fatto disconnettere.", "AMB", "", ""));
}
}

Go to Plus->Habbo Hotel->Rooms->RoomUser.cs and isert this!

Search: GetClient().GetHabbo().TimeAFK = 0

and bottom this insert

PHP:
using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().GetQueryReactor())
{
dbClient.RunQuery("UPDATE `user_stats` SET `time_afk` = '" + GetClient().GetHabbo().TimeAFK + "' WHERE `id` = '" + GetClient().GetHabbo().Id + "'");
dbClient.GetRow();
}

Compile it and Enjoy :cool:
 

Attachments

You must be registered for see attachments list
Last edited:
Back
Top