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

Question Feedback/Help

Discussion in 'Developer Support' started by Zulander69ni, Sep 13, 2017.

  1. Zulander69ni

    Joined:
    Sep 6, 2017
    Messages:
    9
    Likes Received:
    0
    My first RuneMate script bot is posted below, to pastebin. It's a called Chop N' Burn and it's supposed to chop trees and then burn the logs on a bonfire.

    ChopNBurn - Pastebin.com

    My BURN state works but rarely - in that most of the time there are misclicks etc.

    If you guys could give me some pointers on the code I have written and how to get it working without lots of flaws It'd be greatly appreciated.

    Thanks
     
  2. Zulander69ni

    Joined:
    Sep 6, 2017
    Messages:
    9
    Likes Received:
    0
  3. Derk

    Derk 12 year old normie

    Joined:
    Jan 8, 2015
    Messages:
    2,766
    Likes Received:
    1,339
    Switch/case bots are frowned upon. If you want to split your execution based on some sort of validation, use either TaskBot (looping through tasks) or TreeBot (binary tree structure).

    Also your code needs a lot of improvement to avoid nullpointers with Players and GameObjects. Also to improve efficiency you can store a lot of things you're querying multiple times at the moment.

    I suggest using the devchat on Slack if you're confused about any of this.
     

Share This Page

Loading...