Thread: Invisible items

Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1 Invisible items 
    Registered Member Nuno555's Avatar
    Join Date
    Sep 2011
    Posts
    330
    Thanks given
    40
    Thanks received
    14
    Rep Power
    0
    Hello guys im trying to add a item that extends the original item id of obj.dat;
    I hard code the item but its returning invisible but when i add the id of a existing item it works.

    Already looked in model.java , itemDef, Sprite; its not the getSprite method in itemDef

    Any ideas?

    http://prntscr.com/p646xh

    Edit:

    Fixed was something to do with the client packets
    Quote Originally Posted by soccerchamp149 View Post
    whats eclipse lol
    Reply With Quote  
     

  2. #2  
    Respected Member


    Join Date
    Jan 2009
    Posts
    5,743
    Thanks given
    1,162
    Thanks received
    3,603
    Rep Power
    5000
    Quote Originally Posted by Nuno555 View Post
    Hello guys im trying to add a item that extends the original item id of obj.dat;
    I hard code the item but its returning invisible but when i add the id of a existing item it works.

    Already looked in model.java , itemDef, Sprite; its not the getSprite method in itemDef

    Any ideas?

    http://prntscr.com/p646xh
    You should provide some code examples?
    Reply With Quote  
     

  3. #3  
    Registered Member Nuno555's Avatar
    Join Date
    Sep 2011
    Posts
    330
    Thanks given
    40
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by Spooky View Post
    You should provide some code examples?
    I would like to know what method is that appears dwarf remains when the items are null, like in this picture:

    http://prntscr.com/p6c3ee

    I know its not in ItemDef, Model, Player because ive looked.
    I belive if i know where dwarf remains are displaying where the null comes my costumes will work
    Quote Originally Posted by soccerchamp149 View Post
    whats eclipse lol
    Reply With Quote  
     

  4. #4  
    'Slutty McFur'

    Owain's Avatar
    Join Date
    Sep 2014
    Age
    26
    Posts
    2,894
    Thanks given
    2,360
    Thanks received
    2,200
    Rep Power
    5000
    There's probably a cap for total items that currently reads from the highest item id loaded from the cache, try and find where it is and extend it.


    Spoiler for wat:
    Attached image
    Attached image

    Attached image


    Reply With Quote  
     

  5. #5  
    Registered Member Nuno555's Avatar
    Join Date
    Sep 2011
    Posts
    330
    Thanks given
    40
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by A Mage View Post
    There's probably a cap for total items that currently reads from the highest item id loaded from the cache, try and find where it is and extend it.
    Already did that , but thanks for ur contribution
    Quote Originally Posted by soccerchamp149 View Post
    whats eclipse lol
    Reply With Quote  
     

  6. #6  
    'Slutty McFur'

    Owain's Avatar
    Join Date
    Sep 2014
    Age
    26
    Posts
    2,894
    Thanks given
    2,360
    Thanks received
    2,200
    Rep Power
    5000
    Quote Originally Posted by Nuno555 View Post
    Already did that , but thanks for ur contribution
    Do you get any client errors? What item id did you try and set the item to? If it works for an existing ID why not just overwrite a useless item that isn't used on your server instead? Few things to consider.


    Spoiler for wat:
    Attached image
    Attached image

    Attached image


    Reply With Quote  
     

  7. #7  
    Registered Member Nuno555's Avatar
    Join Date
    Sep 2011
    Posts
    330
    Thanks given
    40
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by A Mage View Post
    Do you get any client errors? What item id did you try and set the item to? If it works for an existing ID why not just overwrite a useless item that isn't used on your server instead? Few things to consider.
    I printed the items and output as :

    Total items : 11791

    I can only spawn to 11789, 11790 turns invisible aswell idk whats wrong with this.

    Already looked for 11790 and couldnt find anything
    Quote Originally Posted by soccerchamp149 View Post
    whats eclipse lol
    Reply With Quote  
     

  8. #8  
    'Slutty McFur'

    Owain's Avatar
    Join Date
    Sep 2014
    Age
    26
    Posts
    2,894
    Thanks given
    2,360
    Thanks received
    2,200
    Rep Power
    5000
    Quote Originally Posted by Nuno555 View Post
    I printed the items and output as :

    Total items : 11791

    I can only spawn to 11789, 11790 turns invisible aswell idk whats wrong with this.

    Already looked for 11790 and couldnt find anything
    Is your client only loading revision 474 items? That seems pretty low for the highest id lol. But yeah for what it's worth, if you only have a few items to add just use existing ids for items that you aren't using, that'll be the easiest way in your case.


    Spoiler for wat:
    Attached image
    Attached image

    Attached image


    Reply With Quote  
     

  9. #9  
    Registered Member Nuno555's Avatar
    Join Date
    Sep 2011
    Posts
    330
    Thanks given
    40
    Thanks received
    14
    Rep Power
    0
    Quote Originally Posted by A Mage View Post
    Is your client only loading revision 474 items? That seems pretty low for the highest id lol. But yeah for what it's worth, if you only have a few items to add just use existing ids for items that you aren't using, that'll be the easiest way in your case.

    Now that i put the 634 obj it reads the items, but if i put the 474 it doesnt read em, its very wierd.. The sprites appear, what i need is when its reading the null items appears the "Dwarf Remains"
    http://prntscr.com/p6ex3k
    Quote Originally Posted by soccerchamp149 View Post
    whats eclipse lol
    Reply With Quote  
     

  10. #10  
    Banned

    Join Date
    Jun 2019
    Posts
    203
    Thanks given
    99
    Thanks received
    44
    Rep Power
    0
    Quote Originally Posted by Nuno555 View Post
    Now that i put the 634 obj it reads the items, but if i put the 474 it doesnt read em, its very wierd.. The sprites appear, what i need is when its reading the null items appears the "Dwarf Remains"
    http://prntscr.com/p6ex3k
    You have to extend the data by like 1000 ids for custom items:

    Code:
    public static void init(Archive archive) {
            data_buffer = new Buffer(
                    ClientConstants.LOAD_OSRS_DATA_FROM_CACHE_DIR ?
                    FileUtils.read(ClientConstants.DATA_DIR+"items/obj.dat")
                    : archive.get("obj.dat"));
    
            Buffer index_buffer = new Buffer(
                    ClientConstants.LOAD_OSRS_DATA_FROM_CACHE_DIR ?
                    FileUtils.read(ClientConstants.DATA_DIR+"items/obj.idx")
                    : archive.get("obj.idx"));
    
            length = index_buffer.readUShort();
            pos = new int[length + 7000];
    
            int offset = 2;
            for (int index = 0; index < length; index++) {
                pos[index] = offset;
                offset += index_buffer.readUShort();
            }
            cache = new ItemDefinition[10];
            for (int index = 0; index < 10; index++)
                cache[index] = new ItemDefinition();
    
            System.out.println(String.format("Loaded %d items loading OSRS version %d and SUB version %d", length, ClientConstants.OSRS_DATA_VERSION, ClientConstants.OSRS_DATA_SUB_VERSION));
    
        }
    Reply With Quote  
     

Page 1 of 2 12 LastLast

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. Invisible item
    By wolfenzi in forum Help
    Replies: 1
    Last Post: 10-07-2010, 05:06 PM
  2. Invisible Items
    By Ventrix in forum Help
    Replies: 2
    Last Post: 09-11-2010, 05:02 AM
  3. Invisible items
    By thenolifer in forum Help
    Replies: 5
    Last Post: 08-27-2010, 02:43 PM
  4. Invisible Items (rep)
    By Neekage in forum Help
    Replies: 4
    Last Post: 05-09-2010, 10:10 AM
  5. Invisible items?
    By TGWCam in forum Help
    Replies: 2
    Last Post: 07-24-2009, 09:46 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •