You cannot call a procedure "FindBitmap" it's already a pre-made statement. You have errors in your script regarding syntax. Some of your logic and stuff are also not the most efficient, but i'll leave it to your to fix those. I just made your script compile. Here's a fixed version. Compaire urs and mine=).
SCAR Code:
program PracticeBitmap;
{.include SRL/SRL.Scar}
Var
Bitmap_Tinderbox, Bitmap_WillowLog,x,y : Integer;// Must declare a x or y to use.
//The one you had before is just a longer version of the x & y. + you didn't declare them ^^'
Procedure DeclareBitmaps;
Begin
Bitmap_Tinderbox := BitmapFromString(35, 35, 'beNrtlu9LU1EYx9c' +
'LS23vqrcaoaFvGuIPVDJ/jHQwG5szTYdOZZnKGMMyG1Pnj1mtECH8' +
'f/UDX3i4bLkdp9YLvTxc7j3n3Ofz/DrPuefn99f/vXy+Bya3pxnp7' +
'+sZHhp8GxyJhEM3wjLN6ESzKY9H383Eo9xD48FrgqQfVagNh8alfO' +
'791OL8LJL4MI3EImG4dYOEQI9s5mFpYW4lmfi4vIDwgDDCLPT6QEJ' +
'ID4La9dWV9Foqs7GK8IwwK48EGhsZ6u3ucmcJgc5PqSXu2fTaZmYD' +
'2cqmEV4RpmQDFGKoqAJypAiBTlShc/tzJreVzW9v7ua+cOcVkTs4C' +
'AV3oOAOCXIvOZaZ2kL+68HOt6O9HMIDrwxigFG8QUPcNxHLpPl4P/' +
'/jcLdULPz+fsCdV8ZxxCjeoGEVjjNI6NxB2IxONIOABVSO4KZSo6z' +
'hzky4ORF9nIz7U7N+sRi/UujQjH5RgJZRsHwy2CSJTTQLxyfGYou5' +
'sMwpo6gAFLSJN42SShbLjOXYHMTCSNkJZXSg0cRYhjMWjqsmYdXct' +
'syyTCsR4vC65xFyGasMh+MYSQafPX2CVGExRS5YTEXRMAOdDb2Bh5' +
'Wsv+JgKZsU5PPWlva2F9VB+E6CuFO6gLysmjgVDEZ2drzsCryqDsK' +
'q019FEsRXbA1HlsrS2kXNdscsBXB2WmIfUXV8yNYQ6DIWCNvIahR0' +
'JM7BmiAo5OjPyU+2ElACTrlWshCUq/IJl7e7qh05NlU6DwEkWWov6' +
'gZ2XjCiTu7t4bhDqBHHPWs4KARQrbWsP+iwMAOgoJ8RnbZXPc3Vji' +
'p7kTJiTY/TweJW34+QSh3l+EWbtYZmTQ+EZeQ6P1p8iDtkynsGyXK' +
'OUapRvfoGf66stSpueETT+Af/ireBuL/u1nUBwN7cMw==');// Do you really need this much bitmap to
Bitmap_WillowLog := BitmapFromString(35, 35, 'beNrtlk9Lw0AUxOs' +// find a specific object?
'nEBURUaqnXtRDEC2WYpWKIj20oPgPURRFEQqe/Pp1YGB47Osum5De' +// The more you have,
'ssyhJOn77ey+2WQ2a0Yzahyt1pLV4hB7neVif6VbrPWP1897G7WzU' +// the slower your script runs.
'FD1R8Oty8EmVAEULIgXao6vtoGwKgtiHUwVwpwxc00e00ZBILzKgv' +
'Dk22P34/nk571/O2pTvqxu6S5Bu+3VTBYe+/0+ox7GO55lEVYEwXU' +
'1kGVJvG4lUKmlE2j6eWpZvr4Ep9i+fDsxUEJcVdpBw+TEVq0rkF3A' +
'WH3Gh/0JTa4PLgadBAu3GDooQVFjCEHxj0yTkutxuPJ0c4iFUvRIs' +
'R3OWPmyipX20c4kYDE7AKHy12uPfyRFc/YI3/B+VT3obzqkBYGQ2Z' +
'e7o+CQ8RZ8z6dBajOByAUultBYstIg1CQIP2gnlqac8CZAMGJBtvE' +
'SoLLhZTMIBDs5juZ2PnubZ/7cNJEFXxBc30+KuedDYuuhzNd68Fgs' +
'tvY8D4pXe1NbRzKlV0+NXyO250mpt75n0cjivqaCjWu+YJtRz/gHf' +
'kN4MQ==');
End;
Procedure LocateObjects; // Changed so script can work
Begin
If (FindBitmap(Bitmap_Tinderbox,x,y)) Then
Begin
Wait(250 + Random(250));
MoveMouseSmooth(x, y);// This will get you banned. Use Mouse or MMouse + clickmouse
Wait(250 + Random(250));
ClickMouse(x, y,true); // You missed a parameter here.
Wait(250 + Random(250));
End;
If Not FindBitmap(Bitmap_Tinderbox, x, y) Then // instead of a if not, try "end else".
Begin
WriteLn('Could not find tinderbox.');
exit; // terminatescript wont work to what you want. Forums has the WHY.
End;
If FindBitmap(Bitmap_WillowLog, x,y) Then
Begin
Wait(250 + Random(250));
MoveMouseSmooth(x, y);
Wait(250 + Random(250));
ClickMouse(x,y, True);
Wait(250 + Random(250));
End;
If not FindBitmap(Bitmap_WillowLog, x, y) Then
Begin
WriteLn('Could not find logs.');
exit;
End;
End;
Procedure BitmapLoop;
Begin
DeclareBitmaps;
LocateObjects;
End;
Begin
SetupSRL;
ActivateClient;
BitmapLoop;
End.