Results 1 to 12 of 12

Thread: Help with making it more efficiency.

  1. #1
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default Help with making it more efficiency.

    So in my mining script. I have a little problem where the script sees the coal rock but when it click on it at the edge of the rock, it didn't register. This cause my script to keep clicking on that rock, making it not efficient. So I had added a safe fail like so below.
    Is there another way to make it works better when it click on the rock and it didn't register then it clicks on another rock?



    Simba Code:
    Procedure MiningSkill;
     begin
    Case Lowercase(Mining) of
        '1' :
    Begin
    repeat
    repeat
    CheckEverything;
    existinguser;
    if not ores then begin turnscreen; end;
    Failed := Failed + 1;
    until (fullinventoryOres) or (Failed >=20);
    Failed:=0;
    if fullinventoryOres then begin bankingtheores; end;
    cleardebug;
    repeat
    Failed:=Failed+1;  until (failed>=15);
    if failed>=15 then begin (turnscreen); end;
    Failed:=0;
    until(false);
    End;end;end;

  2. #2
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    show us the whole script

  3. #3
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by rj View Post
    show us the whole script
    I can't do that since I have 6 skills total in this script and I don't want it to be public just yet. Mining is just one of them and yes it did bank when full inventory =D.

    I was thinking about adding animation to check if my character is doing mining animation if not then turn screen and click on rock again....but I don't know if this code will do the job as i said^. I also don't know how to implement this code into my script-.-.
    Simba Code:
    playerAnimating := Animating(box, 5000, 2000);
    Last edited by The Legendary; 04-30-2015 at 01:52 AM.

  4. #4
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by The Legendary View Post
    I can't do that since I have 6 skills total in this script and I don't want it to be public just yet. Mining is just one of them and yes it did bank when full inventory =D.

    I was thinking about adding animation to check if my character is doing mining animation if not then turn screen and click on rock again....but I don't know if this code will do the job as i said^. I also don't know how to implement this code into my script-.-.
    Simba Code:
    playerAnimating := Animating(box, 5000, 2000);
    Get the inventory count and make it wait until the inventory count has increased by 1.

  5. #5
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by rj View Post
    Get the inventory count and make it wait until the inventory count has increased by 1.
    Maybe you misunderstand me. I want to make a function somehow check after the click on coal rock and if it miss click the rock then it will click the other rocks around there. Here is a video, look closely at 1sec-30sec ish. you will see that it miss click the rock and just stand there for a good 9 second before the random of x,y I just added kick in.
    Simba Code:
    Mouse(X+Random(3),Y+Random(8),2,2,True);
    Sorry for the bad quality --->http://tinypic.com/player.php?v=2ijr...8#.VUGjqI5Viko

    Ps. What does this do? I don't quite understand it.
    Simba Code:
    Animating
    function Animating(B: TBox; Time, MinCount: Integer): Boolean;
    //Finds constant animation in boxes B during time T. If PixelShift in box is smaller than MinCount, it’s considered not animating.

    //Note Author: marpis Last Modified: Nov. 29, 2009
    //Example:

    playerAnimating := Animating(box, 5000, 2000);

  6. #6
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Do you check for mouse over text before you click? You could also just add

    didClick()

    To check it actually did a red click. If not, then look for another rock.

  7. #7
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by The Mayor View Post
    Do you check for mouse over text before you click? You could also just add

    didClick()

    To check it actually did a red click. If not, then look for another rock.
    No i don't check text before the click because it makes the script slower =]

    It gives me a error: "Invalid number of parameters at line 1840.
    Simba Code:
    Case Lowercase(Mining) of
        '1' :
    Begin
    repeat
    repeat
    CheckEverything;
    existinguser;
    if not ores then begin turnscreen; end;
    if not didclick then ores;
    Failed := Failed + 1;
    until (fullinventoryOres) or (Failed >=20);
    Failed:=0;
    if fullinventoryOres then begin bankingtheores; end;
    cleardebug;
    repeat
    Failed:=Failed+1;  until (failed>=15);
    if failed>=15 then begin (turnscreen); end;
    Failed:=0;
    until(false);
    End;end;end;
    I love the idea of checking for redclick Might just well make a custom one for it.

  8. #8
    Join Date
    Jun 2007
    Location
    The land of the long white cloud.
    Posts
    3,702
    Mentioned
    261 Post(s)
    Quoted
    2006 Post(s)

    Default

    Quote Originally Posted by The Legendary View Post
    No i don't check text before the click because it makes the script slower =]

    It gives me a error: "Invalid number of parameters at line 1840.
    Simba Code:
    Case Lowercase(Mining) of
        '1' :
    Begin
    repeat
    repeat
    CheckEverything;
    existinguser;
    if not ores then begin turnscreen; end;
    if not didclick then ores;
    Failed := Failed + 1;
    until (fullinventoryOres) or (Failed >=20);
    Failed:=0;
    if fullinventoryOres then begin bankingtheores; end;
    cleardebug;
    repeat
    Failed:=Failed+1;  until (failed>=15);
    if failed>=15 then begin (turnscreen); end;
    Failed:=0;
    until(false);
    End;end;end;
    I love the idea of checking for redclick Might just well make a custom one for it.
    It takes True/False, and a waitTime parameter (default 2000ms). Sometihng like:

    Simba Code:
    procedure clickARock();
    var
      i: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    begin
      //Find rock colours
      // Put all into an ATPA
       
      for i := 0 to high(ATPA) do
      begin
        mouse(ATPA[i].getBounds().getRandomPoint());
        if isMouseOverText(['ine Co']) then
          if didClick(True, 2000) then // True = red click, 2000 = wait time
            break();
      end;
                   
    end;

  9. #9
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default

    Thanks I got it working very efficient now with little waste time if it miss click.
    Simba Code:
    if didClick(True, 2000) then // True = red click, 2000 = wait time
            break();

  10. #10
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    @The Legendary; you should take out the randomness for a RSPS

  11. #11
    Join Date
    Apr 2015
    Location
    Falador
    Posts
    41
    Mentioned
    2 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by rj View Post
    @The Legendary; you should take out the randomness for a RSPS
    Can't do that
    This rsps I play on can detect same pattern mouse movement. Mods/Admin will come to you in no time if you use ghost mouse.

  12. #12
    Join Date
    Sep 2010
    Posts
    5,762
    Mentioned
    136 Post(s)
    Quoted
    2739 Post(s)

    Default

    Quote Originally Posted by The Legendary View Post
    Can't do that
    This rsps I play on can detect same pattern mouse movement. Mods/Admin will come to you in no time if you use ghost mouse.
    I highly doubt that. Even if you don't have randomness you will still click in different spots.

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
  •