
Originally Posted by
Raepor
Well I have completed my script, it's not for runescape but it's another RPG.
Basically I coded the whole thing and it picks 5 wheat plants then stops, but I want it to constantly do them over and over and over. How do I set a loop so it does my WHOLE SCRIPT over and over?
SCAR Code:
program MainLoop;
Var
i:integer//declares i as an integer (duh)
begin
i:=0//says what i is
repeat
i:=i+1//adds 1 to i every time and keeps track of it so it isnt an infinite loop =D
//blah blah blah
//more blahs
//w/e
//mhm....
//yadayada
until
i>=(50)//however many times you want it done
end.
Should give you an idea on how to do it, oh and you can use a constant at the beggining to make it easier so you dont have to input it whereever it is in your script buy doing
SCAR Code:
Const
timestodo=//howevery many times you want it done
var
i:integer//declares i as an integer (duh)
begin
i:=0//says what i is
repeat
i:=i+1//adds 1 to i every time and keeps track of it so it isnt an infinite loop =D
//blah blah blah
//more blahs
//w/e
//mhm....
//yadayada
until
i>=(timestodo)
end.