Catalogfix for BCStorm

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

    Catalogfix for BCStorm

    Hi,
    Many years ago someone released catalogfix for uberemulator. I changed it to working on BCstorm based emulators. This script changes 99.9% sprite ids on db and you can use other habbo furnidata habbo.nl etc..

    Create catalogfix.php and add this text:

    Code:
    <?php
    set_time_limit(0); 
    
    /*=======================================================================
    | Vemund Eldegard aka iLost. 
    | #######################################################################
    | Found on Otaku-Studio
    | Free for use!
    \======================================================================*/
    
    $db_host = "localhost";    //Host database
    $db_user = "root";        //mysql_user
    $db_pass = "";        //mysql_password
    $db_database = "";    //database
    
    $connect = mysql_connect($db_host, $db_user, $db_pass) or die("Could not connect to server, error: ".mysql_error());
    $db = mysql_select_db($db_database, $connect) or die("Could not connect to database, error: ".mysql_error());
    
    $data = file_get_contents("http://www.habbo.fi/gamedata/furnidata?hash=x");
    $data = str_replace("\n", "", $data);
    $data = str_replace("[[", "[", $data);
    $data = str_replace("]]", "]", $data);
    $data = str_replace("][", "],[", $data);
    
    
    foreach (explode('],[', $data) as $val)
    {
        $val = str_replace('[', '', $val);
        $val = str_replace(']', '', $val);
        
        $bits = explode(',', $val);
        $name = str_replace('"', '', $bits[2]);
        
        $stufftoupdate[] = '[' . $val . ']';
    }
    
    foreach ($stufftoupdate as $stuff)
        {
            #Start select item_name
            $stuff = str_replace('"s",', '', $stuff);
            $stuff = str_replace('"i",', '', $stuff);
            $furni = explode('[', $stuff);
            $furni = explode(']', $furni[1]);
            $nome = explode('","', $furni[0]);
            $nome = explode('","', $nome[1]);
            $nome = $nome[0];
            #End select item_name
            
            #Start select sprite_id
            $stuff = str_replace('"s",', '', $stuff);
            $stuff = str_replace('"i",', '', $stuff);
            $furni = explode('[', $stuff);
            $furni = explode(']', $furni[1]);
            $id = explode('"', $furni[0]);
            $id = explode('","', $id[1]);
            $id = $id[0];
            #End select sprite_id
            
            
            $idfurni = mysql_query("SELECT * FROM items_base WHERE item_name = '$nome'");
            $furni = mysql_fetch_array($idfurni);
            $furniid = $furni['item_id'];
            $update = mysql_query("UPDATE items_base SET sprite_id = ".$id." WHERE iteM_id =".$furniid);
            if ($update==FALSE) echo("MySQL error in item ".$nome."<br/><br/>");
            else echo("Item ".$nome." updated<br/><br/>");
        }
    ?>
    Change mysql details and furnidata hotel location.


  2. #2
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Catalogfix for BCStorm

    What does this do, basically update sprite_Ids?

  3. #3
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Catalogfix for BCStorm

    Quote Originally Posted by Spheral View Post
    What does this do, basically update sprite_Ids?
    Correct

  4. #4
    Eye Eye Capt'n Spheral is offline
    MemberRank
    May 2010 Join Date
    TumptonshireLocation
    2,488Posts

    Re: Catalogfix for BCStorm

    Is useful in it's own way.
    Another great release from soneone who cares about the community and is trustworthy.

  5. #5
    JustLikeMeForNoReason Kaan2106 is offline
    MemberRank
    Nov 2007 Join Date
    282Posts

    Re: Catalogfix for BCStorm

    It is the same as this or not?

  6. #6
    Enthusiast Carlosso is offline
    MemberRank
    Mar 2013 Join Date
    42Posts

    Re: Catalogfix for BCStorm

    This is very nice, but if I do this.. is my hotel getting buggy?

  7. #7
    Banned Divide is offline
    BannedRank
    Aug 2011 Join Date
    British CoderLocation
    1,013Posts

    Re: Catalogfix for BCStorm

    This was made `back in the day` when a gold bar would look like a club sofa or a furniture didnt load.

  8. #8
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Catalogfix for BCStorm

    You dont use json_decode (i know you didnt made it, but you edited it)?

    And why do you want to update the sprite ids in the database when you can update the ids from the furnidata with the ids out the database?

  9. #9
    Check http://arcturus.pw The General is offline
    DeveloperRank
    Aug 2011 Join Date
    7,608Posts

    Re: Catalogfix for BCStorm

    Quote Originally Posted by joopie View Post
    You dont use json_decode (i know you didnt made it, but you edited it)?

    And why do you want to update the sprite ids in the database when you can update the ids from the furnidata with the ids out the database?
    I do prefer this though :/

  10. #10
    Run, but I'll find you. Ddos Attack is offline
    MemberRank
    Jan 2011 Join Date
    AustraliaLocation
    908Posts

    Re: Catalogfix for BCStorm

    Quote Originally Posted by Divide View Post
    This was made `back in the day` when a gold bar would look like a club sofa or a furniture didnt load.
    Good ol' days ;)

  11. #11
    Account Upgraded | Title Enabled! Chapo is offline
    MemberRank
    Jul 2010 Join Date
    United StatesLocation
    944Posts

    Re: Catalogfix for BCStorm

    Uh i'm a little bit confused because it updates the sprite ids same as habbo ids right? but what about the furniture in the hotel? People will get other furni etc?

  12. #12
    Live Ocottish Sverlord Joopie is offline
    LegendRank
    Jun 2010 Join Date
    The NetherlandsLocation
    2,773Posts

    Re: Catalogfix for BCStorm

    Quote Originally Posted by tdid View Post
    I do prefer this though :/
    All the complicated str_replace shit can ge reduced to this:

    PHP Code:
    $parsed preg_replace('/\]\](\r|\n|\r\n|\n\r)\[\[/''],['$content);
    $json json_decode($parsedtrue);

    foreach (
    $json as $item)
    {
      
    $furni = array();
      list(
    $furni['type'], $furni['sprite_id'], $furni['item_name'], $furni['revision'], $furni['start_rotation'], $furni['width'], $furni['length'], $furni['colors'], $furni['public_name'], $furni['description']) = $item;
      
      
    //Do the mysql queries and shit

    I just lol'd

    Quote Originally Posted by Ryan View Post
    Uh i'm a little bit confused because it updates the sprite ids same as habbo ids right? but what about the furniture in the hotel? People will get other furni etc?
    Theoretical it should be the same if this script is coded right.
    Last edited by Joopie; 15-05-13 at 06:12 PM.

  13. #13
    1 + 3 + 3 = 7 EvilCoder is offline
    MemberRank
    Jul 2009 Join Date
    /home/mvdworpLocation
    334Posts

    Re: Catalogfix for BCStorm

    Quote Originally Posted by Carlosso View Post
    This is very nice, but if I do this.. is my hotel getting buggy?
    Possible.

    You should be carefull with this kind of stuff. Don't trust the furnidata of Habbo... They block "user_agents" using javascript. But anyway.. Good luck =)



Advertisement