SRL Archive - First Scripts

my first auto drop :D


karlkarlngng

2010-02-02 18:35:54

well this is my first script i made it because i cant find an auto dropper that works so here it is plz help me to improve it if possible :D
v1.3 i changed all scripts to mouse() but it moves hell slow plz help
v1.5 moves fast but is still slowish

Frement

2010-02-02 18:43:13

This gets you most likely banned.

Instead of ClickMouse(), use Mouse().

Waits have randoms, which is good.

There is a ChooseOption() function in srl for right click options.

I think there is also DropAll; function.

And you include SRL but dont setup it in your mainloop.

Also try learning procedures and functions.

Nice to see a registered user starting to script.

karlkarlngng

2010-02-02 20:18:47

i tryed adding {.include SRL/SRL/core/mouse.Scar}
so i can use mouse circle but i get this error
Line 20: [Error] (21114:1): Duplicate identifier 'MouseSpeed' in script C:\Users\admin\Documents\Downloads\SCAR 3.22\includes\SRL\SRL\core\mouse.Scar
plz help and how do i right click with mouse circle

i luffs yeww

2010-02-02 20:30:36

You never need to add anything from the /core/ folder. Just add {.include SRL/SRL.scar} at the beginning. :>

{.include SRL/SRL.scar}

begin
SetupSRL;
Mouse(50, 50, 50, 50, True);
end.

Smarter Child

2010-02-03 20:57:35

umm, i remember:
{*******************************************************************************
procedure DropAll;
By: Rasta Magician
Description: Drops all items in inventory.
*******************************************************************************}
procedure DropAll;
var i: integer;
begin
for i:= 0 to 2 do
begin
DropPattern(Random(2) + 1);
if InvCount = 0 then
break;
end;
end;


I suggest making a real first script.

Cigue

2010-02-03 21:28:17

From: Smarter Child
I suggest making a real first script.


Chill out man, my first script didn't accomplish jack.

Karlkarlngng :

You had a good idea for a first script :) The execution is pretty fine, but going through a number of commands without wait time will get you banned.

That's the first thing you should learn. The second one is that you should always head your scripts with {.include SRL/SRL.scar} and put SetupSRL; just after your main begin.

Let me introduce you to a few functions that help your script go easier…

for..to..do : the first value is a starting variable, the second where it will stop. Basically, as long as the first variable isn't equal to the second value, it will run and run.

if..then : if test returns true, it will do what is after then.

ExistsItem : if item exists in specified slot, it will return true.

MouseItem : clicks item in item spot () :) (False) goes for a right click.

ChooseOption : Chooses option. When you right click, a box appears; it will search the box for the option you specify.

Inc() : raises the value of the variable in (..) by one. Here it's used to count the number of times you've dropped stuff !

Wait(RandomRange(500, 1000)); will wait between 500 and 1000 milliseconds.

Overall I see a great first try, especially by your own. If you have any questions there are a number of scripters out there that you can add on MSN and talk to for help, including me.

If you're the kind who likes to dig, you can use SCAR to open any file located in the SCAR/Includes/SRL/SRL/Core folder and browse through it. ChooseOption was in Text.scar since it searches for text, MouseItem and ExistsItem were in Inventory.scar, et cetera.

There are a number of interesting tutorials out there. :)



Here is something that would work. Notice the use of all the functions I mentioned earlier. Kudos to you if you can understand it ! If not, you can PM me for help :)

procedure DropItAll;
var i : Integer;
begin
for i:= 1 to 28 do
begin
if ExistsItem(i) then
begin
MouseItem(i, False);
Wait(RandomRange(200,400));
ChooseOption('Drop');
Wait(RandomRange(200, 500));
end;
end;
end;