Results 1 to 10 of 10

Thread: How to tell when ore mined?

  1. #1
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default How to tell when ore mined?

    Just wondering I use waits which are bad if there is competition around (and a bit more detectable) what should i use to detect when the ore is mined? And then move ont o the next one.

    Thanks.

  2. #2
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    My powerminer uses inventory count checks, and a timer (set by user).
    If inventory count increases, ore is mined.
    If there is competition and someone gets ore before, once timer elapses it will move on to another ore. Ideally user sets timer to appx how long it takes them to mine an ore so not very much time is wasted if someone beats you to the ore.
    Also ideally there is no competition so inventory count just always works.

  3. #3
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    My powerminer uses inventory count checks, and a timer (set by user).
    If inventory count increases, ore is mined.
    If there is competition and someone gets ore before, once timer elapses it will move on to another ore. Ideally user sets timer to appx how long it takes them to mine an ore so not very much time is wasted if someone beats you to the ore.
    Also ideally there is no competition so inventory count just always works.
    Sounds like a good idea thanks

  4. #4
    Join Date
    Feb 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    The hands down best way is to track the ore color and if it disappears the rock has been mined

    the other suggested methods can be backups

  5. #5
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Default

    Just before I click I normally do:
    Simba Code:
    FTab(Tab_Inv);//So that it doesn't move the mouse away from the rock to click
    StoredInvCount := InvCount;

    After you click the rock do:
    Simba Code:
    GetMousePos(x, y);
    StoredPoint := Point(x, y);
    Then do:
    Simba Code:
    MarkTime(Time);
    While(CountColorTolerance(RockColour, StoredPoint.x1 - 10, StoredPoint.y1 - 10, StoredPoint.x1 + 10, StoredPoint.y1 + 10, 10) > 5)do
      begin
        if(StoredInvCount <> InvCount)then
          break;
        if(TimeFromMark(Time) > 10000)then
          break;
        Wait(50+Random(50));
      end;
    Last edited by putonajonny; 06-09-2012 at 05:23 PM.

  6. #6
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Nice way to track the rock, only reason I don't use that is because it only works if the rock is adjacent to you. If your player moves at all after the click/point store then the storepoint will be wrong .

  7. #7
    Join Date
    Feb 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by YoHoJo View Post
    Nice way to track the rock, only reason I don't use that is because it only works if the rock is adjacent to you. If your player moves at all after the click/point store then the storepoint will be wrong .
    What do you mean?

    1) Click rock
    2) Begin tracking rock and updating coords while you move to that rock
    3) Once you have stopped moving, store your final coord
    4) Create a box around that final coord to check if it is gone/still there

    I cant think of any reasons why your character would move?...after those steps

  8. #8
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    I was referring to putonajonny's post, your method is fine code would be nice :)

  9. #9
    Join Date
    Oct 2011
    Location
    UK
    Posts
    1,322
    Mentioned
    2 Post(s)
    Quoted
    1 Post(s)

    Lightbulb

    Quote Originally Posted by YoHoJo View Post
    Nice way to track the rock, only reason I don't use that is because it only works if the rock is adjacent to you. If your player moves at all after the click/point store then the storepoint will be wrong .
    Yeah that was the code from a script I wrote that only mined the rocks next to you, tracking wouldnt be too hard

  10. #10
    Join Date
    Nov 2011
    Location
    Australia
    Posts
    418
    Mentioned
    2 Post(s)
    Quoted
    86 Post(s)

    Default

    Tried both methods, is using objectdtms better? Someone said to use these in a PM.

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
  •