Jump to content

Dot

Members
  • Posts

    44
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Dot

  1. Dot

    APA Rooftop Agility

    Seems to not be taking breaks properly. [INFO][Bot #1][11/09 02:35:33 PM]: Started random solver : BreakManager [INFO][Bot #1][11/09 02:51:53 PM]: Random solver exited : BreakManager [INFO][Bot #1][11/09 02:51:53 PM]: Executing movement event: Camera event [INFO][Bot #1][11/09 02:51:53 PM]: Executing movement event: Mouse event [INFO][Bot #1][11/09 02:51:55 PM]: Started random solver : Auto Login [INFO][Bot #1][11/09 02:51:59 PM]: Successfully logged in, waiting for welcome screen. [INFO][Bot #1][11/09 02:51:59 PM]: Random solver exited : Auto Login [INFO][Bot #1][11/09 02:52:01 PM]: Stopping script: You cannot access course: Canifis Rooftop [INFO][Bot #1][11/09 02:52:01 PM]: Terminating script APA Rooftops... Other scripts don't have this issue. The script terminates before the Welcome Screen handler can execute.
  2. I'm new to the site so I went ahead and bought the script. Hopefully it doesn't get my pure banned. A couple of suggestions/requests I have so far would be: - Add a "custom food" option (had to buy food to use this script because the food I had wasn't listed) - Option to eat on aggro refresh rather than at certain HP percentages (looks more human-like AFK if you can survive that long) - Option to separate HP from combat style XP and add a time-to-level or XP-to-level (I want to know my Attack/Strength/Defense XP per hour without including HP XP/h) - When breaking, wait for a refresh rather than moving to a safe place. Would give the appearance that a human just walked away from the PC and didn't come back rather than taking a deliberate break. So far this is a really great script and I think $5 is a modest price. Thanks for taking the time to make it.
  3. I am not an OSBot guru by any means but I do have a lot of programming experience. We use NPC because it is (almost always) used to reference a single NPC. getNpcs() targets a group of them but the purpose of getClosest(value) is to narrow it down to a single NPC. It has very little to do with what class the method resides in because the naming of types has more to do with how they are actually used in the language. As you continue to learn it will become more and more clear how things are named and why. To elaborate, the NPC in `NPC chicken = getNpcs.closest("chicken")` is actually the type of variable. It's the same as String in `String myName = "Dot"` or int in `int myAge = 9001`. Technically, it can be anything the compiler accepts. `getNpcs().closest("Chicken").getLevel()` is actually an `int` (because it is the level of the closest chicken, as an integer), so it needs to be written as `int chickenLevel = getNpcs().closest("Chicken").getLevel()` and the NPC type has nothing to do with it. If you don't understand that now, you will soon. The NPC type is specific to OSBot's API but if you familiarize yourself will other variable types in Java you'll figure it out quickly.
  4. Thanks for the suggestion. I actually did put my changes to the booleans within the functions themselves but moved them out just to show what I did. I will make cleaning my code up with better functions a priority in my next script.
  5. Thanks dudes. My lootOption and buryBonesOption are actually just booleans pulled from the GUI to decide whether the user wants the script to bury bones, but I added a "flag" for those functions and got it working. if (!myPlayer().isUnderAttack()) { if (lootOption && !looted) { loot(); looted = true; } if (buryBonesOption && !buried) { buryBones(); buried = true; } if (goblin != null && goblin.exists() && goblin.getHealthPercent() > 0 && !myPlayer().isInteracting(goblin) && !goblin.isUnderAttack() && map.canReach(goblin) && goblinArea.contains(goblin) && looted && buried) { attackGoblin(goblin); looted = false; buried = false; } } Just in case anyone sees this in the future, I was still having the same problem even after doing this, so I added a short sleep() to that start of my loot() and buryBones() functions. Just as @feggit suggested, my script was picking a new target before the items actually appeared on screen. I don't know if there's a better API function for this, but the sleep works fine. Thanks again guys.
  6. Thanks a lot guys. I can definitely work that into my script.
  7. That would work. Is that the standard practice?
  8. Any suggestions on how to wait until it's dropped loot? I didn't run into this problem with my chicken killer and I'm not seeing any difference in the code that should cause this.
  9. I'm writing a goblin killer after my chicken killer worked out and I'm having a weird problem. Sometimes it loots coins and buries bones as I expect it to, but most of the time it skips that step and just attacks another goblin. I can't really tell what's going on and I've made a bunch of minor adjustments to the code trying to figure it out. Can anyone give me a hint? I tried moving the calls to loot() and buryBones() to within the attackGoblin() void, as well as some random shit like adding that whole "currentGoblin" thing so it didn't pick a new goblin before the bones/coins actually spawn, but I'm at a loss. Code:
  10. This script works flawlessly. Will be a great resource to help me start scripting. Thanks!
×
×
  • Create New...