Page 2 of 2 FirstFirst 12
Results 26 to 36 of 36

Thread: [AeroLib]bAl_KharidUnstrungMaker - Mine silver, make symbols, collect coins!

  1. #26
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    That's a really neat script. I noticed in your description you only target the 3 silver rocks rather than that cluster as well as the two north-east of that location. Is that because of the color similarity between the silver rocks and the tin rock / rune spawns?

    I just whipped up my own simple silver miner & banker that utilizes both clusters of rocks. It was a bit tricky to correctly handle the 2 silver rock zones but if you'd like some advice let me know and I'll show you how I tackled them.
    I'm not sure why that issue arises if I can be completely honest, it seemed like a good fix at the time to simply target the cluster and hop.

    I was also hoping to ask you regarding a way to detect if the character is mining, but I think pixel shift is probably best bet for that.

  2. #27
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Grendal View Post
    Can you add Tiaras for banking as an option?
    I made this entirely for ironman, but I think when I rewrite this I can include banking/normal man mode.

  3. #28
    Join Date
    Aug 2007
    Location
    Colorado
    Posts
    7,421
    Mentioned
    268 Post(s)
    Quoted
    1442 Post(s)

    Default

    Quote Originally Posted by Barr View Post
    I'm not sure why that issue arises if I can be completely honest, it seemed like a good fix at the time to simply target the cluster and hop.

    I was also hoping to ask you regarding a way to detect if the character is mining, but I think pixel shift is probably best bet for that.
    Because you're simply mining 3 out of the 5 rocks available, and I've noticed most accounts do just that; completely ignoring the remaining 2 silver rocks to the north.

    Pixelshift is a way to go however the downside is if you're competing for an ore and the other player(s) gets the ore, your mining animation remains constant for a period of time. A better way would be to track the rock that you clicked and wait until A: you receive an ore or B: the rock changes (the ore was mined by another player). I made this procedure to track the rock we clicked on; you'll need to modify it for your script but I'm sure given your ability you can decipher how it works. Just feed the function the point at which you found & clicked the target rock and call this function immediately after you click the rock.
    Simba Code:
    function waitForOre(rockPoint:tpoint): Boolean;
    var
      sBox : TBox;
      T,T2 : Timer;
      c    : Integer;
      tPnt : TPoint;
      pnts : TPointArray;
    begin
      tPnt := rockPoint;
      sBox := pointToBox(tPnt, 36);  // Size of a standard tile
      c := getInvCount();
      T2.start();

      T.start();
      while (T.timeElapsed() < MAXTIMEOUT) do
      begin
        if getInvCount() > c then exit(true);

        if obj_Rock.findAllIn_2(sBox, 5, tPnt, pnts) then
        begin
          if getInvCount() > c then exit(true);
          if not pointInBox(pnts[0], sBox) then
          begin
            if getInvCount() > c then exit(true);
            warn('Someone else got the ore!');
            {$IFDEF SMART}
              OS_SMART.__Graphics.Clear();
            {$ELSE}
              LayerBMP.clearGraphics();
            {$ENDIF}
            exit;
          end;

          if not pointsInDist(tPnt, pnts[0], 10) then
            T2.start();

          tPnt := pnts[0];
          sBox := pointToBox(tPnt, 36);
          {$IFDEF SMART}
            OS_SMART.__Graphics.Clear();
            OS_SMART.__Graphics.DrawBox(sBox, False, clLime);
          {$ELSE}
            LayerBMP.clearGraphics();
            LayerBMP.DrawBox(sBox, clLime);
          {$ENDIF}
        end else
        begin
          if getInvCount() > c then exit(true);
          warn('Someone else got the ore!');
          {$IFDEF SMART}
            OS_SMART.__Graphics.Clear();
          {$ELSE}
            LayerBMP.clearGraphics();
          {$ENDIF}
          exit;
        end;

        if (T2.timeElapsed() > 1290+random(470)) then
        begin
          if clickContinue(False) then
            exit(true);
          doAntiBans();
        end;
      end;

      result := False;
    end;
    Feel free to remove the debugging. I like to add it in to see the object the script is currently tracking.

    Current projects:
    [ AeroGuardians (GotR minigame), Motherlode Miner, Blast furnace ]

    "I won't fall in your gravity. Open your eyes,
    you're the Earth and I'm the sky..."


  4. #29
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Flight View Post
    Because you're simply mining 3 out of the 5 rocks available, and I've noticed most accounts do just that; completely ignoring the remaining 2 silver rocks to the north.

    Pixelshift is a way to go however the downside is if you're competing for an ore and the other player(s) gets the ore, your mining animation remains constant for a period of time. A better way would be to track the rock that you clicked and wait until A: you receive an ore or B: the rock changes (the ore was mined by another player). I made this procedure to track the rock we clicked on; you'll need to modify it for your script but I'm sure given your ability you can decipher how it works. Just feed the function the point at which you found & clicked the target rock and call this function immediately after you click the rock.
    Simba Code:
    function waitForOre(rockPoint:tpoint): Boolean;
    var
      sBox : TBox;
      T,T2 : Timer;
      c    : Integer;
      tPnt : TPoint;
      pnts : TPointArray;
    begin
      tPnt := rockPoint;
      sBox := pointToBox(tPnt, 36);  // Size of a standard tile
      c := getInvCount();
      T2.start();

      T.start();
      while (T.timeElapsed() < MAXTIMEOUT) do
      begin
        if getInvCount() > c then exit(true);

        if obj_Rock.findAllIn_2(sBox, 5, tPnt, pnts) then
        begin
          if getInvCount() > c then exit(true);
          if not pointInBox(pnts[0], sBox) then
          begin
            if getInvCount() > c then exit(true);
            warn('Someone else got the ore!');
            {$IFDEF SMART}
              OS_SMART.__Graphics.Clear();
            {$ELSE}
              LayerBMP.clearGraphics();
            {$ENDIF}
            exit;
          end;

          if not pointsInDist(tPnt, pnts[0], 10) then
            T2.start();

          tPnt := pnts[0];
          sBox := pointToBox(tPnt, 36);
          {$IFDEF SMART}
            OS_SMART.__Graphics.Clear();
            OS_SMART.__Graphics.DrawBox(sBox, False, clLime);
          {$ELSE}
            LayerBMP.clearGraphics();
            LayerBMP.DrawBox(sBox, clLime);
          {$ENDIF}
        end else
        begin
          if getInvCount() > c then exit(true);
          warn('Someone else got the ore!');
          {$IFDEF SMART}
            OS_SMART.__Graphics.Clear();
          {$ELSE}
            LayerBMP.clearGraphics();
          {$ENDIF}
          exit;
        end;

        if (T2.timeElapsed() > 1290+random(470)) then
        begin
          if clickContinue(False) then
            exit(true);
          doAntiBans();
        end;
      end;

      result := False;
    end;
    Feel free to remove the debugging. I like to add it in to see the object the script is currently tracking.
    you make me want to rewrite this whole script right now!

    Thank you for the help, im going to work on this!

  5. #30
    Join Date
    Mar 2018
    Posts
    34
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    When I started the script it gave me error:
    Error: Unknown declaration "GetTickCount64" at line 179
    Compiling failed.
    I tried to fix it but was unable.

  6. #31
    Join Date
    Jul 2017
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    15 Post(s)

    Default

    Quote Originally Posted by Nixes View Post
    When I started the script it gave me error:
    Error: Unknown declaration "GetTickCount64" at line 179
    Compiling failed.
    I tried to fix it but was unable.
    Works fine except after this update
    https://villavu.com/forum/showthread.php?t=117908&
    now its broken like many older scripts whilst smithing silver.

  7. #32
    Join Date
    Nov 2014
    Location
    DC
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I get ``Error: Unknown declaration "dateToStr" at line 448``

  8. #33
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    hey guys,

    this scipt is dead but do plan to make a come back for it

  9. #34
    Join Date
    Dec 2011
    Posts
    77
    Mentioned
    5 Post(s)
    Quoted
    31 Post(s)

    Default

    Looking forward to it!

  10. #35
    Join Date
    Jan 2012
    Location
    Sydney, Australia
    Posts
    877
    Mentioned
    12 Post(s)
    Quoted
    368 Post(s)

  11. #36
    Join Date
    Dec 2011
    Posts
    39
    Mentioned
    0 Post(s)
    Quoted
    12 Post(s)

    Default

    Quote Originally Posted by Dan the man View Post
    Going to redo it in SRL or keep it in Aerolib?
    I'm going to redo it in SRL.
    At this point just working on an edgeville smelter to try out working with DTMs, and a few other things before I get back into this one.

Page 2 of 2 FirstFirst 12

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
  •