Page 1 of 6 123 ... LastLast
Results 1 to 25 of 139

Thread: How to script for a RSPS - Beginner level

  1. #1
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default How to script for a RSPS - Beginner level

    Hello, I am Officer Barbrady I can currently script for RSPS's (Finally finished this guide March 18th lol). Now some SRL people may ask "why?" Well, botting is botting, and if a task is boring enough then, well it needs to be done!

    (some parts of this guide are being re-written)

    Credits:[Multiple people in different areas of tutorial]
    @Flight TPA function
    @DannyRS Project 2006 Include + GetText Function + like 500 other things
    @Sin Helped me with something.. I forgot
    @NKN Helping me with stuff
    @Le Jingle Helping me with stuff
    @SjoekeloeHelping me with stuff



    NOTE: You will have to know some basic scripting knowlege because I will not be going over the bare basics, this is just a guide on how to bot on servers in general.
    I suggest you visit @YoHoJo's tutorials: Tutorial #1Tutorial #2
    Older SRL People: let me know if I missed anything in this tutorial

    Most tutorial's on here are directed towards botting on Runescape. This means that a lot of the srl include will be unusable for the private server you want to bot on.

    I am going to come out and say it, I am not expert scripter, no benland10 but I can help you start out your way to botting on a RSPS to do what ever task you need to be done!

    Table of contents
    - Introduction
    - Clicking a color
    - Using bitmaps
    - Using DTM's
    - Making a good Writeln
    - Basic Walking - More to Come
    - Closing words


    ----Introduction----
    First off we always want to include SRL just so we can use mmouse because you never know if a server can detect mouse jumping AND it just looks better. Also, you may think 'Oh it's just a RSPS I don't need to add fail-safes' WRONG. On a private server, chances are someone sees you standing around in a area for 15 hours they are going to call a mod and ban you unlike in Runescape were you would just be reported and chances are you won't be banned. Second off, Bitmaps are your friend, To be honest you can't make a decent script without them or with the help of fonts


    ----Clicking a color----

    If you are completely new to scripting then you will want to start here. Using static coords are just not good enough to I will teach you how to click a color incase you don't already know how. I would advise you read some basic tutorials on the pascal language before getting started here.

    First we are going to want to define SRL

    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Begin
    SetupSRL;
    end.

    Next make a procedure and define X and Y for simba to store were it finds the colors:

    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
    end;
    Begin
    SetupSRL;
    end.


    here is the code that will click a color:

    Simba Code:
    FindColorTolerance(X, Y, COLOR, X, Y, X2, Y2, TOL)
    The first X and Y is were the script will store the variables that we will use to position our click, the XStarts and YStarts are the Co-Ords of the screen range were you want to find the color inside.


    now you want to click a color. So in my example I am going to use a maple tree because it has some nice unique colors(and it's good XP hehe)

    Use the color picker a select a nice unique color (like the red) like so:



    Now put the color in the code above were a put color, and use the color picks to pick the coords to were you want to search for that color. So if i wanted to find the color 10336 in this box:



    The color finding code would look like:

    Simba Code:
    FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5)

    the 5 at the end is the tolerance, so it will be more easy to find the color because the colors are always changing in the cleint whether it is on purpose or not.

    So far, your script:
    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5)
    end;
    Begin
    SetupSRL;
    end.

    Find the color 10336 in that area of the screen above with a tolerance of 5.

    Now we want the script to click it!

    This is simple, After the find color code, you add this
    Simba Code:
    mmouse(x, y,1,1); // moves the mouse to were the colot is found
      wait(250); // waits one fourth of a second
      ClickMouse(X, Y, mouse_Left)// clicks

    Congratz! You have now made a script that clicks a color!

    Now we want to add some failsafes. So were you see find color tolerance add a if before it and then after it and on the next line add begin like so:

    Simba Code:
    if FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5) then
      begin

    So now your script should look like:

    Simba Code:
    Program ChopTree;
    {$i srl/srl.simba}
    Procedure ClickTree;
    var
      X,Y:Integer;
    begin
      if FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5) then
      begin
        mmouse(x, y,1,1);
        wait(250);
        ClickMouse(X, Y, mouse_Left)
      end;
    end;
    Begin
    MouseSpeed := 15;
    SetupSRL;
    end.

    what the script now does is,sets the mouse speed to 15, finds the color 10336 in the selected area, and if it does not find it then it does not move or click the mouse.


    -----Using bitmaps-----

    Bitmaps are great for botting on private servers. Why? Because you don't have acess to the SRL uptext NOOB . Anyway here is how you can use bitmaps to click on a image.But first I will go over were to use, and not to use bitmaps.Bitmaps are for more precise clicking for more static area such as well.. options

    BAD PLACES TO USE BITMAPS:

    - For clicking a object such as a tree, there are a million better ways to do this
    - For clicking a item in the inventory, leave this to DTM's
    - For check for a HP bar in combat

    GOOD PLACES TO USE BITMAPS

    - To choose the drop option on a object
    - To choose any option on a NPC or Object
    - If DTM's are not accurate enough for clicking an item (such as getting super attack 3's confused with super attack 4's)
    - To check if the character is logged in

    Lets get started, first you have to define a variable in which the bitmap will be stored. So I am going to do this here, I will be using dropping a maple log as an example:

    Simba Code:
    Program BitmapExample;
    var
      Drop:Integer;
    Begin
    end.

    So your probably asking ' how do I get a bitmap' well, anybody with a IQ above 7 can do this so here are the easy steps:

    1) Find the bitmap you want to click and take a screenshot using print screen. I will do this by right clicking a maple log and clicking print screen. Make sure you don't hover over the option overwise it will mess it up.

    2) Paste the screenshot into paint and select the area you want to click like so:



    Select the area and paste it into paint, my bitmap looks like this:



    Next, save it, but make sure you save it as A 24 BITMAP IMAGE LIKE SO:



    Now we want to convert this to a bitmap using simba so go to tools --> Bitmap conversion like so:



    Next go to open, find the file, and hit ' To String ' simba will output a bunch of random letters and numbers in the debug box. Mine looked like:

    Simba Code:
    Bmp := BitmapFromString(97, 7, 'meJzNVNsNgDAIZJD+96NLOKI/7uI' +
            'ErqWNTRoCPfo0kfBBzkPgSut8OM4rOhE5H9b6tt9FH6vVmztTSziX' +
            'KMXJBUGABq6b1IHWEGmLRka5vfwqjiSi1/jXaFwNhKMmE5MjOc64y' +
            'EK4wUHVh2sJEcTgaMfs2F5142T1OANxVaL2/9hbxMt9J5E+wd5xuL' +
            'bLJcqb/weJZuJsjRdtYBvRy6M5RabGV100vSF2ri2R4PNuqz08aX+' +
            'C5w==');

    Next, you want to add this into your script in the main execution (Atleast thats how I do it) like so:

    Simba Code:
    Program BitmapExample;
    var
      Drop:Integer;
    Begin
    Drop := BitmapFromString(97, 7, 'meJzNVNsNgDAIZJD+96NLOKI/7uI' +
            'ErqWNTRoCPfo0kfBBzkPgSut8OM4rOhE5H9b6tt9FH6vVmztTSziX' +
            'KMXJBUGABq6b1IHWEGmLRka5vfwqjiSi1/jXaFwNhKMmE5MjOc64y' +
            'EK4wUHVh2sJEcTgaMfs2F5142T1OANxVaL2/9hbxMt9J5E+wd5xuL' +
            'bLJcqb/weJZuJsjRdtYBvRy6M5RabGV100vSF2ri2R4PNuqz08aX+' +
            'C5w==');
    end.

    Now you want simba to click on it, the code to find bitmaps is:

    Simba Code:
    FindBitmapToleranceIn(BITMAP, X, Y, X1, Y1, X2, Y2, TOL)

    So add that in the procedure, but add failsafes like you did with color so it would look like:

    Simba Code:
    Program BitmapExample;
    {$i srl/srl.simba}
    var
      Drop:Integer;
    Procedure DropLog;
    var
      X,Y:Integer;
    begin
    if FindBitmapToleranceIn(Drop, X, Y, 561, 226, 738, 484, 145) then
      begin
        mmouse(x, y,1,1);
        wait(250);
        ClickMouse(X, Y, mouse_Left)
      end;
    end;
    Begin
    Drop := BitmapFromString(97, 7, 'meJzNVNsNgDAIZJD+96NLOKI/7uI' +
            'ErqWNTRoCPfo0kfBBzkPgSut8OM4rOhE5H9b6tt9FH6vVmztTSziX' +
            'KMXJBUGABq6b1IHWEGmLRka5vfwqjiSi1/jXaFwNhKMmE5MjOc64y' +
            'EK4wUHVh2sJEcTgaMfs2F5142T1OANxVaL2/9hbxMt9J5E+wd5xuL' +
            'bLJcqb/weJZuJsjRdtYBvRy6M5RabGV100vSF2ri2R4PNuqz08aX+' +
            'C5w==');
    DropLog;
    end.

    Now, as you noticed this did not drop the log, because it could not find the bitmap because the log was not right clicked, so make the script right click the log, search for the bitmap and click it, like so:

    Simba Code:
    Program BitmapExample;
    {$i srl/srl.simba}
    var
      Drop:Integer;
    Procedure DropLog;
    var
      X,Y:Integer;
    begin
    if FindColorTolerance(X, Y, 605787, 561, 226, 738, 484, 5) then
    begin
      mmouse(x, y,1,1);
      wait(250);
      ClickMouse(X, Y, mouse_Right)
      wait(450);
        if FindBitmapToleranceIn(Drop, X, Y, 561, 226, 738, 484, 145) then
        begin
          mmouse(x, y,1,1);
          wait(250);
          ClickMouse(X, Y, mouse_Left)
        end;
      end;
    end;
    Begin
    MouseSpeed := 15;
    Drop := BitmapFromString(97, 7, 'meJzNVNsNgDAIZJD+96NLOKI/7uI' +
            'ErqWNTRoCPfo0kfBBzkPgSut8OM4rOhE5H9b6tt9FH6vVmztTSziX' +
            'KMXJBUGABq6b1IHWEGmLRka5vfwqjiSi1/jXaFwNhKMmE5MjOc64y' +
            'EK4wUHVh2sJEcTgaMfs2F5142T1OANxVaL2/9hbxMt9J5E+wd5xuL' +
            'bLJcqb/weJZuJsjRdtYBvRy6M5RabGV100vSF2ri2R4PNuqz08aX+' +
            'C5w==');
    DropLog;
    FreeBitmap(Drop);
    end.

    Make sure you always free your bitmaps, otherwise your computer will clog up:

    Simba Code:
    FreeBitmap(Drop);



    -----Using DTM's-----

    DTM's are just like bitmaps, and are by far the most useful thing when finding a object in the inventory. You may be thinking: Wow, why would I use a DTM when I can use color? Well sometimes colors can be mixed up and you can get a lot of matching colors and not be able to find your object accurately.Lets say you wanted to drink super attack 4's so then you can use them to make extreme attacks, with pure color there would be no way to tell the difference between a super attack 3 and a super attack 4. You can see that here,the matching colors are in red (tolerance of 7):



    As you can see, the bot would be clicking the super attack 3's thinking they are 4's. This is were DTM's come in handy, here is a picture if I use DTM's(matching DTM's in red):



    As you can see DTM's are a lot more accurate then just using color. Now I will teach you to use DTM's, by the way using them is the script is almost the same as bitmaps!

    First off, to use DTM's you have to enable the DTM editer like so:



    Now that we have that enabled, open it up by going to tools ----> DTM editor:



    At the top go to image---> Load cleint image.

    Now create some points for the DTM! But make sure you change the tolerance otherwise your DTM won't work good:



    Example:



    Your almost done!
    Next, at the top press 'DTM' and then press 'Print DTM' You should get a bunch of random letters and numbers in the debug box. Now we are going to need these later to add to your script:


    Now your mind be wondering 'wut how i use dtm in my script'? Well it's simple just like Bitmaps, here is a example, you have to declare the DTM name as a integer,and you have to free it:

    Simba Code:
    Program DTM;
    {$i srl/srl.simba}
    var
      BlueCharm:Integer;
    Procedure ClickCharm;
    var
      X,Y:Integer;
    begin
      if FindDTM(BlueCharm, x, y, 554, 230, 732, 482) then
      begin
      mmouse(x, y, 1, 1);
      wait(randomrange(100, 200));
      clickmouse2(mouse_Left);
      wait(randomrange(150, 250));
      end;
    end;
    Begin
    SetUpSRL;
    BlueCharm := DTMFromString('mggAAAHicY2NgYHBjYmDwAGI/IPYGYgco/gmU+8wAof9D8VcgFhEQYCia2IWBOYFy2DAjDgwBAPOxD8M=');
    ClickCharm;
    FreeDtm(BlueCharm);
    end.

    Congratulations! You have hopefully learned how to click a DTM!

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    MAKING A GOOD WRITELN/EASY TO USE SCRIPT

    This section I will cover how to make your script easy to use for yourself and other people, and also how to make it look better and more informative. I am first going to start off with user input, unfortunately i cannot teach you how to use a T-form, and even if I could i think it is to complicated for the purpose of a short script. I will be teaching you how to use input query so the script will stop when X amount of resources are collected or it could be used for other things.

    First off here is the code for input query:

    Simba Code:
    If (InputQuery('Enter Time between Herb clean', 'Enter time[In Miliseconds]:' , HerbWait)) Then

    HerbWait is the variable it edits, which would be declared as a global variable (string) at the start of the script.


    This would look like:




    Now to use this, above it asks how many milliseconds the user wants to wait inbetween clicks and they enter a number. that number is then saved a string. in order to use it for it's purpose which is to wait we have to convert it to a integer like this:

    Simba Code:
    StrToInt(HerbWait)

    So an example of me using this would be:

    Simba Code:
    Wait((StrToInt(HerbWait)+1)  + Random(50));

    Now there more we can do with input query, we can also make the user input how many they want to clean:

    Simba Code:
    If (InputQuery('How many herbs would you like to clean', 'Enter Amount:' , HowManyClean)) Then

    This would be right after the input query above, and then in the repeat part of the script you can add this:

    Simba Code:
    repeat
     WithDrawHerbs;
     until (StrToInt(HowManyClean)) <= HerbsCleaned;

    This repeats the script until all the herbs are cleaned.


    Now you are probalbly wondering 'how do i make a good writeln' Well, first you better know how to properly count how many logs are cut or how many fish are fished. there is a simple way to do this:

    1) Declare a variable as a integer
    Simba Code:
    HerbsCleaned:Integer;

    2) Now in order to add to that variable you just use the code

    Simba Code:
    IncEx(HerbsCleaned, 1);

    3) In order for it to calculate correctly, make it add to the variable after the item is dropped or banked, so in my cleaning procedure when ever the herb is clicked it adds 1 to the herbscleaned variable:

    Simba Code:
    if FindDTM(GrimyWeed, x, y, 652, 212, 685, 460) then
         begin
          mmouse(x, y,1,1);
          Wait((StrToInt(HerbWait)+1)  + Random(50));
          ClickMouse(x, y, mouse_Left);
          IncEx(HerbsCleaned, 1);
          Wait((StrToInt(HerbWait)+1)  + Random(50));

    One more then before I teach you how to make a halfway decent writeln, to add a decent timer, add this in the repeat part of your script:

    Simba Code:
    SetScriptProp(SP_WriteTimeStamp, [True]);

    This will have the time to the left of the Writeln.

    Now, what you have been waiting for, how to make a decent writeln. First off, the point of a Writeln is for you or the user to check the script and see what it's doing, it's progress, and how long it's been running. You want to make the Writeln as easy to read as possible, here are a few examples, and remember always add "ClearDebug;" before each writeln otherwise it spams the debug box and looks straight up tacky

    Code:
    [0:00:18]: ******************************
    [0:00:18]: Officer Barbrady HerbCleaner Version 1.0
    [0:00:18]: Status: Cleaning herbs . . .
    [0:00:18]: Herbs Cleaned:5 |995 Left|
    [0:00:18]: Herblore XP Earned:5000
    [0:00:18]: ******************************
    Source:
    Simba Code:
    ClearDebug;
      status := ('Storing Herbs.');
      Writeln(Officer Barbrady  HerbCleaner Version 1.0');
      Writeln('
    Status: ' + Status + '.');
      Writeln('
    Herbs Cleaned:' + IntToStr(HerbsCleaned) + ' |'
      + IntToStr(StrToInt(HowManyClean)-HerbsCleaned) + '
    Left|');
      Writeln('
    Herblore XP Earned:' + Tostr(HerbsCleaned*931));


    -----------------------------------------------------------------------------

    Code:
    [0:00:18]:********************************
    [0:00:18]:Officer Barbrady  Potion Drinker Version 2.2
    [0:00:18]:Status:Withdrawing Potions
    [0:00:18]:Potions Drank:100
    [0:00:18]:Goal:[5000]|4900 Left to drink| [0%]
    [0:00:18]:********************************
    SourceThis one is a bit complicated haha)
    Simba Code:
    ClearDebug;
        status := ('Storing Potions');
        Writeln('********************************')
        Writeln('Officer Barbrady Potion Drinker Version 2.2')
        Writeln('Status:' + status + '');
        Writeln('Potions Drank:' + IntToStr(PotsDrank) + '');
        WriteLn('Goal:' + '[' + HowManyDrink + ']' + '|'
        + IntToStr(StrToInt(HowManyDrink)-PotsDrank) + ' Left to drink| ['
        + IntToStr(Round(PotsDrank * 1.0 / StrToInt(HowManyDrink)*100)) + '%]');
        Writeln('********************************')



    -----------------------------------------------------------------------------

    Code:
    [0:00:18]**********************************
    [0:00:18]Officer Barbrady  IRON MINER 1.12')
    [0:00:18]Status:Mining . . .
    [0:00:18]Ores mined:1 
    [0:00:18]XP gained:1000 
    [0:00:18]Smoked rocks:0
    [0:00:18]**********************************
    Source:
    Simba Code:
    ClearDebug;
        status := ('Dropping ores.');
        WriteLn('**********************************')
        WriteLn('Officer Barbrady  IRON MINER 1.12')
        Writeln('Status: ' + status)
        Writeln('Ores mined:' + IntToStr(Round(oremined)))
        Writeln('XP gained:' + IntToStr(Round(oremined*1050)))
        Writeln('Smoked rocks:' + IntToStr(Round(smokes2)))
        WriteLn('**********************************')



    As you can see all these Writeln's are easy to read, informative, and have a couple extra features such as % finished. To make a status for your script visit this thread:http://villavu.com/forum/showthread.php?t=94915
    A good way to save space is to write a Procedure for the writeln and call it everytime you want to update. For example, I have the writeln Procedure here:
    Simba Code:
    Procedure WriteDebug;
    begin
      ClearDebug;
      Writeln('*****************************');
      Writeln('Status:' + Status + '');
      Writeln('Spice steals:' + IntToStr(Stole_Spice) + '');
      Writeln('Ruby steals:' + IntToStr(Stole_Ruby) + '');
      Writeln('Runs:' + IntToStr(Runs) + '');
      WriteLn('Goal:' + '[' + How_Steal + ']'
      + '|' + IntToStr(StrToInt(How_Steal) - Steals)
      + ' Left to steal| ['
      + IntToStr(Round(Steals * 1.0 / StrToInt(How_Steal) * 100)) + '%]');
      Writeln('*****************************');
    end;

    And when I want to update it I just do:

    Simba Code:
    WriteDebug;

    This is pretty much it, theres not much more I can teach you about this since the source is above.

  3. #3
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Basic walking

    - Reconstructing

    I'm going to be honest I am not very good at walking and I only know of 1 way to do it so I will teach you the most I know. This walking method is semi-reliable if you are going to be clicking 1 point on the minimap, but for walking long distances I would not advise it AT ALL.

    This walking method is called DTM walking (I think?) The command for walking with the method is this:


    Simba Code:
    ClickDTMRotatedIn(DTM_1, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);

    Looks complicated right? Not really, now first off copy this basic script to test it out:

    Simba Code:
    program Test;
    {$I srl/srl.simba}
    var
    DTM_1:integer;
    begin
    MouseSPeed := 15;
    DTM_1 := DTMFromString('mQwAAAHicY2ZgYFjLxMBQDsQngLgCyLcHYn8gLs/PY8isngum+YF8GGZEwkAAADWpB1U=');



    ClickDTMRotatedIn(DTM_1, MMX1,MMY1, MMX2,MMY2, -Pi, Pi, Pi/30, [], mouse_Left);
    Wait(2500);
    while (IsMoving) do
    wait(100);

    FreeDTM(DTM_1);
    end.

    Chances are it did not do anything, well that is because you have to make a DTM of were you want to walk on the minimap. So open up the DTM editor and make a DTM of were you want to walk. When you make it, make sure you use a high tolerance (15-20) and pick a central point and then spots that won't be walked on like this:



    Next, in the DTM editor click "show matching DTM's and you will see red markers over the matching DTM's like so:



    Make sure that it shows plenty of matching DTM's otherwise the bot will not be able to find the spot next time you try. Now click print DTM and replace the DTM in the code to the one you just made. Now hit run and it should walk to that spot on the minimap! You have now learned basic walking! I only advise you to use this if your going to be walking 1 - 2 clicks on the minimap it is NOT a very reliable way to walk.


    Closing

    This concludes the tutorial, overall scripting for a RSPS is challenging because you have to make your own functions or just use a unreliable script, I hope this helped you. If you have any suggestions, or think something needs to be worded better or have a grammar mistake please state it below

  4. #4
    Join Date
    Nov 2012
    Posts
    2,351
    Mentioned
    55 Post(s)
    Quoted
    603 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    Here is the code that will Find a Color:

    Code:
     FindColorTolerance(X, Y, COLOR, XStart, YStart, XEnd, YEnd, TOL)
    The first X and Y is were the script will store the variables that we will use to position our click, the XStarts and YStarts are the Co-Ords of the screen range which you want to find the color inside.
    Think this part is better worded like this so its less confusing for new Scripter's?

    Haven't read the rest yet but Good Job


    Programming is like trying keep a wall of shifting sand up, you fix one thing but somewhere else starts crumbling

  5. #5
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by DannyRS View Post
    Think this part is better worded like this so its less confusing for new Scripter's

    Haven't read the rest yet but Good Job
    thanks lol didn't know how to word it

  6. #6
    Join Date
    Apr 2007
    Location
    Netherlands
    Posts
    427
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    omg i fuckng love you ! this is just what i needed

  7. #7
    Join Date
    Jan 2013
    Posts
    36
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Looks neat, i'll be studying this after im done with the main scripting tutorial for simba.

  8. #8
    Join Date
    Dec 2012
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks this helped me start

  9. #9
    Join Date
    Dec 2012
    Posts
    87
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Eagerly awaiting the TPA guide as the other ones don't make a lot of sense. Great work so far, wish this was here when I started would have saved me a lot of messing around.

  10. #10
    Join Date
    Jan 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    All the numbers and x and y and everything is very complicated , could you please simplify it?

  11. #11
    Join Date
    Jan 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Great guide, it is really helping me out so far.

    edit: i fixed my problem
    Last edited by jmu2; 01-14-2013 at 03:39 PM.

  12. #12
    Join Date
    Jul 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    FindColorTolerance(X, Y, COLOR, X, Y, X2, Y2, TOL)

    how do you gain the X,Y,X2,Y2 values?

    FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5)

  13. #13
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by gstar View Post
    FindColorTolerance(X, Y, COLOR, X, Y, X2, Y2, TOL)

    how do you gain the X,Y,X2,Y2 values?

    FindColorTolerance(X, Y, 10336, 277, 169, 326, 218, 5)
    Using the pick color you get the top left coords and the bottom right coords.


    @pew going to add tapas later

  14. #14
    Join Date
    Jan 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    I followed the very first part of your tutorial, but whenever I hit run, it does nothing and tells me it executed successfully.

  15. #15
    Join Date
    Mar 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by TuSaliHai View Post
    I followed the very first part of your tutorial, but whenever I hit run, it does nothing and tells me it executed successfully.
    Make sure you add the Procedure into the Main Loop. Also make sure your colors and other information is correct. RSPS are tricky to script for, but once you figure out whats what, it isn't that bad.
    Good luck on figuring out how to make it work!

  16. #16
    Join Date
    Jan 2013
    Posts
    9
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by Elip007 View Post
    Make sure you add the Procedure into the Main Loop. Also make sure your colors and other information is correct. RSPS are tricky to script for, but once you figure out whats what, it isn't that bad.
    Good luck on figuring out how to make it work!
    That's exactly what it needed, thank you!

  17. #17
    Join Date
    Mar 2012
    Location
    Canada
    Posts
    442
    Mentioned
    4 Post(s)
    Quoted
    67 Post(s)

    Default

    great guide, i found a couple helpful tips for scripting on normal rs in here too

  18. #18
    Join Date
    Oct 2006
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Quote Originally Posted by Elip007 View Post
    Make sure you add the Procedure into the Main Loop. Also make sure your colors and other information is correct. RSPS are tricky to script for, but once you figure out whats what, it isn't that bad.
    Good luck on figuring out how to make it work!
    I made sure the procedure was in the main loop. All my colors are right, but it still wont do anything but successfully execute. I made sure to even target the client. Tried websites as well on 3 different browsers. please help?
    the only difference is i made mine into a power miner.

  19. #19
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by lilsaint20 View Post
    I made sure the procedure was in the main loop. All my colors are right, but it still wont do anything but successfully execute. I made sure to even target the client. Tried websites as well on 3 different browsers. please help?
    the only difference is i made mine into a power miner.
    Can we see the code?

  20. #20
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    updated with TPA's Writeln's and dropping methods.

  21. #21
    Join Date
    Mar 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    10 Post(s)

    Default

    Quote Originally Posted by lilsaint20 View Post
    I made sure the procedure was in the main loop. All my colors are right, but it still wont do anything but successfully execute. I made sure to even target the client. Tried websites as well on 3 different browsers. please help?
    the only difference is i made mine into a power miner.
    You should upload the code so we could help you out that way.
    Make sure you have "SetUpSRL;" That can be a problem if you don't have it.

  22. #22
    Join Date
    Feb 2012
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Very helpful thanks

  23. #23
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Very helpfull! Can you create a tutorial on how to NOT use static coords? I've seen that in some scripts they used the DTM editor to do this, can you tell how? I'd really appreciate it! Thanks!

  24. #24
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by Dormik View Post
    Very helpfull! Can you create a tutorial on how to NOT use static coords? I've seen that in some scripts they used the DTM editor to do this, can you tell how? I'd really appreciate it! Thanks!
    What do you mean not use static coords...

  25. #25
    Join Date
    Jan 2013
    Posts
    49
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by rjj95 View Post
    What do you mean not use static coords...
    I mean walking using DTM.
    Q[1] := DTMFromString('mwQAAAHic42RgYKhlYmCoA+JKIK4A4moovw mIG4C4EYhrgeqagbiRAcKuAOJyIK4C4jogbgLi5ERlhu6OPDiO S1ZmSExTBovHRSqCxf4D1fETwIxEYDgAAPZSFOM=');
    And then making a procedure with it;
    procedure WalkToSomething;
    begin
    If FindDTMRotated(Q[1], X, Y, 0, 0, 0, 0, -Pi/4, Pi/4, Pi/60, aFound) Then
    Begin
    Mouse((X - 5), (Y + 15), 6, 10, True);
    Repeat
    Wait(50 + Random(25));

    Until FindDTMRotated(Q[0], X, Y, 0, 0, 0, 0, -Pi/4, Pi/4, Pi/60, aFound);
    end;

Page 1 of 6 123 ... LastLast

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
  •