Search the Community
Showing results for tags 'while if no execution'.
-
Hi all, I am writing a script for RS which cuts trees automatically - but that's not important now. What is important is that the script doesn't execute a certain part. I'll abbreviate the code: While (condition) do; begin; wait(); If findcolor() then; begin; clickmouse(); end end It's the if then part he doesn't do... Here's the full code: program CutMapleBank; var x,y,a,b,c,d : integer ; BmpBankIcon : TSCARBitmap; begin BmpBankIcon := TSCARBitmap.Create('deNoBiwB0/wUACQDEmSpxTxDCmBmFYRqRax2+k' + 'yhmRRHPpikuDwU1FQfwuzPUpCm8kRUvDwQsDAXGmCvyuTL4vjXfri9cNhMyEgm' + 'yhhmyhSPvsjTTni0yFAmshCVdOxO5hSjorTKufSaRZw1rRxHXnjDXnTDZnzHgp' + 'jPhpjPXnTGebSV3TBuzgSWgcCR4TBw+Gg1EVzZU'); repeat clickmouse(815,433,false) wait(5000) while findcolor(x,y,3548518,629,264,750,421) do begin wait(200) if findcolor(a,b,801626,1237,465,1265,491) then begin findbitmap(c,d,BmpBankIcon,1183,85,1325,202) clickmouse(c,d,false) wait(15000) end; end; clickmouse(622,177,false) wait(5000) while findcolor(x,y,3548518,480,200,750,421) do begin wait(200) if findcolor(a,b,801626,1237,465,1265,491) then begin findbitmap(c,d,BmpBankIcon,1183,85,1325,202) clickmouse(c,d,false) wait(15000) end; end; clickmouse(434,248,false) wait(5000) while findcolor(x,y,3548518,480,200,750,421) do begin wait(200) if findcolor(a,b,801626,1237,465,1265,491) then begin findbitmap(c,d,BmpBankIcon,1183,85,1325,202) clickmouse(c,d,false) wait(15000) end; end; clickmouse(414,318,false) wait(5000) while findcolor(x,y,3548518,480,200,750,421) do begin wait(200) if findcolor(a,b,801626,1237,465,1265,491) then begin findbitmap(c,d,BmpBankIcon,1183,85,1325,202) clickmouse(c,d,false) wait(15000) end; end; clickmouse(1028,735,false) wait(12000) clickmouse(693,654,false) wait(1000) clickmouse(812,101,false) wait(2000) clickmouse(777,249,false) wait(8000) until(false) ; end.