Thread: Why is my UseItem not working on objects???

Results 1 to 6 of 6
  1. #1 Why is my UseItem not working on objects??? 
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Hello, I need this really bad and ASAP please.

    Its like my whole UseItem on obejcts packet is not working whatsoever...

    It is 100000% correctly coded, I can promise you... (im not a shit coder; its correct)

    But somewhere my items on objects packet "UseItem" packet is not getting called when an item is use on an object.
    Forexample:
    Bars on an anvil doesnt work.
    Seeds on a herb patch doesnt work.

    I even put is so all it should of done was to just send a message saying "you used the seed on me.." just so test and it still didn't even show that message.

    What can be wrong?
    Please help ASAP Thanks.

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  2. #2  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Ok hold on hold on....

    These variables are NEVER used... ("a" and "b") are NEVER used...

    Yet when I uncomment them in ItemOnObject.java here:
    Code:
    		int a = c.getInStream().readUnsignedWord();
    		int objectId = c.getInStream().readSignedWordBigEndian();
    		int objectY = c.getInStream().readSignedWordBigEndianA();
    		int b = c.getInStream().readUnsignedWord();
    		int objectX = c.getInStream().readSignedWordBigEndianA();
    		int itemId = c.getInStream().readUnsignedWord();
    it works...... wtf??

    It's like the "a" and "b" variable make the difference....

    Why is this??? a and b are NEVER used........ I'm so stumped..

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  3. #3  
    q.q


    Join Date
    Dec 2010
    Posts
    6,519
    Thanks given
    1,072
    Thanks received
    3,535
    Rep Power
    4752
    you need to understand how packets are written and read

    a and b are slot for the item you used and interface id the item was used from

    by not using them you're making exploits more likely to happen
    Reply With Quote  
     

  4. #4  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Quote Originally Posted by Harlan View Post
    by not using them you're making exploits more likely to happen
    How so? I'm very interested.

    How could I use it to not make these exploits possible?

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     

  5. #5  
    Registered Member
    TheChosenOne's Avatar
    Join Date
    Jan 2013
    Posts
    967
    Thanks given
    47
    Thanks received
    161
    Rep Power
    366
    By checking if the item at the given slot (a ) belonging to interface b (most likely the inventory interface, but check before proceeding with the code) really is in the container.

    For example:
    Imagine INV_INTERFACE is the number of the inventory container interface.

    The server received item 995 from interface INV_INTERFACE from slot 9.
    The server checks which interface the item comes from: INV_INTERFACE.
    The server continues with the code which has to do with the inventory interface (as it's the interface the item comes from, which is checked right before).
    The server then checks if the item in slot 9 of the inventory matches itemId 995.
    If this is not the case, the packet code stops (returns) as the client and server are not in sync (which COULD mean the player uses a cheat client and tries to fool the server into thinking an item exists, where it does not).
    If the item does exist at the given slot, the code continues as it would normally.
    Reply With Quote  
     

  6. #6  
    Registered Member BryceTheCoder's Avatar
    Join Date
    Aug 2008
    Posts
    740
    Thanks given
    21
    Thanks received
    24
    Rep Power
    27
    Quote Originally Posted by TheChosenOne View Post
    By checking if the item at the given slot (a ) belonging to interface b (most likely the inventory interface, but check before proceeding with the code) really is in the container.

    For example:
    Imagine INV_INTERFACE is the number of the inventory container interface.

    The server received item 995 from interface INV_INTERFACE from slot 9.
    The server checks which interface the item comes from: INV_INTERFACE.
    The server continues with the code which has to do with the inventory interface (as it's the interface the item comes from, which is checked right before).
    The server then checks if the item in slot 9 of the inventory matches itemId 995.
    If this is not the case, the packet code stops (returns) as the client and server are not in sync (which COULD mean the player uses a cheat client and tries to fool the server into thinking an item exists, where it does not).
    If the item does exist at the given slot, the code continues as it would normally.
    I recently downloaded tons of PI based server and checked if they ever use "a" or "b' integers anywhere and no one does.
    Maybe I am fine without ever using it server based?
    Oor should I be concerned? And if so, help double-check and fix it to protect fake packets like that?

    Advertise your RSPS cheap on my website: www.BryceBux.com

    ^ PM me and I will give you a few dollars for FREE on my website for advertisements ^
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. Replies: 0
    Last Post: 05-26-2012, 09:51 PM
  2. why is my object doing this
    By Andrew in forum Help
    Replies: 9
    Last Post: 11-19-2011, 03:45 PM
  3. why is the bots not working?
    By hontiris1 in forum RuneScape Underground
    Replies: 2
    Last Post: 02-02-2010, 10:17 PM
  4. Replies: 1
    Last Post: 12-23-2009, 10:27 AM
  5. Sendmail function is not working on this forum
    By Dj Java in forum Complaints
    Replies: 10
    Last Post: 11-08-2009, 03:40 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •