Jump to content

Removed for now


Recommended Posts

Posted
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 :)

Posted (edited)
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
Posted
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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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