Jump to content
seafight17

Upgrate from 3.34 to 3.35 scar divi and FindBitmapTol no working?

Recommended Posts

hallo ...

Here the sript that i i used before the update of corse it now working the problem ..is that even if i change the FindBitmapTolerance>FindBitmapTol

still no detect the bitmaps why?and What i can do to solve it (at least any way to download the ols version 3.34? )

 

procedure LoadBMP;
begin
writeln('fortvsh eikonvn')  ;

 logout := BitmapFromString(54, 9, 'ceNrNUv1PUmEU/ltSqwECoq' +
   '02WNH6UvtFt0otm64Pxfjwh1qsWurmmmEYtAXNmHOFZeCCBX5AaF' +
   'nORSAzioWbuWq4Nh2gM1QczNFzedm7O+wP8O7Z2fM855z3nnvfY5' +
   'OIM5nM+6tXED8q5BahYKisFNxTfyHidoOMVVfBJIh+mU1EIiDwQ0' +
   'YjyIcWGTgt8LXdhbQfOYzovXOb+osT45vLy4T/sFqRHT5dSbOQUy' +
   'qVpURIsJ1OBx/p4b8SCl4K+EGDAQUvBPx4+PuSzwcyWCqC82tsFP' +
   'Fbby8cCtvxYzB/Op0rc3PEeSdrhvP6qBRwX6xfCYeT0ejbxgZmzp' +
   'MnaOOM5j55C8Fvlyu9sWGViInM7Hhm9Xr4A1kk4/F5u90ilXo7O5' +
   'EalIjNohIQfMjnri7mHzY2POMXU8xotcxIFeVEepqb2CdHQ6GR83' +
   'W2ygpwRNrl79bAofJvJLIUCFCJ1IRSgRkI8OqAXsfOsp+gydRfIg' +
   'Rx1NX2FfP+eL2p9XUQivFWFbJUupqYCfv4xQxYZVurq369jsrF6e' +
   'l5x5scn5pKxmLsYmapFAoqMaFfl+s18bibsZiByyFYcLu3U6kn2c' +
   'UYqq2B8/RAGfiCx0NrRpVKOFQ6sgtMJcWwjNnPsVYVuN9o2Fpbw1' +
   'HgXwfM8M3lpww8bg5cDpwR+TXaixk+Pewh/DGXM6l9oNm/j6C/uo' +
   'q5HaUC8fnZM8R03rgO6e5oJ9Iml0PSFsvlS2xJMKJW00sx15yjvE' +
   'co2Eok8m4N9czatMhoOyac1GqpbC8qZKP70MGuUhFinsl2dmbzDu' +
   'nYW0RaSOq/PM/MO/CegA/SlsWtwoJdDnXBnl2Lm9n4D8zFovk=');


last15:= BitmapFromString(26, 9, 'ceNqtj79LAmEYx9faQoQWaT' +
   'KhSxCEdJDAtQbdb3LoXk+h/gAVwe1abGgw1NLFXWgJXAS3bCvsl6' +
   'd3r56nnl5qpVcZ9ByvXf4BwYeXz/f7Pu/78oqKIv4fmsPxsbU1Rk' +
   'jo9wFRFN/39mYu13R3V5AkUi4zSCbHLGvEudn8tb5OgIhvbhq93s' +
   'vhYe/sDGSEEBG5UBgHAiDLDCMReGjEsiQ2eX7mdC4P1LtdAJdKE7' +
   '8f5NNiIQ0wN5lgHcTjaigE0i4W+xwn5/Mqy5KB9uXliKaNeeBZlo' +
   'FmtTp1u0G+V1ZIA3yZzboIgs5v2cnl1GCQeI/jlFjsc2NDo6huMg' +
   'nNY6cD8NfXU6cT5Ht1lTQA3Ga4QfviQkWIePf4uJNKgTw1GrPtbb' +
   '5afZAkoHl1NdnfB9E2N0kDzNfWDDdon58PEVpEjI1+eHAgnZ7Wy+' +
   'Vaq6WEw9LJiS5HR61UCgTDj2ga5L5eB0AIOJsdMAxxOCUnErrzvG' +
   'azPVcqmtU6oyiFYe4w1uH5V4/nbWdn4vXWbm+hkaNRBaHFLsZiJv' +
   'M3jPHI55va7XCDmE5D/AH/Zhhk');

  last5 := BitmapFromString(31, 10, 'ceNq1jL1LAnEcxtfcJIQ' +
   'WcdIgCwzDGiIsyCEH3Z0a9KBA/4EkaKulBgelpRb/AgkEIQQ3dQi' +
   'MSr3zXuzutOvFfDmvMuixHxyB1yh8OD73PM/vyysKPzW4pyeClMt' +
   'pLtfHwsI7RZGE5/nBzs5wdVXd2OBEUV/+V40slq+5OQJJGu02QVt' +
   'eFsplyFs02k6lIB2KIiKn0++7u/rSsGIZZuh2/92A/taWlE6zNze' +
   'o6FYLCLlcNxiEfFqtJAGj2Vl8nw8PX/f2DKvHTKYTCukhoc5xdVk' +
   'Wstm+zwcBbKmkrq1BvmdmSAK+LJaxYPy7n6zax8dKPP5ps2lOZ+v' +
   '0lFRVSQLs9XVve5s4Uyyqbjfk22QiCcAF3Q2r1smJlExCao3GcHG' +
   'RKZXgD6IIqrWaurJCnM1mu34/RHM4SAJGZrPuxpUg6MlLOCwmEpB' +
   '7mr5rNsHA46HzeYiyvy+enY0lFmsmkxDh4uI1FIJgTPaTFV7JR0f' +
   'jUwyjzc/XCwV4z+vlLi9vBYG+utLs9qHTqUQi+B3DML319b7H093' +
   'cvKtUkMgHBwpFGVagEwioS0u4wJ+fk6TC89PjBzyJyEg=');




writeln('ok eikones')  ;
end;

procedure Mouse(var x, y: Integer);
begin
 HoldMouse(x, y, True);
 MoveMouseSmooth(x, y);
 wait(100);
 ReleaseMouse(x, y, True);
 wait(50);
end;

procedure reload;
begin
if FindBitmaptolerance( logout, x, y,50)     then   begin
Mouse(x,y);
end;
end;

function agoraA:boolean;
begin
result:=false;
if (FindBitmaptolerance( last5, ax, ay, 50)=true) then   begin
result:=true;
end;
end;


function agoraB:boolean;
begin
result:=false;
if (FindBitmaptolerance( last15, ax, ay, 50)=true) then   begin
result:=true;
end;
end;

Link to comment
Share on other sites

I can't know for sure this will work since you only provided part of the script, but I think this should be a correct port of that part:

 

[scar]procedure LoadBMP;

begin

WriteLn('fortvsh eikonvn');

 

logout := TSCARBitmap.Create('deNrNUv1LU2EU9tf+jNSKTXf3YRhs1KIvtV8UKrUMpQ+d' +

'7cMfikZFKkis2cwFzbAhUrNskzbanLqmZQ1pbQ6zRgomFZNA2VRsfjGR9dy94+Uy+wO8PBye' +

'5znnvPfc+57CrD1Zdpk0mUy+v3oF8aNKaRUyfQUScG/VhYjHAzJYVgqTIPplIh6JgMAPd3SA' +

'fKhXgNOCQONdSMeRw4j+O7epPzcyvL6wQPgPmw3Z/tMlNAvp02isIiHB9tbW5CMj/FdC5iUj' +

'mDSZUPCCESxOfZ8PBEB6JWI4vwYHEL91dsKhsB8/BvOny7U0PU2cd4o6OK+PygHPxaqlqamN' +

'aPRtTTU758kTtHFcf5+8heD30NDW2ppNJiUyueOZMBrh96Swsbg443BY5XJ/SwtSvTKpRSwC' +

'wYd81unYf1hT/UyQTzFuMLAjFRcR6a2r5Z4cDYfd5yvtJcXgiLQr2KqHQ+XfSGQ+FKISqRG1' +

'CjMQ4NUhYzs3y30mzeZukRDEWVnRlZ/3x+9PrK6CUAw3aJClcqiWnbBLkM+CU7a5vBw0tlM5' +

'NzY243yT5j7fRizGLWaXSqWiEhMG29O95jz+eixm4vMIZj2e7UTiSWox+irK4Tw9WAA+6/XS' +

'mgG1Gg6VztQCU0nRr2D3c7BBAx7sMG2urOAo8K89FviWolOmPH4afB4ct/Ia7cUMnx62Ef6Y' +

'zxs1PNAf2E/QXVbK3o5ahfj87Blium5ch/Q0NxFpVyohaYv18iWuJHBrtfRSLOXnKG8TMpvx' +

'eMatoZ5dm3oFbceEowYDlU25OVy0HirUScSIGSbX2ZnNOKR5Xy5pIan/8gwz48B7jACkMYVb' +

'Odm7HNrsvbsWN1PxHzSfozg=');

 

 

last15 := TSCARBitmap.Create('deNqtj79LAmEYxx1zixCCCCcLMiE4UAcJWm3I3ckhXy+h' +

'/gCLoE0XHRwUM3VxF1oEF6Et24p+3undq+d5ntppdV6m0HO8dfkHBB9ePt/v+7zvy7tiMpt4' +

'Wf5HtK2tz42NIUJctwvwPP/h9Y5dLnV7mxMEUs7Ti8eHNG3EqcXytbxMgIhvbuqS9Hp4KKXT' +

'IApCRMRicRgIgMzTj0TgIYWmSWyw7Jii5geYTgfAlcrI5wOZrK6SBpguLcHaOz0dHByAtEql' +

'bjQqFgoDmiYDrctLxe835oEXUQQatZrqdoPMFhZIA3xZLLpwnM5v2c7nB6EQcSkalU9OJlar' +

'Zrd34nFontptgL2+VikKZGY2kwaA2ww3aOVyA4SId2KxdioF8lyvjzc32VrtURCARrk82t0F' +

'0dbWSANMFxcNN2hdXPQR+okYG31/f19IJplq9b7ZlMNhIZHQ5eiomUqBYPiR3w/ywDAACAFn' +

's71gkDicEs/OdGdZbX395epKs9nGdrscDN5hrMOybx7Pu9M52tm5v72FRjw+lhH62cWYPz//' +

'G8ZY2dtTHQ64gc9kIH4DX+0Yhw==');

 

last5 := TSCARBitmap.Create('deNq1jL1LAnEcxhurSUJokVoqSIVE0YaICnKwwXYnhzww' +

'0H+gCNxqqaHBaKnFvyACQRDBLR0Ew1LvvBe7O+3KfOu8yqDHfnAEXWPw4fjc8zy/7+zY5Bi' +

'vKP8H9/hIkFIpbWnpbXGxQ1Ek4Xn+1ecbeDzq6ionivryr2poNn9MTxNIUms2CZrDIeTzkJ' +

'dIpHl2BmlTFBE5kegEg/rSsGIZZuB0/tyA/saGlEiwhQIqutEAQirV3d6GvFssJAHDqSl8n' +

'w4OWuGwYfVwddUOBPSQUOW4qiwLyWTf64UANpdTl5chn+PjJAEfZvNIMP7e/66ah4fK/v77' +

'zIxmtTaOj0lVliTAptO9zU3izM2N6nRCPicmSAJwQXfDqnF0JMXjkEqtNrDZmFwOfi+KoFy' +

'pqC4XcTaZ7G5tQbT5eZKAocmku3ElCHryvLMjnp5C7mi6VK+DV7ebzmQgyu6ueHIykmi0Ho' +

'9DhIuLViAAwZjsf1d4Jcdio1MMoy0sVLNZeG9tjbu8vBUE+vpam5sbWK1KKITfEQzTW1npu' +

'93d9fVSsYhE3ttTKMqwAm2/X7XbcYE/PydJkef/jy/SD8hx');

 

WriteLn('ok eikones');

end;

 

procedure Mouse(x, y: Integer);

begin

MouseBtnDown(x, y, btnLeft);

MoveMouse(x, y);

Wait(100);

MouseBtnUp(x, y, btnLeft);

Wait(50);

end;

 

procedure reload;

begin

if FindBitmapTol(x, y, logout, 50) then

Mouse(x, y);

end;

 

function agoraA: Boolean;

begin

Result := FindBitmapTol(last5, ax, ay, 50);

end;

 

function agoraB: Boolean;

begin

Result := FindBitmapTol(last15, ax, ay, 50);

end;[/scar]

 

Make sure you declare the bitmap variables as TSCARBitmap instead of Integer.

Link to comment
Share on other sites

FindBitmapTol (x,y,logout,xs,ys,xe,ye,50) is correct sintax

problem is maybe one litle bug in finding images functions

actualy search in xs,ys,xe-1,ye-1(i reported this in mantis)

try FindBitmapTol (x,y,logout,xs,ys,xe+1,ye+1,50) until freddy fix it

And,did you setup search client...

Link to comment
Share on other sites

FindBitmapTol(x, y, logout, 50) Type mismatch ? ;( If i use the (x,y,logout,xs,ys,xe,ye,50) no resond in finding..

 

[scar]procedure LoadBMP;

begin

WriteLn('fortvsh eikonvn');

 

logout := TSCARBitmap.Create('deNrNUv1LU2EU9tf+jNSKTXf3YRhs1KIvtV8UKrUMpQ+d' +

'7cMfikZFKkis2cwFzbAhUrNskzbanLqmZQ1pbQ6zRgomFZNA2VRsfjGR9dy94+Uy+wO8PBye' +

'5znnvPfc+57CrD1Zdpk0mUy+v3oF8aNKaRUyfQUScG/VhYjHAzJYVgqTIPplIh6JgMAPd3SA' +

'fKhXgNOCQONdSMeRw4j+O7epPzcyvL6wQPgPmw3Z/tMlNAvp02isIiHB9tbW5CMj/FdC5iUj' +

'mDSZUPCCESxOfZ8PBEB6JWI4vwYHEL91dsKhsB8/BvOny7U0PU2cd4o6OK+PygHPxaqlqamN' +

'aPRtTTU758kTtHFcf5+8heD30NDW2ppNJiUyueOZMBrh96Swsbg443BY5XJ/SwtSvTKpRSwC' +

'wYd81unYf1hT/UyQTzFuMLAjFRcR6a2r5Z4cDYfd5yvtJcXgiLQr2KqHQ+XfSGQ+FKISqRG1' +

'CjMQ4NUhYzs3y30mzeZukRDEWVnRlZ/3x+9PrK6CUAw3aJClcqiWnbBLkM+CU7a5vBw0tlM5' +

'NzY243yT5j7fRizGLWaXSqWiEhMG29O95jz+eixm4vMIZj2e7UTiSWox+irK4Tw9WAA+6/XS' +

'mgG1Gg6VztQCU0nRr2D3c7BBAx7sMG2urOAo8K89FviWolOmPH4afB4ct/Ia7cUMnx62Ef6Y' +

'zxs1PNAf2E/QXVbK3o5ahfj87Blium5ch/Q0NxFpVyohaYv18iWuJHBrtfRSLOXnKG8TMpvx' +

'eMatoZ5dm3oFbceEowYDlU25OVy0HirUScSIGSbX2ZnNOKR5Xy5pIan/8gwz48B7jACkMYVb' +

'Odm7HNrsvbsWN1PxHzSfozg=');

 

 

last15 := TSCARBitmap.Create('deNqtj79LAmEYxx1zixCCCCcLMiE4UAcJWm3I3ckhXy+h' +

'/gCLoE0XHRwUM3VxF1oEF6Et24p+3undq+d5ntppdV6m0HO8dfkHBB9ePt/v+7zvy7tiMpt4' +

'Wf5HtK2tz42NIUJctwvwPP/h9Y5dLnV7mxMEUs7Ti8eHNG3EqcXytbxMgIhvbuqS9Hp4KKXT' +

'IApCRMRicRgIgMzTj0TgIYWmSWyw7Jii5geYTgfAlcrI5wOZrK6SBpguLcHaOz0dHByAtEql' +

'bjQqFgoDmiYDrctLxe835oEXUQQatZrqdoPMFhZIA3xZLLpwnM5v2c7nB6EQcSkalU9OJlar' +

'Zrd34nFontptgL2+VikKZGY2kwaA2ww3aOVyA4SId2KxdioF8lyvjzc32VrtURCARrk82t0F' +

'0dbWSANMFxcNN2hdXPQR+okYG31/f19IJplq9b7ZlMNhIZHQ5eiomUqBYPiR3w/ywDAACAFn' +

's71gkDicEs/OdGdZbX395epKs9nGdrscDN5hrMOybx7Pu9M52tm5v72FRjw+lhH62cWYPz//' +

'G8ZY2dtTHQ64gc9kIH4DX+0Yhw==');

 

last5 := TSCARBitmap.Create('deNq1jL1LAnEcxhurSUJokVoqSIVE0YaICnKwwXYnhzww' +

'0H+gCNxqqaHBaKnFvyACQRDBLR0Ew1LvvBe7O+3KfOu8yqDHfnAEXWPw4fjc8zy/7+zY5Bi' +

'vKP8H9/hIkFIpbWnpbXGxQ1Ek4Xn+1ecbeDzq6ionivryr2poNn9MTxNIUms2CZrDIeTzkJ' +

'dIpHl2BmlTFBE5kegEg/rSsGIZZuB0/tyA/saGlEiwhQIqutEAQirV3d6GvFssJAHDqSl8n' +

'w4OWuGwYfVwddUOBPSQUOW4qiwLyWTf64UANpdTl5chn+PjJAEfZvNIMP7e/66ah4fK/v77' +

'zIxmtTaOj0lVliTAptO9zU3izM2N6nRCPicmSAJwQXfDqnF0JMXjkEqtNrDZmFwOfi+KoFy' +

'pqC4XcTaZ7G5tQbT5eZKAocmku3ElCHryvLMjnp5C7mi6VK+DV7ebzmQgyu6ueHIykmi0Ho' +

'9DhIuLViAAwZjsf1d4Jcdio1MMoy0sVLNZeG9tjbu8vBUE+vpam5sbWK1KKITfEQzTW1npu' +

'93d9fVSsYhE3ttTKMqwAm2/X7XbcYE/PydJkef/jy/SD8hx');

 

WriteLn('ok eikones');

end;

 

procedure Mouse(x, y: Integer);

begin

MouseBtnDown(x, y, btnLeft);

MoveMouse(x, y);

Wait(100);

MouseBtnUp(x, y, btnLeft);

Wait(50);

end;

 

procedure reload;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

if FindBitmapTol(logout, x, y, 50, Box.x1, Box.y1, Box.x2, Box.y2) then

Mouse(x, y);

end;

 

function agoraA: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(last5, ax, ay, 50, Box.x1, Box.y1, Box.x2, Box.y2);

end;

 

function agoraB: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(last15, ax, ay, 50, Box.x1, Box.y1, Box.x2, Box.y2);

end;[/scar]

Link to comment
Share on other sites

ok freedy i tried to make it...but i can't alwayes so me type mictmach or Unknow indetifier...i pasate you the whole sript if you have time and fix it i would be pleased :)

[scar]program New;

var ax,ay,randomwait,tolerance_bmp,aax,aay,maxbuy,time,x,y,contor,Acontor,Bcontor :integer ;

var fast_pleidothsh,slow_pleidothsh :boolean;

var last15,last5,logout :TSCARBitmap;

procedure ru8mishs;

begin

 

 

randomwait:=1000; //time

maxbuy:=100; // time!

tolerance_bmp:=50;

 

 

fast_pleidothsh:=true ; //

slow_pleidothsh:=true; //

end;

 

procedure LoadBMP;

begin

WriteLn('fortvsh eikonvn');

 

logout := TSCARBitmap.Create('deNrNUv1LU2EU9tf+jNSKTXf3YRhs1KIvtV8UKrUMpQ+d' +

'7cMfikZFKkis2cwFzbAhUrNskzbanLqmZQ1pbQ6zRgomFZNA2VRsfjGR9dy94+Uy+wO8PBye' +

'5znnvPfc+57CrD1Zdpk0mUy+v3oF8aNKaRUyfQUScG/VhYjHAzJYVgqTIPplIh6JgMAPd3SA' +

'fKhXgNOCQONdSMeRw4j+O7epPzcyvL6wQPgPmw3Z/tMlNAvp02isIiHB9tbW5CMj/FdC5iUj' +

'mDSZUPCCESxOfZ8PBEB6JWI4vwYHEL91dsKhsB8/BvOny7U0PU2cd4o6OK+PygHPxaqlqamN' +

'aPRtTTU758kTtHFcf5+8heD30NDW2ppNJiUyueOZMBrh96Swsbg443BY5XJ/SwtSvTKpRSwC' +

'wYd81unYf1hT/UyQTzFuMLAjFRcR6a2r5Z4cDYfd5yvtJcXgiLQr2KqHQ+XfSGQ+FKISqRG1' +

'CjMQ4NUhYzs3y30mzeZukRDEWVnRlZ/3x+9PrK6CUAw3aJClcqiWnbBLkM+CU7a5vBw0tlM5' +

'NzY243yT5j7fRizGLWaXSqWiEhMG29O95jz+eixm4vMIZj2e7UTiSWox+irK4Tw9WAA+6/XS' +

'mgG1Gg6VztQCU0nRr2D3c7BBAx7sMG2urOAo8K89FviWolOmPH4afB4ct/Ia7cUMnx62Ef6Y' +

'zxs1PNAf2E/QXVbK3o5ahfj87Blium5ch/Q0NxFpVyohaYv18iWuJHBrtfRSLOXnKG8TMpvx' +

'eMatoZ5dm3oFbceEowYDlU25OVy0HirUScSIGSbX2ZnNOKR5Xy5pIan/8gwz48B7jACkMYVb' +

'Odm7HNrsvbsWN1PxHzSfozg=');

 

 

last15 := TSCARBitmap.Create('deNqtj79LAmEYxx1zixCCCCcLMiE4UAcJWm3I3ckhXy+h' +

'/gCLoE0XHRwUM3VxF1oEF6Et24p+3undq+d5ntppdV6m0HO8dfkHBB9ePt/v+7zvy7tiMpt4' +

'Wf5HtK2tz42NIUJctwvwPP/h9Y5dLnV7mxMEUs7Ti8eHNG3EqcXytbxMgIhvbuqS9Hp4KKXT' +

'IApCRMRicRgIgMzTj0TgIYWmSWyw7Jii5geYTgfAlcrI5wOZrK6SBpguLcHaOz0dHByAtEql' +

'bjQqFgoDmiYDrctLxe835oEXUQQatZrqdoPMFhZIA3xZLLpwnM5v2c7nB6EQcSkalU9OJlar' +

'Zrd34nFontptgL2+VikKZGY2kwaA2ww3aOVyA4SId2KxdioF8lyvjzc32VrtURCARrk82t0F' +

'0dbWSANMFxcNN2hdXPQR+okYG31/f19IJplq9b7ZlMNhIZHQ5eiomUqBYPiR3w/ywDAACAFn' +

's71gkDicEs/OdGdZbX395epKs9nGdrscDN5hrMOybx7Pu9M52tm5v72FRjw+lhH62cWYPz//' +

'G8ZY2dtTHQ64gc9kIH4DX+0Yhw==');

 

last5 := TSCARBitmap.Create('deNq1jL1LAnEcxhurSUJokVoqSIVE0YaICnKwwXYnhzww' +

'0H+gCNxqqaHBaKnFvyACQRDBLR0Ew1LvvBe7O+3KfOu8yqDHfnAEXWPw4fjc8zy/7+zY5Bi' +

'vKP8H9/hIkFIpbWnpbXGxQ1Ek4Xn+1ecbeDzq6ionivryr2poNn9MTxNIUms2CZrDIeTzkJ' +

'dIpHl2BmlTFBE5kegEg/rSsGIZZuB0/tyA/saGlEiwhQIqutEAQirV3d6GvFssJAHDqSl8n' +

'w4OWuGwYfVwddUOBPSQUOW4qiwLyWTf64UANpdTl5chn+PjJAEfZvNIMP7e/66ah4fK/v77' +

'zIxmtTaOj0lVliTAptO9zU3izM2N6nRCPicmSAJwQXfDqnF0JMXjkEqtNrDZmFwOfi+KoFy' +

'pqC4XcTaZ7G5tQbT5eZKAocmku3ElCHryvLMjnp5C7mi6VK+DV7ebzmQgyu6ueHIykmi0Ho' +

'9DhIuLViAAwZjsf1d4Jcdio1MMoy0sVLNZeG9tjbu8vBUE+vpam5sbWK1KKITfEQzTW1npu' +

'93d9fVSsYhE3ttTKMqwAm2/X7XbcYE/PydJkef/jy/SD8hx');

 

WriteLn('ok eikones');

end;

 

procedure Mouse(x, y: Integer);

begin

MouseBtnDown(x,y,mbLeft);

MoveMouse(x, y);

Wait(100);

MouseBtnUp(x, y, btnLeft);

Wait(50);

end;

 

procedure reload;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

if FindBitmapTol(logout, x, y, 50, Box.x1, Box.y1, Box.x2, Box.y2) then

Mouse(x, y);

end;

 

function agoraA: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(last5, ax, ay, 50, Box.x1, Box.y1, Box.x2, Box.y2);

end;

 

function agoraB: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(last15, ax, ay, 50, Box.x1, Box.y1, Box.x2, Box.y2);

end;

 

 

procedure Abara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 15 deytera ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Acontor:=Acontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

procedure Bbara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 5 deutera! ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Bcontor:=Bcontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

 

procedure calculate ;

begin

contor:= Acontor + Bcontor;

end;

 

procedure buy;

begin

if (agoraA=true) and (fast_pleidothsh=true) then Abara;

if (agoraB=true) and (slow_pleidothsh=true) then Bbara;

end;

 

begin

cleardebug;

writeln('!!!!!sript gia dhmoprasia 3ekinah !!!!!! ') ;

Loadbmp;

ru8mishs;

SetDesktopAsClient;

Acontor:=0;

Bcontor:=0;

repeat

//shoot;

calculate;

buy;

reload;

if (contor>maxbuy) then begin

writeln('contor > apo maxbuy telos toy sripts gia perisoteres plhodosies >>line 33!! ') ;

writeln('terminatescript ') ;

terminatescript;

end;

until false

end.[/scar]

Link to comment
Share on other sites

I didn't have access to SCAR at the time of your original post. This is a translation that compiles, though as I can't test it, I can't guarantee it will work.

 

[scar]program New;

var ax,ay,randomwait,tolerance_bmp,aax,aay,maxbuy,time,x,y,contor,Acontor,Bcontor :integer ;

var fast_pleidothsh,slow_pleidothsh :boolean;

var last15,last5,logout :TSCARBitmap;

 

procedure ru8mishs;

begin

randomwait:=1000; //time

maxbuy:=100; // time!

tolerance_bmp:=50;

 

 

fast_pleidothsh:=true ; //

slow_pleidothsh:=true; //

end;

 

procedure LoadBMP;

begin

WriteLn('fortvsh eikonvn');

 

logout := TSCARBitmap.Create('deNrNUv1LU2EU9tf+jNSKTXf3YRhs1KIvtV8UKrUMpQ+d' +

'7cMfikZFKkis2cwFzbAhUrNskzbanLqmZQ1pbQ6zRgomFZNA2VRsfjGR9dy94+Uy+wO8PBye' +

'5znnvPfc+57CrD1Zdpk0mUy+v3oF8aNKaRUyfQUScG/VhYjHAzJYVgqTIPplIh6JgMAPd3SA' +

'fKhXgNOCQONdSMeRw4j+O7epPzcyvL6wQPgPmw3Z/tMlNAvp02isIiHB9tbW5CMj/FdC5iUj' +

'mDSZUPCCESxOfZ8PBEB6JWI4vwYHEL91dsKhsB8/BvOny7U0PU2cd4o6OK+PygHPxaqlqamN' +

'aPRtTTU758kTtHFcf5+8heD30NDW2ppNJiUyueOZMBrh96Swsbg443BY5XJ/SwtSvTKpRSwC' +

'wYd81unYf1hT/UyQTzFuMLAjFRcR6a2r5Z4cDYfd5yvtJcXgiLQr2KqHQ+XfSGQ+FKISqRG1' +

'CjMQ4NUhYzs3y30mzeZukRDEWVnRlZ/3x+9PrK6CUAw3aJClcqiWnbBLkM+CU7a5vBw0tlM5' +

'NzY243yT5j7fRizGLWaXSqWiEhMG29O95jz+eixm4vMIZj2e7UTiSWox+irK4Tw9WAA+6/XS' +

'mgG1Gg6VztQCU0nRr2D3c7BBAx7sMG2urOAo8K89FviWolOmPH4afB4ct/Ia7cUMnx62Ef6Y' +

'zxs1PNAf2E/QXVbK3o5ahfj87Blium5ch/Q0NxFpVyohaYv18iWuJHBrtfRSLOXnKG8TMpvx' +

'eMatoZ5dm3oFbceEowYDlU25OVy0HirUScSIGSbX2ZnNOKR5Xy5pIan/8gwz48B7jACkMYVb' +

'Odm7HNrsvbsWN1PxHzSfozg=');

 

 

last15 := TSCARBitmap.Create('deNqtj79LAmEYxx1zixCCCCcLMiE4UAcJWm3I3ckhXy+h' +

'/gCLoE0XHRwUM3VxF1oEF6Et24p+3undq+d5ntppdV6m0HO8dfkHBB9ePt/v+7zvy7tiMpt4' +

'Wf5HtK2tz42NIUJctwvwPP/h9Y5dLnV7mxMEUs7Ti8eHNG3EqcXytbxMgIhvbuqS9Hp4KKXT' +

'IApCRMRicRgIgMzTj0TgIYWmSWyw7Jii5geYTgfAlcrI5wOZrK6SBpguLcHaOz0dHByAtEql' +

'bjQqFgoDmiYDrctLxe835oEXUQQatZrqdoPMFhZIA3xZLLpwnM5v2c7nB6EQcSkalU9OJlar' +

'Zrd34nFontptgL2+VikKZGY2kwaA2ww3aOVyA4SId2KxdioF8lyvjzc32VrtURCARrk82t0F' +

'0dbWSANMFxcNN2hdXPQR+okYG31/f19IJplq9b7ZlMNhIZHQ5eiomUqBYPiR3w/ywDAACAFn' +

's71gkDicEs/OdGdZbX395epKs9nGdrscDN5hrMOybx7Pu9M52tm5v72FRjw+lhH62cWYPz//' +

'G8ZY2dtTHQ64gc9kIH4DX+0Yhw==');

 

last5 := TSCARBitmap.Create('deNq1jL1LAnEcxhurSUJokVoqSIVE0YaICnKwwXYnhzww' +

'0H+gCNxqqaHBaKnFvyACQRDBLR0Ew1LvvBe7O+3KfOu8yqDHfnAEXWPw4fjc8zy/7+zY5Bi' +

'vKP8H9/hIkFIpbWnpbXGxQ1Ek4Xn+1ecbeDzq6ionivryr2poNn9MTxNIUms2CZrDIeTzkJ' +

'dIpHl2BmlTFBE5kegEg/rSsGIZZuB0/tyA/saGlEiwhQIqutEAQirV3d6GvFssJAHDqSl8n' +

'w4OWuGwYfVwddUOBPSQUOW4qiwLyWTf64UANpdTl5chn+PjJAEfZvNIMP7e/66ah4fK/v77' +

'zIxmtTaOj0lVliTAptO9zU3izM2N6nRCPicmSAJwQXfDqnF0JMXjkEqtNrDZmFwOfi+KoFy' +

'pqC4XcTaZ7G5tQbT5eZKAocmku3ElCHryvLMjnp5C7mi6VK+DV7ebzmQgyu6ueHIykmi0Ho' +

'9DhIuLViAAwZjsf1d4Jcdio1MMoy0sVLNZeG9tjbu8vBUE+vpam5sbWK1KKITfEQzTW1npu' +

'93d9fVSsYhE3ttTKMqwAm2/X7XbcYE/PydJkef/jy/SD8hx');

 

WriteLn('ok eikones');

end;

 

procedure Mouse(x, y: Integer);

begin

MouseBtnDown(x, y, mbLeft);

MoveMouse(x, y);

Wait(100);

MouseBtnUp(x, y, mbLeft);

Wait(50);

end;

 

procedure reload;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

if FindBitmapTol(x, y, logout, Box.x1, Box.y1, Box.x2, Box.y2, 50) then

Mouse(x, y);

end;

 

function agoraA: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(ax, ay, last5, Box.x1, Box.y1, Box.x2, Box.y2, 50);

end;

 

function agoraB: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(ax, ay, last15, Box.x1, Box.y1, Box.x2, Box.y2, 50);

end;

 

procedure Abara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 15 deytera ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Acontor:=Acontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

procedure Bbara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 5 deutera! ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Bcontor:=Bcontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

 

procedure calculate ;

begin

contor:= Acontor + Bcontor;

end;

 

procedure buy;

begin

if (agoraA=true) and (fast_pleidothsh=true) then Abara;

if (agoraB=true) and (slow_pleidothsh=true) then Bbara;

end;

 

begin

cleardebug;

writeln('!!!!!sript gia dhmoprasia 3ekinah !!!!!! ') ;

Loadbmp;

ru8mishs;

SetClient(GetDesktopWindow).Free;

Acontor:=0;

Bcontor:=0;

repeat

//shoot;

calculate;

buy;

reload;

if (contor > maxbuy) then

begin

writeln('contor > apo maxbuy telos toy sripts gia perisoteres plhodosies >>line 33!! ') ;

writeln('terminatescript ');

terminatescript;

end;

until false

end.[/scar]

Link to comment
Share on other sites

You could try turning down the tolerance(50) down to a lower number. I usually use anywhere between 5-15 and get good results. 50 may be too high.

If you are getting errors please copy from the debug box, and paste them here...

 

That's not really related to the issue. I believe he's referring to an error, but I don't know how it could be occurring...

The first 2 lines of FindBitmapTol:

[scar] if (XS > XE) or (YS > YE) then

raise ESearchAreaException.Create('Invalid search area');[/scar]

Link to comment
Share on other sites

Lol, failing at my own system...

Try this:

[scar]program New;

var ax,ay,randomwait,tolerance_bmp,aax,aay,maxbuy,time,x,y,contor,Acontor,Bcontor :integer ;

var fast_pleidothsh,slow_pleidothsh :boolean;

var last15,last5,logout :TSCARBitmap;

 

procedure ru8mishs;

begin

randomwait:=1000; //time

maxbuy:=100; // time!

tolerance_bmp:=50;

 

 

fast_pleidothsh:=true ; //

slow_pleidothsh:=true; //

end;

 

procedure LoadBMP;

begin

WriteLn('fortvsh eikonvn');

 

logout := TSCARBitmap.Create('deNrNUv1LU2EU9tf+jNSKTXf3YRhs1KIvtV8UKrUMpQ+d' +

'7cMfikZFKkis2cwFzbAhUrNskzbanLqmZQ1pbQ6zRgomFZNA2VRsfjGR9dy94+Uy+wO8PBye' +

'5znnvPfc+57CrD1Zdpk0mUy+v3oF8aNKaRUyfQUScG/VhYjHAzJYVgqTIPplIh6JgMAPd3SA' +

'fKhXgNOCQONdSMeRw4j+O7epPzcyvL6wQPgPmw3Z/tMlNAvp02isIiHB9tbW5CMj/FdC5iUj' +

'mDSZUPCCESxOfZ8PBEB6JWI4vwYHEL91dsKhsB8/BvOny7U0PU2cd4o6OK+PygHPxaqlqamN' +

'aPRtTTU758kTtHFcf5+8heD30NDW2ppNJiUyueOZMBrh96Swsbg443BY5XJ/SwtSvTKpRSwC' +

'wYd81unYf1hT/UyQTzFuMLAjFRcR6a2r5Z4cDYfd5yvtJcXgiLQr2KqHQ+XfSGQ+FKISqRG1' +

'CjMQ4NUhYzs3y30mzeZukRDEWVnRlZ/3x+9PrK6CUAw3aJClcqiWnbBLkM+CU7a5vBw0tlM5' +

'NzY243yT5j7fRizGLWaXSqWiEhMG29O95jz+eixm4vMIZj2e7UTiSWox+irK4Tw9WAA+6/XS' +

'mgG1Gg6VztQCU0nRr2D3c7BBAx7sMG2urOAo8K89FviWolOmPH4afB4ct/Ia7cUMnx62Ef6Y' +

'zxs1PNAf2E/QXVbK3o5ahfj87Blium5ch/Q0NxFpVyohaYv18iWuJHBrtfRSLOXnKG8TMpvx' +

'eMatoZ5dm3oFbceEowYDlU25OVy0HirUScSIGSbX2ZnNOKR5Xy5pIan/8gwz48B7jACkMYVb' +

'Odm7HNrsvbsWN1PxHzSfozg=');

 

 

last15 := TSCARBitmap.Create('deNqtj79LAmEYxx1zixCCCCcLMiE4UAcJWm3I3ckhXy+h' +

'/gCLoE0XHRwUM3VxF1oEF6Et24p+3undq+d5ntppdV6m0HO8dfkHBB9ePt/v+7zvy7tiMpt4' +

'Wf5HtK2tz42NIUJctwvwPP/h9Y5dLnV7mxMEUs7Ti8eHNG3EqcXytbxMgIhvbuqS9Hp4KKXT' +

'IApCRMRicRgIgMzTj0TgIYWmSWyw7Jii5geYTgfAlcrI5wOZrK6SBpguLcHaOz0dHByAtEql' +

'bjQqFgoDmiYDrctLxe835oEXUQQatZrqdoPMFhZIA3xZLLpwnM5v2c7nB6EQcSkalU9OJlar' +

'Zrd34nFontptgL2+VikKZGY2kwaA2ww3aOVyA4SId2KxdioF8lyvjzc32VrtURCARrk82t0F' +

'0dbWSANMFxcNN2hdXPQR+okYG31/f19IJplq9b7ZlMNhIZHQ5eiomUqBYPiR3w/ywDAACAFn' +

's71gkDicEs/OdGdZbX395epKs9nGdrscDN5hrMOybx7Pu9M52tm5v72FRjw+lhH62cWYPz//' +

'G8ZY2dtTHQ64gc9kIH4DX+0Yhw==');

 

last5 := TSCARBitmap.Create('deNq1jL1LAnEcxhurSUJokVoqSIVE0YaICnKwwXYnhzww' +

'0H+gCNxqqaHBaKnFvyACQRDBLR0Ew1LvvBe7O+3KfOu8yqDHfnAEXWPw4fjc8zy/7+zY5Bi' +

'vKP8H9/hIkFIpbWnpbXGxQ1Ek4Xn+1ecbeDzq6ionivryr2poNn9MTxNIUms2CZrDIeTzkJ' +

'dIpHl2BmlTFBE5kegEg/rSsGIZZuB0/tyA/saGlEiwhQIqutEAQirV3d6GvFssJAHDqSl8n' +

'w4OWuGwYfVwddUOBPSQUOW4qiwLyWTf64UANpdTl5chn+PjJAEfZvNIMP7e/66ah4fK/v77' +

'zIxmtTaOj0lVliTAptO9zU3izM2N6nRCPicmSAJwQXfDqnF0JMXjkEqtNrDZmFwOfi+KoFy' +

'pqC4XcTaZ7G5tQbT5eZKAocmku3ElCHryvLMjnp5C7mi6VK+DV7ebzmQgyu6ueHIykmi0Ho' +

'9DhIuLViAAwZjsf1d4Jcdio1MMoy0sVLNZeG9tjbu8vBUE+vpam5sbWK1KKITfEQzTW1npu' +

'93d9fVSsYhE3ttTKMqwAm2/X7XbcYE/PydJkef/jy/SD8hx');

 

WriteLn('ok eikones');

end;

 

procedure Mouse(x, y: Integer);

begin

MouseBtnDown(x, y, mbLeft);

MoveMouse(x, y);

Wait(100);

MouseBtnUp(x, y, mbLeft);

Wait(50);

end;

 

procedure reload;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

if FindBitmapTol(x, y, logout, Box.x1, Box.y1, Box.x2, Box.y2, 50) then

Mouse(x, y);

end;

 

function agoraA: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(ax, ay, last5, Box.x1, Box.y1, Box.x2, Box.y2, 50);

end;

 

function agoraB: Boolean;

var

Box: TBox;

begin

Box := GetClient.ImageArea;

Result := FindBitmapTol(ax, ay, last15, Box.x1, Box.y1, Box.x2, Box.y2, 50);

end;

 

procedure Abara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 15 deytera ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Acontor:=Acontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

procedure Bbara;

begin

aax:=ax + 310;

aay:=ay + 17 ;

writeln('prosfora sta 5 deutera! ') ;

wait(random(randomwait));

Mouse(aax,aay) ;

Bcontor:=Bcontor+1;

writeln(inttostr(time) +' o xrusos pou dw8hke ws twra! ' + inttostr(contor*3000));

end;

 

 

procedure calculate ;

begin

contor:= Acontor + Bcontor;

end;

 

procedure buy;

begin

if (agoraA=true) and (fast_pleidothsh=true) then Abara;

if (agoraB=true) and (slow_pleidothsh=true) then Bbara;

end;

 

begin

cleardebug;

writeln('!!!!!sript gia dhmoprasia 3ekinah !!!!!! ') ;

LoadBmp;

ru8mishs;

SetClient(TSCARWindowClient.Create(GetDesktopWindow)).Free;

Acontor:=0;

Bcontor:=0;

repeat

//shoot;

calculate;

buy;

reload;

if (contor > maxbuy) then

begin

writeln('contor > apo maxbuy telos toy sripts gia perisoteres plhodosies >>line 33!! ') ;

writeln('terminatescript ');

terminatescript;

end;

until false

end.[/scar]

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...