[Uber] Save ads_background and ads_mpus data 100%

Results 1 to 8 of 8
  1. #1
    Sorcerer Supreme =dj.matias= is offline
    Member +Rank
    Apr 2008 Join Date
    FinlandLocation
    381Posts

    [Uber] Save ads_background and ads_mpus data 100%

    I've coded Save ads data for Uber.

    Add Messages -> Requests -> Rooms.cs

    Code:
            public void SaveBranding()
            {
                uint ItemId = Request.PopWiredUInt();
               uint Data = Request.PopWiredUInt();
         
          
                string Brand = Request.PopFixedString();
                string Brand2 = Request.PopFixedString();
                string Brand3 = Request.PopFixedString();
                string Brand4 = Request.PopFixedString();
                string Brand5 = Request.PopFixedString();
                string Brand6 = Request.PopFixedString();
                string Brand7 = Request.PopFixedString();
                string Brand8 = Request.PopFixedString();
                string Brand9 = Request.PopFixedString();
                string Brand10 = Request.PopFixedString();
                string BrandData = Brand + "=" + Brand2 + Convert.ToChar(9) + Brand3 + "=" + Brand4 + Convert.ToChar(9) + Brand5 + "=" + Brand6 + Convert.ToChar(9) + Brand7 + "=" + Brand8 + Convert.ToChar(9) + Brand9 + "=" + Brand10 + Convert.ToChar(9) + "state=0";
                Room Room = UberEnvironment.GetGame().GetRoomManager().GetRoom(Session.GetHabbo().CurrentRoomId);
                RoomItem Item = Room.GetItem(ItemId);
         
                Item.ExtraData = BrandData;
                Item.UpdateNeeded = true;
                Item.UpdateState();
         
          
            }
    Find:

    Code:
    RequestHandlers[73] = new RequestHandler(MoveItem);
    Add:

    Code:
    RequestHandlers[74] = new RequestHandler(SaveBranding);
    Add following fixs to Uber:

    [Fix] Efectos y User Status uberEmu


    Find: internal void HandleRights()

    Add in the void end:

    Code:
    if (Session.GetHabbo().Rank > 5)
    {
    GetResponse().AppendInt32(1000);
    }
    You can now save ad settings in ads.
    Last edited by =dj.matias=; 02-12-11 at 03:51 PM.


  2. #2
    <insert title here> Shorty is offline
    Grand MasterRank
    Feb 2007 Join Date
    United KingdomLocation
    1,857Posts

    Re: [Uber] Save branding 100%

    Why do people always end up coding something which has been added to a future build of Phoenix :( Makes us look like we copy.

    Ps: The int for "data" is the type of branding you're saving.
    Code:
                if (ItemType == 10 || ItemType == 8) // 10 - Advertisement
                {

  3. #3
    Elite Member Privilege_ is offline
    Member +Rank
    Jul 2010 Join Date
    143Posts

    Re: [Uber] Save branding 100%

    Quote Originally Posted by Shorty View Post
    Why do people always end up coding something which has been added to a future build of Phoenix :( Makes us look like we copy.

    Ps: The int for "data" is the type of branding you're saving.
    Code:
                if (ItemType == 10 || ItemType == 8) // 10 - Advertisement
                {
    The "type id" is the amount of additional signs, so it is sort of an Array. Maybe interesting to know: Sulake doesn't use Char9 as a split char in the recent versions of Habbo Hotel :-)

    You should use a loop, also your code is unsafe. The type id you can get via itemId.
    Last edited by Privilege_; 02-12-11 at 03:26 PM.

  4. #4
    Sorcerer Supreme DominicGunn is offline
    Member +Rank
    Jun 2011 Join Date
    347Posts

    Re: [Uber] Save branding 100%

    Branding? What is this nonsense.

  5. #5
    <insert title here> Shorty is offline
    Grand MasterRank
    Feb 2007 Join Date
    United KingdomLocation
    1,857Posts

    Re: [Uber] Save branding 100%

    Quote Originally Posted by DominicGunn View Post
    Branding? What is this nonsense.
    ads_background/ads_mpu

    The furniture has text boxes with a Save Branding button when the @b permissions has been sent correctly. :)

    Quote Originally Posted by Privilege_ View Post
    The "type id" is the amount of additional signs, so it is sort of an Array. Maybe interesting to know: Sulake doesn't use Char9 as a split char in the recent versions of Habbo Hotel :-)

    You should use a loop, also your code is unsafe. The type id you can get via itemId.
    Fair enough! =D But my coding is nothing like this post.

  6. #6
    Sorcerer Supreme DominicGunn is offline
    Member +Rank
    Jun 2011 Join Date
    347Posts

    Re: [Uber] Save ads_background and ads_mpus data 100%

    Oh wait, so that's how you guys have been doing it in-client? I thought you'd just been modifying DB entries to get the room back-grounds showing.

  7. #7
    <insert title here> Shorty is offline
    Grand MasterRank
    Feb 2007 Join Date
    United KingdomLocation
    1,857Posts

    Re: [Uber] Save ads_background and ads_mpus data 100%

    Quote Originally Posted by DominicGunn View Post
    Oh wait, so that's how you guys have been doing it in-client? I thought you'd just been modifying DB entries to get the room back-grounds showing.
    Everybody is, well.. I am.. I've never actually used the Save Branding button on a live hotel.

  8. #8
    Web & Interaction Design Gangnam is offline
    Grand MasterRank
    Dec 2010 Join Date
    Lincoln, UKLocation
    1,983Posts

    Re: [Uber] Save branding 100%

    Quote Originally Posted by Shorty View Post
    Why do people always end up coding something which has been added to a future build of Phoenix :( Makes us look like we copy.
    I was so gonna PM you to ask if there was any chance of that being added.. ^^



Advertisement