Jump to content
Frequently Asked Questions
  • Are you not able to open the client? Try following our getting started guide
  • Still not working? Try downloading and running JarFix
  • Help! My bot doesn't do anything! Enable fresh start in client settings and restart the client
  • How to purchase with PayPal/OSRS/Crypto gold? You can purchase vouchers from other users
  • My Shitty Banking Method / Lumbridge Miner


    EncoreAspire

    Recommended Posts

    Posted

    Hey guys. I was hoping to tinker and figure out whatever is causing this maddness after I got off work, but RS update =[

     

    So i figured I could post here to get an idea of what im doing wrong... which is probably alot, I like to learn by doing so forgive the noobiness of this code. 

     

    I'm testing the banking method first. It starts to move but the whole client slows the fuck down. If I look at the task manager, I'm pretty sure the memory used by the client was constantly increasing. And the CPU usage hits 100% in a 3-10 seconds.

     

    I think the part of code thats supposed to get the staircase gameobject is fucking up. But I'm not sure how to fix it nor can I atm.

     

    If anyone has any ideas why this happening, or any suggestions for improving this method at all, im all ears.

     

    Thanks for taking the time.

    if the readability of this codes sucks, let me know how to fix =]

    Code is Attached as .txt

     

    Log would show the random number calculated, then shit on itself... if that helps

    BankMethod1.0.txt

    Posted

    Readability is a little bad; jumbled/unorganized, a lot of repetition, and honestly it's hard to read code in notepad sometimes. Try posting it on pastebin.

     

    Why are you using Calculations.random() to choose where to walk? If it's for antiban, that's not a good method longterm. It'll look like a bot when you're constantly clicking in the same area where you are, just because a calculations.random() returned a specific number.

     

    For your bank locations after stair climbing, might want to check that you're upstairs before you try to start walking towards it.

     

    With your sleeps, check out the methods sleepUntil() and sleepWhile(). Helps if you want to speed up certain interactions.

     

    Look into switching up some of your while loops, the ordering may have your bot stalling in the same place instead of stepping along a path.

     

    Also for your gameobject queries (same with banker and booth), you can use lambdas to change things like

    stair = getGameObjects().closest("Staircase")

    with the checking actions and such on multiple lines after setting the object, to

    stair = getGameObjects().closest(GameObject -> GameObject != null && GameObject.getName().equals("Staircase") && GameObject.hasAction("Climb-up"));

    And then checking if stair is null before interacting.

     

    Those are just some small things but I don't really understand what you're saying is going wrong? Like is it trying to walk to bank and just getting stuck (possibly solved by checking if at/near an area before stepping)? Or is it constantly clicking in the same area and not progressing (possibly from calculation.random switches)? Or does it walk once and shut down?

    Posted

    Readability is a little bad; jumbled/unorganized, a lot of repetition, and honestly it's hard to read code in notepad sometimes. Try posting it on pastebin.

     

    Why are you using Calculations.random() to choose where to walk? If it's for antiban, that's not a good method longterm. It'll look like a bot when you're constantly clicking in the same area where you are, just because a calculations.random() returned a specific number.

     

    For your bank locations after stair climbing, might want to check that you're upstairs before you try to start walking towards it.

     

    With your sleeps, check out the methods sleepUntil() and sleepWhile(). Helps if you want to speed up certain interactions.

     

    Look into switching up some of your while loops, the ordering may have your bot stalling in the same place instead of stepping along a path.

     

    Also for your gameobject queries (same with banker and booth), you can use lambdas to change things like

    stair = getGameObjects().closest("Staircase")

    with the checking actions and such on multiple lines after setting the object, to

    stair = getGameObjects().closest(GameObject -> GameObject != null && GameObject.getName().equals("Staircase") && GameObject.hasAction("Climb-up"));

    And then checking if stair is null before interacting.

     

    Those are just some small things but I don't really understand what you're saying is going wrong? Like is it trying to walk to bank and just getting stuck (possibly solved by checking if at/near an area before stepping)? Or is it constantly clicking in the same area and not progressing (possibly from calculation.random switches)? Or does it walk once and shut down?

    Awesome thank you for that response! 

    love the feed back :D

    As for whats going wrong. Im starting with a full inventory to access the bank method. the script will start to move in the right direction, but then the whole client freezes, and my computer becomes laggy. Eventually a java pop up says the client has become unsresposnive, and asks if i would like to shut down. Even if i stop the script, the client is still incredibly slow, and i have to restart the whole thing and login again. =/ basically in game the character moves like 3-10 tiles and then the game screen freezes. 

    Posted

    To solve that you'd have to take into account where you already are and what's being called. Honestly because the whole method is jumbled between walking and banking, you could split it up into a walk method and a banking method, where the banking one is only called and executing when you're for-sure at the bank area. Might help you debug.

     

    As for it going unresponsive and crashing, that's usually in response to an infinite loop. Things like:

    while(!bank1stFStaircase.contains(getLocalPlayer())){
                        sleep(250);
                    }

    would cause an infinite loop because in that while loop you're not doing anything that could change the status that would determine if it's going to be executed again. The loop will only execute if it's not at the bank1stFStaircase and if that's true, it'll sleep forever (in intervals of 250). That's why I said look into switching up some of your ordering with while loops, or they'll have your script stall ;)

     

    Edit: @@EncoreAspire That quote actually sounds exactly like what is going on. Look at your code right around there. You have the character walk somewhere, and then sleep indefinitely - which sounds like what you're saying the problem is.

    Posted

    To solve that you'd have to take into account where you already are and what's being called. Honestly because the whole method is jumbled between walking and banking, you could split it up into a walk method and a banking method, where the banking one is only called and executing when you're for-sure at the bank area. Might help you debug.

     

    As for it going unresponsive and crashing, that's usually in response to an infinite loop. Things like:

    while(!bank1stFStaircase.contains(getLocalPlayer())){
                        sleep(250);
                    }

    would cause an infinite loop because in that while loop you're not doing anything that could change the status that would determine if it's going to be executed again. The loop will only execute if it's not at the bank1stFStaircase and if that's true, it'll sleep forever (in intervals of 250). That's why I said look into switching up some of your ordering with while loops, or they'll have your script stall ;)

     

    Edit: @@EncoreAspire That quote actually sounds exactly like what is going on. Look at your code right around there. You have the character walk somewhere, and then sleep indefinitely - which sounds like what you're saying the problem is.

    ahh I see thanks a bunch man! cant wait to load the client up again :P

    Posted

    ahh I see thanks a bunch man! cant wait to load the client up again :P

    I am ready to help you out with all your questions. I've been on the same boat as you are, and it's frustrating if you can't find the answer you are looking for. I've had many questions when i started scripting, but only a few got answered.. The rest of them i had to figure out myself.

     

    So PM me with anything you desire :)

    Posted

    I am ready to help you out with all your questions. I've been on the same boat as you are, and it's frustrating if you can't find the answer you are looking for. I've had many questions when i started scripting, but only a few got answered.. The rest of them i had to figure out myself.

     

    So PM me with anything you desire :)

     

    The best dev support sections are the ones that only answer some of the questions honestly. Helped me learn to debug my own code much better than I thought I knew how to.

    Posted

    The best dev support sections are the ones that only answer some of the questions honestly. Helped me learn to debug my own code much better than I thought I knew how to.

    Agreed.

     

    But if you have 0 clue of what is going on, then you need a helping hand in order to go on :P

    Posted

    I am ready to help you out with all your questions. I've been on the same boat as you are, and it's frustrating if you can't find the answer you are looking for. I've had many questions when i started scripting, but only a few got answered.. The rest of them i had to figure out myself.

     

    So PM me with anything you desire :)

    You definitely weren't hanging out in chat enough :P

    Archived

    This topic is now archived and is closed to further replies.

    ×
    ×
    • Create New...

    Important Information

    We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.