• Log in or sign up for an account here: https://www.sythe.org/login

[TUT]Unmatched Beginner's Guide to Scripting Scar

How Helpfull

  • Unmatched/Perfect

    Votes: 169 59.1%
  • Needs a Little Improvement

    Votes: 50 17.5%
  • Vague/Hard to Follow

    Votes: 35 12.2%
  • Impossible/Needs Total Revision

    Votes: 32 11.2%

  • Total voters
    286
Status
Not open for further replies.
very very nice I knew only a little about scar but this makes it much mroe clear. I hope you see some of my scripts in the future. Also it was very well written. I had no problems with spelling errors and such. Thanks very much :) . Keep it real.
 
Hmm i have a question, If i wanted to get a image (Object) for the bitmap

Would i just Screen shot runescape, come the section and paste it on a black background?
 
Hmm i have a question, If i wanted to get a image (Object) for the bitmap

Would i just Screen shot runescape, come the section and paste it on a black background?

Yes, but try to make it as small as possible. Eliminate all the colors you don't need and shrink the background to just fit the picture.
 
I'm still not sure as how to get my mouse to move to a certain color. I know how to make my mouse move to a certain coordinate, but not how to move to a certain color. Right now I have this

begin
Wait(1000+random(2000));
Findcolor(x,y,2175795,124,214,635,546)
MoveMouseSmoothEX(x,y,0,0);
Mouse(x,y,0,0,true);
repeat

(thats just a fraction) but is there something wrong with that part of my script? When I try to run it, it says "Failed when compiling Line 18: [Error] (18:27): Invalid number of parameters in script" .
 
I'm still not sure as how to get my mouse to move to a certain color. I know how to make my mouse move to a certain coordinate, but not how to move to a certain color. Right now I have this

begin
Wait(1000+random(2000));
Findcolor(x,y,2175795,124,214,635,546)
MoveMouseSmoothEX(x,y,0,0);
Mouse(x,y,0,0,true);
repeat

(thats just a fraction) but is there something wrong with that part of my script? When I try to run it, it says "Failed when compiling Line 18: [Error] (18:27): Invalid number of parameters in script" .

I'm guessing that you are using SRL. If you are, then get rid of MoveMouseSmoothEx.

Code:
program ClickColor;

{.include SRL\SRL.scar}

var
  x, y: Integer;

begin
 if FindColor(x, y, color, 124, 635, 546) then
 begin
  Mouse(x, y, 0, 0, true);
 end;
end.

The error in your script is from MoveMouseSmoothEx. There are many more integers involved in the procedure.

procedure MoveMouseSmoothEx(x,y: integer; minsleeptime, maxsleeptime, maxdistance, gravity, forces: Integer)

You only have x, y, minsleeptime, and maxsleeptime.
 
Alright I took about 1 hour to read this whole guide. It is amazing. I never knew how to even write a script till now! I read over the functions over and over trying to remember them. I finally made a simple and easy login, but hey im a nooby scripter ^_^. It will click existing user type in username and pasword and logs you in. i know its nothing but it is a lot for me. This guide helped me like hell. I love it.
 
Awesome tut!!! It took me about 3 hours to try almost every example (besides the bitmap examples, just to lazy to do those and as you said, try to avoid them lol). I now understand alot about scar but I'm pretty sure theres more then just that :p

Thanks again!!!!!!!
 
ty for the guide it helps
i just got 1 prob,
i read the guide and started to make it wookcut trees and bank but everytime i go to see if it works i add end. and it comes up with identifier expetct here is the script can u try it and fish it and send to [email protected]

---------------------------------
here it is
---------------------------------


program randomwoodctter;

var
x,y: integer;

const
bankcolour= 3127755;
rockcolors= 2303520;
treemapcolors= 18449;

begin
if(findcolor(x,y,rockcolors,582,11,758,157)) then
begin
movemousesmoothex(x,y +random(0),20,40,45,25,20);
wait(1000+random(500));
clickmouse (x,y,true);

begin
if(findcolor(x,y,treemapcolors,582,11,758,157)) then
begin
movemousesmoothex(x,y +random(0),20,40,45,25,20);
wait(1000+random(500));
clickmouse (x,y,true);
end else
writeln('did not find rockcolor');
end.
 
Good Job, even though i dont play RS anymore i still think this is pretty good ;)
 
ty for the guide it helps
i just got 1 prob,
i read the guide and started to make it wookcut trees and bank but everytime i go to see if it works i add end. and it comes up with identifier expetct here is the script can u try it and fish it and send to [email protected]

---------------------------------
here it is
---------------------------------


program randomwoodctter;

var
x,y: integer;

const
bankcolour= 3127755;
rockcolors= 2303520;
treemapcolors= 18449;

begin
if(findcolor(x,y,rockcolors,582,11,758,157)) then
begin
movemousesmoothex(x,y +random(0),20,40,45,25,20);
wait(1000+random(500));
clickmouse (x,y,true);

begin
if(findcolor(x,y,treemapcolors,582,11,758,157)) then
begin
movemousesmoothex(x,y +random(0),20,40,45,25,20);
wait(1000+random(500));
clickmouse (x,y,true);
end else
writeln('did not find rockcolor');
end.

For each "begin" you have, you have to have an "end".
 
Whoa, nice guide. Extremely well detailed and hopefully I'll start making some scripts soon.
 
I don't understand DTMs (opposed to BMPs), could you enlighten me? :D

-- Nevermind, I didn't realise there was a "DTM Editor" option. It's all so much clearer now. . .
 
Two Factor Authentication User
Christmas 2015
Lawrence
Supporting Business
This guide is really AWSOME!!! I always wanted to script something myself, well, i made a bit of a auto-miner. I won't use it because it's a bit too simple.

But there's still 1 thing that's quite foggy, the 'var' with the x,y: integer;

I don't get that really well, I hope you can help me out, otherwise I search the site a bit.

Thx for making me better with SCAR
 
Status
Not open for further replies.
Runescape Gamblingrunescape gambling
Back
Top