Questions regarding packet(logging)

Results 1 to 9 of 9
  1. #1
    Sorcerer Supreme Yannickzz is offline
    Member +Rank
    May 2009 Join Date
    The NetherlandsLocation
    348Posts

    Questions regarding packet(logging)

    Hi,

    I've been wanting to fix up some broken stuff in my emulator lately (mostly broken packets). But I have no idea what they exactly are and how to 'find' them. For example, what does the following mean in Events.cs:

    'internal static int CreateTicket = 2875;//CS7'

    What does 2875 refer to? How can you figure out the correct ID for the correct class? And does it matter if it's the current build on Habbo or not?

    Because, let's say I get the following error:

    Code:
    Error in packet [475] BODY: [0]    ??[0][0][0][0]: 
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Silverwave.HabboHotel.Items.Interactor.InteractorWired.OnTrigger(GameClient Session, RoomItem Item, Int32 Request, Boolean HasRights) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\HabboHotel\Items\Interactor\InteractorWired.cs:line 45
       at Silverwave.Messages.GameClientMessageHandler.TriggerItem() in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\Requests\Rooms.cs:line 2540
       at Silverwave.Messages.StaticMessageHandlers.SharedPacketLib.TriggerItem(GameClientMessageHandler handler) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\StaticMessageHandlers\SharedPacketLib.cs:line 540
       at Silverwave.Messages.StaticMessageHandlers.StaticClientMessageHandler.HandlePacket(GameClientMessageHandler handler, ClientMessage message) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\StaticMessageHandlers\StaticClientMessageHandler.cs:line 33
       at Silverwave.Messages.GameClientMessageHandler.HandleRequest(ClientMessage request) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\GameClientMessageHander.cs:line 43
       at Silverwave.HabboHotel.GameClients.GameClient.parser_onNewPacket(ClientMessage Message) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\HabboHotel\GameClients\GameClient.cs:line 81
    That means that the packet '475' isn't the correct one. 475 links to HandleItem in my case, so I must find the correct ID for HandleItem. But, the question is: how? (http://wonderhotel.nl/swfs-old/habbo.swf)

    I also got a couple of other questions:
    - Is it possible to 'scan' for broken/missing packets without having to do it manually?
    - What do the lines beneath 'System.NullReferenceException: Object reference not set to an instance of an object.' exactly try to tell me?


  2. #2
    Sorcerer Supreme Yannickzz is offline
    Member +Rank
    May 2009 Join Date
    The NetherlandsLocation
    348Posts

    Re: Questions regarding packet(logging)

    Bump! Haven't figured it out yet, so I'm hoping that somebody could explain it :)

  3. #3
    Hakuna Matata Matata is offline
    Grand MasterRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: Questions regarding packet(logging)

    Code:
    internal static int CreateTicket = 2875;//CS7
    2875 is the packet id for CreateTicket. If the emulator receives a packet with the header id 2875, it knows that it should ruin the function CreateTicket.

    Error in packet [475]
    This does NOT mean that the packet is wrong. It means that it's get handled incorrectly.
    In this case it gives this error:
    Code:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Silverwave.HabboHotel.Items.Interactor.InteractorWired.OnTrigger(GameClient Session, RoomItem Item, Int32 Request, Boolean HasRights) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\HabboHotel\Items\Interactor\InteractorWired.cs:line 45
       at Silverwave.Messages.GameClientMessageHandler.TriggerItem() in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\Requests\Rooms.cs:line 2540
       at Silverwave.Messages.StaticMessageHandlers.SharedPacketLib.TriggerItem(GameClientMessageHandler handler) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\StaticMessageHandlers\SharedPacketLib.cs:line 540
       at Silverwave.Messages.StaticMessageHandlers.StaticClientMessageHandler.HandlePacket(GameClientMessageHandler handler, ClientMessage message) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\StaticMessageHandlers\StaticClientMessageHandler.cs:line 33
       at Silverwave.Messages.GameClientMessageHandler.HandleRequest(ClientMessage request) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\Messages\GameClientMessageHander.cs:line 43
       at Silverwave.HabboHotel.GameClients.GameClient.parser_onNewPacket(ClientMessage Message) in C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\HabboHotel\GameClients\GameClient.cs:line 81
    C:\Users\Administrator\Desktop\WonderHotel - Copy\Plus Emulator\HabboHotel\Items\Interactor\InteractorWired.cs:line 45 <- The error happens here.
    System.NullReferenceException: Object reference not set to an instance of an object. <- It's trying to use something that is null (not set).

    I'm not sure what version of Plus you're using, so I can't help you with fixing the problem.
    But take a look yourself - what is being done on line 45? And why isn't the variable set? Make a null check or look for possible errors.

  4. #4
    Sorcerer Supreme Yannickzz is offline
    Member +Rank
    May 2009 Join Date
    The NetherlandsLocation
    348Posts

    Re: Questions regarding packet(logging)

    Thank you so much! That cleared up a lot for me! Somehow there is something wrong with the following line of code:

    Code:
                    ExtraInfo = Row["string"].ToString();
    But I have no idea what it could be. All of my database tables are functioning the way they should, yet this is still the cause of all of my problems right now.
    Last edited by Yannickzz; 16-07-14 at 10:02 AM.

  5. #5
    Hakuna Matata Matata is offline
    Grand MasterRank
    Sep 2012 Join Date
    DenmarkLocation
    807Posts

    Re: Questions regarding packet(logging)

    Quote Originally Posted by Yannickzz View Post
    Thank you so much! That cleared up a lot for me! Somehow there is something wrong with the following line of code:

    Code:
                    ExtraInfo = Row["string"].ToString();
    But I have no idea what it could be. All of my database tables are functioning the way they should, yet this is still the cause of all of my problems right now.
    The row "string" is probably not set.

  6. #6
    Sorcerer Supreme Yannickzz is offline
    Member +Rank
    May 2009 Join Date
    The NetherlandsLocation
    348Posts

    Re: Questions regarding packet(logging)

    Quote Originally Posted by Matata View Post
    The row "string" is probably not set.
    Weird thing is that there is no row being inserted into wired_items or whatsoever when placing the Wired Effect 'To position & State... I added a row manually, but now the Wired won't save. They emulator doesn't show any error when trying to save, but the database remains unchanged.

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

    Re: Questions regarding packet(logging)

    Quote Originally Posted by Yannickzz View Post
    Weird thing is that there is no row being inserted into wired_items or whatsoever when placing the Wired Effect 'To position & State... I added a row manually, but now the Wired won't save. They emulator doesn't show any error when trying to save, but the database remains unchanged.
    Needs to be rewritten. Wired is one of the derpy things in Plus emulator along with groups.

  8. #8
    Sorcerer Supreme Yannickzz is offline
    Member +Rank
    May 2009 Join Date
    The NetherlandsLocation
    348Posts

    Re: Questions regarding packet(logging)

    Quote Originally Posted by The General View Post
    Needs to be rewritten. Wired is one of the derpy things in Plus emulator along with groups.
    That's too bad. Could be fixed by comparing the query that is being run when placing another wired item, but can't find any reference to 'INSERT INTO wired_items' or anything.

  9. #9
    Newbie freefox is offline
    MemberRank
    Nov 2013 Join Date
    8Posts

    Re: Questions regarding packet(logging)

    Delete
    Last edited by freefox; 18-07-14 at 06:43 PM.



Advertisement