Results 1 to 8 of 8

Thread: First Script: -keeps clicking, needs to stop-

  1. #1
    Join Date
    Mar 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Red face First Script: -keeps clicking, needs to stop-

    Hello all,

    I have just made my first script using tutorials on internet.
    now I have a question:

    I want to run the procedure mineCopper one time, then when I have got something in the inventory I want to run the procedure dropInventory and when I have the ore it has to run the mineCopper again..

    What it does now is this:
    It mines, it keeps clicking which I dont want and between these clicks it drops the ores.


    So I want to let it mine then when I mined it it needs to drop, then again mining.. without clicking about each 500 ms.

    Im happy that I made it so far!
    Hope you can help me out with my first script!

    Castrovalva

    Simba Code:
    program CastroScript;
    {$DEFINE SMART}
    {$DEFINE PAINT}
    {$i srl/srl/misc/smart.simba}
    {$i SRL/srl.simba}
    {$i SRL\SRL\Misc\PaintSmart.simba}
    {$i ObjectDTM\ObjDTMInclude.simba}

    procedure login;
    var email, x, y:integer;
    begin
    email := DTMFromString('mQwAAAHicY2aAABMglmJABWlJSXDMCuTDMCMSBgIAiuAD4g==');
      if FindDTM(email, x, y, MSX1, MSY1, MSX2, MSY2)then
      begin
        MMouse(312, 185, 1, 1);
        Mouse(x, y, 312, 185, true);
        TypeSend(''); //Username
        wait(5000 +random(200));
        MMouse(312, 232, 1, 1);
        Mouse(x, y, 312, 232, true);
        TypeSend(''); //Password
        wait(5000 +random(200));
        MMouse(373, 461, 1, 1);
        Mouse(x, y, 373, 461, true);
      end;
    end;
    procedure mineCopper;
    var
      copper, copperInventory, x, y:integer;
    begin
    copper := DTMFromString('mLgAAAHicY2KAAD4gZoSyyxqrGG7VODGwAtnKUHGIHABLKQNF');
    copperInventory := DTMFromString('m6wAAAHic42ZgYHBhYmDwA+JAIHYFYkcgtgBiYyhtxwRR4wvET4DqbwHxQyB+BcSfgPgNED8D4rtAfBWIb0DFdmZbAUkmojArkCQWM5KAkQAAts4OdA==');

      repeat
       if FindDTM(copper, x, y, MSX1, MSY1, MSX2, MSY2) then
        begin
          writeln('Found ore!');
          MMouse(x, y, 7, 7);
        end;
       if IsUpText('opper') then
       begin
          Mouse(x, y, 7, 7, true);
          wait(500 + random(500));
       end;
      until(FindDTM(copperInventory, x, y, MIX1, MIY1, MIX2, MIY2));
    end;

    procedure dropInventory;
    var
      copperInventory, x, y:integer;
    begin
    copperInventory := DTMFromString('m6wAAAHic42ZgYHBhYmDwA+JAIHYFYkcgtgBiYyhtxwRR4wvET4DqbwHxQyB+BcSfgPgNED8D4rtAfBWIb0DFdmZbAUkmojArkCQWM5KAkQAAts4OdA==');

      if  FindDTM(copperInventory, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          MMouse(x,y, 10,10)
          Mouse(x,y,10,10,false)
          ChooseOption('rop')
          wait(150 + random(500))
        end;
    end;

    var i:integer;
    begin
      SetUpSRL;
      login;
        for i:= 0 to 200 do //aantal keer dat je dit wilt doorlopen
        begin
            mineCopper;
          dropInventory;
        end
    end.
    Last edited by castrovalva; 04-03-2012 at 01:09 PM. Reason: Not readable

  2. #2
    Join Date
    Feb 2012
    Location
    Somewhere, over the rainbow...
    Posts
    2,272
    Mentioned
    3 Post(s)
    Quoted
    45 Post(s)

    Default

    First of all, put your script in [SIMBA] Tags

    Secondly, use this: PixelShift

  3. #3
    Join Date
    Mar 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Changed thanks for answer!

    Quote Originally Posted by abu_jwka View Post
    First of all, put your script in [SIMBA] Tags

    Secondly, use this: PixelShift

    Hey

    I have changed in the forum.
    Thanks for your hint! im sure Im going to use it, but im now at school
    Perhaps its now readable..

  4. #4
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    Take that login out since your using srl.

    Instead put this in and add DeclarePlayers after SetupSrl

    SCAR Code:
    procedure DeclarePlayers;
    begin

      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      with Players[0] do
      begin
        Name   := '';
        Pass   := '';
        Nick   := '';
        Pin    := '';
        Member := True;
        Active := True;
      end;
    end;

    Also for the spam clicking seeing this...

    SCAR Code:
    repeat
       if FindDTM(copper, x, y, MSX1, MSY1, MSX2, MSY2) then
        begin
          writeln('Found ore!');
          MMouse(x, y, 7, 7);
        end;
       if IsUpText('opper') then
       begin
          Mouse(x, y, 7, 7, true);
          wait(500 + random(500));
       end;
      until(FindDTM(copperInventory, x, y, MIX1, MIY1, MIX2, MIY2));

    Says its gonna spam click the dtm it finds till no tomorrow until its in the inventory. It would stop already if the ore is in the inventory though, so it's only gonna do it once.

  5. #5
    Join Date
    Mar 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default I know

    Thanks for your reply!

    Yes I know that it does that, I changed the login. (I couldt do this because smart didnt work until last night)
    Isnt there any easy way to dont spam clicking?
    I know I can fix it by adding just a longer wait, but I want to mine my fast.
    like until(IsMoving) or something until(IsMining)
    Last edited by castrovalva; 04-03-2012 at 02:44 PM.

  6. #6
    Join Date
    Jun 2006
    Posts
    694
    Mentioned
    0 Post(s)
    Quoted
    31 Post(s)

    Default

    You could add a marktime to check if the inventory has changed after so much time, if not find a ore.

    Basic why I can think of. Look in the inventory file within srl.

  7. #7
    Join Date
    Mar 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default ?

    How do I do that with this script?

  8. #8
    Join Date
    Dec 2010
    Posts
    89
    Mentioned
    4 Post(s)
    Quoted
    8 Post(s)

    Default

    Simba Code:
    function MineOre;
    var //declaring a few variables locally
      plusOne, miningTime: integer;

    begin
      plusOne:= InvCount + 1;  //Telling the script what I want "plusOne" to be

      if FindOre then   // "FindOre" is my way of describing the method you are using to find your ore
      begin
      ClickOre;         // "ClickOre" is my way of describing the method you are using to click your ore
        if DidRedClick then  //DidRedClick is a function in SRL
        Exit;

        MarkTime(miningTime);  // SRL function to tell the script to start keeping time
        repeat
            Wait(Random_Wait_Here); //Random Wait
            Antiban; //Your Antiban Function called here
        until (InvCount = plusOne) or (TimeFromMark(miningTime) > 7000) or (InvFull)  
       //If the Inventory Count increased, or if it is full, or if MiningTime runs out then it will result true
        Result:= true;
      end;
    end;

    I'm pretty sure that will work. Most of this stuff is pretty basic stuff. A good place to learn some other basic stuff for RS botting is here. If you want to add that function to trigger your Dropping Procedure then do something like...

    Simba Code:
    procedure Dropping;
    begin
      if MineOre then
      begin
        DropOre;
      end;
    end;
    Last edited by Valithor; 04-04-2012 at 03:37 AM.

Thread Information

Users Browsing this Thread

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

Tags for this Thread

Posting Permissions

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