Ok, will do. Thanks. How's this?
SCAR Code:
Program VarrockAnythingSmither;
{.include SRL\SRL.scar}
Const
//LoadsWanted = 10; // Change this for how many loads you want
YourSRLID = '';
YourSRLPass = '';
Var x,y,i : Integer;
Procedure DeclarePlayers;
Begin
HowManyPlayers := 1;
NumberOfPlayers(HowManyPlayers);
CurrentPlayer := 0;
Players[0].Name :='';
Players[0].Pass :='';
Players[0].Nick :='';
Players[0].Active:=True;
Writeln( IntToStr ( HowManyPlayers ) + ' Players' );
SetPlayerNameTPAs;
End;
Procedure FleeFromFight;
Begin
RunAway('N', True, 1, 10000 + Random(2000));
End;
Function CheckForFight: Boolean;
Begin
if CheckHpFirst then
begin
Wait(500 + Random(100));
if (HpPercent < 100) then
FleeFromFight;
end;
End;
Procedure AntiRandoms;
Begin
if not(LoggedIn) then Exit;
LampSkill := 'Smithing';
FindTalk;
FindNormalRandoms;
if (CheckForFight = True) then
begin
FleeFromFight;
end;
End;
Procedure AntiBan;
Begin
case random(50) of
1 : MMouse(0, 0, 700, 500);
2 : Hoverskill('Smithing', false);
4 : BoredHuman;
5 : RandomMovement;
6 : GameTab(1);
end;
End;
Function WalkToAnvil: Boolean;
Var
MarkedTime : Integer;
begin
If not (LoggedIn) then Exit;
MarkTime(MarkedTime);
Repeat
if FindSymbol(x, y, 'anvil') then
begin
Mouse(x, y, 1, 1, true);
AntiRandoms;
Result := True;
WriteLn('Found Symbol');
FFlag(4);
AntiBan;
end;
if (not Result) then
Wait(1000 + Random(1000));
until ((Result = True) or (TimeFromMark(MarkedTime) >=400000));
if (TimeFromMark(MarkedTime) >=400000)then
begin
WriteLn('Couldn''t Find Symbol');
Logout;
TerminateScript;
end;
end;
Function FindAnvil: Boolean;
Var
Counter : Integer;
begin
If not (LoggedIn) then Exit;
if FindObjTPA(x,y,3947585,11,-1,7,7,20,['options','1 mor','more opt']) then
begin
Repeat
MMouse(x,y,2,2);
Wait(100+random(200));
begin
GetMousePos(x,y);
Mouse(x,y,2,2,false);
AntiRandoms;
Result := True;
ChooseOption('amine');
AntiBan;
end;
Inc(Counter);
until ((Result = True) or (Counter = 20));
if (Counter=20) then
begin
WriteLn('Couldn''t find Anvil');
Logout;
TerminateScript;
end;
end;
end;
Begin
// LoadsDone := 0
ClearDebug;
SetupSRL;
DeclarePlayers;
ActivateClient;
LoginPlayer;
SymbolAccuracy := 0.45;
if(YourSRLId = '')or(YourSRLPass = '')then
begin
SRLId := '6394';
SRLPassword := 'GwepfLrGMa';
end;
Wait(1000);
MakeCompass('N');
Setangle(True);
AntiRandoms;
Repeat
SetRun(True);
WalkToAnvil;
FindAnvil;
Until (not (LoggedIn));
//(LoadsDone=LoadsWanted);
End.
I keep getting this error: [Runtime Error] : Exception: in line 46 in script. Here is the line. I really don't understand it.
SCAR Code:
Result := CreateTPAFromBMP( GetBitmapDC(TempBMP));
~Camo