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

scripting tut!

Joined
Mar 9, 2008
Sythe Gold
0
Messages
720
I KNOW EVERYONE IS PROBABLY THINKING OMFG A TUT ON Sythe AND YEA ITS A TUT ON Sythe WELL HERE IT GOES

WELL FIRST YOU HAVE TO GET THE LATES SCAR/SRL INCLUDES AFTER YOU GET THAT PROCEED WITH THIS TUT

GETTING STARTED

I know bye know your probably thinking this is going to be hard but its not really i will provide you will the basic structure of scar scripting.

so when you first open scar you should see a lil something like this
program New;
begin
end.

This is the basic setup of your script the first thing you will always want to do it make a program name relevant to your script so if you were making a yew cutter your script would look like this so far

program YewCutter;
begin
end.

as you can see what Ive done here is Ive replaced the word new on the first line with the name of the program in the program name there should be no spaces and each begging on a word should be capitalized also there will be a ";" after every end except the last.

now to begin scripting you will first need to declare the include so far your script should look like this

program YewCutter;
{.include srl/srl.scar}
begin
end.

this will make it so you can use srl functions now to start making the mouse move this will be fun

some of the most used functions for this is the folowing

mouse(x,y,rx,ry,true(orfalse); this will move the mouse to the cord you but in x and the cord you put in y with a random for each rx and ry which will make it less detectable then it will click true=left false=right

movemouse(x,y) this will only move the mouse to the specifyed cordinates

clickmouse(true(orfalse); will click the mouse true=left false=right

ok lets say you want it to click in a certaint spot first you find this handy bugger
target.jpg


and drag that on the screen were you want it to click after it is done focusing find this

color.jpg

click that and move the mouse were you want to click then click again in the debug box it should come up with something similar to this

Color Picked: 13160660 at (626, 161)

13160660 is the color and

(626, 161) is the cordinats so now to make the mouse move and click in that spot we will do this

program YewCutter;
{.include srl/srl.scar}
begin
mouse(626,161,2,2,true);
end.

this will move the mouse to that point and left click

ok ok your doing good so far

now your probably wondering how to make scar type for you well thats what im going over next

pretty much the only thing you want to use for typing is this function

tyepsend('text'); this will type whats in between the ' '

pretty simble eh that easy i dont think it needs much explanation

another usefull function is the writeln which outputs text in the debug box

to get you used to what it does let try this


program beep;
begin
writeln('im starting to script');
end.

put that in scar and expirment a little bit

its useful to make progress reports ect.


now on to variables these are kind of hard to explain variables are letters\words that can change

kinda hard to explain but this is all i have time for for now if youd like me to explain something ealse post here ill try my best
 
I'm going to side with Myyrh. It's a little basic (yes, I realize it's aimed at new scripters), not structured all that well, there's spelling and grammar mistakes all over the place, etc. On top of that, you teach movemouse and clickmouse! BAD! They WILL get you banned! Use Mouse and MMouse.

And please don't tell me to make a script or a tut - I've done both.

~Sandstorm
 
i never said to use movemouse \ click mouse ;) i showed a exmple and also i dont see how its so bad if you look in the function mouse it uses movemouse\clickmouse to make it work ;) gg
 
That makes me think you have no clue what you're talking about.

Code:
{*******************************************************************************
procedure MMouse(x, y, rx, ry: integer);
By: Benland100
Description: Moves the mouse.
*******************************************************************************}
//Randomness is just added to the x,y. Might want to change that.
procedure MMouse(x, y, rx, ry: integer);
var
  cx, cy: integer;
  randSpeed: extended;
begin
  randSpeed:= (random(MouseSpeed) / 2.0 + MouseSpeed) / 10.0;
  if randSpeed = 0.0 then
    randSpeed := 0.1;
  getMousePos(cx,cy);
  X := x + random(rx);
  Y := y + random(ry);
  WindMouse(cx,cy,x,y,9.0,3.0,10.0/randSpeed,15.0/randSpeed,10.0*randSpeed,10.0*randSpeed);
end;

MMouse.

Code:
{*******************************************************************************
procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
By: Mutant Squirrle, with a small fix by hy71194
Description: Moves then clicks mouse.
*******************************************************************************}

procedure Mouse(mousex, mousey, ranx, rany: Integer; left: Boolean);
var
  a, b, c: Integer;
begin
  MMouse(mousex, mousey, ranx, rany);
  Wait(60 + Random(30));
  GetMousePos(b, c);
  HoldMouse(b, c, left);
  repeat
    Wait(20 + Random(30));
    a := a + 1;
  until (a > 4);
  GetMousePos(b, c);
  ReleaseMouse(b, c, left);
  Wait(100 + Random(100));
end;

Mouse.

As you would put it: GG.

~Sandstorm
 
which is pretty much the same thing dude how can it be more banable it does the same thing think about it also you have to but in ;) plus if you think your so good lets see you do something worth your time and get a gf :)
 
I've got a script for sale dude. I've also released a few over on the SRL forums. Check out Scar Help forums, I released the tutorial on Functions that I made for the SRL Forums.

Also, run this and tell me why you think movemouse is detectable.

Code:
Program New;
{.Include SRL\SRL.Scar}

Var
  X, Y : Integer;

Begin
  SetupSRL;
  Wait(2500);
  GetMousePos(x, y);
  MoveMouse(100, 100);
  WriteLn(ReadLn('Was that an instant movement? MoveMouse.'));
  Wait(1000);
  MMouse(x, y, 5, 5);
  WriteLn(ReadLn('Was that an instant movement? MMouse.'));
End.

On a completely unrelated note:

Why the hell does everyone judge you on having a gf/bf? Honestly...

~Sandstorm
 
still who cares?
i try to help and i get dogged on >.> so much for a nice community eh

Program New;
{.Include SRL\SRL.Scar}
var
hey321:string;

const
name = 'hey321'; //fill this in

Begin
SetupSRL;
if(name = 'hey321') then
begin
writeln('you right im soz');
end else
writeln('your a ok person');
end.
 
I'm trying to help by teaching you as well.

Also, who cares? Maybe the people who don't want to be banned? -.-.

~Sandstorm
 
If you really want to have people learn ide advise you to advise them to look at the scar help file first( even though procedures are outdated it helps alot in understanding) and then look at the srl help file that is included in the folder on download. Both help explain loads about the certain functions and what they are best used for. Also its alittle for advanced but needed in almost an workable script nowadays is declaring your vars, so maybe add a section on that. Dont forget to include to have them declare X,Y as globals with the new srl it makes everything alot more easier.
 
duelarena.gg
Back
Top