[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
Quote:
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.
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
{
Re: [Uber] Save branding 100%
Quote:
Originally Posted by
Shorty
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.
Re: [Uber] Save branding 100%
Branding? What is this nonsense.
Re: [Uber] Save branding 100%
Quote:
Originally Posted by
DominicGunn
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_
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.
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.
Re: [Uber] Save ads_background and ads_mpus data 100%
Quote:
Originally Posted by
DominicGunn
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.
Re: [Uber] Save branding 100%
Quote:
Originally Posted by
Shorty
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.. ^^