shadows-collide
06-23-2007, 10:41 AM
Hey I only started scripting yesterday, and have tried not to post with nooby questions as much as possible, I can now get other peoples script to work provided they are compatible with SCAR Divi 3.06, so i started writing some of my own, i breezed through the Begginer Tut and then got the the Intermediate one where it gets a little more complicated. I made this script to click on the Quest icon in your inventory. But it dosnt... Even though it compiles properly, Is it something to do with my Bitmap not being big enough? All the Bitmaps i have seen have been huge! It simply stays at the top left hand of the RS window... Im glad it compiles though, I guess im doing something right!
Program FirstBitmap;//Program Name
Var // Declares Variables
x, y, Bitmap:Integer; //States Variables that are going to be used
//Declares the Bitmaps that are going to be used.
Procedure DeclareBitmaps;
Begin
Bitmap := BitmapFromString(16, 1, 'z78DA733670C60341C00245C4' +
'0D03581880A001542D0C1A404900218E1574');
End;
//Procedure that clicks on the Bitmap
Procedure ClickBitmaps;
Begin
Wait(250+random(43))
movemousesmooth(x,y)
wait(32+random(12))
clickmouse(x,y,true)
End;
//Procedure that finds the Bitmap
Procedure FindBitmaps;
Begin
If(FindBitmap(Bitmap, x, y)) Then
ClickBitmaps;
End;
//The main loop
begin
repeat
Wait(1300+random(100))
DeclareBitmaps;
FindBitmaps;
ClickBitmaps;
Wait(5000)
until(false)
end.
Many thanks!
Program FirstBitmap;//Program Name
Var // Declares Variables
x, y, Bitmap:Integer; //States Variables that are going to be used
//Declares the Bitmaps that are going to be used.
Procedure DeclareBitmaps;
Begin
Bitmap := BitmapFromString(16, 1, 'z78DA733670C60341C00245C4' +
'0D03581880A001542D0C1A404900218E1574');
End;
//Procedure that clicks on the Bitmap
Procedure ClickBitmaps;
Begin
Wait(250+random(43))
movemousesmooth(x,y)
wait(32+random(12))
clickmouse(x,y,true)
End;
//Procedure that finds the Bitmap
Procedure FindBitmaps;
Begin
If(FindBitmap(Bitmap, x, y)) Then
ClickBitmaps;
End;
//The main loop
begin
repeat
Wait(1300+random(100))
DeclareBitmaps;
FindBitmaps;
ClickBitmaps;
Wait(5000)
until(false)
end.
Many thanks!