thanatos920
2007-01-14 02:00:08
Making a pretty useless script, for a friend to get a ton of bronze arrows on tutorial island ( i know useless since you can't keep em, don't ask), but I've run into the dumbest problem I have no idea how to make procedures repeat X number of times, heres my scritp thus far.
Basic questions really, how to get those procedures (Dropitem(1) and ClickVennakka) to repeat 6 times before moving on to do PickUpArrows. Also if I defined a constant at the top as TimesToRun, in the setup, where the user could specify how many times they wanted the script to repeat, how would I make my main loop of
Dropitem(1);
ClickVennakka;
Repeat 6 times
PickupArrows
Repeat TimesToRun times. this is my biggest problem with scripting, I have no clue how to repeat unless I'm using colors, IE Repeat Until(SOMETHING=false), meh if anyone could explain it would be much appreciated I can't find it in any tuts.
//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}
//Setup//
Const
BronzeArrows = 1347504;
VennakkaShirt = 1710621;
//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
Wait(800+random(400))
if(FindColorSpiralTolerance(x,y,VennakkaShirt,9,64,478,360,15))then
Begin
Mouse(x,y,0,0,true);
end else
writeln('cant find Vennakka,try widening your box')
End;
Procedure PickupArrows;
Begin
Wait(500);
if FindObj(x,y,'Take',BronzeArrows,20) then
begin
mouse(x,y,1,1,true)
End else
Writeln('Cant find the arrows try and change the color')
end;
//Main Loop//
Begin
setupsrl; SymbolAccuracy:=0;
DisguiseScar('Runescape - the massive online adventure game by Jagex Ltd.');
ActivateClient;
PerfectNorth;
Repeat
Dropitem(1);
ClickVennakka;
//NEED THE ABOVE TWO PROCEDURES TO REPEAT SIX TIMES BEFORE CONTINUING TO BELLOW//
PickupArrows;
End.
Basic questions really, how to get those procedures (Dropitem(1) and ClickVennakka) to repeat 6 times before moving on to do PickUpArrows. Also if I defined a constant at the top as TimesToRun, in the setup, where the user could specify how many times they wanted the script to repeat, how would I make my main loop of
Dropitem(1);
ClickVennakka;
Repeat 6 times
PickupArrows
Repeat TimesToRun times. this is my biggest problem with scripting, I have no clue how to repeat unless I'm using colors, IE Repeat Until(SOMETHING=false), meh if anyone could explain it would be much appreciated I can't find it in any tuts.