PDA

View Full Version : Read this before posting a first script!



Pure1993
02-19-2008, 11:16 PM
Well, if you are reading this, and have not yet published yout first script, then you are on the right way to go. ;)

Even though, I think the quality of the first scripts has improved a bit lately, it could still be raised.

Now, I think I speak for all the SRL members, JR members, and experienced scripters, that scripts which are only based upon coordinates, using sendkeys, and moving and clicking with the mouse, and which are being posted in the first script section, are pointless and even annoying.

I mean no offence to anyone who has done so, and I can understand that you are proud of your first scripts, and want to present it to everyone. Yet, have you thought about maybe putting that off for a few more days, and learn to apply more advanced functions, so that your script actually serves a purpose, which doesn't always repeat the 100% exact same thing, without any variables, anti-randoms, and anti-ban?

I always try to stay polite or just skip the threads on which people posted first scripts like this one, but seriouslly, what is suppossed to be so special about it? It uses no standards, exactly repeated clicks, and not even srl functions (no offence to the scripter):
program Bone burrier;

procedure bank;
begin
movemouse(249, 207);
wait(100);
clickmouse(249, 207, false);
wait(100);
movemouse(179, 242);
clickmouse(179, 242, true);
wait(100);
movemouse(93, 75);
wait(4000);
clickmouse(93, 75, false);
wait(500);
movemouse(96, 140);
wait(300);
clickmouse(96, 140,true);
wait(1300);
movemouse(482, 48);
wait(1000)
clickmouse(482, 48,false);
wait(700)
movemouse(443, 73)
wait(700)
clickmouse(443, 73,true)
end;
Procedure Burry;
begin
movemouse(579,230)
wait(1500)
ClickMouse(579,230,true);
wait(100)
movemouse(620,230)
wait(1500)
ClickMouse(620,230,true);
wait(100)
movemouse(667,230)
wait(2000)
ClickMouse(667,230,true);
wait(100)
movemouse(704,230)
wait(1500)
ClickMouse(704,230,true);
wait(100)
movemouse(590,260)
wait(2000)
ClickMouse(590,260,true);
wait(2000)
movemouse(620,260)
wait(100)
ClickMouse(620,260,true);
wait(2000)
movemouse(667,260)
wait(100)
ClickMouse(667,260,true);
wait(2000)
movemouse(704,260)
wait(100)
ClickMouse(704,260,true);
wait(2000)
movemouse(590,300)
wait(100)
ClickMouse(590,300,true);
wait(2000)
movemouse(620,300)
wait(100)
ClickMouse(620,300,true);
wait(2000)
movemouse(667,300)
wait(100)
ClickMouse(667,300,true);
wait(2000)
movemouse(704,300)
wait(100)
ClickMouse(704,300,true);
wait(2000)
movemouse(590,340)
wait(100)
ClickMouse(590,340,true);
wait(2000)
movemouse(620,340)
wait(100)
ClickMouse(620,340,true);
wait(2000)
movemouse(667,340)
wait(100)
ClickMouse(667,340,true);
wait(2000)
movemouse(704,340)
wait(100)
ClickMouse(704,340,true);
wait(2000)
movemouse(590,370)
wait(100)
ClickMouse(590,370,true);
wait(2000)
movemouse(620,370)
wait(100)
ClickMouse(620,370,true);
wait(2000)
movemouse(667,370)
wait(100)
ClickMouse(667,370,true);
wait(2000)
movemouse(704,370)
wait(100)
ClickMouse(704,370,true);
wait(2000)
movemouse(590,410)
wait(100)
ClickMouse(590,410,true);
wait(2000)
movemouse(620,410)
wait(100)
ClickMouse(620,410,true);
wait(2000)
movemouse(667,410)
wait(100)
ClickMouse(667,410,true);
wait(2000)
movemouse(704,410)
wait(100)
ClickMouse(704,410,true);
wait(2000)
movemouse(590,437)
wait(100)
ClickMouse(590,437,true);
wait(2000)
movemouse(620,437)
wait(100)
ClickMouse(620,437,true);
wait(2000)
movemouse(667,437)
wait(100)
ClickMouse(667,437,true);
wait(2000)
movemouse(704,437)
wait(100)
ClickMouse(704,437,true);
wait(500)
end;
begin;
repeat
bank
wait(500);
Burry;
until(false)
end.


This was (obviously) an example of a coordinate clicking one. This is about a 110% chance of being banned, and a 5% chance of success (for only two runs).

Now, here is an example of a bad auto-typer:
program Autotyper;
{.include srl/srl.scar}
const
message1='';
message2='';

procedure autotyping;

begin

wait(1001 + Random(2001))
typesend(message1);
wait(2001 + Random(1001))
typesend(message2);
end;

begin
setupSRL;
repeat
until(false)
end.

end.



Okay, first of all, this wouldn't even type anything, the procedure wasn't called again in the main loop, second, never have a false repeat without failsafes. This is probably the worst example of an auto-typer (again, no offence to the scripter) I have ever seen.

Now you have seen two examples of what you shouldn't do, but you might be asking yourself, "well, what should I do then?". First of all, learn some of the srl commands and how to use them. Include the
{.include srl/srl.scar}
on top of your script, right under the program name, to tell the program that you are using SRL. Then, go learn standards, they are very important. You will seldom get (actually serious) positive comments, if you don't applied them. It just gives the reader a headache, just look at this small function I created myself, and see what the difference is between no standards and perfect standards:

Good Standards:
Procedure WalkCloseToLadders;
Begin
If Not LoggedIn Then Exit;
For Z:=1 To 5 Do
Begin
CWDTMTol := CWDTMTol+5;
CWDTMArea := CWDTMArea+5;
if (DTMRotated(CaveWayMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
begin
Writeln('Found DTM at a tolerance of '+IntToStr(FRDTMTol)+
'and an area of '+IntToStr(FRDTMArea));
Mouse(x,y,0,0,true);
MyWait(1);
FFlag(0);
Exit;
End;
End;
Writeln('DTM Not Found');
End;

No Standards:Procedure WalkCloseToLadders;
Begin
If Not LoggedIn Then Exit;
For Z:=1 To 5 Do
Begin
CWDTMTol := CWDTMTol+5;
CWDTMArea := CWDTMArea+5;
if (DTMRotated(CaveWayMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
begin
Writeln('Found DTM at a tolerance of '+IntToStr(FRDTMTol)+
'and an area of '+IntToStr(FRDTMArea));
Mouse(x,y,0,0,true);
MyWait(1);
FFlag(0);
Exit;
End;
End;
Writeln('DTM Not Found');
End;

Here is a list of tutorials which you should visit to learn the basics, and some other neat things:

-Special Ed's guide to te SRL forums (http://www.villavu.com/forum/showthread.php?t=22178)

-Starblast's guide to setting up Scar (http://www.villavu.com/forum/showthread.php?t=400)

-Dark_Sniper's Guide to SRL Repositories (http://www.villavu.com/forum/showthread.php?t=17890)

-WhoCares' ultimate beginners Tut (http://www.villavu.com/forum/showthread.php?t=4625)

-My own beginners tut :D (http://www.villavu.com/forum/showthread.php?t=25143)

Another beginners guide, this one is from Bebe (http://www.villavu.com/forum/showthread.php?t=12154)

(technically all three of them cover the same stuff, but if one is too confusing, just try another one :))

-THE OFFICIAL STANDARDS posted by Bam Bam (http://www.villavu.com/forum/showthread.php?t=3293)

-JAD's unbelievable guide to fixing errors (http://www.villavu.com/forum/showthread.php?t=6413) (probably the tut I used most of the time when I started scripting :D)

-Oh, and How can I forge this (http://www.villavu.com/forum/showthread.php?t=17881?t=19575) uber-godly-sweet tutorial from gerauchert? Geez, i am such a noob. XD

After reading moost of these tuts, you should be rready to make your script, but feel free to go into the intermediate section and check out a few of those neat things, like the titel of that sections says," Here we are starting to have fun" or something.

One last word of advice: The better the first script, the more comments you will get, and the better it's rating, and with that, your rating will be. So I would advise you to wait and script, until you have a script, which you think will suprise everyone with your unbelieveable skill. ;)

@Admins and Mods: If this counts as flaming, feel free to remove it, but I am just trying to make people, who are new to scripting, to understand that it is better not to publish any script at all rather than publishing one which will just get the usual "oh, good first script", or "not too bad for your first try" comments which aren't even meant seriously.

Naike
02-20-2008, 12:12 AM
Good boy =] ! Should be useful

Pure1993
02-20-2008, 06:33 AM
Thanks, I hope it is. :D

dillbagz
02-20-2008, 07:09 AM
WOW! are you still thinking about writing a ess miner?

Pure1993
02-20-2008, 12:53 PM
Well, a lot of other things came into my way, so I barely have any time atm, sorry.

gerauchert
02-20-2008, 01:49 PM
*sniffle* why isnt my tut in that list?? :p JK

nice tut dude, this needed to be addressed.

wasnt a huge concern of mine...but who cares lets dance :spot:

Pure1993
02-20-2008, 02:07 PM
*pads on back* [Nurse like voice] It's alright, no need to cry.. I'll add yours... just don't cry please... [/Nurse like voice] :p
did you write more than the "everything tutorial"? and if so, which one would you like to be up here? :D
Thanks for the comment though, and....
:spot: :spot: :spot: :spot: !ooh yeah, sweet moves baby! :spot: :spot: :spot: :spot:

Harry
02-20-2008, 02:16 PM
Jw, aren't bold letters in SCAR supposed to be lowercase? Not Capatil?


Procedure WalkCloseToLadders;
Begin
If Not LoggedIn Then Exit;
For Z:=1 To 5 Do
Begin
CWDTMTol := CWDTMTol+5;
CWDTMArea := CWDTMArea+5;
if (DTMRotated(CaveWayMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
begin
Writeln('Found DTM at a tolerance of '+IntToStr(FRDTMTol)+
'and an area of '+IntToStr(FRDTMArea));
Mouse(x,y,0,0,true);
MyWait(1);
FFlag(0);
Exit;
End;
End;
Writeln('DTM Not Found');
End;


Bam Bam: "Object Pascal language reserved words and key words shall always be completely lowercase."

gerauchert
02-20-2008, 03:37 PM
Jw, aren't bold letters in SCAR supposed to be lowercase? Not Capatil?


Procedure WalkCloseToLadders;
Begin
If Not LoggedIn Then Exit;
For Z:=1 To 5 Do
Begin
CWDTMTol := CWDTMTol+5;
CWDTMArea := CWDTMArea+5;
if (DTMRotated(CaveWayMDTM,x, y,MMX1,MMY1,MMX2,MMY2)) Then
begin
Writeln('Found DTM at a tolerance of '+IntToStr(FRDTMTol)+
'and an area of '+IntToStr(FRDTMArea));
Mouse(x,y,0,0,true);
MyWait(1);
FFlag(0);
Exit;
End;
End;
Writeln('DTM Not Found');
End;


Bam Bam: "Object Pascal language reserved words and key words shall always be completely lowercase."


I think you are correct, but I still capitalize Procedure and Function cuz i think it looks nicer. The begins and ends with caps hurts my eyes a bit after a while :p

@Str

yes its my only tut...

lol u dont have to add tho, im just jokin :P

Pure1993
02-20-2008, 04:39 PM
@Gerauchert, well, now I added your tut, and if you don't like it, well then cry a rive, build a bridge, and get over it! :p

@Hy: Well, I siad those were "good standards", not perfect ones. I personally always use capitalization on the first letter, it just looks neater. :D (It's my own style, I am not telling anyone to use exactly this one, but I will never change! lol)

brad734
09-14-2008, 01:06 AM
thanks, i was about to post a script to. ill rethink it now.

snoker
11-04-2008, 07:51 AM
thanks man ... still cant post thread yet lol =P

hrh
01-17-2009, 12:28 PM
thanks for the exmaple of the standards, helping me just edit everythign so it looks nicer hehe =P