Results 1 to 4 of 4

Thread: Potion Maker Help

  1. #1
    Join Date
    Jun 2019
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Potion Maker Help

    Code:
    program ClickEggs;
    {$i srl-6/srl.simba}
    
    var Eggs:Integer;
    var Potion,i:Integer;
    var PotionIcon:Integer;
    var BankPresets:Integer;
    
    Procedure ClickEggs;
    var X,Y:Integer;
    begin
      if FindDTM(Eggs, x,y,554,230,723,482) then
      begin
      MoveMouse(x,y);
      wait(randomrange(100,200));
      ClickMouse(x,y, mouse_Left);
      wait(randomrange(100,200));
      end;
    end;
    
    Procedure ClickPotion;
    var X,Y:Integer;
    begin
      if FindDTM(Potion, x,y,554,230,723,482) then
      begin
      MoveMouse(x,y);
      wait(randomrange(100,200));
      ClickMouse(x,y,mouse_Left);
      wait(randomrange(100,200));
      end;
      end;
    
    Procedure Type1;
    begin
      wait(1000);
      SendKeys('1',100,30);
      wait(197900);
      end;
    
    Procedure Bank;
    var X,Y:Integer;
    begin
      //wait(197900);
      if FindColorTolerance(X,Y,606294,74,89,453,305,5) then
      begin
      MoveMouse(x,y);
      wait(randomrange(100,200));
      ClickMouse(x,y,mouse_Right);
      wait(randomrange(100,200));
      if FindBitmapToleranceIn(BankPresets, x, y,74,89,453,305,145) then
      begin
        MoveMouse(x,y);
        wait(randomrange(100,200));
        ClickMouse(x,y,mouse_Left);
        wait(500);
        MoveMouse(212,182);
        wait(500);
        ClickMouse(212,182,mouse_Left);
        wait(randomrange(100,200));
        MoveMouse(415,272);
        wait(randomrange(100,200));
        ClickMouse(415,272,mouse_Left);
        wait(1000);
        end;
        end;
        end;
    
    begin
    Eggs := DTMFromString('mFQEAAHic42VgYLBjYmDwBmIrIHYDYgcgdoLSIL4LEHsCsQcTRK0NEL8B6nsExI+B+BkQvwDiJ0D8AIgfQvELqJqnUDkGBkY4rpDgZUgR5QRjDwcTsFgBUAxE10jxMsxWEGSYAcSkAk4UW4jHKAAALFQUZQ==');
    Potion := DTMFromString('mlwAAAHicY2dgYJjIxMAwjQlCzwTiGUA8FYjnAHEMIwODPxCHAnEEEAcDsTsQRwLx5rlzGCoqKhk2zZ7FsLi1mWFpWyvDliUhDA3pqQzogBOJzYgHQwEAvTYSIQ==');
    BankPresets := BitmapFromString(156, 8, 'meJztldENgzAMRLNER+hP9mUXJm' +
            'AtihSVur7zOQTUqlJRPoyT2M49HKZ5meallFLvt58e09BB1rVso+2' +
            'y9tGR7j0TXMdBj5Wi2V+nMzb+TCMpSnnNtikHWr+iyHR9j9P5x4JE' +
            'EZwg+7DHt/5oPQrr/HRj51RaQFRSA4p9urPeHuqnr/ip0O2YVCSyT' +
            '/96EYF+9g6H9iO+6MNIoY8VYI+DJUWAUruJmTKN7DSpbj1dZHoDoK' +
            'QVLjFsYSo1Cotq0ES6gB47oq+ZRm2Fs0eZUtkd7vr8F9BOj/rdVYI' +
            'RephqdpEdXbwn2XUydWULELbN6/vleSFTTJRGo4XR7WL2cqkjrB9m' +
            'Gh3cdYRdZruDgjjUTTSR6F9RWGcEJwi9OfXdm9pjiQ75I6YPTuON5w==');
    
    Bank;
    ClickEggs;
    ClickPotion;
    Type1;
    
    
    FreeDTM(Eggs);
    FreeDTM(Potion);
    FreeBitmap(BankPresets);
    end.
    Hey all this code works perfectly and allows me to load a bank preset, use potion ingredient on unfinished potion, and press 1 to make the potion..

    How do I run a while loop so that something like this occurs

    I want to run this loop 1200 times.. anticheat isnt really a concern cuz its rsps

    ***
    Code:
    var Count:integer;
    while (count<1200){
    Bank;
    ClickEggs;
    ClickPotion;
    Type1;
    count++;
    }
    ******

    thank you in advance

  2. #2
    Join Date
    Oct 2015
    Location
    Nowhere
    Posts
    134
    Mentioned
    2 Post(s)
    Quoted
    64 Post(s)

    Default

    Simba Code:
    procedure MakePotion(var count:Integer);
    begin
      Bank();
      ClickEggs();
      ClickPotion();
      Type1();
      Inc(count); //i++
    end;

    procedure MainLoop();
    var count:Integer := 0;
    begin
      while(count<1200)do
        MakePotion(count);
    end;

  3. #3
    Join Date
    May 2012
    Location
    Glorious Nippon
    Posts
    1,011
    Mentioned
    50 Post(s)
    Quoted
    505 Post(s)

    Default

    Simba Code:
    for 1 to 1200 do
    begin
      ...
    end;

  4. #4
    Join Date
    Jun 2019
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    thank you all

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •