PDA

View Full Version : Help!!!!



lewwy44
12-19-2006, 07:25 PM
ok somethings wrong and i can't figure it put plz help me

program TeakSmasher;

//Script owned by lewwy44//
//Edit at own will//
//Do not sell or claim as own//

{.include Si.scar}

var x,y : integer;

const
waittime=1;
treecolor=0;
loadstodo=0; //amount need to do//
procedure cuttree;

begin
findcolor(x,y,7383496,-1244037, -5094993)
procedure DropIfNeeded;
begin
if(InventoryFull)then
begin
Beer := BitmapFromString(5, 5,
'000001C9C1C9CDC5CDD0CAD0CDC5CD000001D7D1D7D9D2D8D AD5D9' +
'DDD9DD564D42000001E6E2E6E7E4E7E8E5E8564D42000001C 09018' +
'F4F2F4F2F0F2544A3B000001C09018C09018C09018');
DroppedOres:=DroppedOres+(CountItemBmpTol(Ore,50)) ;
if(FindItemBmpTol(Beer,50))then
begin
ClickAllItemsNameWait('Drop','Eat',0);
ClickAllItemsNameWait('Drop','Drink',0);
end;
if(DropAllButPick)then
begin
ClickAllItemsNameWait('Drop','Use',0);
end else
ClickAllItemsBmpTolWait('Drop',Ore,50,0);
ProgressReport;
FreeBitmap(Beer);
end;
procedure DropIfNeeded;
begin
if(InventoryFull)then
begin
Beer := BitmapFromString(5, 5,
'000001C9C1C9CDC5CDD0CAD0CDC5CD000001D7D1D7D9D2D8D AD5D9' +
'DDD9DD564D42000001E6E2E6E7E4E7E8E5E8564D42000001C 09018' +
'F4F2F4F2F0F2544A3B000001C09018C09018C09018');
DroppedOres:=DroppedOres+(CountItemBmpTol(Ore,50)) ;
if(FindItemBmpTol(Beer,50))then
begin
ClickAllItemsNameWait('Drop','Eat',0);
ClickAllItemsNameWait('Drop','Drink',0);
end;
if(DropAllButPick)then
begin
ClickAllItemsNameWait('Drop','Use',0);
end else
ClickAllItemsBmpTolWait('Drop',Ore,50,0);
ProgressReport;
FreeBitmap(Beer);
end;
wait(5000)
until (InvFull);
wait(5000)
end;

procedure procedure DropIfNeeded;
begin
if(InventoryFull)then
begin
Beer := BitmapFromString(5, 5,
'000001C9C1C9CDC5CDD0CAD0CDC5CD000001D7D1D7D9D2D8D AD5D9' +
'DDD9DD564D42000001E6E2E6E7E4E7E8E5E8564D42000001C 09018' +
'F4F2F4F2F0F2544A3B000001C09018C09018C09018');
DroppedOres:=DroppedOres+(CountItemBmpTol(Ore,50)) ;
if(FindItemBmpTol(Beer,50))then
begin
ClickAllItemsNameWait('Drop','Eat',0);
ClickAllItemsNameWait('Drop','Drink',0);
end;
if(DropAllButPick)then
begin
ClickAllItemsNameWait('Drop','Use',0);
end else
ClickAllItemsBmpTolWait('Drop',Ore,50,0);
ProgressReport;
FreeBitmap(Beer);
end;
begin
repeat
cuttree;
DropIfNeeded;
until(loadstodo-amountloads);
end.

Pentti
12-19-2006, 07:55 PM
See line 18:
findcolor(x,y,7383496,-1244037, -5094993) You must have there FindColor(x,y,Color,xs,ys,xe,ye) You have x and y and color there, but these 2 last numbers you got, what are them? You must replace them with 4 numbers, xs,ys is coords for toplef coords and xe and ye is bottomright coords for the "box" inside you are finding the color.