[RELEASE] [COMMAND] [PlusEMU] View Inventories

Seriosk

Programmer;
Oct 29, 2016
256
105
So in command manager, this.Register("cmd", new Command()); should be Register("cmd", new Command()); ? Just asking if it true, I've done that and I wan't to know if that is true.
The 'this.' qualifier is useless in this sense, I am not sure why coders continuously use it in the wrong way, maybe they think it gives their application a performance boost (LOL).

There are several usages of this keyword in C#.
To qualify members hidden by similar name
To have an object pass itself as a parameter to other methods
To have an object return itself from a method
To declare indexers
To declare extension methods
To pass parameters between constructors
To internally reassign value type (struct) value.
To invoke an extension method on the current instance
To cast itself to another type
To chain constructors defined in the same class
 

Velaski

winner
Aug 4, 2015
562
165
The 'this.' qualifier is useless in this sense, I am not sure why coders continuously use it in the wrong way, maybe they think it gives their application a performance boost (LOL).

There are several usages of this keyword in C#.
To qualify members hidden by similar name
To have an object pass itself as a parameter to other methods
To have an object return itself from a method
To declare indexers
To declare extension methods
To pass parameters between constructors
To internally reassign value type (struct) value.
To invoke an extension method on the current instance
To cast itself to another type
To chain constructors defined in the same class
Even the IDE tells you that it isn't needed.
 

Antiflot96

New Member
Jul 8, 2012
15
3
Is it worth it trying to convert this code to phoenix emu? Or will it not work, because if there is a chance for it working i will try.
 

Seriosk

Programmer;
Oct 29, 2016
256
105
Is it worth it trying to convert this code to phoenix emu? Or will it not work, because if there is a chance for it working i will try.
Will this exact code work? no, but you can make it work with a bit of converting and changing up a few methods. I really wouldn't suggest using Phoenix full stop, its deobfuscated version.
 

Queso

echo 'Web Developer';
Nov 29, 2016
232
72
Nice command, very useful for people that need to view others inventory, could be cool to code a catch method too, where it can catch errors in the users inventory, so if certain items are broken, etc, it'll send a error to log or something. But overall nice command.
 

Queso

echo 'Web Developer';
Nov 29, 2016
232
72
@Bren217 This appears to work fine for me, I can help you if you'd like, PM me your Skype/FB/W.e so I can try to help you if you would like.
 

Marko97

M97 Project based Plus EMU
Aug 7, 2013
99
45
Because you're trying to pass the wrong parameter var types, PM me and I'll help.
Can you help me please?
 
It not work for Plus EMU by @Sledmore .
upload_2017-2-21_22-52-3-png.5965

Someone, can help me?
 
Last edited by a moderator:

Bekmezci

Member
Sep 14, 2011
64
7
I could but

1) if i help you over skype that doesn't help other users on this forum that may have the same problem
2) if you are not a 'programmer' or have no csharp knowledge i would not advise plus emulator
Why ? It might be updated and a community project but there is a shit ton of work to , you can't update anything yourself and the community is as good as dead , and never wants to help somebody so they can use it for their own (not everybody but a general 95%)
I would advide you to search a more up to date emulator w/ functions you like
 

Txc

Member
Jan 26, 2017
84
45
35433047f75495e4600d574fc2e00727.png

Getting these 4 errors trying to add it to plus r2, would anyone be able to help me fix them exactly? I know two people have had similar errors but it appears one got assistance via PM and the second either gave up or found a fix himself. Any help would be appreciated.
 

treebeard

Member
Jan 16, 2018
317
173
Sadly there was never an answer to any of the people asking for a fix to convert this to Plus R2. Does anyone know how to solve this issue that cares to post it for the public? I'm trying to add this command right now but am having the same issues as the other people who commented here to no avail. I've fooled with this for about an hour, anyone got an answer?
 

Txc

Member
Jan 26, 2017
84
45
Sadly there was never an answer to any of the people asking for a fix to convert this to Plus R2. Does anyone know how to solve this issue that cares to post it for the public? I'm trying to add this command right now but am having the same issues as the other people who commented here to no avail. I've fooled with this for about an hour, anyone got an answer?
Pm me, let me know what you're having trouble with. I fixed it in my emulator.
 
For anyone having trouble adding this into plus, getting errors in FurniListComposer.cs use mine:
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(ICollection<Item> Items, int pages, int page)
            : base(ServerPacketHeader.FurniListMessageComposer)
        {
            base.WriteInteger(pages);//Pages
            base.WriteInteger(page);//Page?

            base.WriteInteger(Items.Count);
            foreach (Item Item in Items)
            {
                WriteItem(Item);
            }
        }

        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);
            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);
            }
        }
        private void WriteItem(Item Item)
        {
            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(Item.GetBaseItem().AllowEcotronRecycle);
            base.WriteBoolean(Item.GetBaseItem().AllowTrade);
            base.WriteBoolean(Item.LimitedNo == 0 ? Item.GetBaseItem().AllowInventoryStack : false);
            base.WriteBoolean(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);
            }
        }
    }
}
 
Last edited:

Users who are viewing this thread

Top