Results 1 to 4 of 4

Thread: Couple of newbie questions

  1. #1
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Couple of newbie questions

    Hello in this thread I will post my newbie questions to the pros.

    1. What do these variables mean and what do they do?
    Code:
      TreeColors: array [0..3] of integer;
      TreeTPA: TPointArray;
      Chill, a, I: Integer;
    2. I have a script that chops trees, but when all trees around are chopped it stands there waiting for them to grow back, how do I make it go back to the area where he started or better yet, is there a way to define an area in which the bot will run around? I don't want it to start chopping trees in Lumbridge and end up in Varrock.

    3. Can anyone link me to a detailed scripting guide that is up to date? I've looked at a couple of them but they are from like 2008 and I'm not sure if all the functions etc. are still the same?

    Sorry for the nooby questions. I might add some more later as I go on with making my first script.

  2. #2
    Join Date
    Oct 2006
    Location
    Netherlands
    Posts
    3,285
    Mentioned
    105 Post(s)
    Quoted
    494 Post(s)

    Default

    Quote Originally Posted by Spandzbab View Post
    1. What do these variables mean and what do they do?
    Code:
      TreeColors: array [0..3] of integer;
      TreeTPA: TPointArray;
      Chill, a, I: Integer;
    This is different for every script. The creator of the script decides what variables are called and what they do. Four of those vars have a common function:

    TreeColors is an Array, which is basically a list. Probably a list of colors that are common on the tree it needs to find. It will search for them and locate the tree.

    TreeTPA I also an Array. This is an array of points. It usually contains the found pixels with the color specified in TreeColors. It is used to remember where to move the mouse.

    I is used a lot to loop through an array. For example for i := 0 to High(TreeColors) do. This will increase i for every color in the array.

    a is used less often, normally it is a variable with a bad name. It doesn't say what it does or what it is. It is used a lot in while loops or other loops to count a number of hits/finds.
    Working on: Tithe Farmer

  3. #3
    Join Date
    Feb 2012
    Location
    SRL Jail
    Posts
    1,319
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Spandzbab View Post
    2. I have a script that chops trees, but when all trees around are chopped it stands there waiting for them to grow back, how do I make it go back to the area where he started or better yet, is there a way to define an area in which the bot will run around? I don't want it to start chopping trees in Lumbridge and end up in Varrock.
    First of all, you will never end up in varrock as a result of tree misclicks...
    Your answer to your question? There are numerous ways of doing this! you could use Timeout Failsafes- after a certain amount of time, it will walk to a specific point. Or after you cut a certain amount of trees it walks to a certain point. Or if it doesn't find a tree it walks to a certain point... just search up failsafes in advanced search under tutorial island and you shall be educated

  4. #4
    Join Date
    Mar 2012
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Ok I've got the walking done.

    Now I want to add multiple tree choice to the script. At the moment it's designed to only chop normal trees. How do I add oaks, willows and maples to the script?

    I've been using ACA to find the color of the tree. If I put for example WillowTree: at the top of the script and then insert what I got from ACA, what do I have to do next?

    In the account settings there should be a line where the user inputs the name of the tree he wants to cut?

    How do I get the script to check for what the user input and then use it throughout the script?

    I'm sorry if you don't understand I find it really hard explaining it.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •