Thread: [718+] In-Game ItemId Finder

Results 1 to 8 of 8
  1. #1 [718+] In-Game ItemId Finder 
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    Well, a while ago I posted an Item Searching method for 667. The one for 667 would not work for 718, so I just made this really quick. It's nothing special or extraordinary, but it works, so I'm happy with it. What this does is search a text file for related names to what you type. Can be partial names, full names, whatever. I've also found a text file in a server that was formatted the way i needed it.

    I've monitored RAM while typing this like 5 times with a large amount of results, and RAM was not dramatically increased (it actually wasn't affected at all.) Simple because it doesn't load the file, it just reads it (from what i can tell..lul) Well anyway, Don't Hate. here it is:

    Code:
    package com.rs.game.player.content.custom;
    
    import java.io.IOException;
    
    
    import com.rs.cache.loaders.ItemDefinitions.FileUtilities;
    import com.rs.game.player.Player;
    
    
    public class ItemDatabase {
    
    
        public static void search(Player p, String name) {
            String itemName = name.toLowerCase();
            int results = 0;
                try {
                    for (String lines : FileUtilities.readFile("./data/ItemList.txt")) {
                        String[] data = lines.split(" - ");
                        if (lines.toLowerCase().contains(itemName)) {
                            results++;
                            if (results > 250) {
                                p.getPackets().consoleMessage("Found 250+ results. Only 250 are shown.");
                                return;
                            }
                            p.getPackets().consoleMessage("<col=00FF00>"+data[0]+"</col> - "+data[1]+"");
                        }
                    }
                    p.getPackets().consoleMessage("<col=FF0000>Found "+results+" matches for '"+itemName+"'</col>.");
                } catch (IOException e) {
                    e.printStackTrace();
                }
                return;
        }
    }
    Code:
    if (cmd[0].equals("getid")) {
            String itemName = "";
            for (int i = 1; i < cmd.length; i++)
                 itemName += cmd[i] + ((i == cmd.length - 1) ? "" : " ");
            ItemDatabase.search(player, itemName);
    }
    Item List Download: [Only registered and activated users can see links. ]
    PS: name might need changed

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  2. #2  
    Extreme Donator


    Join Date
    Jul 2009
    Age
    24
    Posts
    4,350
    Thanks given
    824
    Thanks received
    1,237
    Rep Power
    1789
    Item names can be checked through item definitions (and they can be matched up with there ID) can they not?

    You can find my [Only registered and activated users can see links. ], for what I'm currently working on.
    Reply With Quote  
     

  3. #3  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    Yes they can.Someone didnt read the thread completely..........

    [Only registered and activated users can see links. ]

    That's what that does, but it wouldn't work with 718 >.>

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  4. #4  
    Registered Member PavSwag's Avatar
    Join Date
    Jul 2012
    Posts
    1,079
    Thanks given
    310
    Thanks received
    98
    Rep Power
    57
    Your other one worked for my 718 o.O
    changing osrs forever
    Reply With Quote  
     

  5. #5  
    Registered Member Grown's Avatar
    Join Date
    Oct 2012
    Posts
    839
    Thanks given
    647
    Thanks received
    86
    Rep Power
    54
    Cool
    "Programs aren’t just built in one go, like a bridge. They are talked about,
    sketched out, prototyped, played with, refactored, tuned, tested, tweaked,
    deleted, rewritten....
    A program is not built; it is grown.
    Because a program is always growing and always changing, it must be written
    with change in mind."
    Reply With Quote  
     

  6. #6  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    Quote Originally Posted by PavSwag View Post
    Your other one worked for my 718 o.O
    Well it wouldn't work with mine for some reason O_O

    [Only registered and activated users can see links. ]
    Reply With Quote  
     

  7. #7  
    Registered Member

    Join Date
    Oct 2008
    Posts
    2,342
    Thanks given
    132
    Thanks received
    1,019
    Rep Power
    828
    obviously it wouldnt work... definitions are loaded on demand dumbas <.<.
    Reply With Quote  
     

  8. #8  
    KNOWLEDGE IS POWER

    OG KingFox's Avatar
    Join Date
    Dec 2006
    Age
    30
    Posts
    1,683
    Thanks given
    628
    Thanks received
    1,055
    Discord
    View profile
    Rep Power
    709
    So my method wouldn't work for my 718, but works for his? Makes sense i guess.......
    Oh well, Ternary Operator posted one much better than searching a text file, but either one works all the same. Gets an item name and id number >.>

    [Only registered and activated users can see links. ]
    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. Tip.it itemid to website url id
    By digistr in forum Configuration
    Replies: 5
    Last Post: 04-18-2010, 09:58 PM
  2. Changing (ITEMID) to (AMT)
    By Vain Ollie in forum Help
    Replies: 0
    Last Post: 02-19-2010, 03:55 PM
  3. ItemId's to Examines etc.
    By Vastiko in forum RS 503+ Client & Server
    Replies: 10
    Last Post: 06-19-2009, 08:22 PM
  4. Replies: 43
    Last Post: 09-19-2008, 10:39 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
  •