rj
11-23-2012, 07:04 PM
When i try to add failsafes.. It ends up failing.
I get this error:
[Error] C:\Simba\Scripts\Autofightteser.simba(31:8): 'BEGIN' expected at line 30
Compiling failed.
http://i49.tinypic.com/5aey9s.jpg
program fite;
Var
X, Y, charm: Integer;
Const
// fill out
NPC=1122383;
loot=14079706;
tolerence=15;
time=7; // in seconds
rwait=1000;
tleft= 41;
tright = 44;
bleft=426;
bright=280;
procedure pickup;
Begin
charm := BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59m MJMl' +
'VnHMdIvf8WjKiBGnEQIAUtQGXA==');
WriteLn('Looking for bones . . . ');
Wait(1700 + Random(1200));
if FindColorTolerance(X,Y,loot,184,123,294,197,15) then
WriteLn('Found bones');
movemouse(x, y);
Wait(120 + Random(80));
ClickMouse(x, y, Mouse_right);
End;
else
Begin
clicknpc;
End;
Begin
WriteLn('Looking for charm . . . ');
wait(1100);
if FindBitMapToleranceIn(charm, X, Y,161, 95, 330, 205, 75) then
movemouse(X, Y);
WriteLn('Found charm ');
wait(500);
ClickMouse(X, Y, Mouse_left)
FreeBitMap(charm);
wait(3000);
End;
else
Begin
clicknpc;
End;
End;
procedure checkcombat;
begin
Wait((time*500) + Random(rwait));
WriteLn('Waiting for loot . . .');
Wait((time*500) + Random(rwait));
pickup;
End;
procedure clicknpc;
var
X, Y, charm: Integer;
begin // kill npc
WriteLn('Attacking skeleton . . .');
if FindColorTolerance(X,Y,NPC,tleft,tright,bleft,brig ht,tolerence) then
movemouse(x, y);
Wait(20 + Random(50));
ClickMouse(x, y, Mouse_Left)
checkcombat;
End else;
Begin
clicknpc;
End;
Begin
repeat
clicknpc;
until (False);
End.
I get this error:
[Error] C:\Simba\Scripts\Autofightteser.simba(31:8): 'BEGIN' expected at line 30
Compiling failed.
http://i49.tinypic.com/5aey9s.jpg
program fite;
Var
X, Y, charm: Integer;
Const
// fill out
NPC=1122383;
loot=14079706;
tolerence=15;
time=7; // in seconds
rwait=1000;
tleft= 41;
tright = 44;
bleft=426;
bright=280;
procedure pickup;
Begin
charm := BitmapFromString(31, 12, 'meJyTUdeWIQU5TPgPRyRpJNJkBj' +
'CgrvnIJkNEkNnUMpwMvVN3HIMj/IZjDXOscQFxCcRMiDdxmY/scrQ' +
'wxx8XcMPR2HiCBZmLi40ZJnAvUNdwBiSAJ9iJNxwevGiOx59m MJMl' +
'VnHMdIvf8WjKiBGnEQIAUtQGXA==');
WriteLn('Looking for bones . . . ');
Wait(1700 + Random(1200));
if FindColorTolerance(X,Y,loot,184,123,294,197,15) then
WriteLn('Found bones');
movemouse(x, y);
Wait(120 + Random(80));
ClickMouse(x, y, Mouse_right);
End;
else
Begin
clicknpc;
End;
Begin
WriteLn('Looking for charm . . . ');
wait(1100);
if FindBitMapToleranceIn(charm, X, Y,161, 95, 330, 205, 75) then
movemouse(X, Y);
WriteLn('Found charm ');
wait(500);
ClickMouse(X, Y, Mouse_left)
FreeBitMap(charm);
wait(3000);
End;
else
Begin
clicknpc;
End;
End;
procedure checkcombat;
begin
Wait((time*500) + Random(rwait));
WriteLn('Waiting for loot . . .');
Wait((time*500) + Random(rwait));
pickup;
End;
procedure clicknpc;
var
X, Y, charm: Integer;
begin // kill npc
WriteLn('Attacking skeleton . . .');
if FindColorTolerance(X,Y,NPC,tleft,tright,bleft,brig ht,tolerence) then
movemouse(x, y);
Wait(20 + Random(50));
ClickMouse(x, y, Mouse_Left)
checkcombat;
End else;
Begin
clicknpc;
End;
Begin
repeat
clicknpc;
until (False);
End.