Fixed all the standards, those were horrible... now I'll go fix the real problem, and you go read a tut on standards in the mean time please. Standards are a huge thing, especially when applying for members or creating a complex script. 
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
//failsafes small const, big result
//////////////////////////////V2.00////////////////////////////////
program LRK;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
var
x,y,foodbmp,kill :integer;
TPA : TPoint; i : 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
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'farflafa';
Players[0].Pass := 'savedit';
Players[0].Nick := 'arfl';
Players[0].Active := True;
end;
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////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 then // "if eat=true then" is the same as "if eat 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);
writeln('Ate food successfully!');
wait(1500+random(200));
end else
if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
begin
writeln('Could not find food');
exit;
end;
end else
// if (eat = false )then not needed, if it is not true then it has to be false
begin // more than one line after the "if" or "else", so you need a "begin"
Writeln('Said no to eat');
exit;
end;
end;
end;
Procedure Anti; //Estebans tutorial
begin
case random(4) of
0:Sleepandmovemouse(5000+random(1000));
1:Boredhuman;
2:begin
HoverSkill('Random', false);
wait(2500+Random(500));
end;
3:Pickupmouse;
4:Begin
Makecompass('w')
wait(1000+random(500))
makecompass('e')
end;
end;
end;
function findmouse : boolean; //Awkardsaw's tutorial tree finder
var tpa : tpointarray; I : integer;
begin
if findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20) then
for i:= 0 to high(tpa) do
begin
mmouse(tpa[i].x, tpa[i].y, 0, 0);
if isuptext('ttack') then
begin
result := true;
Writeln('Mouse is found')
exit;
end else
if(not(findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20))) then
begin
Writeln('Mouse is not found, logging out.')
logout;
terminatescript;
end;
end;
end;
Procedure clickkiller;
begin
if(findmouse)then
begin
mouse(x,y,3,3,false);
chooseoption('ttack')
end;
end;
procedure waitinfight;
begin
if(infight)then
begin
repeat
Anti;
until(not(infight))
if (not(infight)) then
clickkiller; //no "begin" needed since it is only one line
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;
logout;
proggy;
Writeln('you died')
terminatescript;
end;
end;
begin;
setupsrl;
DeclarePlayers;
cleardebug;
activateclient;
if(not(loggedin))then
Loginplayer;
repeat
Findnormalrandoms;
clickkiller;
EatFood;
FreeBitmap(foodbmp);
finddead;
until(kill >=howmanykills)
if(kill >=howmanykills)then
begin
logout;
proggy;
terminatescript;
end;
end.
// alot bai wr
// cs Tpa pro Tpa it
// cedure bitmaps Advice er login standards and others
{Credits- Jad,Baked,Awkardsaw,marpis,Evilkitten,me,masterbb,and others for helping me.
Alright, your problem is the global/local variable mix... if the mouse is found, then that location is saved in the variable "TPA[something]", yet when you click the mouse, you are using the variables "x" and "y". Here is the problem, fixed:
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
//failsafes small const, big result
//////////////////////////////V2.00////////////////////////////////
program LRK;
{.include srl/srl.scar}
{.include srl/srl/skill/fighting.scar}
var
x,y,foodbmp,kill :integer;
TPA : TPoint; i : integer;
/////////////////////fill this in/////////////////////////////////////////////
const
mousecolor= 989817;// 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
procedure DeclarePlayers;
begin
HowManyPlayers:= 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name := 'farflafa';
Players[0].Pass := 'savedit';
Players[0].Nick := 'arfl';
Players[0].Active := True;
end;
//////////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////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 then // "if eat=true then" is the same as "if eat 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);
writeln('Ate food successfully!');
wait(1500+random(200));
end else
if not(FindBitmapToleranceIn(foodbmp, x, y, MIX1, MIY1, MIX2, MIY2, 20))then
begin
writeln('Could not find food');
exit;
end;
end else
// if (eat = false )then not needed, if it is not true then it has to be false
begin // more than one line after the "if" or "else", so you need a "begin"
Writeln('Said no to eat');
exit;
end;
end;
end;
Procedure Anti; //Estebans tutorial
begin
case random(4) of
0:Sleepandmovemouse(5000+random(1000));
1:Boredhuman;
2:begin
HoverSkill('Random', false);
wait(2500+Random(500));
end;
3:Pickupmouse;
4:Begin
Makecompass('w')
wait(1000+random(500))
makecompass('e')
end;
end;
end;
function findmouse(var TheRatx, TheRaty : Integer): boolean; //Awkardsaw's tutorial tree finder
var
tpa : tpointarray; I : integer;
begin
if findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 10) then
for i:= 0 to high(tpa) do
begin
mmouse(tpa[i].x, tpa[i].y, 0, 0);
Wait(175);
if isuptext('ttack') then
begin
result := true;
TheRatx := tpa[i].x;
TheRaty := tpa[i].y;
Writeln('Mouse is found')
exit;
end else
if(not(findcolorstolerance(TPA, mousecolor, msx1, msy1, msx2, msy2, 20))) then
begin
Writeln('Mouse is not found, logging out.')
logout;
terminatescript;
end;
end;
end;
Procedure clickkiller;
begin
if(findmouse( x, y))then
begin
mouse(x,y,3,3,false);
wait(175+random(25));
chooseoption('ttack')
end;
end;
procedure waitinfight;
begin
if(infight)then
begin
repeat
Anti;
until(not(infight))
if (not(infight)) then
clickkiller; //no "begin" needed since it is only one line
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;
logout;
proggy;
Writeln('you died')
terminatescript;
end;
end;
begin;
setupsrl;
DeclarePlayers;
cleardebug;
activateclient;
if(not(loggedin))then
Loginplayer;
repeat
Findnormalrandoms;
clickkiller;
EatFood;
FreeBitmap(foodbmp);
finddead;
until(kill >=howmanykills)
if(kill >=howmanykills)then
begin
logout;
proggy;
terminatescript;
end;
end.
// alot bai wr
// cs Tpa pro Tpa it
// cedure bitmaps Advice er login standards and others
{Credits- Jad,Baked,Awkardsaw,marpis,Evilkitten,me,masterbb,and others for helping me.
If you are having problems understanding the solution, then i would suggest you read up on some starter tuts with variables, otehrwise, good luck scripting.