Staff picks for Uber 100%

Results 1 to 13 of 13
  1. #1
    Account Upgraded | Title Enabled! =dj.matias= is offline
    MemberRank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    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);


  2. #2
    swagggggg Livar is offline
    MemberRank
    Oct 2008 Join Date
    United KingdomLocation
    2,272Posts

    Re: Staff picks for Uber 100%

    Now this is sick. ta.

  3. #3
    Apprentice BlakeBanks is offline
    MemberRank
    Oct 2011 Join Date
    PALocation
    24Posts

    Re: Staff picks for Uber 100%

    nice, whered you find this?

  4. #4
    Account Upgraded | Title Enabled! American is offline
    MemberRank
    Sep 2011 Join Date
    WeedlandLocation
    658Posts

    Re: Staff picks for Uber 100%

    Oh thanks bro

  5. #5
    Account Upgraded | Title Enabled! George2000 is offline
    MemberRank
    Jul 2011 Join Date
    The NetherlandsLocation
    1,150Posts

    Re: Staff picks for Uber 100%

    Omg, once I was busy with it but I got bored, thanks, cool system :)

  6. #6
    Account Upgraded | Title Enabled! Nesar is offline
    MemberRank
    Aug 2011 Join Date
    Anime LandLocation
    748Posts

    Re: Staff picks for Uber 100%

    Great,This should be coded in Phoenix,Arron is lazy...

  7. #7
    Developer / Patch Finder Tankado is offline
    MemberRank
    Oct 2011 Join Date
    The NetherlandsLocation
    451Posts

    Re: Staff picks for Uber 100%

    O.o Nice bro :D

  8. #8
    Alpha Member Danny is offline
    MemberRank
    Oct 2011 Join Date
    My PCLocation
    2,158Posts

    Re: Staff picks for Uber 100%

    Nice release, as Nesar said Aaron(Phoenix 3.0 Dev) should code this is Phoenix.

  9. #9
    Account Upgraded | Title Enabled! ItsDylan is offline
    MemberRank
    Oct 2011 Join Date
    391Posts

    Re: Staff picks for Uber 100%

    This is awesome, aaron should make it -.-

  10. #10
    I use to love it more! Jmandupree is offline
    MemberRank
    Oct 2009 Join Date
    /ragezone/homeLocation
    996Posts

    Re: Staff picks for Uber 100%

    Aaron will come on here and copy out and copy this code then say he has coded..

  11. #11
    Web Developer Papercup is offline
    MemberRank
    Nov 2009 Join Date
    WalesLocation
    1,607Posts

    Re: Staff picks for Uber 100%

    Awesome DJ, I miss your releases.

  12. #12
    Account Upgraded | Title Enabled! nickymonsma is offline
    MemberRank
    Sep 2009 Join Date
    The NetherlandsLocation
    232Posts

    Re: Staff picks for Uber 100%

    Thanks

  13. #13
    Apprentice PtiitKev is offline
    MemberRank
    May 2009 Join Date
    21Posts

    Re: Staff picks for Uber 100%

    Nice release!



Advertisement