Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Skoller7

Script help

Recommended Posts

Hello guys Skoller here again,

 

I started from scratch with to rework my script. I think I am actually finally done with it but i made one little mistake I never clicked the play buttom. So i gues i have quite some errors and i dont see what is wrong. Can anyone help me look at them when i come past them? Thanks

 

Here is the

program FishingBot;varFightbuttom, Shinycheck, NormalCheck, UseItem, Bag, Xbuttom, Magikarp, Dratini, Poli, ThrowUltra, ArrowSearch: TSCARBitmap;x, y, Int: Integer;Box1: Tbox; Desktop: TSCARWindowClient   //does this actually search the scar client or does it also find my Chrome(pokemon game)?procedure Shinycheck //[s]begin   Shinycheck := TSCARBitmap.Create('deNqNULkNwCAQo06RGRklo1BkkBskQ9' +   'CnSAxWLAuEFMvFPT7fwZ629Nz1J48PiCMCQc6NAFIViVJOFplGh48DnIWS/kgV' +   'o9scrlDLlVztW8RBCQfEvNP9Z6XI1ejK2ZU8Wy34u+18p7995bn6TylfjisyyA' +   '==');   Dratini := TSCARBitmap.Create('deNpjZ+BmWHbqAx6k4NAARGgi////ZwADY' +   'gQdFBqQBSFqIIINDQfgggkODUAEEUxIcACjAxDFQBFkQQgXjyBEF1AQWRwAZfl' +   '0ig==');      Desktop := TSCARWindowClient.Create(GetDesktopWindow); // Searches the desktop aka Pokemon Map SetClient(Desktop); // Actually only looks to the pokemon map aka my whole screan Box1 := GetWindowBox(GetDesktopWindow);  end;procedure NormalCheck // Magikarpbegin   Magikarp := TSCARBitmap.Create('deNrdkbENgDAMBFmAmvUyCqOkYBAPkiHo' +   'KeDFk8dJkFAoQS7sBJ8/72kYh31bfxlz/lhaMpYxLr2QEDLEDDmiF4L/0YV2lM' +   'grJRyBuNWa+bmCqKsqxadCHhLIoR7CRhjCltYTQZh4giC6okhB6DNHF5D0BDk1' +   'aE3+ObLiVYkM9M5odxjhPbkOG0+8h8Vz3Malk6ZJ4YegKs46AAKqzk0=');   Poli := TSCARBitmap.Create('deNqTYOBl+P/7w8CiBQuWABEyA4IaUAGyFFaU' +   'kABVA2cgi0MQ0Bwg98CBA8SYg0ccaAIyF8gAcoEICOCGwxWgOR7THIgWuJlABr' +   'I78fgLDiBs5HCDmn/nAKZ2POGDHDLIZiIbi98czHAjzz1Y0wmp4YMrzeCPLzwa' +   'BxABALsV+mg=');   Fightbuttom := TSCARBitmap.Create('deNoTZJBgOGCvP8jRh1s3/mOAO+tX' +   '77TVvTFj8pcnj/f6O++100PW8h6s5d3jRy9u3ngJQ0enTlhjofXs6KHf374dqC' +   '7daq2zzw6h5R1Yy/ryoqmGKnOM1eaC0UJT9fWW2ttsdLfHhiw109hkBdSih6Zl' +   'U0XxErAU0EAg2m6ju9tW71RBxqnasu1+TjtsdPfbo9uyuaJ4tYXWHlQ3Q7x5tK' +   'YMqAXTYScWzAW6+Wxd2fn6ciA6GOgCVAPx5s6qEqAjgYJoWtAAxGRkB7y+cA5N' +   'y9EFc4BSOyqhaJWXw2ZrHWQtQAaalo0VxfNM1FeaawJlgQjoEjRbMLUAxYHqgd' +   'EHDAEgAsYd0C8EtWCGGLLUCwy/ENRyKD+dVC1Ar8HFj+en76kqWeppD/QyWvJD' +   'lkI2DcgGhucGK220KMYjBUw8+0Dho4emHr8UMehkUgSpWvaTbst+epUSADd3Xr' +   'o=');   Goldeen := TSCARBitmap.Create('deNqNj0ERwDAIBBEQEZWClEg5KZUSKXXSX' +   'gNhJnwCs48AO0CaNHnL8UB/VJyZbgKLA47JE1xSd3xybNmhRqqOit7DSH/pXQm' +   'AaDFNJlYcHT5YtJnJsW5E3BMHJOHofBPmGqk=');    Slowpoke := TSCARBitmap.Create('deNrjZuBheLDgAAg1NGCiBQ4OIAZBBdRF' +   'CagIQ/bAgQP/YQDIhqhpSGCAKECWRVZDUMGDByA1QB9BBBnAAK4GogCi5j82AF' +   'cAQgsacFmBrAaCILKgkExoAABipBaK');   Psyduck := TSCARBitmap.Create('deNrjYOBkePCg4cEDB3S0wAGr4P///5FFF' +   'iQwANF/MCBVHMJGWLfAASr1+wMQIaQewKR+fwA59YADECHrBYmDBeEIKAUEAJh' +   'ligI=');  Desktop := TSCARWindowClient.Create(GetDesktopWindow); SetClient(Desktop);  Box1 := GetWindowBox(GetDesktopWindow); end;procedure ThrowUltra  //bag    + Arrow begin Bag := TSCARBitmap.Create('deNqFUdsRgDAI898fR2IURmGUjpJROoL/fiiID' +   '67SyuV6bcjRpJ2nZQLTBWCPta214O0yKaM07vKjrq1ApBAZHiYT4ERPYF2mKmL' +   'M9wrAvLkH7RZpBE0QG5iaDKkHJl3TM2lQn2NBOkEjiFQ13/EwSGH7AA3ibx7/C' +   '5SBf3AAfYVbaw==');  ArrowSearch := TSCARBitmap.Create('deNrjYhBgOJDgQCH6Dwb4ZfEoQFaDS' +   'xlBBcRYRIz5RNqLxz3EeITyMCceAQBS6hME');  UseItem := TSCARBitmap.Create('deNqTZOBlOJDgQDv0oKHhwYIDQEQFoxYc+' +   'A8GcJH/vz8AzafcKAibcqOAJkCNWtCAbBooEBoaCJqPbNR/ZPD7A9y/yMJAW4h' +   'yFYwNjogGhDnA0ANHDbIVpIYVZozAZTH9i8coeNCBTIAjsJtJdRVSLBxAQTjCn' +   'yQPgmKWuGBHC2fswY5kMn6j4FzsiQEpIwAACjtndg==');    Desktop := TSCARWindowClient.Create(GetDesktopWindow); SetClient(Desktop);  Box1 := GetWindowBox(GetDesktopWindow);   end;if FindBitmap(x, y, Shinycheck, 0, 0, ClientBox.X2, ClientBox.Y2) //Search Shiny Signthen // catch shiny or other needed pokémon Questionbegin      ThrowUltra;DebugBitmap(UltraSearch);if FindBitmap(x, y, Bag, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) then  //Click Bag imagebeginMoveMouse(x, y);wait(Random(500));ClickMouse(x, y)then  //not sure if it'll always click on a random x,y location?if FindBitmap (x, y, ArrowSearch, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) thenMoveMouse(x, y);wait(Random(750));beginInt := 0;while Int <> 5 dobeginClickMouse(x, y);Inc(Int);            //click 5x to come on the right ultraball page end;then FindBitmap (x, y, UseItem, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) then        // Searches Use Item ButtomthenbeginMoveMouse(x, y);wait(Random(1000)):ClickMouse(x, y);  end;  end;end;  end;else // Kill magikarpif FindBitmap (x, y, NormalCheck, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) thenFindBitmap (x, y, FightButtom, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) thenbego,MoveMouse(x, y);wait(Random(500));ClickMouse(x, y); // To lazy so just 2x same leftmouseclickClickMouse(x, y); end;end.

 

 

My first error already came up at line 9 ( procedure Shinycheck) even tho i have no idea whats wrong in that small sentence i searched off some forums and there i see the same? but without the error. Any idea's? hopefully you can help me

 

-Sko

Share this post


Link to post
Share on other sites

You are missing a ; at the end of some lines. You can't name procedure/function names the same as variables. You must give them a different name e.g. bmpShinyCheck.

Share this post


Link to post
Share on other sites
You are missing a ; at the end of some lines. You can't name procedure/function names the same as variables. You must give them a different name e.g. bmpShinyCheck.

 

Thanks man really! got everything fixed up but now I stumbeled on a new problem gues thats how this bot making is?:P

Do you know something about bitmaps? Been searching around on google a bit because i have a bitmap error it tells me the bitmap on line 73 is invalid. Do you know what could cause this? line 73: if FindBitmap(x, y, Shinycheck, 0, 0, Box1.X2, Box1.Y2)

I first thought it might have been a typo but apperently thats not it. Hopefully u know the answer !

Share this post


Link to post
Share on other sites

"ShinyCheck" is a reference in your script to a procedure/function and NOT a bitmap handle.. change that to bmpShinyCheck etc.

Share this post


Link to post
Share on other sites
"ShinyCheck" is a reference in your script to a procedure/function and NOT a bitmap handle.. change that to bmpShinyCheck etc.

 

I changed the procedures to bmp, but yea now i did as you told me change the TScARBitmaps to BmpShinyheck, BmpGoldeen,... But i still get the invalid bitmap error on line 73 :

 

 

program FishingBot;    // updates --- Xbuttom toevoegenvarBmpFightbuttom, BmpShinycheck, BmpNormalCheck, BmpUseItem, BmpBag, BmpMagikarp, BmpDratini, BmpGoldeen, BmpPoli, BmpSlowpoke, BmpPsyduck, BmpArrowSearch: TSCARBitmap;x, y, Int: Integer;Box1: Tbox; Desktop: TSCARWindowClient;   //does this actually search the scar client or does it also find my Chrome(pokemon game)?procedure Shinycheck; //[s]begin   BmpShinycheck := TSCARBitmap.Create('deNqNULkNwCAQo06RGRklo1BkkBskQ9' +   'CnSAxWLAuEFMvFPT7fwZ629Nz1J48PiCMCQc6NAFIViVJOFplGh48DnIWS/kgV' +   'o9scrlDLlVztW8RBCQfEvNP9Z6XI1ejK2ZU8Wy34u+18p7995bn6TylfjisyyA' +   '==');   BmpDratini := TSCARBitmap.Create('deNpjZ+BmWHbqAx6k4NAARGgi////ZwADY' +   'gQdFBqQBSFqIIINDQfgggkODUAEEUxIcACjAxDFQBFkQQgXjyBEF1AQWRwAZfl' +   '0ig==');      Desktop := TSCARWindowClient.Create(GetDesktopWindow); // Searches the desktop aka Pokemon Map SetClient(Desktop); // Actually only looks to the pokemon map aka my whole screan Box1 := GetWindowBox(GetDesktopWindow);  end;procedure NormalCheck; // Magikarpbegin   BmpMagikarp := TSCARBitmap.Create('deNrdkbENgDAMBFmAmvUyCqOkYBAPkiHo' +   'KeDFk8dJkFAoQS7sBJ8/72kYh31bfxlz/lhaMpYxLr2QEDLEDDmiF4L/0YV2lM' +   'grJRyBuNWa+bmCqKsqxadCHhLIoR7CRhjCltYTQZh4giC6okhB6DNHF5D0BDk1' +   'aE3+ObLiVYkM9M5odxjhPbkOG0+8h8Vz3Malk6ZJ4YegKs46AAKqzk0=');   BmpPoli := TSCARBitmap.Create('deNqTYOBl+P/7w8CiBQuWABEyA4IaUAGyFFaU' +   'kABVA2cgi0MQ0Bwg98CBA8SYg0ccaAIyF8gAcoEICOCGwxWgOR7THIgWuJlABr' +   'I78fgLDiBs5HCDmn/nAKZ2POGDHDLIZiIbi98czHAjzz1Y0wmp4YMrzeCPLzwa' +   'BxABALsV+mg=');   BmpFightbuttom := TSCARBitmap.Create('deNoTZJBgOGCvP8jRh1s3/mOAO+tX' +   '77TVvTFj8pcnj/f6O++100PW8h6s5d3jRy9u3ngJQ0enTlhjofXs6KHf374dqC' +   '7daq2zzw6h5R1Yy/ryoqmGKnOM1eaC0UJT9fWW2ttsdLfHhiw109hkBdSih6Zl' +   'U0XxErAU0EAg2m6ju9tW71RBxqnasu1+TjtsdPfbo9uyuaJ4tYXWHlQ3Q7x5tK' +   'YMqAXTYScWzAW6+Wxd2fn6ciA6GOgCVAPx5s6qEqAjgYJoWtAAxGRkB7y+cA5N' +   'y9EFc4BSOyqhaJWXw2ZrHWQtQAaalo0VxfNM1FeaawJlgQjoEjRbMLUAxYHqgd' +   'EHDAEgAsYd0C8EtWCGGLLUCwy/ENRyKD+dVC1Ar8HFj+en76kqWeppD/QyWvJD' +   'lkI2DcgGhucGK220KMYjBUw8+0Dho4emHr8UMehkUgSpWvaTbst+epUSADd3Xr' +   'o=');   BmpGoldeen := TSCARBitmap.Create('deNqNj0ERwDAIBBEQEZWClEg5KZUSKXXSX' +   'gNhJnwCs48AO0CaNHnL8UB/VJyZbgKLA47JE1xSd3xybNmhRqqOit7DSH/pXQm' +   'AaDFNJlYcHT5YtJnJsW5E3BMHJOHofBPmGqk=');    BmpSlowpoke := TSCARBitmap.Create('deNrjZuBheLDgAAg1NGCiBQ4OIAZBBdRF' +   'CagIQ/bAgQP/YQDIhqhpSGCAKECWRVZDUMGDByA1QB9BBBnAAK4GogCi5j82AF' +   'cAQgsacFmBrAaCILKgkExoAABipBaK');   BmpPsyduck := TSCARBitmap.Create('deNrjYOBkePCg4cEDB3S0wAGr4P///5FFF' +   'iQwANF/MCBVHMJGWLfAASr1+wMQIaQewKR+fwA59YADECHrBYmDBeEIKAUEAJh' +   'ligI=');  Desktop := TSCARWindowClient.Create(GetDesktopWindow); SetClient(Desktop);  Box1 := GetWindowBox(GetDesktopWindow); end;procedure ThrowUltra;  //bag    + Arrow begin BmpBag := TSCARBitmap.Create('deNqFUdsRgDAI898fR2IURmGUjpJROoL/fiiID' +   '67SyuV6bcjRpJ2nZQLTBWCPta214O0yKaM07vKjrq1ApBAZHiYT4ERPYF2mKmL' +   'M9wrAvLkH7RZpBE0QG5iaDKkHJl3TM2lQn2NBOkEjiFQ13/EwSGH7AA3ibx7/C' +   '5SBf3AAfYVbaw==');  BmpArrowSearch := TSCARBitmap.Create('deNrjYhBgOJDgQCH6Dwb4ZfEoQFaDS' +   'xlBBcRYRIz5RNqLxz3EeITyMCceAQBS6hME');  BmpUseItem := TSCARBitmap.Create('deNqTZOBlOJDgQDv0oKHhwYIDQEQFoxYc+' +   'A8GcJH/vz8AzafcKAibcqOAJkCNWtCAbBooEBoaCJqPbNR/ZPD7A9y/yMJAW4h' +   'yFYwNjogGhDnA0ANHDbIVpIYVZozAZTH9i8coeNCBTIAjsJtJdRVSLBxAQTjCn' +   'yQPgmKWuGBHC2fswY5kMn6j4FzsiQEpIwAACjtndg==');    Desktop := TSCARWindowClient.Create(GetDesktopWindow); SetClient(Desktop);  Box1 := GetWindowBox(GetDesktopWindow);   end;begin [u][b]if FindBitmap(x, y, BmpShinycheck, 0, 0, Box1.X2, Box1.Y2) //Search Shiny Sign[/b][/u]then // catch shiny or other needed pokémon Questionbegin      ThrowUltra;if FindBitmap(x, y, BmpBag, 0, 0, Box1.X2 - 1, Box1.Y2 - 1) then  //Click Bag imagebeginMoveMouse(x, y);wait(Random(500));ClickMouse(x, y, mbLeft)  //not sure if it'll always click on a random x,y location?if FindBitmap (x, y, BmpArrowSearch, 0, 0, Box1.X2, Box1.Y2) thenMoveMouse(x, y);wait(Random(750));beginInt := 0;while Int <> 5 dobeginClickMouse(x, y, mbLeft);Inc(Int);            //click 5x to come on the right ultraball page end; FindBitmap (x, y, BmpUseItem, 0, 0, Box1.X2, Box1.Y2);      // Searches Use Item ButtombeginMoveMouse(x, y);wait(Random(1000));ClickMouse(x, y, mbLeft);  end;  end;end;  end;NormalCheck;if FindBitmap (x, y, BmpNormalCheck, 0, 0, Box1.X2, Box1.Y2) then      // Kill magikarpif FindBitmap (x, y, BmpFightButtom, 0, 0, Box1.X2, Box1.Y2) thenMoveMouse(x, y);wait(Random(500));ClickMouse(x, y, mbLeft); // To lazy so just 2x same leftmouseclickClickMouse(x, y, mbLeft); end.

 

 

As you can see i did change them to Bmp, did i still missunderstood something? What kind of newbish thing am i doing wrong now >.< Hopefully you know it

Btw thanks for trying to explain these things to a noob really appericiate it.

Share this post


Link to post
Share on other sites

Try to use keys instead of mouseclicks.. its better.Laso searching bmps one after another might cause you that problem.

 

Try for example to use writeln("it worked"); and see till which point the script is working.Then do the next move without ussing bmp search. For example(these are script for pokemon at another game firs tone is safari second one for fishing random places).Also it better to use procedures and make your script easier for someone to read it and fix it (sadly i got confused a bit and i have to ask you a lot to understant it)

 

procedure  baltletime; var Box: TBox;begin     //  counter:=0; Box := GetClient.ImageArea; wait(2000+random(randomwait)); //writeln('START BATTLE ')   repeat        aa;   //pess a button     wait(3000+random(1000));       kappa;         //it just checks and close windows that may pop up .Also checks if i run out of balls so sets endtime=1     until    (FindBitmapTol(x,y,HP,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) or   (endtime=1) ;  // thats a tricky one If i cant find the bmp "hp" that mean i either caught or lose the fish  so its over .end;

 

or this

 

procedure  baltletime; var Box: TBox;       begin   Box := GetClient.ImageArea; wait(2000+random(randomwait));//wait(3000 +random(4000)) ;    if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin // no need its just a way to find out faster that you tner in batle              //  writeln('START BATTLE ')  ;               wait(3000+random(1000));                     IF     (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin   // it find a fish!                                    if     (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin  // bag (same as you)                                            repeat                  // path to use ball                                            bb;        // ensures that no key pressed accidently                                            bb;                                            rightx; //                                             aa;                                             rightx;                                            rightx;                                             aa;                                            balls:=balls-1;                                             wait(5000+random(1000)); // the time i believes it needs to use next balls .                                            until    (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) or   (endtime=1) ;                                       end                                    ELSE BEGIN        // that happen in case for some reason the bmp is detected but i cant use the bag yet : for example rain delay time by 2-3 seconds                                              wait(3000+random(1000));                                            if     (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                                                    repeat                                                         bb;                                                        bb;                                                    rightx;                                                    aa;                                                    rightx;                                                    rightx;                                                    aa;                                                     balls:=balls-1;                                                       wait(5000+random(1000));                                                     until    (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) or   (endtime=1) ;                                              end;                                             end;                       // end;                     end;         end; end; 

 

 

Whole script :

 

 program New;var up,down,left,right,hotkey,a,b   : string;var  mousewait,keywait,randomwait,reloadwait,x,y,steps,balls,endtime,counter,counterA,counterB,counterC,counterD,counterE,counterF,Cdratini,Cgoldeen,Cseaking,Cpsyduck,Cslowboke,Cdragonnair  :integer;var failcat, magikarp,hp,close,Bag,Battles,BADFISH :TSCARBitmap; //ez game ez life . procedure Loadvariable ;begin//////////////////////////////////////////////KEYS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\up:='w' ;             //updown:='s';            //downleft:= 'a';       // leftright:= 'd' ;          //righta:= 'z'  ;   //b:= 'x'     ;   // hotkey:='v';steps:=0;balls:=300;endtime:=0;//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////mousewait:=50;  keywait:=500;randomwait:=100; reloadwait:=2500;/////////counters///////////////////////// THESE ARE USELESScounterA:=0;  //seakingcounterB:=0;  //goldeencounterC:=0;  //dratinicounterD:=0;  //snowbokecounterE:=0;  //psyduckcounterF:=74;  //dragonair/////////catch//////////  NOT IN USE YET!  USELESSCdratini:=1;Cgoldeen:=0;Cseaking:=0;Cpsyduck:=0;Cslowboke:=0;Cdragonnair:=1;end; procedure loadbmp;       begin Loadvariable ;    failcat := TSCARBitmap.Create('deNrVVFlPE1EY5dl/5H+QTcpidyqgBGntgwUjq' +   'YpaFFIaCgKCBBEh8AIBK42NUTNrZzpdYBhZChSwLHFB6i/w0BsnDZ0CLz5482V' +   'yl3PPd+53z9zLRZeKXHfbZt6Gtg9/IyiKulJcQvqacS7gn8ZHOmyra9hIH51Sk' +   'vz609PZrauqRng6fRhiEqtq5FNt7R/7+4dr9MbyCp273bO6/Y2VZKutLnWQIQB' +   '0MOSiy/lIAgDtm+lZs9VWWlZ+s6mZjci5/FxYgJLR8elcqamDY8/TTsdt5/tQi' +   'GKFO61tvt4XVLYBgK/WqTM+//Nmu+NdMMgJ0qOOrt6BIY4XGm85Qp95gpmYnGp' +   'ssucjn3l71OyultaFYJBmuL7BkSa7MzdFbEnhIwkcZGXrUJWakFeuGYxC/Mtm+' +   'igSTXz4xBjN1rMNsKSsG0xmPlux2KJMc6LeYAqL0sjYpPvhEwBWt/YgY3xqRhO' +   'pkstrO6n9Y2Boli8pLc9NATEcHx4ceU3qRpSwHGBloDpxwu53mmHJrjOkggRbS' +   'BSXlAKGr7y6yfAiLLS8sUcxvK6yCgXRRJ4ih1qKpvNzLSlJKS7DsYFAgKxSFG0' +   'wWSQ5eQI4yMzNzWN4tlQw6/UG3B31t2Xd+4th2PvtnuFXE16vF51CyHxyzVxwJ' +   'hw7PRNwtbSoVe3y9bXec8vr6YSyaXc4u/0DZHtldY24uKZRVS488HIMW3BAKOS' +   'jijsrLJqQZ+cXam11FquNmLYQ8iJSEcr6Dgpb33BD9SoM/7ijq0JXdbWi0v2gP' +   'bn7A/MoUf/QKCY1r0aU4tAA28Mttuv15A2ERfmwYDSZzZZa8hQUQl5QKkIQJfU' +   'uUOfY4jKTbehgqP47NMMUeAFONMCHNE3zgqgkd3JtjDgXeYq2UJb/Iv4AQF4NN' +   'g==');  close:= TSCARBitmap.Create('deNptjrsKwkAQRdOLrRDCQqoQQrot8pN2go3Y+' +   'B9qrHwkPjAa368/8ZDBZVkcDsO9d3Znt+W1vfL2me1qQDhI3mmquL7z7ZHuWFB' +   'K+b4voWoKa6ZCGIZBENCTJInj2JmuLi+IoihNU611vjmAhAb9K86wh8Q+w11GW' +   'ZZN1xWat/jP8vzE0kE2G8sGPimaUHIjHCSflNXi9AAj/lontKfz+m4zLvZgJ73' +   'hyKbbH4CdfAEUhRXc'); magikarp:= TSCARBitmap.Create('deNqTZWBlCDQxAaIPM2c6aWk9fvXKVl0dyPY1N' +   'Lx5715LVRWQC0FA9osPHyCyQBLObgkJAZKhZmYQBUATgOZA1EAUVPj6QswBsu0' +   '1NJ69ewdhQxCyUchsIMpwcoKYCURARqWvL9zYuoAAZCvQXIvHWIhro6yskL1TC' +   'zYNjoCmwRXXllVduPv0yuPXcKNuvPiAld0QFARkJNjalucXA02A+w7upJ7IyHA' +   'PzzgbGyC7xt/fXVfXUVMz09kZv7FAB1T7+wPZfkZGvVFREEEA/bjQ3Q==');   HP:= TSCARBitmap.Create('deNqVkLENgDAQA6mpWC5dRE+TUdJRsEJES88UT' +    //chech batle ends?   'EHBBsHSSdaLjldkOZ/jcTIN43D9rN57a62UUmvVFo9SOWcd9VBqPtsmldcpXur' +   'FNPNm4rdS9fkFHcJI3fGpJ0QeGP5e17jExy03gifPuSyehpc6T4TJfMyz74tHz' +   'djA7ymJJJu81ZkNy+uteOTo3fnUC3/NQF4=');                  Battles := TSCARBitmap.Create('deNrt1KERACAQA0G6wdF/KS+RyJdIPD5uZ7aES' +     //  Battles =checks if enters    '+ZY43QDAPDZd5MjsKjqIsd+owQG+F7fm/MAnkMTww=='); Bag := TSCARBitmap.Create('deNqNkUkKgDAMRbPyIp7RhZQiDiCUKlURxcvWQ' +   'LCEpIrhL5rXn6RDCQXEJwBg2C4Sh3xNHg6FmQzWr6lVSrmtW05SqhKDaNe48HY' +   'SquWB5tQzG1jVhgOliYDC8KePvkU9TvEzxKBm3lFZyIn1G+njj/R7cn+2gybGL' +   'aS3QVmDTqvecYIpwhsmb61U');     BADFISH := TSCARBitmap.Create('deNrt3DFu4kAYBWDKLTnCHiHHyBG2Wm2ZknKbl' +   'SgpcwxKypQ5wpaUlC5TUu5Klv+JePbL++0xIPysV4Hx4G/Q75mxkz+rn6vjx/F' +   'meX6+yHm/0bP7tmqDb627jXwq0vz9NZQ4TvVzP51PV8445JKX71+GsGPi+xD26' +   'yuZ3ewPw379Sj5RO45Tavuwf88+wjUiXpnxcmZ2s5u9UpQTVwp46TXYiH8U5yK' +   'Jo1b4YvXHjfCTM7vZzV4rZSwnDPxS2oq/0jr5YUz0x6vGfNNes5v9btlnmopO1' +   'FbYSxPd1lOuiW1mn3grd+6gbXazL5B9puEiBpuuXtsJO2lUmfYqXNhEGbUeT23' +   'Mbnaz4yQOAaWmD69fJje6GzWAJNNVnLcqvU/82fC12zabXRuzm31p7OQuPC5Pk' +   'bodpPhWaaK2P9Hu4YLfFf7A8DJErlmKdtT28orZzb4Y9qEZ1siGQPL96eki6K9' +   'MIUmnE23CPnFkq3wxsshvdrMviL05/E/T7C+CBQpraY/A7x9tCDu5EChjuZTAe' +   'nhT1s3WwsZ+M8MXSrObfTnsCH4RtvTUjYsi+IWRPRJ9FMFTaM7biyhzyVR6egT' +   'OS0FYZzazm93sWOT3+7ehbF/WbQIHyz5qkytCSMaRyxeOLugehybsUpEH5BS7s' +   'sUKWMTsZl8O+6HZ8sSepKwhe48kVHJ8S5knEn/sazzfVMgvLYWM9d/sZjc7Bo+' +   'P2qUYCuxKbSfp6eso8kK5RslUScePIzJ2hNnNbnYSHEkq7GxZm1T7zB+fkplsa' +   'riYKuA9DwPgDVMo6W8fuzZmN/ty2N/Pr2JwBZ6wY90mGfdUZIQUeeVeHinpSke' +   'Q5wSiR3Rks5t9yew4XcXzxU8pi1HK31MoC+Y9/34HtJXlstS4EbsPe8TsZjd7q' +   'rbjVvy7E2eXhsyt/9RdOcJOtMkBU+NGjNnNbvZawRNXdlZMlOcJsXWls5SeJf7' +   'KtLfKANLsZjf75yhFHv0VW9Ij2GjqOOMeYcKFwRv6m93sD8aeWpwPCtwHZ7LjH' +   'mJU/FM9q/QR1nbij/fyzG52s6eQU/6piXAKedxIMlXJCTuZt5rd7GavhYyHxTX' +   '5eEXpa2XZDYP7pLTJ1yDsWOT1caPZzb4c9vkS7ONWoRXtVJHHDk0t3+H/Abv+e' +   'rvZzW72W7H3FPlprZMJNfmvgzfUNrvZ74e9yiiRaYNAqml0w78Uk4o8fHycQGq' +   '6anazmz3V6MiSDgKp02Ts6A+v4NyWHHAie2pOanazm33qcHGadnV2Aog9omiQk' +   'aTZzW72K2TiZJBoSx0x/KnqJ0iW681udrPfbZQlLLIPss9n8gDaZjf7AtnH3XG' +   'rvsi/tJjd7HPkH/RHKow=');end; procedure leftx;     //key leftvar s: string;begin s:=left   TypeText(s);   wait(keywait+random(randomwait));end;procedure rightx;    //key rightvar s: string;begin s:=right   TypeText(s);   wait(keywait+random(randomwait));end;procedure upx;     //key upvar s: string;begin s:=up   TypeText(s);   wait(keywait+random(randomwait));end;Procedure downx;  //key downvar s: string;begin s:=down ; TypeText(s);   wait(keywait+random(randomwait));end;Procedure aa;     //key zvar s: string;begin s:=a  TypeText(s);    wait(keywait+random(randomwait));end;Procedure bb;     //key xvar s: string;begin s:=b  TypeText(s);    wait(keywait+random(randomwait));end;Procedure rod;   //key cvar s: string;begin s:=hotkey  TypeText(s);    wait(5000+random(randomwait));end;procedure playagain;beginrepeat   bb;until False;end;procedure kappa;  var Box: TBox; begin      Box := GetClient.ImageArea;      If  (FindBitmapTol(x,y,close,Box.x1, Box.y1, Box.x2, Box.y2, 50)) then begin        /// ESSENTIAL!    MoveMouse(x,y);     ClickMouse(x, y, mbLeft);     end;end;  procedure leaveb;   begin   wait(random(1000));rightx;  downx;        aa;wait(random(1000));end; procedure  baltletime; var Box: TBox;       begin   Box := GetClient.ImageArea; wait(2000+random(randomwait));//wait(3000 +random(4000)) ;    if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin             //  writeln('START BATTLE ')  ;               wait(3000+random(1000));                     IF     (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                       //  writeln('CHECK IF SHINY ')  ;                    {   IF (FindBitmapTol(x,y,BADFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then  begin                          //   writeln('NOT SHINY')  ;                         wait(1000+random(2000));                          leaveb;                       end    }                        // ELSE BEGIN  //case of shiny!                                   // writeln(' SHINY')  ;                                    if     (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                                            repeat                                               bb;                                               bb;                                            rightx;                                            aa;                                             rightx;                                            rightx;                                             aa;                                            balls:=balls-1;                                             wait(5000+random(1000));                                             until    (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) or   (endtime=1) ;                                       end                                    ELSE BEGIN                                             wait(3000+random(1000));                                            if     (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                                                    repeat                                                         bb;                                                        bb;                                                    rightx;                                                    aa;                                                    rightx;                                                    rightx;                                                    aa;                                                     balls:=balls-1;                                                       wait(5000+random(1000));                                                     until    (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) or   (endtime=1) ;                                              end;                                             end;                       // end;                     end;         end; end;procedure fishy;    var Box: TBox;begin              rod;Box := GetClient.ImageArea;//wait(3000+random(randomwait));       If    (FindBitmapTol(x,y,failcat,Box.x1, Box.y1, Box.x2, Box.y2, 50))             then begin                                bb;                       end        ELSE  BEGIN               //find fishy.                  bb;                bb;                wait(4000+random(randomwait))               If  (FindBitmapTol(x,y,magikarp,Box.x1, Box.y1, Box.x2, Box.y2, 50)) then begin                     // writeln('DRAGONAIR NOYS ')                       counterF:=CounterF+1 ;                      baltletime;               end;                end;end;function TimeH(time : extended) : integer; begin result := Floor(DecRet(time)*24) end;function TimeM(time : extended) : integer; begin result := Floor(DecRet(time*24)*60) end;function TimeS(time : extended) : integer; begin result := Floor(DecRet(time*24*60)*60) end;function TimeMs(time : extended) : integer; begin result := Floor(DecRet(time*24*60*1000)*1000) end;function TimeStr : string;var v : extended;begin    v := now;     result :=inttostr(TimeH(v)) + ':'+inttostr(TimeM(v)) + ':'+ inttostr(TimeS(v))+' '  ;end;beginwait(1000);Loadbmp ;cleardebug;SetClient(TSCARWindowClient.Create(GetDesktopWindow)).Free;repeat     counter:=counter+1;    fishy;        kappa;                      writeln ('MAGICARPS:='+inttostr(counterF)+'  TIME:'+Timestr);    //  If (balls<=0) then playagain;until False;

 

 

 

in case you want any help give me a shout .HOwever i need somekind of more info about your script / game you looking at.

Pokemon script are easy .

Edited by seafight17
  • Confused 1

Share this post


Link to post
Share on other sites

Thanks for the response i'll watch into it when i wake up, did a quick sneak peak and wtf it looks insane, i'll observe it when i wake up and hit you up thanks again and cya tomorrow!

Share this post


Link to post
Share on other sites
I changed the procedures to bmp, but yea now i did as you told me change the TScARBitmaps to BmpShinyheck, BmpGoldeen,... But i still get the invalid bitmap error on line 73 :

As you can see i did change them to Bmp, did i still missunderstood something? What kind of newbish thing am i doing wrong now >.< Hopefully you know it

Btw thanks for trying to explain these things to a noob really appericiate it.

 

You didn't call the procedure that initiated the bitmap before searching for it so it's trying to find a bitmap that hasn't loaded yet. You have to call that procedure you defined in your main body before so that it will load that bitmap so it doesn't try searching with an empty one which is throwing an error.

Share this post


Link to post
Share on other sites

I re-wrote it again with looking how Seafight117 wrote hes and tried to learn from it now let me first explain what this bot actually has to do :

0672491804.png You start by pressing F (which i didnt put into the script since you only have to press it once and it'll fish until you press f again)

 

When you get a catch you get a pop-up screen looking like this :

111690f161.png

 

Now i saw that Seafight made hes code with they w,a,s,d keys but sadly enough you cant battle with the keyboard so thats why I again used loads of bitmaps in my new version. (see bottom of post)

 

As you see i found a magikarp so what the bot has to do if it found out i dont need this pokemon it will click on Fight and after that on the first attack which is on the same coordinates as the fight buttom.

 

Now what if it found a pokemon that I want to catch?

Then I try to make it click the " BAG " buttom but them comes a stupid part.

After clicking on " BAG " this will pop-up :

b636a6b065.png

 

As you see I will need to make it click the " > "So i needed another bitmap for that.

It has to click " > " 5times to actually be at the ultra balls.

Then it wil click on the use item ( with another bitmap )

And this will be repeated until the bitmap of the battle background dissapears.

 

After that it will just repeat

 

Now i also have some questions about your code that i still dont really understand :

-

unction TimeH(time : extended) : integer; begin result := Floor(DecRet(time)*24) end;function TimeM(time : extended) : integer; begin result := Floor(DecRet(time*24)*60) end;function TimeS(time : extended) : integer; begin result := Floor(DecRet(time*24*60)*60) end;function TimeMs(time : extended) : integer; begin result := Floor(DecRet(time*24*60*1000)*1000) end;function TimeStr : string;

What does this actually do? i really dont get this part :P

 

Also what does the

bb;

do that you used quite alot? I wrote it in my code but tbh i really don't know what it actually is for.

 

I probally will have some small mistakes left in the code but if you dont mind you can always take a look and tell me what can be made better, I also gues you understand what i am trying to make a bit better now :D

Thanks again for the help guys!

 

 

program New;var up,down,left,right,hotkey,a,b   : string;var  mousewait,keywait,randomwait,reloadwait,x,y,steps,balls,endtime,counter,counterA,counterB,counterC,counterD,counterE,counterF,Cdratini,Cgoldeen,Cseaking,Cpsyduck,Cslowboke,Cdragonnair  :integer;var failcat, magikarp,hp,close,Bag,Battles,BADFISH :TSCARBitmap; procedure Loadvariablebegin//////////////////////////////////////////////KEYS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\mousewait:=50;  keywait:=500;randomwait:=100;                           // No Walking needed so no need for movement buttomsreloadwait:=2500;Cdragonnair:=1;Cdratini:=1;end;procedure loadbmp; begin   Loadvariable ;  Battles := TSCARBitmap.Create('deNpjYdBk+PDjBxyduPGCbgjZXmR048ULmiJc9' +     //Checks if you are in the battle screen   'iKjBx8+0BT9wAGAMjRFANs4v50='); close := TSCARBitmap.Create('deNrjZeBj+A8GBxwccKH/qAC/mgVIbDxqgFy' +         // Close buttom of learning your pokemon a new attack   'sKtHUHMCmEqsaTJW41GCqXDBS/b4AzMYT9RAFAHHHWLw=');  Bag := TSCARBitmap.Create('deNqFUdsRgDAI898fR2IURmGUjpJROoL/fiiID' +         // Searches the Bag Buttom   '67SyuV6bcjRpJ2nZQLTBWCPta214O0yKaM07vKjrq1ApBAZHiYT4ERPYF2mKmL' +   'M9wrAvLkH7RZpBE0QG5iaDKkHJl3TM2lQn2NBOkEjiFQ13/EwSGH7AA3ibx7/C' +   '5SBf3AAfYVbaw==');   GOODFISH := TSCARBitmap.Create('deNpjZ+BmWHbqAx6k4NAARGgi////ZwAD' +         // Dratini   'YgQdFBqQBSFqIIINDQfgggkODUAEEUxIcACjAxDFQBFkQQgXjyBEF1AQWRwAZf' +   'l0ig=='); Shinycheck := TSCARBitmap.Create('deNqNULkNwCAQo06RGRklo1BkkBskQ9' +         // Shiny?   'CnSAxWLAuEFMvFPT7fwZ629Nz1J48PiCMCQc6NAFIViVJOFplGh48DnIWS/kgV' +   'o9scrlDLlVztW8RBCQfEvNP9Z6XI1ejK2ZU8Wy34u+18p7995bn6TylfjisyyA' +   '==');                                                             NextItem := TSCARBitmap.Create('deNrjYhBgOJDgQCH6Dwb4ZfEoQFaDSxlB' +         // Click next item buttom   'BcRYRIz5RNqLxz3EeITyMCceAQBS6hME');   Ultra := TSCARBitmap.Create('deNrjYOBg+HHBAogurBAoaJgAR0Dujw8RCzYcQ' +       // Ultraball   'BaEoB9ggCmFSxwogtUcrAjNGQjDL1jgEgcAvqNrWQ==');          UseItem := TSCARBitmap.Create('deNqTZOBlOJDgQDv0oKHhwYIDQEQFoxYc+' +          //Click on the useitem buttom   'A8GcJH/vz8AzafcKAibcqOAJkCNWtCAbBooEBoaCJqPbNR/ZPD7A9y/yMJAW4h' +   'yFYwNjogGhDnA0ANHDbIVpIYVZozAZTH9i8coeNCBTIAjsJtJdRVSLBxAQTjCn' +   'yQPgmKWuGBHC2fswY5kMn6j4FzsiQEpIwAACjtndg==');        FB := TSCARBitmap.Create('deNoTZJBgOGCvP8jRh1s3/mOAO+tX77TVvTFj8p' +         //Fight buttom   'cnj/f6O++100PW8h6s5d3jRy9u3ngJQ0enTlhjofXs6KHf374dqC7daq2zzw6h' +   '5R1Yy/ryoqmGKnOM1eaC0UJT9fWW2ttsdLfHhiw109hkBdSih6ZlU0XxErAU0E' +   'Ag2m6ju9tW71RBxqnasu1+TjtsdPfbo9uyuaJ4tYXWHlQ3Q7x5tKYMqAXTYScW' +   'zAW6+Wxd2fn6ciA6GOgCVAPx5s6qEqAjgYJoWtAAxGRkB7y+cA5Ny9EFc4BSOy' +   'qhaJWXw2ZrHWQtQAaalo0VxfNM1FeaawJlgQjoEjRbMLUAxYHqgdEHDAEgAsYd' +   '0C8EtWCGGLLUCwy/ENRyKD+dVC1Ar8HFj+en76kqWeppD/QyWvJDlkI2DcgGhu' +   'cGK220KMYjBUw8+0Dho4emHr8UMehkUgSpWvaTbst+epUSADd3Xro=');    end;procedure playagain;beginrepeat   bb;until False;end;procedure kappa;  var Box: TBox; begin      Box := GetClient.ImageArea;      If  (FindBitmapTol(x,y,close,Box.x1, Box.y1, Box.x2, Box.y2, 50)) then begin        /// ESSENTIAL!           Closes an not needed popup ? or am i wrong?   MoveMouse(x,y);     ClickMouse(x, y, mbLeft);     end;end; procedureprocedure  baltletime; var Box: TBox;       begin   Box := GetClient.ImageArea; wait(2000+random(randomwait));  if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin               writeln('START BATTLE ')  ;               wait(3000+random(1000));                   IF     (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)                              // If it is a shiny or a Dratini then move to bag               OR     (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin               // And Try to catch it                       repeat                       bb; // What was this bb; for?  to afraid to delete it haha                       bb;                      (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                      MoveMouse(x, y);                      wait(5000+random(1000));                         ClickMouse(x, y, mbLeft); then                                  repeat                               (FindBitmapTol(x,y,NextItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)                                MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                                 until(FindBitmapTol(x,y,Ultra,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true); then                                       (FindBitmapTol(x,y,UseItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin                                        MoveMouse(x, y, mbLeft);                                      end;                       until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                            end                 ELSE BEGIN                              wait(3000+random(1000)):                      (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false)                                          OR      (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false)  then               begin                       (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then                     repeat                     MoveMouse(x, y);                     wait1000+random(1000);                       ClickMouse(x, y, mbLeft);                     until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                   end;      end;  end; end; beginwait(100);Loadbmp;cleardebug;SetClient(TSCARWindowClient.Create(GetDesktopWindow)).Free;repeat     kappa;     battletime;until False;end;end.

 

0672491804.png

111690f161.png

b636a6b065.png

Share this post


Link to post
Share on other sites

I wouldn't bother with bitmaps. Use GetColor and coordinates at fixed positions on the screen since it looks like nothing is dynamic. I'm not sure where you are getting those 'time functions' from either..

Edited by Wanted

Share this post


Link to post
Share on other sites

no need it just show at debbuget the time.

 

function TimeH(time : extended) : integer; begin result := Floor(DecRet(time)*24) end;function TimeM(time : extended) : integer; begin result := Floor(DecRet(time*24)*60) end;function TimeS(time : extended) : integer; begin result := Floor(DecRet(time*24*60)*60) end;function TimeMs(time : extended) : integer; begin result := Floor(DecRet(time*24*60*1000)*1000) end;function TimeStr : string; 

 

 

Now i saw some wierd stuffs let me explain you.

 

if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin               writeln('START BATTLE ')  ;               wait(3000+random(1000));                   IF     (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)                              // If it is a shiny or a Dratini then move to bag               OR     (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin               // And Try to catch it                       repeat                       bb; // What was this bb; for?  to afraid to delete it haha                       bb;                      (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                      MoveMouse(x, y);                      wait(5000+random(1000));                         ClickMouse(x, y, mbLeft); then                                  repeat                               (FindBitmapTol(x,y,NextItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)                                MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                                 until(FindBitmapTol(x,y,Ultra,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true); then                                       (FindBitmapTol(x,y,UseItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin                                        MoveMouse(x, y, mbLeft);                                      end;                       until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                            end                 ELSE BEGIN                              wait(3000+random(1000)):                      (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false)                                          OR      (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false)  then               begin                       (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then                     repeat                     MoveMouse(x, y);                     wait1000+random(1000);                       ClickMouse(x, y, mbLeft);                     until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                   end;      end;  end; end;  

 

 

you search for 1 bmp ( i recoment use hp bmp)

then you search for 2 other (dratini/shiny) in case you find them you do something like this :

 

 rocedure    abcd;var Box: TBox;begin Box := GetClient.ImageArea;    repeat                      // bb; // What was this bb; for?  to afraid to delete it haha     > no need                      // bb;                     if (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                      MoveMouse(x, y);                      wait(5000+random(1000));                         ClickMouse(x, y, mbLeft); then                                  repeat                               (FindBitmapTol(x,y,NextItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)                                MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                                wait(1000+random(100));                               // or do this      since the time you find the bag you need FIXED 5 clicks so :i dont use for but you can if you want to be smaller.                               {                                 MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);  //1 click                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);           //2                                MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);               //3                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                  //4                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                     //5  > skip the until                                }                               until(FindBitmapTol(x,y,Ultra,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true); then                                       (FindBitmapTol(x,y,UseItem,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin                                        MoveMouse(x, y, mbLeft);                                         // click Mouse ??                                      end;                      until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                            end;    //  end; 

 

but if you dont ? what you do?

I guees you just need to do this.]

 

 procedure  baltletime; var Box: TBox;       begin   Box := GetClient.ImageArea; wait(2000+random(randomwait));  if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin       // SET THE BMP OF HP               writeln('START BATTLE ')  ;               wait(3000+random(1000));                   IF     (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)  OR   IF (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin                         // If it is a shiny or a Dratini then move to bag               abcd;               end ELSE BEGIN                      // In that case you MUST leave battle right?                       //click at run.                end;      end;  end; end;  

 

my idea of script is like this.

 

program New;var up,down,left,right,hotkey,a,b   : string;var  mousewait,keywait,randomwait,reloadwait,x,y,steps,balls,endtime,counter,counterA,counterB,counterC,counterD,counterE,counterF,Cdratini,xx,yy,Cgoldeen,Cseaking,Cpsyduck,Cslowboke,Cdragonnair  :integer;var failcat, magikarp,hp,close,Bag,Battles,BADFISH,GOODFISH, Shinycheck ,NextItem,Ultra,UseItem,FB :TSCARBitmap; procedure Loadvariable;begin//////////////////////////////////////////////KEYS\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\mousewait:=50;  keywait:=500;randomwait:=100;                           // No Walking needed so no need for movement buttomsreloadwait:=2500;Cdragonnair:=1;Cdratini:=1;end;procedure loadbmp; begin   Loadvariable ;  Battles := TSCARBitmap.Create('deNpjYdBk+PDjBxyduPGCbgjZXmR048ULmiJc9' +     //Checks if you are in the battle screen    >> hp BMP its the safesest    'iKjBx8+0BT9wAGAMjRFANs4v50='); close := TSCARBitmap.Create('deNrjZeBj+A8GBxwccKH/qAC/mgVIbDxqgFy' +         // Close buttom of learning your pokemon a new attack   'sKtHUHMCmEqsaTJW41GCqXDBS/b4AzMYT9RAFAHHHWLw=');  Bag := TSCARBitmap.Create('deNqFUdsRgDAI898fR2IURmGUjpJROoL/fiiID' +         // Searches the Bag Buttom   '67SyuV6bcjRpJ2nZQLTBWCPta214O0yKaM07vKjrq1ApBAZHiYT4ERPYF2mKmL' +   'M9wrAvLkH7RZpBE0QG5iaDKkHJl3TM2lQn2NBOkEjiFQ13/EwSGH7AA3ibx7/C' +   '5SBf3AAfYVbaw==');   GOODFISH := TSCARBitmap.Create('deNpjZ+BmWHbqAx6k4NAARGgi////ZwAD' +         // Dratini   'YgQdFBqQBSFqIIINDQfgggkODUAEEUxIcACjAxDFQBFkQQgXjyBEF1AQWRwAZf' +   'l0ig=='); Shinycheck := TSCARBitmap.Create('deNqNULkNwCAQo06RGRklo1BkkBskQ9' +         // Shiny?   'CnSAxWLAuEFMvFPT7fwZ629Nz1J48PiCMCQc6NAFIViVJOFplGh48DnIWS/kgV' +   'o9scrlDLlVztW8RBCQfEvNP9Z6XI1ejK2ZU8Wy34u+18p7995bn6TylfjisyyA' +   '==');                                                             NextItem := TSCARBitmap.Create('deNrjYhBgOJDgQCH6Dwb4ZfEoQFaDSxlB' +         // Click next item buttom   'BcRYRIz5RNqLxz3EeITyMCceAQBS6hME');   Ultra := TSCARBitmap.Create('deNrjYOBg+HHBAogurBAoaJgAR0Dujw8RCzYcQ' +       // Ultraball   'BaEoB9ggCmFSxwogtUcrAjNGQjDL1jgEgcAvqNrWQ==');          UseItem := TSCARBitmap.Create('deNqTZOBlOJDgQDv0oKHhwYIDQEQFoxYc+' +          //Click on the useitem buttom   'A8GcJH/vz8AzafcKAibcqOAJkCNWtCAbBooEBoaCJqPbNR/ZPD7A9y/yMJAW4h' +   'yFYwNjogGhDnA0ANHDbIVpIYVZozAZTH9i8coeNCBTIAjsJtJdRVSLBxAQTjCn' +   'yQPgmKWuGBHC2fswY5kMn6j4FzsiQEpIwAACjtndg==');        FB := TSCARBitmap.Create('deNoTZJBgOGCvP8jRh1s3/mOAO+tX77TVvTFj8p' +         //Fight buttom   'cnj/f6O++100PW8h6s5d3jRy9u3ngJQ0enTlhjofXs6KHf374dqC7daq2zzw6h' +   '5R1Yy/ryoqmGKnOM1eaC0UJT9fWW2ttsdLfHhiw109hkBdSih6ZlU0XxErAU0E' +   'Ag2m6ju9tW71RBxqnasu1+TjtsdPfbo9uyuaJ4tYXWHlQ3Q7x5tKYMqAXTYScW' +   'zAW6+Wxd2fn6ciA6GOgCVAPx5s6qEqAjgYJoWtAAxGRkB7y+cA5Ny9EFc4BSOy' +   'qhaJWXw2ZrHWQtQAaalo0VxfNM1FeaawJlgQjoEjRbMLUAxYHqgdEHDAEgAsYd' +   '0C8EtWCGGLLUCwy/ENRyKD+dVC1Ar8HFj+en76kqWeppD/QyWvJDlkI2DcgGhu' +   'cGK220KMYjBUw8+0Dho4emHr8UMehkUgSpWvaTbst+epUSADd3Xro=');    end;procedure kappa;  var Box: TBox; begin      Box := GetClient.ImageArea;      If  (FindBitmapTol(x,y,close,Box.x1, Box.y1, Box.x2, Box.y2, 50)) then begin        ///    MoveMouse(x,y);     ClickMouse(x, y, mbLeft);     end;end; procedure    abcd;var Box: TBox;begin Box := GetClient.ImageArea;    repeat                      // bb; // What was this bb; for?  to afraid to delete it haha     > no need                      // bb;                     if (FindBitmapTol(x,y,Bag,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin                      MoveMouse(x, y);                      wait(5000+random(1000));                         ClickMouse(x, y, mbLeft);                              writeln('BAG FOUND ')  ;                                // or do this      since the time you find the bag you need FIXED 5 clicks so :i dont use for but you can if you want to be smaller.                               {                                 MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);  //1 click                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);           //2                                MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);               //3                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                  //4                               MoveMouse(x, y);                               ClickMouse(x, y, mbLeft);                     //5  > skip the until                                }                                 if     (FindBitmapTol(x,y,UseItem,Box.x1, Box.y1, Box.x2, Box.y2, 50))   then begin                                            writeln('USE ITEM FOUND ')  ;                                        MoveMouse(x, y);                                         // click Mouse ??                                 end;                          end;         until (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=false) ;                              //  end;procedure  battletime; var Box: TBox;       begin         /// key for fishing  Box := GetClient.ImageArea; wait(2000+random(randomwait));   if (FindBitmapTol(x,y,Battles,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true) then begin       // SET THE BMP OF HP               writeln('START BATTLE ')  ;               wait(3000+random(1000));                   IF     (FindBitmapTol(x,y,GOODFISH,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)  OR    (FindBitmapTol(x,y,Shinycheck,Box.x1, Box.y1, Box.x2, Box.y2, 50)=true)   then begin                         // If it is a shiny or a Dratini then move to bag                 writeln('FISH FOUND ')  ;               abcd;               end ELSE BEGIN                      // In that case you MUST leave battle right?                  writeln('I LEAVE ')  ;    //leave procedure you make it and then you fish again                end;    end;  end; beginwait(100);Loadbmp;cleardebug;SetClient(TSCARWindowClient.Create(GetDesktopWindow)).Free;repeat     //kappa;     battletime;until False;end;end. 

 

 

 

the you may set procedure abcd; like you had before (keep in mind the follow however cause i think you done some loops very strange.

if > then its one line and no need end

if > then begin needs end .

if then begin

if this dont work sent me the name of the game(whisper so i check it out at weekend )

//bla bla

end else begin

// bla bla

end;

Also at some findbitmaptol i didnt found the if ahead( nnot sure if matter i dont rly know pascal )

IN CASE WRITELN WORKS then we got problem with the clicks if you dont see anyw riteln bmp are wrong

Edited by seafight17

Share this post


Link to post
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...