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.
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)
//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)