[C#, R63] ION/Deltar - Public Room Listing

Status
Not open for further replies.

Quackster

a devbest user says what
Aug 22, 2010
1,763
1,235
Snippetz​

ION has hardly been developed on, and kept its name but every now and again I will be that guy that releases his awesome lil snippets

This one do?
List public rooms

Hardcoded?
No.

Find /HabboHote/Client/Requests/Navigator.cs Replace who void private void SetFrontPageListening()

With

Code:
        private void SetFrontPageListening()
        {
            using (DatabaseClient dbClient = LimeEnvironment.GetDatabase().GetClient())
            {
                DataTable DataQuery = dbClient.ReadDataTable("SELECT * FROM public_rooms ORDER BY orderid ASC");
                                
                Response.Initialize(ResponseOpcodes.NavigatorFrontPageResult); // "GB"
                Response.AppendInt32(DataQuery.Rows.Count);
                foreach (DataRow Row in DataQuery.Rows)
                {
                    Response.AppendInt32(DataQuery.Rows.Count);
                    Response.AppendString(Convert.ToString(Row["frontpagetext"]));
                    Response.AppendString(Convert.ToString(Row["desc"]));
                    Response.AppendInt32(Convert.ToInt32(Row["style"]));
                    Response.AppendString(Convert.ToString(Row["frontpagetext"]));
                    Response.AppendString("");
                    Response.AppendInt32(Convert.ToInt32(Row["hidden"]));
                    Response.AppendInt32(Convert.ToInt32(Row["in_room"]));
                    Response.AppendInt32(Convert.ToInt32(Row["type"]));
                    Response.AppendString(Convert.ToString(Row["model"]));
                    Response.AppendInt32(Convert.ToInt32(Row["id"]));
                    Response.AppendInt32(0); // Unknown
                    Response.AppendString(Convert.ToString(Row["ccts"]));
                    Response.AppendInt32(Convert.ToInt32(Row["max_in"]));
                    Response.AppendInt32(DataQuery.Rows.Count);
                }
            }
            SendResponse();
        }

SQL


Code:
--
-- Table structure for table `public_rooms`
--

CREATE TABLE IF NOT EXISTS `public_rooms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `orderid` int(11) NOT NULL,
  `desc` varchar(150) NOT NULL,
  `style` int(11) NOT NULL,
  `frontpagetext` varchar(150) NOT NULL,
  `hidden` int(11) NOT NULL,
  `in_room` int(11) NOT NULL,
  `type` int(11) NOT NULL,
  `model` varchar(150) NOT NULL,
  `ccts` varchar(150) NOT NULL,
  `max_in` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;

--
-- Dumping data for table `public_rooms`
--

INSERT INTO `public_rooms` (`id`, `orderid`, `desc`, `style`, `frontpagetext`, `hidden`, `in_room`, `type`, `model`, `ccts`, `max_in`) VALUES
(1, 1, 'Come and relax with the most beautiful fountains ever seen!', 1, 'Peaceful Fountains', 0, 0, 3, 'hh_room_park', 'hh_room_park', 25);

Imagez

 

Heth0d

New Member
May 21, 2011
19
0
Yes, that also has to be done to make sure that it works but though is it nice and i know this is a very good tool, i really like it.
 
Status
Not open for further replies.

Users who are viewing this thread

Top