CESCH Posted July 5, 2012 Share Posted July 5, 2012 i've been working on it for ever and i keep running it to the problem where the loop will just not break and click the right click option _________________________________________________________________________________ program New; var x,y,a,b,c,d: Integer; var xp,doublebreak: Boolean; var rcxp,deathwraith: Integer; procedure ganingXp; begin xp:=True while xp=True do begin if FindBitmap(rcxp,x,y) then begin MoveMouseSmooth(x,y); end else begin xp:=False; end; end; end; procedure horizantal; begin Writeln('new row'); while x<a do begin // Writeln('ne'); MoveMouseSmooth(x,y); ClickMouse(x,y,False) if FindBitmap(deathwraith,c,d) then begin doublebreak:=True; break; end else wait(20); x:=x+20; //Writeln(x); end; end; procedure findesswraith; begin doublebreak:=False; y:=10; GetClientDimensions(a,b); while y<b-100 do begin x:=10; horizantal; if doublebreak=True then begin break; // Writeln(' break'); end else y:=y+60; end; ClickMouse(c,d,True); end; procedure loadbmp; begin rcxp := BitmapFromString(21, 17, 'beNpdlFtIFGEcxYO87/2+' + 'O7vr7sysu7PbpKKyYJnhiqWpXUix21aGij6JsRtF+CKthqY9Sg+VF' + 'aEobVdYQoKgoJBNoZ6CQOlC9WA9leA2M53PycH8+BhmYc6Z3znff5' + 'bSsizr9XppF1Wu1z4vtUv9deKTU1J7YEde1tmu1r7O1vrqYp61JDr' + 'qelvKVCq1y+XiOG7b+mLXF+djwgbtUtgovOuRphqJT2ZZlERJmhN+' + 'pDMLjz7fG7g/dkSnLmAYNhgMbpTL9yE3dZ3OIVpxaPVuh5iM/Unfg' + 'RA+v169+J6cFFcWbyVO6HR6nuc3yUOhkN1u79m6RRqNQI4NDASBjz' + 'A9AiFMYBXr3OPWZAFgk5xhGI9RBULyMOILE8AmW5iAAzAgf3ht6O3' + 'Mhdpyr9lsKSkpkeXKq7/NNCGs8OG9lEqCPPPpnGyCG+HlMAAg/zI3' + 'BX63NodlfVDJclRhsVjR7ezk2PyzBwR1ZVEajwrpBklMwYSkWHq98' + 'PT21SvDMIlWFppMJr/fr7zd6XSGGWPf0erHMzewwUCaRwr0gPLTDQ' + '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gpr54elfPxiJWCVU4EecQDOfe5o4AkFlPhkcrfjkdmtm' + 'IMy+AojJCtSu8feaWPtU4u/HI+dnF21HpEEmPoVbbKzDoICDXPGXL' + 'ui15kmHp6rDVkrOk2P9osZ2pr7UKZrRD2SJVl9SIdSels5XaIi+2Z' + '8ZlpaonUS09Gnayxth7BI0Q4F95FFSjXtSBd8VrFH2iGvE9uR01Yk' + 'JiyeurQSjtbPgbbLG7ZiKSk6i7qsxW1pTNZWvTPwqrKaR+r8t3MYo' + 'VVPoLsfiwYbYnaJHLCljVBvqSuulaUduSqdwuVccOFE1jX/xirewS' + 'rKndF20BJ4UusY9ANRp3LHLpLVVT5kOVm7PgwCYZ93GIAsy+ZxSWb' + 'LXbg/PVmueCravP3WKU1SpHsYo1y/pUWVklJPhl9Wam4QxA9F+EYF' + 'tHLKXwXqytL+lq2QCLqbJV+iQ8+Pgd5zEtjt/BPtRFXnt7Hmv/NUJ' + '2w6nNECeFb9Ug0rVdUs62aljofzzxVet6rkJGmqSazlicrW01lrXf' + '0xcT261/r+q7tn1HiZv3bePWWR+NvTkWOjg=='); end; begin loadbmp; // ganingXp; findesswraith; end. _________________________________________________________________________________ my problem is with the scanning for the esswraith it right clicks it cuz its bruteforce but it never stops an clicks the option the horizontal procedure moves the cursor horizantaly and the findesswraith moves it virticaly please run and post possible solutions Quote Link to comment Share on other sites More sharing options...
LordJashin Posted July 5, 2012 Share Posted July 5, 2012 Please use [-SCAR][-/SCAR] tags without the dashes around your SCAR code in your post. i've been working on it for ever and i keep running it to the problem where the loop will just not break and click the right click option You are saying you have an endless loop. This is because the loop never reaches one of the desired results you set (possibly finding this right click option). So it never ends. Quote Link to comment Share on other sites More sharing options...
CESCH Posted July 5, 2012 Author Share Posted July 5, 2012 the comand break is suposed to break; out of the loop and then the if boolian is ment to break out of the secont loop Quote Link to comment Share on other sites More sharing options...
CESCH Posted July 5, 2012 Author Share Posted July 5, 2012 should i just do it one section cheacked at a time brute force method? Quote Link to comment Share on other sites More sharing options...
LordJashin Posted July 5, 2012 Share Posted July 5, 2012 Language English? [sCAR] program New; var x,y,a,b,c,d: Integer; var xp,doublebreak: Boolean; var rcxp,deathwraith: Integer; procedure ganingXp; begin xp:=True while xp=True do begin if FindBitmap(rcxp,x,y) then begin MoveMouseSmooth(x,y); end else begin xp:=False; end; end; end; procedure horizantal; begin Writeln('new row'); while x<a do begin // Writeln('ne'); MoveMouseSmooth(x,y); ClickMouse(x,y,False) if FindBitmap(deathwraith,c,d) then begin doublebreak:=True; break; end else wait(20); x:=x+20; //Writeln(x); end; end; procedure findesswraith; begin doublebreak:=False; y:=10; GetClientDimensions(a,b); while y<b-100 do begin x:=10; horizantal; if doublebreak=True then begin break; // Writeln(' break'); end else y:=y+60; end; ClickMouse(c,d,True); end; procedure loadbmp; begin rcxp := BitmapFromString(21, 17, 'beNpdlFtIFGEcxYO87/2+' + 'O7vr7sysu7PbpKKyYJnhiqWpXUix21aGij6JsRtF+CKthqY9S g+VF' + 'aEobVdYQoKgoJBNoZ6CQOlC9WA9leA2M53PycH8+BhmYc6Z3z nff5' + 'bSsizr9XppF1Wu1z4vtUv9deKTU1J7YEde1tmu1r7O1vrqYp6 1JDr' + 'qelvKVCq1y+XiOG7b+mLXF+djwgbtUtgovOuRphqJT2ZZlERJ mhN+' + 'pDMLjz7fG7g/dkSnLmAYNhgMbpTL9yE3dZ3OIVpxaPVuh5iM/Unfg' + 'RA+v169+J6cFFcWbyVO6HR6nuc3yUOhkN1u79m6RRqNQI4NDA SBjz' + 'A9AiFMYBXr3OPWZAFgk5xhGI9RBULyMOILE8AmW5iAAzAgf3h t6O3' + 'Mhdpyr9lsKSkpkeXKq7/NNCGs8OG9lEqCPPPpnGyCG+HlMAAg/zI3' + 'BX63NodlfVDJclRhsVjR7ezk2PyzBwR1ZVEajwrpBklMwYSkW Hq98' + 'PT21SvDMIlWFppMJr/fr7zd6XSGGWPf0erHMzewwUCaRwr0gPLTDQ' + 'iFI4C2tCqyr3y702xAXqV2mmZwKGgG/tjyqYGZREADMJlqxE+UA/l' + 'uPmDT5tM0rchBYtLrovtrKirKvr6ZhRb8pLFkDPwki5giIzEe HYsf' + 'dzmdGo3W5/MpzWOWDAZDc1UlyZ5ZRtJ/DQyegUT8OLLGkEKc+ZM7w' + '4zBbndwXFDhR3ybzXa6qRjtISABWFmEFaYFqeEgzwN8MNvNJr XH41' + '2LTMNB5vd4PDxrnYzvuhjvHL10HiY3L8fgIO/V3mNwAP/vA3zUrfc' + 'XFSlyGQDxMZCJwxxOtiYSQQmQI+lAvDve3TZ48NDPllqC0V/X7lAF' + 'WO9GORb4Cws9Fk0ejhVHE6vfiyvawDVA6ayagm5brtgVAQP4g 1Yj5' + '/dTFKXIyXfHcfgk8/ML8DD6KTLlqnKzs7Nz0LPRaAzq1fimAA+TBK' + '/z2s2YFvb/JffpcDgsGESrFf74Q0AuTCbyhihbg0WH7xombX8BAme' + '1Hg=='); deathwraith := BitmapFromString(157, 11, 'beNrNmEFu3DAMRTFB' + 's4oln8Dyblzkmt30GllkWfRI8aAXqewv0V8UpfG0BVKAMGRap oZ8I' + 'kXPdHXz60n5+f49itz6B6Vj+fbrmcVN1yjekjFcx/2KOTLNhWXYrt' + 'tgv6axDwtsshFXSnzxZb8eEpLs1hY3L35e0rgUTItP8/wkfl866j3' + 'm7GZlORHXkLHhPgQebaEIOSaVPIT1x9u3py/Pf8D0LtaPj0u0HCUO' + 'ojSx5uvIcUhB3uKZNkaOLTQw3orS0GBKpBTcY/8AGTaVjXVe8pwr5' + 'qsd1efrMkT2XTwygUKA6SGs/5YpY3XTfQrCt8Y6EMQU3o7B0MBqkN' + '3s+4yVE/PgVWJ1FVaesO03i6CJmIMzToZHKF/KO7PAfhpWGvexSjk' + 'dSqwrYfXTfazOxFqX4pkYUSID61HGC7IpZ10wjLfISnq6jJix utKj' + 'zmklsUUNZMqKNbBGgV6B41dMZWfb9LHysVsfMWuquotUYJRxn gZNb' + 'YGzdd1NQZgpr54elfPxiJWCVU4EecQDOfe5o4AkFlPhkcrfjk dmtm' + 'IMy+AojJCtSu8feaWPtU4u/HI+dnF21HpEEmPoVbbKzDoICDXPGXL' + 'ui15kmHp6rDVkrOk2P9osZ2pr7UKZrRD2SJVl9SIdSels5XaI i+2Z' + '8ZlpaonUS09Gnayxth7BI0Q4F95FFSjXtSBd8VrFH2iGvE9uR 01Yk' + 'JiyeurQSjtbPgbbLG7ZiKSk6i7qsxW1pTNZWvTPwqrKaR+r8t 3MYo' + 'VVPoLsfiwYbYnaJHLCljVBvqSuulaUduSqdwuVccOFE1jX/xirewS' + 'rKndF20BJ4UusY9ANRp3LHLpLVVT5kOVm7PgwCYZ93GIAsy+Z xSWb' + 'LXbg/PVmueCravP3WKU1SpHsYo1y/pUWVklJPhl9Wam4QxA9F+EYF' + 'tHLKXwXqytL+lq2QCLqbJV+iQ8+Pgd5zEtjt/BPtRFXnt7Hmv/NUJ' + '2w6nNECeFb9Ug0rVdUs62aljofzzxVet6rkJGmqSazlicrW01 lrXf' + '0xcT261/r+q7tn1HiZv3bePWWR+NvTkWOjg=='); end; begin loadbmp; // ganingXp; findesswraith; end. [/sCAR] Quote Link to comment Share on other sites More sharing options...
CESCH Posted July 5, 2012 Author Share Posted July 5, 2012 srry English is my first language, just have trouble explaining my self how does that long line after "while x<a" do it doesn't make a lot of sense Quote Link to comment Share on other sites More sharing options...
LordJashin Posted July 5, 2012 Share Posted July 5, 2012 It all makes sense. You just need to understand the coding. Here is a good manual for SCAR, and how to do loops etc. - http://wiki.scar-divi.com/index.php?title=The_Official_SCAR_Scripting_Guide and the old manual - http://scar-divi.com/oldmanual/ I suggest you look over these. Very useful. Quote Link to comment Share on other sites More sharing options...
CESCH Posted July 5, 2012 Author Share Posted July 5, 2012 the problem is i know how loops work, its successfully breaking them to do some thing else such as clicking a right click option that's the problem and those links above don't help me with that. Quote Link to comment Share on other sites More sharing options...
LordJashin Posted July 5, 2012 Share Posted July 5, 2012 Break; leaves one loop, exit; leaves all loops and exits the function/procedure. You need to find the unit somehow. Show us what bitmap/part you are trying to find in that image. Quote Link to comment Share on other sites More sharing options...
CESCH Posted July 10, 2012 Author Share Posted July 10, 2012 the stradigy is to systematically write click crossed the screen rightclicking till it findeds the bitmap the actual creatue is harder Quote Link to comment Share on other sites More sharing options...