Question Working on a construction bot.

Discussion in 'Developer Support' started by janharmveenstra, Jul 28, 2016.

  1. janharmveenstra

    Joined:
    Jan 13, 2016
    Messages:
    60
    Likes Received:
    5
    Hallo,

    I am new with writing a bot. but i going to try it anyway. i have a small set up:

    public void onLoop() {
    if (atCastleWarsBank()){
    if (canTeleportToHouse()){
    teleportTohouse();
    }else {
    if (Bank.isOpen()) {
    Bank.withdraw(Oak plank, 28);
    }else {
    openbank();

    i want to make oak larders with this. But i dont know how to make oak larders and remove it again. and make it 3 times when out of oak planks. would some one help me?
     
  2. Party

    Party The Favourite

    Joined:
    Oct 12, 2015
    Messages:
    2,594
    Likes Received:
    1,123
    You should join the development Slack channel, Slack
     
  3. janharmveenstra

    Joined:
    Jan 13, 2016
    Messages:
    60
    Likes Received:
    5
    i dont know how i can join, because email didnt work.
     
  4. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,213
    Likes Received:
    201
    Goodluck man, perhaps you can check if interface is open and the larder is made to remove it and otherwise to make it.
     
  5. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,935
    Likes Received:
    853
    You'll mainly need to get 2 things:
    - Get the GameObject of the building spot.
    - Get the interfacecomponents of the building interface.

    If the building spot has the larder, remove it.
    If there is no larder there, make the larder.

    Not entirely sure what you mean by "make it 3 times when out of oak planks".
     
  6. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,213
    Likes Received:
    201
    You can make three larders from 24 planks (3x8).
     
    janharmveenstra likes this.
  7. SlashnHax

    SlashnHax The Chosen One

    Joined:
    Dec 10, 2014
    Messages:
    2,935
    Likes Received:
    853
    So I guess he means he wants to make it bank when he has less than 8 planks? That should be easy enough for him to figure out :p
     
    janharmveenstra likes this.
  8. janharmveenstra

    Joined:
    Jan 13, 2016
    Messages:
    60
    Likes Received:
    5
    its harder then i thoughtXD. i work on it later. maybe tomorrow.

    how can i test it. i dont know how i can get the script bot in runemate
     
  9. Geashaw

    Joined:
    Jan 8, 2015
    Messages:
    1,213
    Likes Received:
    201
    Think so, although I'd suggest using a butler by investing some money to make him do the banking. Je suis lazy..
     

Share This Page

Loading...