1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question Speeding up a bot?

Discussion in 'Developer Support' started by RiceNice, Feb 17, 2017.

  1. RiceNice

    Joined:
    Feb 15, 2017
    Messages:
    11
    Likes Received:
    3
    First of all, hello hello. I'm new to making or even using Runescape botting and don't have great programming knowhow, but this program is neat as hell and I'm hooked. Expect to see some bots from me in the future, I think :)

    Anyway, after a lot of time getting my head around how to use Runemate, I made myself a bot that processes wood into planks without breaking. Cool. However, the bot is pretty crazy slow at points. Rather, there's seemingly huge delays before it takes in the many little actions it needs to do: clicking yes on dialog boxes, entering the amount of logs to saw, etc. The actual processing of an inventory of logs on a sawmill is super quick in comparison to the 'build up', and so there's a massive amount of wasted time per inventory. As a result, the bot is processing 2000 logs per hour (ish) instead of the 9000-10000 a human going fast as possible could manage.

    So, basically, I'm wondering if the inherent(?) delay before the bot starts an interaction with the world/client can be tuned. There are 0 Execution.delay or similar calls, and my loop delay is set to (100,150) -- if it even goes that low -- so I expected it to be flying, really.

    That's all. Forgive me if this was a noob question, I am new. Thanks.
     
    S Cript likes this.
  2. awesome123man

    awesome123man Go check out new bots and give helpful feedback.

    Joined:
    Jan 31, 2016
    Messages:
    5,413
    Likes Received:
    1,662
    Rs3? and also, what type of calls do you make? Interfaces.newQuery? and such? Also, try to save the results of a call rather than doing it more than once in a single loop of the bot.
     
    RiceNice likes this.
  3. RiceNice

    Joined:
    Feb 15, 2017
    Messages:
    11
    Likes Received:
    3
    RS3, yep. Now that you've mentioned there are a few redundant queries in there, especially GameObjects ones. How should I manage searching for interfaces and storing them? I'm finding them by what text they contain right now, and am doing that everytime I need to check if one is open. Should I do that the once per interface then store the ID and then pick them out using that?
     
  4. Hydration

    Joined:
    Feb 4, 2017
    Messages:
    7
    Likes Received:
    3
    I'm fairly new to coding bots for Runemate, but how I store my interfaces is:

    InterfaceComponent interface = Interfaces.newQuery().names("StringToSearchFor").results().first;


    As for searching for interfaces, I use Visual Developer on the bot store. Ctrl-Click on anything really to get info on it.
     
  5. Serene

    Serene ( ͡° ͜ʖ ͡°)

    Joined:
    Mar 30, 2015
    Messages:
    2,408
    Likes Received:
    508
    An InterfaceQuery is going to be slower than retrieving an interface via index.
    Interfaces.getAt(160,2)
    is faster than
    Interfaces.newQuery()......results().first();
     
  6. Aria

    Joined:
    Feb 26, 2015
    Messages:
    821
    Likes Received:
    286
    You can also check if the value of a varp/varpbit changes from 0 to some nonzero value while an interface is visible.
     
    Serene likes this.
  7. Hydration

    Joined:
    Feb 4, 2017
    Messages:
    7
    Likes Received:
    3
    TIL, thanks :)
     
  8. SlashnHax

    Joined:
    Dec 10, 2014
    Messages:
    3,212
    Likes Received:
    1,042
    Interfaces.getAt is also heavily discouraged. You can speed up your interface queries by a lot by specifying the possible containers, and the type.
     
    Serene likes this.

Share This Page

Loading...