Nice Poster system for Butterstorm/Habbolatino

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

    Nice Poster system for Butterstorm/Habbolatino

    Hi,
    I've coded system for old posters. You don't need add posters manually to furnidata. You need only one furnidata entry (this is already in furnidata):

    Code:
    ["i","4001","poster","39655","","","","","","","","-1","-1","6"]
    Find
    Code:
    Hashtable CataItems = new Hashtable();
    Add to below query poster_id.

    Find
    Code:
      case InteractionType.trophy:
                            ExtraData = Session.GetHabbo().Username + Convert.ToChar(9) + DateTime.Now.Day + "-" + DateTime.Now.Month + "-" + DateTime.Now.Year + Convert.ToChar(9) + ButterflyEnvironment.FilterInjectionChars(ExtraData, true);
                            break;
    Add after:

    Code:
     case InteractionType.poster:
                            ExtraData = Item.PosterId.ToString();
                            break;
    Find extraParam

    Change line to:

    Code:
    Session.GetMessageHandler().GetResponse().AppendStringWithBreak(Item.GetBaseItem(i).InteractionType == InteractionType.poster ? Item.PosterId.ToString() : "");
    Find
    Code:
    internal readonly bool HaveOffer;
    Add after:

    Code:
    internal readonly int PosterId;
    Find
    Code:
    this.HaveOffer = ((string)Row["offer_active"] == "1");
    Add after:

    Code:
    this.PosterId = (int)Row["poster_id"];
    Find
    Code:
      else if (this.songID > 0 && GetBaseItem(i).InteractionType == InteractionType.musicdisc)
                            {
                                Message.AppendStringWithBreak(songID.ToString());
                            }
    Add after:
    Code:
     else if (PosterId > 0)
                            {
                                Message.AppendStringWithBreak(PosterId.ToString());
                            }
    Find wireStandard,

    Add after: poster,

    Find
    Code:
    case "wireStandard":
                        return InteractionType.wireStandard;
    Add after:
    Code:
      case "poster":
                        return InteractionType.poster;
    Find
    Code:
     case InteractionType.wireStandard:
                        return "wireStandard";
    Add after:
    Code:
    case InteractionType.poster:
                        return "poster";
    Find
    Code:
     else if (GetBaseItem().Name.Contains("landscape"))
                {
                    Message.AppendInt32(4);
                }
    Add after:
    Code:
      else if (GetBaseItem().Name == "poster")
                {
                    Message.AppendInt32(6);
                }
    Find in Trade.cs UpdateTradeWindow()
    Code:
     Message.AppendInt32(Item.GetBaseItem().SpriteId);
    Replace below line:
    Code:
    Message.AppendInt32(0);
    to
    Code:
    Message.AppendInt32((Item.GetBaseItem().InteractionType == InteractionType.poster) ? 6 : 0);
    Replace below string:
    Code:
    Message.AppendStringWithBreak((Item.GetBaseItem().InteractionType == InteractionType.poster) ? Item.ExtraData : string.Empty);
    Add new column: poster_id to catalog_items and insert to items_base item who interaction_type is poster.

    If you want add all posters easily use my postermaker (NOTICE: edit catalog_items line!):

    Code:
    <?php
    /*=======================================================================
    | UberCMS - Advanced Website and Content Management System for uberEmu
    | #######################################################################
    | Copyright (c) 2010, Roy 'Meth0d' and updates by Matthew 'MDK'
    | http://www.meth0d.org & http://www.sulake.biz
    | #######################################################################
    | This program is free software: you can redistribute it and/or modify
    | it under the terms of the GNU General Public License as published by
    | the Free Software Foundation, either version 3 of the License, or
    | (at your option) any later version.
    | #######################################################################
    | This program is distributed in the hope that it will be useful,
    | but WITHOUT ANY WARRANTY; without even the implied warranty of
    | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
    | GNU General Public License for more details.
    \======================================================================*/
    function startsWith($haystack, $needle)
    {
        return !strncmp($haystack, $needle, strlen($needle));
    }
    
    
    echo '<h1>Poster Generator</h1>';
     
    $data = file_get_contents("http://www.habbo.com/gamedata/productdata/1");
    $data = str_replace("\n", "", $data);
    $data = str_replace("[[", "[", $data);
    $data = str_replace("]]", "]", $data);
    $data = str_replace("][", "],[", $data);
    
    $ij = 0;
    $stuffWeDontKnow = Array();
    
    foreach (explode('],[', $data) as $val)
    {
    	$val = str_replace('[', '', $val);
    	$val = str_replace(']', '', $val);
    	
    	$bits = explode(',', $val);
    	$name = str_replace('"', '', $bits[0]);
    	$revision = str_replace('"', '', $bits[3]);
    
       if (startsWith($name, 'poster ') != true)
    	{
    	continue;
    	} 
    		$poster = explode(' ', $name);
    		
    	echo "INSERT INTO `catalog_items` (`page_id`, `item_ids`, `catalog_name`, `cost_credits`, `amount`, `poster_id`) VALUES ('926', '60769', '" . $name . "', '3', '1', '" . $poster[1] . "');<br>";
    	$stuffWeDontKnow[] = '[' . $val . ']';
    	$ij++;
    	
    
    }
    
    
    if ($ij >= 1)
    {
    	foreach ($stuffWeDontKnow as $stuff)
    	{
    
    	
    		
    
    	}
    }
    else
    {
    	echo '<Br /><br /><center style="font-size: 120%;"><i><b>Good news!</b><br />I have no new furni for you today.</i></center>';
    }
    
    
    ?>
    Last edited by =dj.matias=; 24-11-12 at 09:49 AM.


  2. #2
    Zephyr Studios PRIZM is offline
    MemberRank
    Feb 2012 Join Date
    DenmarkLocation
    2,291Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    Sounds nice, thank you Matias =)

  3. #3
    Valued Member Xversion is offline
    MemberRank
    Mar 2012 Join Date
    LocalhostLocation
    144Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    Quote Originally Posted by =dj.matias= View Post
    I've coded system for old posters.
    Link Me Please.

    and Nice Release
    Last edited by Xversion; 24-11-12 at 02:33 PM. Reason: Adding Extra Info instead of Spamming.

  4. #4
    Enthusiast danilo171294 is offline
    MemberRank
    Apr 2009 Join Date
    35Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    Wow thank you matias (: Release the manequin fix please :c

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

    Re: Nice Poster system for Butterstorm/Habbolatino

    Quote Originally Posted by Xversion View Post
    Link Me Please.

    and Nice Release
    This is the system for old posters -.-

  6. #6
    Enthusiast Durex is offline
    MemberRank
    Nov 2012 Join Date
    NetherlandsLocation
    36Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    You shoul'd have bots fixed, lol anyway nice release.

  7. #7
    Valued Member Huginho98 is offline
    MemberRank
    Jan 2011 Join Date
    SwitzerlandLocation
    128Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    It would be nice if this would be possible with normal furnis :D

  8. #8
    <insert title here> Shorty is offline
    MemberRank
    Feb 2007 Join Date
    United KingdomLocation
    1,861Posts

    Re: Nice Poster system for Butterstorm/Habbolatino

    That moment when you spend 30 minutes doing all this when somebody has already coded an automated script with coding.

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

    Re: Nice Poster system for Butterstorm/Habbolatino

    Quote Originally Posted by Shorty View Post
    That moment when you spend 30 minutes doing all this when somebody has already coded an automated script with coding.
    (ノ≥∇≤)ノ

    Nice release once again, also.



Advertisement