Strange Problem After Finding Bitmaps..
Posted script in comments below... but atm Im having a problem With Bitmaps.. SO If It does find the Bitmap, and moves to another node and comes
back Even If the bitmap Isn't their It acts as if it were and Clicks exactly where it found the bitmaps Location last Loop. (notice this is an
If Then Statement so it shouldnt even activate unless the bitmap is found) The only errors I have is THe simba Client Stating The Bitmaps Were
not freed Even though I Wrote in the script for them to be. Is there any way to force the script to Forget the bitmap's Cord after it has found
it while keeping the bitmapstostring Information? Like .... If Findbitmap(VAR,X,Y) then Begin
What My problem is even if the Bitmap isnt in place as long as it has found it once it remembers its locations and continues on with the
script even though the Bitmap Is not even There. Any ideas? Im used to using Scar and Have transfered Over to simba Because the game Im
working with uses OpenGl and Scar doesnt work well with OpenGl after Targeting the program.
Any Help Appreciated Sorry for the randomness, I didn't know how to exactly state the problem but this is along the lines..
Code:
program New;
/////////////////////////////
// Made By /
// Schaller /
// /
/////////////////////////////
//Instrunctions, Go to The RIGHT Side apple tree and stand
// Have Your Compass Zoomed all the way out/////// Make Sure your Char is Pointed North
// RELOG on Dc
// Added Camera Fix on Server DC
// Resolution = 1024x600 on client Then Target Client
// Dc Counter Added.
// added confirm Reward On level
// Gather Protection Added!
var GatherProtecti2,gpx2,gpy2,DcSupport,inspectmode,ix,iy,gatherprot,gatherprotectio,gpx,gpy,camfixx,reward,lx,ly,Camfix,cf,cy,Rlcounter,Login,xx,y,Counter,x:integer;
begin
wait(5000);
Counter:=0;
rlcounter:=0;
repeat
InspectMode := BitmapFromString(4, 6, 'beNq7cejHjUMMDAxAEoL' +
'wsCEALoKCAFdgLkU=');
GatherProtectio := BitmapFromString(14, 14, 'meJxFkd1r01AYh/8DL2yTnKTD72' +
'q7Nl1OPlod9pzkxNUurdMWmZvTuamDsYayxW4XQkSYMPzCDxRhboL' +
'dpN7UwmAUvNvNdqGg+Bf5nkwQnouQ8+R3fu8bmZ0XqRlhiMQQCI6Z' +
'qkg0kWCRYsk2kGPKzEKOIbPCf62I48O58eX2kVP5hFaXCEaRicDkD' +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Lca//tfqrysji7/aTzq/Fqzxh/dzSjSjA' +
'F0c6NuYprcZPiYxeKd1b7dmNn8vH3R9u/y/ObSHf5cvj/0k57RHFN' +
'/hXVENUq/qfLC51Rf8ua2jjphEL+cHZNIlqCWTLfKteQjU9Yt3B1Z' +
'Xji+ZmLTXGwAi+liCh2CCZSAGYmXFPAGWTpcsESDCOuZxXHhCOIkm' +
'3OX+ffm7A=');
Reward := BitmapFromString(26, 10, 'beNplzOFLg0AYBnB2ztx524' +
'dMKak1MW3NeSwFg41R3yLJhUEEEREjqEb///fe887zdPDj5Xl93jN' +
'yyd+tNPy9I7s1873nq7Zdks9Vy/uysa3s1ubPCn9k0MLkoBWhegLB' +
'fLtpec3EfEkZHmRVrfg5kVOSKwRSJnLKMHiiZnGNy5jZ1BMUEXlc4' +
'HzeVGoL37ki6gaW4RXFecwC2FA2YeVfYOVK2jqTVR4P7mcAP8A/49' +
'7E7I2HAmROrn49OfVGtso98kZoTBqwqnzShP22c+ONtAubQ94hYCG' +
'w0JUjzCwUOpw4CyxxoxDPA0ufnkja1Dm4PO7PXZ2eAQgd/EALbQgt' +
'od33j4CRTBqLczZTz8gqqQKqmk5PVUbkCv/y8GfK');
Camfixx := BitmapFromString(11, 9, 'beNprd01LSjfWUdyyoqy/M7aq' +
'0Le6yA+Iaor9J/cm9LRF62sqmugp7lpfpa0upigtKCfBa2MkF+ima' +
'aYnpSDFZ2sqv3FZ6b5NtRM6Y2XEeP7///rnzz4pES57UwVZcZ7Pn0' +
'4ByWn9iXs21JTnectL8v36vfPUweYnF+dJi3CBuD/3AnXVlQZsWlY' +
'SHmqsJCvw7M0iRWn+C0c7752epSQj8OjCXKAJMVHm4f7aYSHGKnJC' +
'5/dPApqvIid48WjXq+sLT+5tl5XgiYs1m7vePjzMSF1R5OTubmkxb' +
'm0NEQ0l4X17Cmct9pCT5I2JNw2MN86otNbXFt+2Pk9Bms/TT11LXV' +
'hbXWjOOltFWb7MKhtDXbmSNlcXT1VVJQEzc+nUE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..')
wait(2500);
MoveMouse(513, 237);
wait(50);
ClickMouse(513,237,0);
wait(1000);
if FindBitmap(inspectmode,ix,iy) then
begin
movemouse(ix,iy);
clickmouse(ix,iy,1);
wait(1000);
end;
if findbitmaptolerancein(gatherprotecti2,gpx2,gpy2,460,473,491,495,100) // This Is the If Then That Ghosts
then begin
gatherprot:=gatherprot+1;
movemouse(gpx2,gpy2);
writeln('Gather Protection + ' + IntToStr(GatherProt)+'.');
wait(16000);
end else
wait(16000);
//REWARD CHECK
if
FindBitmap(reward,lx,ly)
then
begin
writeln('found Reward Screen... Accepting..');
wait(15000);
MoveMouse(lx,ly); wait(1000);
Clickmouse(lx,ly,1);
wait(2000);
end;
//DCSUPPORT CHECK
if findbitmap(login,xx,y) then begin
DcSupport:= Dcsupport+1;
writeln('DC check..PASSED');
end;
//DC SUPPORT CHECK
end;
if
DcSupport=0
then
begin
writeln('DC FOUND Attempting Relog..');
Camfix:=0;
wait(45000);
movemouse(723,265);
clickmouse(723,265,1);
MoveMouse(883,592); wait(1000);
Clickmouse(883,592,1);
ClickMouse(883,592,1);
wait(2000);
movemouse(1015,619);
clickmouse(1015,619,1);
wait(1000);
MoveMouse(903,621);
ClickMouse(903,621,1);
wait(4000)
clickmouse(903,621,1);
wait(10000)
rlcounter:= rlcounter+1;
Gatherprot:= Gatherprot+1;
writeln(('Number of Dcs ') + IntTostr(rlcounter) + ('.'));
///////////////////////////////////////////////////////////////////////
wait(3500);
repeat
writeln('Attempting To Fix Camera Angle...');
KeyDown(VK_Left); wait (300);
Keyup(VK_Left); wait(300);
if
FindBitmaptolerancein(Camfixx,cf,cy,1261,34,1284,51,150)
then
begin
Keyup(Vk_left);
Camfix:=1;
Keydown(Vk_down); wait (300); Keyup(Vk_down);
writeln('Found Correct Camera ange!Adjusting...');
wait(20000);
end;
until Camfix=1;
end;
/////
//CAMERA FIX ////////////////////////////////////////////////////////////////
//////////////////
////////////////// RELOG PROCESS
////////////////
// Moving To Left Tree
Begin
Camfix:=0;
DcSupport:=0;
Writeln('Moving Trees...');
movemouse(928,113); wait(2000);
Clickmouse(928,113,1);
Clickmouse(928,113,1);
wait (6000);
end;
//Regather
begin
writeln('gathering..')
wait(2500);
MoveMouse(513, 237); //cord set for middle of screen MAKE SURE TO HAVE FULL SCREEN
ClickMouse(513, 237,0); wait(1000);
if findbitmap(inspectmode,ix,iy)then
begin
movemouse(ix,iy);
clickmouse(ix,iy,1);
wait(1000);
end;
if findbitmaptolerancein(gatherprotectio,gpx,gpy,449,466,486,500,100)
then begin
gatherprot:=gatherprot+1;
movemouse(gpx,gpy)
writeln('Gather Protection + ' + IntToStr(GatherProt)+'.');
wait(16000);
end else
wait(16000);
//
//REWARD CHECK
if
FindBitmap(reward,lx,ly)
then
begin
writeln('found Reward Screen... Accepting..');
wait(15000);
MoveMouse(lx,ly); wait(1000);
Clickmouse(lx,ly,1);
wait(2000);
end;
//REWARD CHECk
///////////////
/////////////// RELOG PROCESS
///////////////
//DCSUPPORT CHECK
if findbitmap(login,xx,y) then begin
DcSupport:= Dcsupport+1;
writeln('DC check..PASSED');
end;
//DC SUPPORT CHECK
if
DcSupport=0
then
begin
writeln('DC FOUND Attempting Relog..');
gatherprot:=Gatherprot+1;
wait(45000);
movemouse(723,265);
clickmouse(723,265,1);
MoveMouse(883,592); wait(1000);
Clickmouse(883,592,1);
ClickMouse(883,592,1);
wait(2000);
movemouse(1015,619);
clickmouse(1015,619,1);
wait(1000);
MoveMouse(903,621);
ClickMouse(903,621,1);
wait(4000)
clickmouse(903,621,1);
wait(10000)
rlcounter:= rlcounter+1;
writeln(('Number of Dcs ') + IntTostr(rlcounter) + ('.'));
///////////////////////////////////////////////////////////////////////
wait(3500);
repeat
writeln('Attempting To Fix Camera Angle...');
KeyDown(VK_Left); wait (300)
Keyup(VK_Left); wait(300)
if
FindBitmaptolerancein(Camfixx,cf,cy,1261,34,1284,51,100)
then
begin
Keyup(Vk_left);
Camfix:=1;
Keydown(Vk_down); wait (300); Keyup(Vk_down);
writeln('Found Correct Camera angle! Adjusting...');
wait(20000);
end;
until Camfix=1;
end;
//////////////////
////////////////// RELOG PROCESS
////////////////
//GATHER AMOUNT
Begin
writeln(('Gathered a total of ') + IntTostr(counter) +' times.');
if Gatherprot=0 then
begin
writeln('Error Detected No gather! Shutting Down');
repeat
until gatherprot=2
end;
if Gatherprot=1 then
begin
writeln('Error Detected Player Interruption!! Shutting Down');
repeat
until gatherprot=2;
end;
// freebitmaps
Begin
FreeBitmap(Login)
freebitmap(camfixx)
Freebitmap(reward)
FreeBitmap(GatherProtectio)
freebitmap(GatherProtecti2)
FreeBitmap(InspectMode)
end;
// Move to right Tree
begin
Camfix:=0;
Writeln('Moving Trees...');
movemouse(963,115); wait(1000);
Clickmouse(963,115,1);
Clickmouse(963,115,1); wait (6000);
end;
end;
end;
until x=999999999 ;
end.