Jump to content

Removed for now


botelias

Recommended Posts

12 hours ago, Medusa said:

Nice release.

Looking at the code I can tell that you aren't using a task-based codebase.

Everything might get more organized if you start using that 😛

Thanks for the tip! I'll look into it. My first javascript from scratch, so the organization is a bit rough indeed 😉

 

Quote

does this support 1 defense/1 prayer builds for f2p?

I'll make sure to add that option once gui is implemented :) Not a hard thing to get running, so should come shortly. 

Quote

Will this support selling everything in the bank except for gear/foods or just the loot you get? 

Just loot for now. If I can find a way to pull item id's from inventory slots, then I could implement all gear/foods. 

Quote

Awesome, waiting for progressive combat switching update

Next thing that will be implemented :)

Link to comment
Share on other sites

41 minutes ago, botelias said:

Just loot for now. If I can find a way to pull item id's from inventory slots, then I could implement all gear/foods. 

For this you could loop through the inventory and add the ids to a list while checking if the list already contains that id:

Here is an example. Haven't Tested this, but should work 🙂

Spoiler

private ArrayList<Integer> getItemIdsFromInventory(){
    ArrayList<Integer> itemIds = new ArrayList<>();
    for(Item item : getInventory().getItems()){
        if(item != null && !itemIds.contains(item.getId())){
            itemIds.add(item.getId());
        }
    }
    return getItemIdsFromInventory();
}

Also just in case you want to get an id from a certain slot:

Spoiler

private int getItemIdFromInventorySlot(int slotNumber){
    Item item;
    if((item = getInventory().getItemInSlot(slotNumber)) != null){
        return item.getId();
    }
    return 0;
}

Any questions feel free to pm me or reply here.

Edited by BravoTaco
Link to comment
Share on other sites

34 minutes ago, BravoTaco said:

For this you could loop through the inventory and add the ids to a list while checking if the list already contains that id:

Here is an example. Haven't Tested this, but should work 🙂

  Hide contents


private ArrayList<Integer> getItemIdsFromInventory(){
    ArrayList<Integer> itemIds = new ArrayList<>();
    for(Item item : getInventory().getItems()){
        if(item != null && !itemIds.contains(item.getId())){
            itemIds.add(item.getId());
        }
    }
    return getItemIdsFromInventory();
}

Also just in case you want to get an id from a certain slot:

  Reveal hidden contents


private int getItemIdFromInventorySlot(int slotNumber){
    Item item;
    if((item = getInventory().getItemInSlot(slotNumber)) != null){
        return item.getId();
    }
    return 0;
}

Any questions feel free to pm me or reply here.

 

Thanks!
I'll make sure to implement that once I've got time!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...