SRL Archive - Help and Support

Having troubles looping =/


thanatos920

2007-01-15 11:59:27

Now I'm trying to make my script work, it's a useless bronze arrow getter for tut island, my friend requested it, but meh, and I seem to be having a few problems with looping, see it will loop my first two loops fine, but it will not repeat my main loop over and over again, unfortunately that's a big problem for me, and I have no idea how to fix it (semi new to scar and loops seem to be my biggest obstacle go figure), there are three loops in this script, I'd like someone to look at it if they can. Also for some random reason it Keeps clicking the combat instructor twice before begining DropItem(1), I think it's probably because my wait time at the end of it is too low, meh I will experiment later, anyways heres the script and I've added a few tags so you can see where I need help.

//Thana's Bronze arrow getter//
//Scripted using the latest version of SRL//
//Download it from villu-reborn.com//
//Complete the setup Between lines 12 and 13//

program BronzeArrowGetter;
{.include SRL/SRL.scar}
{.include SRL/SRL/Extended/Xobject.scar}
var
click,clicktwo,BronzeArrow : integer;

//Setup//
const
BA = 330066;
VennakkaShirt = 463239;
Repeatamount =3;
TimesToRun= 10;
//Notice the ONLY time you should ever change one of the above COlORS is if//
//The script tells you it cannot see THE SPECIFIC THING//
//EXAMPLE:If it says, Cannot find bronze arrows, ONLY MODIFY THE COLOR FOR BRONZE ARROWS//
//These are generic colors, and it should never mess up on any of them//


//No need to do anything bellow this line, attempting to do so will mess up the script//
//---------------------------------------------------------------------------//
procedure ClickVennakka;
begin
FFlag(0);
Wait(400+random(400));
if(FindObj(x,y,'Combat',VennakkaShirt,10))then
begin
Mouse(x,y,1,1,true);
wait(600);

end else
writeln('cant find Vennakka,try changing the color in setup')
end;

Procedure PickupArrows;
Begin
FFlag(0);
Wait(200+random(600));
if FindMSColor(x,y,BA) then
begin
mouse(x,y,1,1,false);
Wait(600+random(400));
ClickOption('Take',1);
End else
Writeln('Cant see the Bronze arrows')
end;

//Main Loop//
begin
setupsrl;
DisguiseScar('Runescape - the massive online adventure game by Jagex Ltd.');
ActivateClient;
PerfectNorth;
Repeat ///This is my main loops repeat which I will define as main loop 1//
repeat ///loop 2//
Dropitem(1);
ClickVennakka;
click:= click + 1;
until(click = Repeatamount);) //End loop 2//
repeat // loop 3//
PickupArrows;
until((FindMSColor(x,y,BA))=false) //end loop 3//
ClickTwo:= ClickTwo + 1;))
Until(ClickTwo = TimestoRun);//End of main loop 1//

End.



Now, loop 2 loops fine, and stops when it is supposed too,
Loop 3 works fine and stops when it's supposed to,
but my main loops won't repeat =/

(when i say loop 2 and 3 work fine, thats ONLY if i remove my main loop repeat otherwise loop 1 just never ends)

Boreas

2007-01-15 12:07:18

ClickTwo:= ClickTwo + 1;))

take off the )) ?

Boreas

2007-01-15 12:07:31

ClickTwo:= ClickTwo + 1;))

take off the )) ?

thanatos920

2007-01-15 12:14:49

Oops. I already edited that in the main script, didn't change much mate heres what the script REALLY looks like

//Thana's Bronze arrow getter//
//Scripted using the latest version of SRL//
//Download it from villu-reborn.com//
//Complete the setup Between lines 12 and 13//

program BronzeArrowGetter;
{.include SRL/SRL.scar}
{.include SRL/SRL/Extended/Xobject.scar}
var
click,clicktwo,BronzeArrow : integer;

//Setup//
const
BA = 330066;
VennakkaShirt = 463239;
Repeatamount =3;
TimesToRun= 10;
//Notice the ONLY time you should ever change one of the above COlORS is if//
//The script tells you it cannot see THE SPECIFIC THING//
//EXAMPLE:If it says, Cannot find bronze arrows, ONLY MODIFY THE COLOR FOR BRONZE ARROWS//
//These are generic colors, and it should never mess up on any of them//


//No need to do anything bellow this line, attempting to do so will mess up the script//
//---------------------------------------------------------------------------//
procedure ClickVennakka;
begin
FFlag(0);
Wait(400+random(400));
if(FindObj(x,y,'Combat',VennakkaShirt,10))then
begin
Mouse(x,y,1,1,true);
wait(800+random(200));

end else
writeln('cant find Vennakka,try changing the color in setup')
end;

Procedure PickupArrows;
Begin
FFlag(0);
Wait(200+random(600));
if FindMSColor(x,y,BA) then
begin
mouse(x,y,1,1,false);
Wait(600+random(400));
ClickOption('Take',1);
End else
Writeln('Cant see the Bronze arrows')
end;

//Main Loop//
begin
setupsrl;
DisguiseScar('Runescape - the massive online adventure game by Jagex Ltd.');
ActivateClient;
PerfectNorth;
Repeat
repeat
Dropitem(1);
ClickVennakka;
click:= click + 1;
until(click = Repeatamount);
repeat
PickupArrows;
until((FindMSColor(x,y,BA))=false)
ClickTwo:= ClickTwo + 1;
Until(ClickTwo = TimestoRun);

End.

Boreas

2007-01-15 12:22:44

until not (FindMSColor(x,y,BA)); ? I can't think of anything else, you got a variable and a const integers set up correctly, when they are equal it should stop.

DaWu

2007-01-15 13:42:31

Uh whats actually the point … for getting arrows on tutorial island ?
When you don't even get em to real game ?

Boreas

2007-01-15 13:52:17

I think he said in another post that its for a friend, don't ask.

thanatos920

2007-01-15 22:03:36

Was for a friend, now he told me why he wants them, he found a way to get em off of TUT island, which is an old bug I knew, but never tried since I figured it had been fixed, (I am a chosen one of Tainted-One's for those of you who that means anything to.), anyways I changed the variable and nothing, just keeps on clicking on him, then droping, then clicking on him and dropping, here's the script yet again.


//Thana's Bronze arrow getter//
//Scripted using the latest version of SRL//
//Download it from villu-reborn.com//
//Complete the setup Between lines 12 and 13//

program BronzeArrowGetter;
{.include SRL/SRL.scar}
{.include SRL/SRL/Extended/Xobject.scar}
var
click,clicktwo,BronzeArrow : integer;

//Setup//
const
BA = 330066;
VennakkaShirt = 463239;
Repeatamount =3;
TimesToRun= 10;
//Notice the ONLY time you should ever change one of the above COlORS is if//
//The script tells you it cannot see THE SPECIFIC THING//
//EXAMPLE:If it says, Cannot find bronze arrows, ONLY MODIFY THE COLOR FOR BRONZE ARROWS//
//These are generic colors, and it should never mess up on any of them//


//No need to do anything bellow this line, attempting to do so will mess up the script//
//---------------------------------------------------------------------------//
procedure ClickVennakka;
begin
FFlag(0);
Wait(400+random(400));
if(FindObj(x,y,'Combat',VennakkaShirt,10))then
begin
Mouse(x,y,1,1,true);
wait(800+random(200));

end else
writeln('cant find Vennakka,try changing the color in setup')
end;

Procedure PickupArrows;
Begin
FFlag(0);
Wait(200+random(600));
if FindMSColor(x,y,BA) then
begin
mouse(x,y,1,1,false);
Wait(600+random(400));
ClickOption('Take',1);
End else
Writeln('Cant see the Bronze arrows')
end;

//Main Loop//
begin
setupsrl;
DisguiseScar('Runescape - the massive online adventure game by Jagex Ltd.');
ActivateClient;
PerfectNorth;
Repeat
repeat
Dropitem(1);
ClickVennakka;
click:= click + 1;
until(click = Repeatamount);
repeat
PickupArrows;
until not (FindMSColor(x,y,BA));
ClickTwo:= ClickTwo + 1;
Until(ClickTwo = TimestoRun);

End.

YoHoJo

2007-01-16 16:14:42

heh taintied ones are prety cool. but i think its retarded that they make vids because jagex can just watch them and fix all the bugs =p

I still dont understand exactly what you want this script to do -.-
And i think i found a little bug with my freind also =p.
How do you get into the actauly "tainted ones group"?

Because i dont know exactly what you want done i dont know if this is right but here
Change the loop to this
begin
setupsrl;
DisguiseScar('Runescape - the massive online adventure game by Jagex Ltd.');
ActivateClient;
PerfectNorth;
Repeat
Dropitem(1);
ClickVennakka;
repeat
PickupArrows;
until not (FindMSColor(x,y,BA));
ClickTwo:= ClickTwo + 1;
Until(ClickTwo = TimestoRun);
End.

thanatos920

2007-01-18 12:31:51

I fixed it, it was a dumb problem, forgot to add Click1:= 0; at the begining of my second loop -.-, as for tainted one's its almost impossible to become part of the tainted-one's group, I myself am a CO, and out of the 800 registered members there are only 24 of us. To become a tainted-one you have to find an extremely good bug. and as for the video's we only release a video after the bugs have been fixed :P, check us out www.tainted-ones.com