TheGodfather
02-11-2007, 03:13 AM
whenever I try to declare a Procedure or a Funtion, I'd always get an error, Identifier Expected in script. WTF? the error is at the part "Procedure DropOres;"
// Drops all iron ores inside an inventory
program DropIron;
var Iro,drop,x1,y1,x2,y2: integer;
begin
drop := BitmapFromString(14, 8, 'z78DA33753135313177C3014CC' +
'1B298247EF5C82206480097C9C4A8C754834B2FF1E243C54C 626C' +
'21C63D98B64048031C809838C2A59E1812BFAB20240010BE9 F4F');
Iro := DTMFromString('78DA631461606010644001D62A32609A118 8F' +
'F0301A32490C181AAC64B4F11AE064C83D4B0A1AA31539444 55A3' +
'0C24F818D00023AA1A5920218EAAC2CF4005558D349090226 08E3' +
'4A69BDDB4E4E16A5881180071A007E9');
begin
Procedure DropOres;
FindDTM(Iro,x1,y1,560,210,730,460)
MoveMouseSmooth(x1,y1)
HoldMouse(x1,y1,false)
wait(20+random(30))
ReleaseMouse(x1,y1,false)
wait(20+random(20))
FindBitmap(drop,x2,y2)
MoveMouseSmooth(x2+6,y2+3)
HoldMouse(x2+6,y2+3,true)
wait(20+random(15))
RealeaseMouse(x2+6,y2+3,true)
end;
begin
repeat DropOres
until not FindDTM(Iro,x1,y1,560,210,730,460)
end.
Okay I've solved my problem.
// Drops all iron ores inside an inventory
program DropIron;
var Iro,drop,x1,y1,x2,y2: integer;
begin
drop := BitmapFromString(14, 8, 'z78DA33753135313177C3014CC' +
'1B298247EF5C82206480097C9C4A8C754834B2FF1E243C54C 626C' +
'21C63D98B64048031C809838C2A59E1812BFAB20240010BE9 F4F');
Iro := DTMFromString('78DA631461606010644001D62A32609A118 8F' +
'F0301A32490C181AAC64B4F11AE064C83D4B0A1AA31539444 55A3' +
'0C24F818D00023AA1A5920218EAAC2CF4005558D349090226 08E3' +
'4A69BDDB4E4E16A5881180071A007E9');
begin
Procedure DropOres;
FindDTM(Iro,x1,y1,560,210,730,460)
MoveMouseSmooth(x1,y1)
HoldMouse(x1,y1,false)
wait(20+random(30))
ReleaseMouse(x1,y1,false)
wait(20+random(20))
FindBitmap(drop,x2,y2)
MoveMouseSmooth(x2+6,y2+3)
HoldMouse(x2+6,y2+3,true)
wait(20+random(15))
RealeaseMouse(x2+6,y2+3,true)
end;
begin
repeat DropOres
until not FindDTM(Iro,x1,y1,560,210,730,460)
end.
Okay I've solved my problem.