Jump to content

Alek

Ex-Staff
  • Posts

    7878
  • Joined

  • Last visited

  • Days Won

    200
  • Feedback

    100%

Everything posted by Alek

  1. You have double spaces/tabs between login, bot, etc. It's not specific to an OS, moving to general help section.
  2. Pretty sure the stats got reset at some point, we have definitely hit 1500-1700 before with the closing down of other bots. Still 1300 its pretty darn high.
  3. 1. You can't force GC 2. Setting something to null isn't dereferencing, also it doesn't necessarily trigger a GC either Definitely not an OSBot issue, please just do some googling.
  4. Thanks for confirming, I spent more time into this than Id like to admit.
  5. Is that some derivation of kebab, kebap, or kabob?
  6. Download Link: https://osbot.org/devbuilds/osbot 2.5.4.jar I've been getting a lot of questions about this lately and it seems that there's confusion over how loading resources works. Java is a little tricky when it comes to this as loading resources from a jar is different than loading resources that are not in a jar. I've went ahead and wrote some methods to make everyone's lives a bit easier, so you can write the same code no matter if its an SDN script, a Jar script, Zip script, or just the class files. Script getScriptResourceAsStream - This loads resources relative to the entry of the script Script getDataResourceAsStream - This loads resources relative to the entry of the OSBot data directory Here are two examples so you get an idea: Of course please ensure you are still following the existing SDN resources folder rules. This is an experimental build, please let me know if this helps.
  7. Ugh the context is bot
  8. Use getDirectoryData() from Script
  9. You don't need to search for a cow in your getState(). Just think of all the conditions necessary to attack a cow, then return the Attack state. If my inventory isn't full, if I'm not animating, if I'm not in the bank, and if I'm in the cowpen < return Attack. See how I didn't search for a cow? Now in your attack state, you can search for the cow once. If the cow doesn't exist, sleep for 1000ms. The reason you want a long sleep is so you're not continually doing all these checks when it can take some time for you to find yourself a suitable target.
  10. States aren't bad, especially for this level of "abstraction" - I actually use them in a few of my scripts. There was a redundancy concern but I don't see that in your original concern you posted above. The only recommendation I have is to not return a null in your getState(), use something like "State.IDLE" - this will save you at some point! Now if your script was bigger, like if it had tanning support, perhaps "Tasks" would be better than states. If you had less, perhaps no banking at all, I'd suggest removing your states and just including everything in your onLoop. Just remember the more you abstract, the more the computer has to work. In your implementation, there's no performance concern at all. For the answer to your question, as others have stated, you need to get an NPC in your onLoop. Think about this logically. Cow = getclosest("Cow"); Cow = alive Player->Attack(Cow); Cow = dead Player->Attack(Cow); // ERROR: Cow doesnt exist You must now get a new closest cow. Now to remove this "redundancy" by searching for a new cow in both the getState() and onLoop(), think about it more logically (again). How about you combine the attack/search state? If your inventory isnt full, you're not animating, and you're in the cow pen, return State.ATTACK. In your attack state code, here you can implement searching for the cow and attacking it.
  11. I heard when you post the same topic twice, both in the wrong sections, you get help faster.
  12. First line do if(tabs.open(Tabs.INVENTORY)) instead, you don't need to check if its already open since thats already checked in the open method.
  13. Your scripts that you are using are not using antiban like checking stats or rotating camera.
  14. Doesn't know how to write code, implements anti-ban.
  15. How often do you play multiple games of csgo at the same time under the same vpn? Unless of course you are only playing on one account under a vpn, and nobody else is using that vpn - in which case you’re spending a lot of money
  16. As a master programmer I write at 900 lines/hour. I think your estimate of 200/hr is your max, not your average. You probably average at 150/hr which is fine. @Septron is a noob and his line count is pretty low ;)
  17. 11 subscribers, 41 views; I think you're advertising these videos? Might need to contact Maldesto if you keep advertising this.
  18. Horde Anglerfish by @Deceiver Waffs RuneBuyer by @Waffe dPuro Puro by @d0zza H0rn's Cannonballer by @H0rn Chikan's Motherlode Mine by @Chikan Macro Recorder by @liverare Blue's Wine Maker by @ThatGamerBlue slCannon by @Slut
  19. You do know that if defence is not less than 30, that means its greater than or equal to 30? If you have specific weapons you are using, then the easiest would be to search for widgets with actions/messages with the nomenclature for "controlled", "defence", etc.
  20. Sounds like you go to university by reading question 2. Remember that whatever "architecture" you develop, you're still running in the loop because that's how OSBot's script executor works. An FSM/automata is a little silly because of the formal name, but it means the same thing when we refer to a "state based" script. This involves the onLoop checking to see what state we are in: onLoop() { state = getState(); } getState() { if(a) return State.A; if(b) return State.B; } Tasks are very similar: onLoop() { for(Task t: tasks) if(t.readyToExecute()) t.execute() } Both have their purposes, however they get abused a lot. Remember that the more you abstract, the more the computer has to work - especially in task systems where there is similar code shared between shouldExecute and execute methods. For instance: shouldExecute() { npcs.getClosest("ABC") != null } execute() { NPC npc = npcs.getClosest("ABC"); if(npc != null) npc.interact(); } Here are some good starting places for you: Also here's an IntelliJ setup. It sounds like your experienced, but I figured I'd share it with you anyways just in case:
  21. The download page? We don't have a download page, only a download link. Is the link blacklisted?
×
×
  • Create New...