This should not lagg nor crash, all its doing is loading more items. If you are lagging/crashing your computer specs cannot support playing a retro, or your server specs are too low.Great job mate, does use a lot of resources on Flash though it tends to lagg a little and/or crash, but none the less great command!
Server and laptop specs aren't enough to support playing a retro lmfao. Anyone else experiencing this issue?!This should not lagg nor crash, all its doing is loading more items. If you are lagging/crashing your computer specs cannot support playing a retro, or your server specs are too low.
Another issue is if you use the command with your inventory open its not flash failing its the emulator trying to fetch and update at the same time just causing minor laggServer and laptop specs aren't enough to support playing a retro lmfao. Anyone else experiencing this issue?!
Post a topic in the actual help section.Anyone have the fix for the LTD's not showing properly?
LTD's when using this command or LTD's as a whole? Didn't remove the comment 'cause I thought you was relating it to when you used this command.Anyone have the fix for the LTD's not showing properly?
When you don't use this command you would have an LTD like this:LTD's when using this command or LTD's as a whole? Didn't remove the comment 'cause I thought you was relating it to when you used this command.
If you know how to add commands I'mUse this sql please, makesure if you create custom commands, include the sql.
Code:INSERT INTO `permissions_commands` (`command`, `group_id`, `subscription_id`) VALUES ('command_viewinventory', '9', '0');
using System;
using System.Linq;
using System.Text;
using System.Collections.Generic;
using Plus.HabboHotel.Items;
using Plus.HabboHotel.Groups;
using Plus.HabboHotel.Users;
using Plus.HabboHotel.Catalog.Utilities;
namespace Plus.Communication.Packets.Outgoing.Inventory.Furni
{
class FurniListComposer : ServerPacket
{
public FurniListComposer(List<Item> Items, ICollection<Item> Walls, bool StaffCheck = false)
: base(ServerPacketHeader.FurniListMessageComposer)
{
base.WriteInteger(1);
base.WriteInteger(1);
base.WriteInteger(Items.Count + Walls.Count);
foreach (Item Item in Items.ToList())
WriteItem(Item, StaffCheck);
foreach (Item Item in Walls.ToList())
WriteItem(Item, StaffCheck);
}
private void WriteItem(Item Item, bool StaffCheck)
{
base.WriteInteger(Item.Id);
base.WriteString(Item.GetBaseItem().Type.ToString().ToUpper());
base.WriteInteger(Item.Id);
base.WriteInteger(Item.GetBaseItem().SpriteId);
if (Item.LimitedNo > 0)
{
base.WriteInteger(1);
base.WriteInteger(256);
base.WriteString(Item.ExtraData);
base.WriteInteger(Item.LimitedNo);
base.WriteInteger(Item.LimitedTot);
}
else
ItemBehaviourUtility.GenerateExtradata(Item, this);
base.WriteBoolean(StaffCheck ? false : Item.GetBaseItem().AllowEcotronRecycle);
base.WriteBoolean(StaffCheck ? false : Item.GetBaseItem().AllowTrade);
base.WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false);
base.WriteBoolean(StaffCheck ? false : ItemUtility.IsRare(Item));
base.WriteInteger(-1);//Seconds to expiration.
base.WriteBoolean(true);
base.WriteInteger(-1);//Item RoomId
if (!Item.IsWallItem)
{
base.WriteString(string.Empty);
base.WriteInteger(0);
}
}
}
}
Did you manage to get it working fine with my fix posted above?Awesome release
So has anyone got any info on how to fix LTD window on items?
This should work?
Code:using System; using System.Linq; using System.Text; using System.Collections.Generic; using Plus.HabboHotel.Items; using Plus.HabboHotel.Groups; using Plus.HabboHotel.Users; using Plus.HabboHotel.Catalog.Utilities; namespace Plus.Communication.Packets.Outgoing.Inventory.Furni { class FurniListComposer : ServerPacket { public FurniListComposer(List<Item> Items, ICollection<Item> Walls, bool StaffCheck = false) : base(ServerPacketHeader.FurniListMessageComposer) { base.WriteInteger(1); base.WriteInteger(1); base.WriteInteger(Items.Count + Walls.Count); foreach (Item Item in Items.ToList()) WriteItem(Item, StaffCheck); foreach (Item Item in Walls.ToList()) WriteItem(Item, StaffCheck); } private void WriteItem(Item Item, bool StaffCheck) { base.WriteInteger(Item.Id); base.WriteString(Item.GetBaseItem().Type.ToString().ToUpper()); base.WriteInteger(Item.Id); base.WriteInteger(Item.GetBaseItem().SpriteId); if (Item.LimitedNo > 0) { base.WriteInteger(1); base.WriteInteger(256); base.WriteString(Item.ExtraData); base.WriteInteger(Item.LimitedNo); base.WriteInteger(Item.LimitedTot); } else ItemBehaviourUtility.GenerateExtradata(Item, this); base.WriteBoolean(StaffCheck ? false : Item.GetBaseItem().AllowEcotronRecycle); base.WriteBoolean(StaffCheck ? false : Item.GetBaseItem().AllowTrade); base.WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false); base.WriteBoolean(StaffCheck ? false : ItemUtility.IsRare(Item)); base.WriteInteger(-1);//Seconds to expiration. base.WriteBoolean(true); base.WriteInteger(-1);//Item RoomId if (!Item.IsWallItem) { base.WriteString(string.Empty); base.WriteInteger(0); } } } }
if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;
if (Session?.GetHabbo() == null || !Session.GetHabbo().InRoom)
return;
_ViewInventory
_viewInventory
base.WriteInteger(1);
WriteInteger(1);
Hey, just a few things to point out (constructive criticism)
This code:
Code:if (Session == null || Session.GetHabbo() == null || !Session.GetHabbo().InRoom) return;
Can be simplified which is called sequential checks, so:
Code:if (Session?.GetHabbo() == null || !Session.GetHabbo().InRoom) return;
Some of your codes don't follow the official naming conventions, example:
Code:_ViewInventory
The correct naming convention would be:
Code:_viewInventory
Also where you have this in a lot of places:
Code:base.WriteInteger(1);
It's a redundant qualifier, it can be written as this:
Code:WriteInteger(1);
It's nothing major but its a few small things that hopefully help some people out. I haven't really checked all the could just quickly scrolled through.
Good tutorial though, its a pretty smart idea and will help many.