Jump to content

Botre

Members
  • Posts

    5883
  • Joined

  • Last visited

  • Days Won

    18
  • Feedback

    100%

Everything posted by Botre

  1. Botre

    Entities

    We already have a pretty flexible filter class :@
  2. Botre

    OSBot Rocks!

    YES
  3. What kind of methods/properties would justify an extended class instead of just adding them to this one? I make my classes immutable and final by default, only making them mutable / extendable when it's absolutely necessary.
  4. To celebrate the recent awesome growth of users and promote my upcoming woodcutting script I will be giving away a couple of free accounts this week. Account details: All accounts are F2P with 61 woodcutting and all other stats at level 1. Perfect for chopping those yews! Game details: Post a picture of something party-related or a happy comment on this thread. I will PM a random user with the account details (make sure you visit the forums regularly and check your PMs!). Some people claim that liking this thread increases your odds of winning a free account. You can visit the devlog here: http://osbot.org/forum/topic/65987-botre-aio-woodcutting-devlog/
  5. :maxi:
  6. Botre

    @Anne.

    Lol read your mails.
  7. 1950 :x inb4 2000. Maxi, please give out some free stuff to keep new users hooked :|
  8. Botre

    Entities

    pls use getObjects() instead of objects.
  9. Idem.
  10. Anne pls *self-censored*
  11. Because I decided that's where that inheritance branch should end There's no need for it to been extendable. Making a class final really just makes it unextendable ^^
  12. Yup. I currently only have one script an account so I only ever create one instance of it :p But yeah will probably make it static later on ^^
  13. public RSExperienceTable() { generateTable(126); } to public RSExperienceTable() { generateTable(500); } It would take 5 seconds. And it's unlikely I'll ever have to pay that time price :p If they were to update it to 500 with the current formula it would take 536870911 xp. Meaning you would have to calc a long every x seconds. But why stop at 500? Why not make the calculation return a BigDecimal, just to be safe, in case they add decimal levels?
  14. That's why I'm using table look-up :p
  15. Welcome!
  16. Welcome
  17. Donates sperm. Mother goes to sperm bank to buy a baby. Welcome to the frather club.
  18. It still uses table look-up (because it's cheaper). I made it generate the table though, because otherwise certain people will cry about it not being flexible (I personally really doubt they'll ever implement levels > 126 but whatever).
  19. LAST UPDATE: MARCH 26, 2015 package org.bjornkrols.experience; import java.util.Arrays; /** * @author Bjorn Krols (Botre) * @version 0.1 * @since March 6, 2015 */ public final class ExperienceTable { /** * The maximum skill level in OSRS. */ private static final int MAXIMUM_LEVEL = 99; /** * A table holding the experience amounts for a specific number of levels. */ private static final int[] TABLE = create(MAXIMUM_LEVEL); private ExperienceTable() { // This class should never be instantiated. // Do not delete or make accessible. } /** * @return The total amount of experience required for the level. */ public static int getXp(int level) { return level == 0 ? 0 : TABLE[level - 1]; } /** * @return The level acquired by the amount of experience. */ public static int getLevel(int experience) { return Math.abs(Arrays.binarySearch(TABLE, experience) + 1); } /** * Creates the experience table. */ private static int[] create(int maximumLevel) { int[] table = new int[maximumLevel]; int experience = 0; for (int i = 1; i < maximumLevel; i++) { experience += Math.floor(i + 300 * Math.pow(2, i / 7.0)); table[i] = (int) Math.floor(experience / 4); } return table; } }
  20. Inside client: Open settings. Navigate to the debug tab. Check entity hover debug. Now when you hover over the NPC you should be able to read its ID (among other info). Hope this helped
  21. Windows: *YourDiskDrive*\Users\*YourUserName*\OSBot\Scripts
×
×
  • Create New...