Richard
2008-03-28 18:13:51
The Tut for Basic SCAR Functions
This is the long tut I said I would work on so that beginners would find this helpful to start with as this is going to cover the use of most basic SCAR functions. I will be adding more functions to it when I get more time.
Waiting
This is one of the most used function in SCAR, as you might have guessed it waits the time specified in the milliseconds bit (1 second = 1000 milliseconds). You will use this for auto-talkers if you make them, to wait between speech and many other things. You will always want to use this because it waits, I mean you wouldn't want a script that just did everything before it had finished the previous thing.
If you find that you want to add random time so that the script is not detectable. All you have to do is add
Example: If you wanted you script to wait 1 second plus a random second you would right the function out like this:
So theres you first easy functions lets move onto the next one…
Moving the Mouse
This is a very basic function but many people miss-use it by not adding the random coordinates, if you don’t want to get people banned, add something like 3 in the “rancoordx” “and rancoordy” so that there will be an offset, also know as a random ammount added on to the coords. You want to use this function because it is the safest mouse moving functions out there, and it has randomness, making it very undetecable.
The first coords are the coords within the client you are using. The normal RS client is about 700 by 600.
The last bit with the Boolean is which mouse click you want to use, True means left, False means right.
Example: Lets say you wanted to move to 100x and 100y, with the randomness of 5, and you wanted to do a left click:
There you go, another well used function, onto the third…
Typing into the Client
Another commonly used function, it will basically type like a human into the client you are using. You want to use this as 1: It talks! and 2: Its very undetectable because its human-like.
One thing I must tell you is that you must ALWAYS put apostrophes ( ‘s ) around the text otherwise you will get an error.
This is very easy and quick to use, just type in the message you want, put apostrophes either side of your text, if it has apostrophes it will be in pink writing, and you are a good to go!
Example: I want to type “iMacro” into the client I’m using.
And there you go, a way to talk in RS, now for the fourth one…
Typing in the Debug Box
This is exactly the same to use as TypeSend, just that it types the message into the debug box(the box at the bottom, used for debugging :)). So I don’t think I’ll need to explain how to use it as its the same as TypeSend, except you write WriteLN instead. You will want this as you can make sig with it, proggies, and information to the user.
Example: I want to tell the user of my script that its logging in the Runescape character.
Basic function, but very useful, moving on to number 5…
Changing the Game Tab
This is another very simple function to use, all you have to do it is write in the number of the game tab you want to use. 1: fighting tab 2: skills tab 3: quest tab 4: invent tab 5: equip tab 6: prayer tab 7: mage tab 8: summoning tab 9: friends tab 10: ingore tab 11: clan chat tab 12: settings tab 13: music tab.
Example: I want to go onto the invent tab:
We're getting near the end, hope you aren't too bored…
Changing the Angle
This is how to change the angle of your camera in RS, its very simple to use. You want to use this because it is basically a short cut to having to write out a whole function the presses the keys for certain ammounts of time. You either type
Or
Now onto number 7, we’re getting there…
Changing the Compass
This is a simple way to move the camera to the direction you want it to. You again must use apostrophes around it. You always use the first letter of the direction you want to go, e.g. north would be ‘N’. This is also great because it is once again a shortcut to writing the whole function again.
Example: I want to make the camera face west
Just one more now…
Commenting
Commenting is another word for putting information that won’t affect how the script will run. And you'll want to use this alot as without it you can't really tell the user how to use the scirpt and what it does so you will find it your best friend :).
There are 2 ways to comment in scar, the first is to use to forward slashes (//). This is good if you are commenting after a function in a script to tell someone what to do to it or what it does. But you can only have the information after the slashes and only on that line.
The other way is to use 2 of the squiggly bracket things ({}). These are good for adding longer amounts of commenting. All you have to do it have the information between the 2 brackets.
The only time that this will affect the script is when you put .include at the front, as this will include and include (lol).
I hope that this tut has helped you on your way to greatness! And that it wasn’t too long…
This is the long tut I said I would work on so that beginners would find this helpful to start with as this is going to cover the use of most basic SCAR functions. I will be adding more functions to it when I get more time.
Waiting
Wait(milliseconds: integer);This is one of the most used function in SCAR, as you might have guessed it waits the time specified in the milliseconds bit (1 second = 1000 milliseconds). You will use this for auto-talkers if you make them, to wait between speech and many other things. You will always want to use this because it waits, I mean you wouldn't want a script that just did everything before it had finished the previous thing.
If you find that you want to add random time so that the script is not detectable. All you have to do is add
+random(milliseconds: integer);So that it will wait anywhere between your first value and you first value plus your random value. You want to add randomness as it will not get you banned.Example: If you wanted you script to wait 1 second plus a random second you would right the function out like this:
Wait(1000+random(1000));So theres you first easy functions lets move onto the next one…
Moving the Mouse
Mouse(coordx, coordy, rancoordx, rancoordy :integer, left mouse click: boolean);This is a very basic function but many people miss-use it by not adding the random coordinates, if you don’t want to get people banned, add something like 3 in the “rancoordx” “and rancoordy” so that there will be an offset, also know as a random ammount added on to the coords. You want to use this function because it is the safest mouse moving functions out there, and it has randomness, making it very undetecable.
The first coords are the coords within the client you are using. The normal RS client is about 700 by 600.
The last bit with the Boolean is which mouse click you want to use, True means left, False means right.
Example: Lets say you wanted to move to 100x and 100y, with the randomness of 5, and you wanted to do a left click:
Mouse(100,100,5,5,True);There you go, another well used function, onto the third…
Typing into the Client
TypeSend(text: string);Another commonly used function, it will basically type like a human into the client you are using. You want to use this as 1: It talks! and 2: Its very undetectable because its human-like.
One thing I must tell you is that you must ALWAYS put apostrophes ( ‘s ) around the text otherwise you will get an error.
This is very easy and quick to use, just type in the message you want, put apostrophes either side of your text, if it has apostrophes it will be in pink writing, and you are a good to go!
Example: I want to type “iMacro” into the client I’m using.
TypeSend('iMacro');And there you go, a way to talk in RS, now for the fourth one…
Typing in the Debug Box
WriteLN(text: string);This is exactly the same to use as TypeSend, just that it types the message into the debug box(the box at the bottom, used for debugging :)). So I don’t think I’ll need to explain how to use it as its the same as TypeSend, except you write WriteLN instead. You will want this as you can make sig with it, proggies, and information to the user.
Example: I want to tell the user of my script that its logging in the Runescape character.
WriteLN('Your character is logging in');Basic function, but very useful, moving on to number 5…
Changing the Game Tab
GameTab(game tab :integer);This is another very simple function to use, all you have to do it is write in the number of the game tab you want to use. 1: fighting tab 2: skills tab 3: quest tab 4: invent tab 5: equip tab 6: prayer tab 7: mage tab 8: summoning tab 9: friends tab 10: ingore tab 11: clan chat tab 12: settings tab 13: music tab.
Example: I want to go onto the invent tab:
GameTab(4);We're getting near the end, hope you aren't too bored…
Changing the Angle
SetAngle(highest :Boolean);This is how to change the angle of your camera in RS, its very simple to use. You want to use this because it is basically a short cut to having to write out a whole function the presses the keys for certain ammounts of time. You either type
SetAngle(True);For the highest.Or
SetAngle(False);For the lowest.Now onto number 7, we’re getting there…
Changing the Compass
MakeCompass(direction: string);This is a simple way to move the camera to the direction you want it to. You again must use apostrophes around it. You always use the first letter of the direction you want to go, e.g. north would be ‘N’. This is also great because it is once again a shortcut to writing the whole function again.
Example: I want to make the camera face west
MakeCompass('W');Just one more now…
Commenting
//Commenting and
{different commenting}Commenting is another word for putting information that won’t affect how the script will run. And you'll want to use this alot as without it you can't really tell the user how to use the scirpt and what it does so you will find it your best friend :).
There are 2 ways to comment in scar, the first is to use to forward slashes (//). This is good if you are commenting after a function in a script to tell someone what to do to it or what it does. But you can only have the information after the slashes and only on that line.
//Commenting is fun :)The other way is to use 2 of the squiggly bracket things ({}). These are good for adding longer amounts of commenting. All you have to do it have the information between the 2 brackets.
{Type your
Information right in
Here}The only time that this will affect the script is when you put .include at the front, as this will include and include (lol).
I hope that this tut has helped you on your way to greatness! And that it wasn’t too long…