Staff picks for Uber 100%
Find: internal void HandleRights()
Add in the void end:
Code:
if (Session.GetHabbo().Rank > 5)
{
GetResponse().AppendInt32(1000);
}
Add Messages -> Requests -> Rooms.cs
Code:
public void AddToStaffPicks()
{
uint RoomId = Request.PopWiredUInt();
if (Session.GetHabbo().Rank < 5)
{
// No rights
}
if (Session.GetHabbo().Rank >= 5)
{
Room Room = UberEnvironment.GetGame().GetRoomManager().GetRoom(RoomId);
int AlreadyStaffPicks;
AlreadyStaffPicks = 0;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
if (dbClient.ReadDataRow("SELECT * FROM navigator_publics WHERE room_id = '" + RoomId + "'") != null)
{
AlreadyStaffPicks = 1;
}
}
if (AlreadyStaffPicks == 0)
{
string Owner;
int StaffPicksCount;
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
Owner = dbClient.ReadString("SELECT owner FROM rooms WHERE id = '" + RoomId + "'");
dbClient.ExecuteQuery("INSERT INTO `navigator_publics` (`bannertype`, `caption`, `room_id`, `category_parent_id`, `image`, `image_type`) VALUES ('1', '" + Room.Name + "', '" + RoomId + "', '2', 'officalrooms_hq/staffpickfolder.gif', 'external')");
dbClient.ExecuteQuery("UPDATE users SET staff_picks_count = staff_picks_count + 1 WHERE username = '" + Owner + "' LIMIT 1");
}
GameClient RoomOwner = UberEnvironment.GetGame().GetClientManager().GetClientByHabbo(Owner);
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
StaffPicksCount = dbClient.ReadInt32("SELECT staff_picks_count FROM users WHERE username = '" + Owner + "'");
}
switch (StaffPicksCount)
{
case 1:
RoomOwner.UnlockAchievement(22, 1);
break;
case 2:
RoomOwner.UnlockAchievement(22, 2);
break;
case 3:
RoomOwner.UnlockAchievement(22, 3);
break;
case 4:
RoomOwner.UnlockAchievement(22, 4);
break;
case 5:
RoomOwner.UnlockAchievement(22, 5);
break;
case 6:
RoomOwner.UnlockAchievement(22, 6);
break;
case 7:
RoomOwner.UnlockAchievement(22, 7);
break;
case 8:
RoomOwner.UnlockAchievement(22, 8);
break;
case 9:
RoomOwner.UnlockAchievement(22, 9);
break;
case 10:
RoomOwner.UnlockAchievement(22, 10);
break;
}
UberEnvironment.GetGame().GetNavigator().Initialize();
Session.SendNotif("Room added to Staff Picks successfully.");
}
else
{
using (DatabaseClient dbClient = UberEnvironment.GetDatabase().GetClient())
{
dbClient.ExecuteQuery("DELETE FROM `navigator_publics` WHERE (`room_id`='" + RoomId + "')");
}
UberEnvironment.GetGame().GetNavigator().Initialize();
Session.SendNotif("Room removed from Staff Picks successfully.");
}
}
}
Find RequestHandlers[113] = new RequestHandler(EnterInfobus);
Add:
Code:
RequestHandlers[483] = new RequestHandler(AddToStaffPicks);
Run sql querys:
Code:
INSERT INTO `navigator_publics` (`id`, `ordernum`, `bannertype`, `caption`, `image`, `image_type`, `room_id`, `category_parent_id`, `enabled`, `category`) VALUES
(2, 1, '0', 'Recommended by staff', 'officalrooms_hq/staffpickfolder.gif', 'external', 0, 0, '1', '1');
Code:
ALTER TABLE `users` ADD `staff_picks_count` INT( 11 ) NOT NULL DEFAULT '0'
Code:
INSERT INTO `achievements` (`id`, `levels`, `dynamic_badgelevel`, `badge`, `pixels_base`, `pixels_multiplier`) VALUES
(22, 10, '1', 'ACH_Spr', 100, 1.25);
Re: Staff picks for Uber 100%
Re: Staff picks for Uber 100%
nice, whered you find this?
Re: Staff picks for Uber 100%
Re: Staff picks for Uber 100%
Omg, once I was busy with it but I got bored, thanks, cool system :)
Re: Staff picks for Uber 100%
Great,This should be coded in Phoenix,Arron is lazy...
Re: Staff picks for Uber 100%
Re: Staff picks for Uber 100%
Nice release, as Nesar said Aaron(Phoenix 3.0 Dev) should code this is Phoenix.
Re: Staff picks for Uber 100%
This is awesome, aaron should make it -.-
Re: Staff picks for Uber 100%
Aaron will come on here and copy out and copy this code then say he has coded..
Re: Staff picks for Uber 100%
Awesome DJ, I miss your releases.
Re: Staff picks for Uber 100%
Re: Staff picks for Uber 100%