MercuryEmu Command.

Stevee

Posting Freak
Mar 29, 2011
580
35
@Westyy

Sorry for the bump, can't PM you or post on your wall..
but
two things
1.) For the twitch.tv code, is it possible you could assist me with editing it for fansites?
2.) IS it possible you can do a filter, to where it'll "cool down" when the user is welcoming/doing the :fansite command? So they don't get spammed with alerts?
 

Brad

Well-Known Member
Jun 5, 2012
2,319
992
@Westyy

Sorry for the bump, can't PM you or post on your wall..
but
two things
1.) For the twitch.tv code, is it possible you could assist me with editing it for fansites?
2.) IS it possible you can do a filter, to where it'll "cool down" when the user is welcoming/doing the :fansite command? So they don't get spammed with alerts?
I'll do it now.
 
@Westyy

Sorry for the bump, can't PM you or post on your wall..
but
two things
1.) For the twitch.tv code, is it possible you could assist me with editing it for fansites?
2.) IS it possible you can do a filter, to where it'll "cool down" when the user is welcoming/doing the :fansite command? So they don't get spammed with alerts?
PHP:
case "fansites":          
                        {
                         

                                StringBuilder builder = new StringBuilder();
                                builder.Append("Hey, " + Session.GetHabbo().Username + " Here is a list of Our Official Fansites, it will be Very Apreciated if you check then out :D.\n");
                                 builder.Append("\n");
                            using (IQueryAdapter dbClient = PlusEnvironment.GetDatabaseManager().getQueryreactor())
                           {
                                                       
               dbClient.setQuery("SELECT `name`,`username`,`link` FROM `fansites`");
                 DataTable GetFansites = dbClient.getTable();

                  if (GetFansites != null)
    {
        foreach (DataRow Row in GetFansites.Rows)
        {
            builder.Append("Fansite:\n");
            builder.Append("Fansite Name: " + Row["name"] + " Fansite Link = " + Row["link"] + "\n");
            builder.Append("in-game Username: " + Row["username"] + "\n");
            builder.Append("\n");
        }
    }
    else
    {
        builder.Append("There are currently no Fansites.\n");
    }
}

builder.Append("Want yours to show here? Message (your username) in-game to sort this out! :D\n");
Session.SendNotifWithScroll(builder.ToString());

                         
                            }
                     
                        }
                        return true;

heres the MySQL Code
Code:
CREATE TABLE `fansites` (
  `name` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(550) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

updated the
 
Last edited:

Stevee

Posting Freak
Mar 29, 2011
580
35
I'll do it now.
 


heres the MySQL Code
Code:
CREATE TABLE `fansites` (
  `name` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(550) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

updated the


Error with the mysql quer
 

Jaden

not so active
Aug 24, 2014
886
263
You used
Code:
using (IQueryAdapter id = PlusEnvironment.GetDatabaseManager().getQueryreactor())
                            {
is not needed in the first statement
 

Users who are viewing this thread

Top