Jump to content

Nbacon

Members
  • Posts

    251
  • Joined

  • Last visited

  • Feedback

    100%

Everything posted by Nbacon

  1. its (* 20seconds ) for 28 different Items... becuase it tried all possibilities. I think its 28! ways to pull out 28 items with pre prossesing and pruning the space becomes alot alot alot less. I bet If I add more rules it could run in 1 secound. but what are the odds that a user will pull out 28 diffent items... In the video you can see that it withdraws,deposits,swaps items, puts on items, takes off items in the best way possible... It theoretically takes the same time but in practice 1 access vs 1 hashing+lookup+maybe a small search adds up when you do it millions of times. Found a speed up for 28 items in 2 seconds and major memory saves
  2. Thanks for asking For me its justified for a few reasons I don't know were that Info is stored (I know there is ItemDefinition) but I don't know how to get a id->ItemDefinition. For speed if there was a map of id->ItemDefinition yea its fast but this is an array and they are always "O(1)" Access Waste of memery (look in ItemInfo.kt they are boolen and char arrays the H2,FEET,WEAPON items are not ues in this porgram are not expleitly used but all that info is in the object called 'test' thats a char array) its only 3.5kb (in c no idea for java and its overhead) so each stackable,notable,noteable if make them BooleanArray as I do. The equipment slots can be golfed into an array of chars length 15000 or about 16 kilobytes (in c at) (I have it set up for non golfed at about 30000 chars 32kb ) So the total space those files take in memoery is less then 50kb or the same. I don't know what your looking at or thinking (not a mind reader). This solves a search space in this cace the search space is taking items out of the bank to meet some goal. If you ran it you would say holy memery use because the defalt problem in Main for me at least can take like 1 gig of memory to sovle the space [but that is an extreme] you can break it down into 5-7 chucks to save memory that java likes to hold on to. I make a video of what it does. At the moment Im working on a off client prossors that will hopefull bring down the memeory uses of my dumb just for fun progects....
  3. It alot of files Ill make a git of it....
  4. So I wrote some banking code that might help some one. Its been updated to things in less then a second no matter how comlex. https://github.com/NicholasBacon/BankingCode
  5. I know how that feels. Im writing a banking thing that I might post. The frist 95% took like 2 hours and the last 80% took like 10+hours... All so I don't have to write banking code ever again.....
  6. interface ISOMETHING{ void onStart(); void execute(); void onEnd(); int time(); boolean testAsBoolean(); } public class d { boolean walkwalk(MethodProvider mp,int run, PathPreferenceProfile profile,boolean camera, Area area, ISOMETHING something) { WebWalkEvent walkEvent = new WebWalkEvent(area); walkEvent.setPathPreferenceProfile(profile); walkEvent.setEnergyThreshold(run); walkEvent.setMoveCameraDuringWalking(camera); Event event = new Event() { public void onStart() throws InterruptedException { this.setAsync(); something.onStart(); } public int execute() throws InterruptedException { if ( something.testAsBoolean()){ this.setBlocking();//impotant something.execute(); this.setAsync();//impotant } return something.time(); } public void onEnd() throws InterruptedException { something.onEnd(); } }; mp.execute(event); boolean done = mp.execute(walkEvent).hasFinished(); event.setFinished(); return done; } }
  7. Because you don't need to do them.
  8. This is the thread that I asked for help with amost the same thing. Ill look for the code and come back if i find it.
  9. Nbacon

    Idle script

    @ScriptManifest(author = "Bacon", name = "idle", info = "", version = 0.0, logo = "") public class Test extends Script { @Override public int onLoop() throws InterruptedException { return 100000; } } 0 lines of code.
  10. Hello Jarl Im not an expert on threading at all. but This is how I did it in the past. Thread(){ While(true){ if (notpaused){ do stoof } Sleep(random(500,1500)) } } @Override public void pause() { notpaused =false } @Override public void resume() { notpaused =true } Thread pools. https://www.geeksforgeeks.org/thread-pools-java/ https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/ThreadPoolExecutor.html
  11. make sure to put the output in the jar file. (I forget that all the time.)
  12. I thinks this will work static{ pathToSewer.add(new Position(3246, 3433, 0)); pathToSewer.add(new Position(3246, 3450, 0)); pathToSewer.add(new Position(3238, 3457, 0)); } or List<Position> pathToSewer = new ArrayList<Position>(Arrays.asList(new Position[]{new Position(3246, 3433, 0), new Position(3246, 3450, 0), new Position(3238, 3457, 0)})); or use https://explv.github.io/?centreX=3108&centreY=3315&centreZ=0&zoom=7
  13. This says if there is a player in the general area(my fault) Area miningArea =new Area(1,1,1,1); if (getPlayers().getAll().stream().anyMatch(s -> s != myPlayer() &&miningArea.contains(s))){ hop }
  14. Hello, (I don't see logic that would get the player to that spot or out of that spot. so thats why it will forever loop) Your logic goes like this. You are in the spot -> you are a player -> will hop... Try this if (getPlayers().getAll().stream().anyMatch(s -> s != myPlayer())){ hop }
  15. Botting causes bans.... Never risk more than you are willing to lose.
  16. Oh, I just aways assume that I'm using webWalk. Did not see that it auto-carroted to something wrong. Thanks. But other than that I think it logicly works (in my head at least who knows if you run it)....
  17. Oh I think i see the problem tell me if this works? }else{ getWalking().walk(miningspot); } to }else{ if(getBank().isOpen()){ getBank().close() }else{ getWalking().walk(miningspot); } }
  18. My tip if your going to do switch statment thing draw it on paper and make sure all A->B->something->Z loop back to A or in better words all paths have a cycle to a start state. oh I see an error in my code from what you said. if (inventory.isFull()) { if (bank.isOpen()) { bank.depositAllExcept("Coins"); } else { bank.open(); } } else { to if (inventory.isFull()) { if (getStore().isOpen()) { getStore().close(); }else{ if (bank.isOpen()) { bank.depositAllExcept("Coins"); } else { bank.open(); } } } else {
  19. no no no no no no...... while (hopCount == 0) { getWorlds().hopToP2PWorld(); hopCount = 1; } this is just an if statment that is (logic like this can lead to forever loops if your not carefull) if (true){ do something..... } and thats just do something..... ps I think this will work better (put this is loop) and make loop return some number like 1500
  20. Hello Matt, You never change state in hopping or bank... so that is why.
  21. Bot less? 10 hours seems like a metric fuck ton
  22. My 2 cents: you can get better perfomance with a looping bot...and they are easier to write imo comments on your code. p.s. uses getter...
  23. I just had to solve this problem for myself in my bot. I don't know if it will help but This will still loot an item if your is full but you want to pick up a noted item. You can change it to eat food to loot or drop items if your inv is full(second return false is were that logic should go). The code I just wrote The java varent.
  24. try looping logic were all states are independent... making bots like how you are just clause alot of errors. examples can be found in here https://github.com/Explv/Explvs-AIO/tree/master/src/main/java/activities/skills I think this is what you need to make a blast furnce bot(sorry the blocks are all fucked up) if(gold bars in inv){ if(not at bank){ if(moving){ wait }else{ walk to bank } }else{ do banking things like swap gloves and withdraw gold ore } }else{ if(gold ore in inv){ if(moving){ wait }else{ if (Conveyor not in view ){ move towards }else{ click Conveyor } } }else{ if(gloves right gloves on){ pick up bars }else{ swap gloves } } }
×
×
  • Create New...