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):
FindCode:["i","4001","poster","39655","","","","","","","","-1","-1","6"]Add to below query poster_id.Code:Hashtable CataItems = new Hashtable();
FindAdd after: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;
Find extraParamCode:case InteractionType.poster: ExtraData = Item.PosterId.ToString(); break;
Change line to:
FindCode:Session.GetMessageHandler().GetResponse().AppendStringWithBreak(Item.GetBaseItem(i).InteractionType == InteractionType.poster ? Item.PosterId.ToString() : "");Add after:Code:internal readonly bool HaveOffer;
FindCode:internal readonly int PosterId;Add after:Code:this.HaveOffer = ((string)Row["offer_active"] == "1");
FindCode:this.PosterId = (int)Row["poster_id"];Add after:Code:else if (this.songID > 0 && GetBaseItem(i).InteractionType == InteractionType.musicdisc) { Message.AppendStringWithBreak(songID.ToString()); }Find wireStandard,Code:else if (PosterId > 0) { Message.AppendStringWithBreak(PosterId.ToString()); }
Add after: poster,
FindAdd after:Code:case "wireStandard": return InteractionType.wireStandard;FindCode:case "poster": return InteractionType.poster;Add after:Code:case InteractionType.wireStandard: return "wireStandard";FindCode:case InteractionType.poster: return "poster";Add after:Code:else if (GetBaseItem().Name.Contains("landscape")) { Message.AppendInt32(4); }Find in Trade.cs UpdateTradeWindow()Code:else if (GetBaseItem().Name == "poster") { Message.AppendInt32(6); }Replace below line:Code:Message.AppendInt32(Item.GetBaseItem().SpriteId);toCode:Message.AppendInt32(0);Replace below string:Code:Message.AppendInt32((Item.GetBaseItem().InteractionType == InteractionType.poster) ? 6 : 0);Add new column: poster_id to catalog_items and insert to items_base item who interaction_type is poster.Code:Message.AppendStringWithBreak((Item.GetBaseItem().InteractionType == InteractionType.poster) ? Item.ExtraData : string.Empty);
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>'; } ?>![]()





