Results 1 to 17 of 17

Thread: PowerMiner

  1. #1
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default PowerMiner

    Hey guys!
    So i'm pretty much making my first script, and I need some help.
    I'm trying to make a script that just mines iron ore till full inv and then drops inventory.

    Simba Code:
    program powerminer;
    {$i srl/srl.simba}


    Procedure MineRock;
    var
      x, y : integer;
      begin
         if FindColorSpiralTolerance(x, y, 2305870, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 1845058, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 2174282, 1, 1, 511, 336, 10) then
         begin
            MoveMouse (x, y);
         if IsUpText('ine Rocks') then
         MoveMouse (x, y) ;
         ClickMouse(x, y, 1);
         wait(4000);
         end;
      end;

    begin
      repeat
        MineRock;
      until(false);
    end.
    ^this is what i have so far.

    So, there are still a few problems.
    1: When there are ores on the ground it clicks on those aswell, so it doesn't seem to use the uptext.
    2: how do you script droping a full inv, since I don't think I can use "DropInv" on a random private server. (2006 based)

    Thanks for the help!

  2. #2
    Join Date
    Sep 2012
    Location
    Netherlands
    Posts
    2,752
    Mentioned
    193 Post(s)
    Quoted
    1468 Post(s)

    Default

    Quote Originally Posted by fluffee View Post
    Hey guys!
    So i'm pretty much making my first script, and I need some help.
    I'm trying to make a script that just mines iron ore till full inv and then drops inventory.

    Simba Code:
    program powerminer;
    {$i srl/srl.simba}


    Procedure MineRock;
    var
      x, y : integer;
      begin
         if FindColorSpiralTolerance(x, y, 2305870, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 1845058, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 2174282, 1, 1, 511, 336, 10) then
         begin
            MoveMouse (x, y);
         if IsUpText('ine Rocks') then
         MoveMouse (x, y) ;
         ClickMouse(x, y, 1);
         wait(4000);
         end;
      end;

    begin
      repeat
        MineRock;
      until(false);
    end.
    ^this is what i have so far.

    So, there are still a few problems.
    1: When there are ores on the ground it clicks on those aswell, so it doesn't seem to use the uptext.
    2: how do you script droping a full inv, since I don't think I can use "DropInv" on a random private server. (2006 based)

    Thanks for the help!
    Simba Code:
    program powerminer;
    {$i srl/srl.simba}


    Procedure MineRock;
    var
      x, y : integer;
      begin
         if FindColorSpiralTolerance(x, y, 2305870, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 1845058, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 2174282, 1, 1, 511, 336, 10) then
         begin
            MoveMouse (x, y);
         if IsUpText('ine Rocks') then
         begin {<- add a begin here since if you dont use begin then it will only do the first task instead of them all}
         MoveMouse (x, y) ;
         ClickMouse(x, y, 1);
         wait(4000);
         end else
         Writeln('no rock found');
         end;
      end;

    begin
      repeat
        MineRock;
      until(false);
    end.

  3. #3
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    I tried adding the "begin" but now it just goes to the iron ore and keeps standing there.
    It doesn't click anymore or anything.

  4. #4
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Simba Code:
    program powerminer;
    {$i srl/srl.simba}


    Procedure MineRock;
    var
      x, y : integer;
      begin
         if FindColorSpiralTolerance(x, y, 2305870, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 1845058, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 2174282, 1, 1, 511, 336, 10) then
         begin
            MoveMouse (x, y);
            if WaitUpText('ine', 30) then
            begin
              ClickMouse(x, y, 1);
              wait(4000);
            end else
              Writeln('no rock found');
         end;
      end;

    begin
      repeat
        MineRock;
      until(false);
    end.

    Try that. I added waituptext. What that does, is when the mouse is over the rock, it will wait the specified time before "failing" the uptext check.

    EDIT: You also had an extra movemouse which I removed
    Last edited by Kyle; 01-30-2014 at 01:36 PM.
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  5. #5
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    It's still doing it.
    It just hovers above the iron ore and stays there like it's continiously checking something, it doesn't find a rock either.
    I'm guessing it doesn't register the uptext as it is a RSPS.
    It's a 2006 based private server btw, wasn't really clear on that in my first post.
    Last edited by fluffee; 01-30-2014 at 03:02 PM.

  6. #6
    Join Date
    Oct 2006
    Posts
    6,752
    Mentioned
    95 Post(s)
    Quoted
    532 Post(s)

    Default

    Quote Originally Posted by fluffee View Post
    It's still doing it.
    It just hovers above the iron ore and stays there like it's continiously checking something, it doesn't find a rock either.
    Maybe it doesn't register the uptext which is weird, cause I thought it did in another script.
    It's a 2006 based private server btw, wasn't really clear on that in my first post.
    Oh... Well yeah, the uptext isn't going to work on a private server....
    “The long-lived and those who will die soonest lose the same thing. The present is all that they can give up, since that is all you have, and what you do not have, you cannot lose.” - Marcus Aurelius

  7. #7
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Do you know how it would?
    or any other options?

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

    Default

    Quote Originally Posted by fluffee View Post
    Do you know how it would?
    or any other options?
    You can download my rsps include from: https://github.com/officerBarbrady/srlRSPS
    Extract it to C:/simba/includes and rename to 'srlRSPS'
    Change interpreter to lape:


    this should work:
    Simba Code:
    program powerminer;
    {$I RSPS/srlRSPS.Simba}

    var
      _myServer:_rsps_server;

    Procedure MineRock;
    var
      x, y : integer;
      begin
         if FindColorSpiralTolerance(x, y, 2305870, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 1845058, 1, 1, 511, 336, 10) or
            FindColorSpiralTolerance(x, y, 2174282, 1, 1, 511, 336, 10) then
         begin
            moveMouse(x, y);
            if _myServer.WaitUpText('ine', 200) then
            begin
              Mouse(x, y);
              wait(4000);
            end else
              Writeln('no rock found');
         end;
      end;

    begin
      _myServer.init(317, '317 server');
      repeat
        MineRock;
      until(false);
    end.


    Guide on how to use it: http://villavu.com/forum/showthread....755&highlight=

  9. #9
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    thanks for the reply.
    I did what you said and I still get the following error:
    "Exception in Script: File "RSPS/srlRSPS.Simba" not found at line 2, column 5"

  10. #10
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    To drop the ore use a for...do to loop through all inventory slots. Unless Rjj has a drop function in his include.

  11. #11
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    a what? :P
    and does someone have an idea how to solve the error?
    thanks.

  12. #12
    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 fluffee View Post
    a what? :P
    and does someone have an idea how to solve the error?
    thanks.
    by the looks of things it can't find the srlRSPS.simba file.

    Make sure it is in C:/Simba/includes/RSPS/srlSRPS.simba

  13. #13
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Yeah but the thing is, i don't have a map "RSPS" in includes.
    I just made one and put it in but that didn't work either.

  14. #14
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    I would PM Rjj as it is his include.

  15. #15
    Join Date
    Feb 2013
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Rjj is officer barbrady right?

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

    Default

    Quote Originally Posted by fluffee View Post
    Rjj is officer barbrady right?
    You can download my rsps include from: https://github.com/officerBarbrady/srlRSPS

    Extract it to C:/simba/includes and rename to 'RSPS'

    My bad told you to name it 'srlRSPS' instead of just 'RSPS'

    Quote Originally Posted by king
    To drop the ore use a for...do to loop through all inventory slots. Unless Rjj has a drop function in his include.
    as long as he sets up the include right he can just use this function:

    Simba Code:
    function _rsps_server.dropAll:boolean;
    var
      i, c, k:integer;
    begin
      result := false;
      c := inventory.count();
      if (c = 0) then
        exit(true);
      for i := 0 to 27 do
        if inventory.slotFull(i) then
        begin
          inventory.interactItem(i, mouse_right);
          if self.waitOption('rop', 200) then
            k := k + 1;
        end;
      exit(k = c);
    end;

  17. #17
    Join Date
    Jun 2012
    Location
    Howell, Michigan
    Posts
    1,585
    Mentioned
    34 Post(s)
    Quoted
    553 Post(s)

    Default

    Quote Originally Posted by Officer Barbrady View Post
    You can download my rsps include from: https://github.com/officerBarbrady/srlRSPS

    Extract it to C:/simba/includes and rename to 'RSPS'

    My bad told you to name it 'srlRSPS' instead of just 'RSPS'



    as long as he sets up the include right he can just use this function:

    Simba Code:
    function _rsps_server.dropAll:boolean;
    var
      i, c, k:integer;
    begin
      result := false;
      c := inventory.count();
      if (c = 0) then
        exit(true);
      for i := 0 to 27 do
        if inventory.slotFull(i) then
        begin
          inventory.interactItem(i, mouse_right);
          if self.waitOption('rop', 200) then
            k := k + 1;
        end;
      exit(k = c);
    end;
    Exactly as he posted!

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
  •