I don't know what you are talking about with declareplayers? You aren't even using it in your script.
In ClickKiller, once you have it click to attack the monster, it does like over 10 seconds of anti ban, then it checks if in fight. If you had already killed the monster by this time, you wouldn't be in a fight, and it would never increment kills (which is why the script doesn't stop after 10).
I don't see where you called FindNormalRandoms either =/
But a few notes:
-Make sure that you put a begin end after an if/then if you are doing more than one statement. You are very inconsistent with this throughout your script.
-In the main loop, you have until(kill = howmanykills); it should be until(kills >= howmanykills) just to be safe. This will insure that the script does not go too far over the amount of kills the user wanted to do if it skipped this or something.
-under that, you have
SCAR Code:
if(kill=howmanykills)then
begin
logout;
proggy;
terminatescript;
end;
kill is already going to = howmanykills because that was the only way it would have broken out of the loop above that. all that's needed there is
SCAR Code:
logout;
proggy;
terminatescript;
No if then because it will always be true here. Notice though that if you did need the if then, I put a begin end there (because you were doing more than one statement, you were doing 3).
Your antiban stuff should also never be in the same place every time like that or else it becomes unhuman. Try a procedure like:
SCAR Code:
procedure AntiBanz;
begin
case random(10) of
0: BoredHuman;
1: SleepAndMoveMouse(5000+random(1000));
2: RandomRClick;
end;
end;
If you don't know cases you should read about them in a tutorial.
I fixed some begin/ends in the script (like in the death procedure) and fixed your standards up a bit. Learning proper indentation would make it much easier for people to read through your code and help you out next time:
SCAR Code:
//JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
//JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
//JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
//JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
//JUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRKJUNKJ LRK
///////////////////////////////////////////////////////////////////
// JUNK's LRK
//bitmap eating procedure infight to keep fighting if not done
//antirandoms cooked meat eater(sorry)
//failsafes small const, big result
//////////////////////////////V1.00////////////////////////////////
program LRK;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
Var
x,y,foodbmp,kill :integer;
/////////////////////fill this in/////////////////////////////////////////////
const
mousecolor= 4013378;// your mouse color
eat= true; //Cooked meat can only be eaten thanks to jad(boolean)
//cook raw beef from a cow and get Cook it to get cooked meat
howmanykills= 10; //how many do you want to kill
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////dont touch the rest
procedure EatFood; // thanks to marpis
begin
foodbmp := BitmapFromString(13, 12, 'beNpzMpoV7zEpyqU/0rnWV' +
'2BAENBqZERdZbhUEmkaJagn3KkxwGZqjCseK7pCHer8rEs9zBal+A' +
'AjAqvi9mB7oDkQZSsz/Zek+cIVQyIOiIDmAJW1BNlV+1hmAwB9+ZV' +
'I');
if(hppercent<20)then //thanks to marpis again
begin
if(eat=true)then
begin
Writeln('said yes to eat.');
GameTab(tab_Inv);
wait(100+random(20));
if (FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20)) then
begin
Mouse(x, y, 2, 2, true);
freebitmap(foodbmp);
writeln('Ate food successfully!');
wait(1500+random(200));
end else
if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
writeln('Could not find food');
end else
if (eat = false )then
Writeln('Said no to eat');
end;
end;
Procedure clickkiller;
begin
makecompass('e')
if FindObj(x, y, 'ttack', mousecolor, 35) then
begin
writeln('found the fight');
mouse(x,y,3,3,false);
Chooseoption('ttack');
boredhuman;
randommovement;
sleepandmovemouse(5000+random(1000))
if(infight)then
begin
repeat
writeln('Not done with fight, repeating until its done');
boredhuman;
randommovement;
sleepandmovemouse(5000+random(1000));
until not(infight)
if not (infight) then
writeln('done with fight');
kill:=kill+1
end;
end;
end;
procedure proggy;
begin
writeln('Killed aprroximitely ' + inttostr(kill));
writeln('ran for '+ (timerunning));
writeln('Junkjs Lumbridge Rat Killer');
writeln('end of the script');
end;
procedure death;
begin
if(finddead)then
begin //need begin end here
logout;
proggy;
Writeln('you died')
terminatescript;
end;
end;
begin;
setupsrl;
cleardebug;
activateclient;
repeat
clickkiller;
EatFood;
finddead;
until(kill=howmanykills)
if(kill=howmanykills)then
begin
logout;
proggy;
terminatescript;
end;
end.
Proper indentation is for the most part:
-2 spaces for all code after a begin or repeat
-untils and ends go backwards 2 spaces as well as everything that follows.
Sorry for this post being so long. It's good to see you trying to learn to script though! If you need any more help I'm on msn a lot:
runescapemacro@hotmail.com