Results 1 to 6 of 6

Thread: Help with my first practice Script

  1. #1
    Join Date
    Mar 2009
    Location
    Scotland! Land of the Brave!
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Help with my first practice Script

    This is my very first time trying this. Read a couple of guides and kinda got the feel of it. But now trying for the first time im stuck. I would appreciate any help:

    Program Powerminer;
    {.include PH.scar}

    var x,y, xx, yy, xx1, yy1, rand: integer;

    Procedure minerocks;
    Begin
    if(Findcolor(x,y,54323,5,5,515,340))then
    begin
    PerfectMouseEx(x,y, 3, 3, 2, 2, 2, 2, true)
    Wait(5000)
    end;
    End;

    That my script - i know its crap But i keep getting this message:

    Line 10: [Error] (10:1): Unknown identifier 'PerfectMouseEx' in script

    I dont understand? That is the file name. Does PH.scar need to be in a particular place?

    Thanks , Nomad
    "Friends help you move. Real friends help you move bodies."

  2. #2
    Join Date
    Dec 2008
    Posts
    2,813
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what tuts have you been reading?

    I've never even heard of PerfectMouseEx

    I'm guessing you're trying to do this..

    SCAR Code:
    program MineRocks;
    {.include SRL/SRL.scar}

    const
      RockColor = 54323;
     
    procedure MineIt;
    var
      rx, ry: integer;
    begin
      if(FindColorTolerance(rx, ry, RockColor, MSX1, MSY1, MSX2, MSY2, 7))then
        Mouse(rx, ry, 2, 2, True);
    end;

    begin
      SetupSRL;
      repeat
        repeat
          MineIt;
          repeat
            Wait(RandomRange(25, 50));
          until(InvCount = InvCount + 1);
        until(InvFull);
        if(InvFull)then
          DropAll;
      until(IsFKeyDown(12));
    end.

    this is VERY basic..

    all it will do is if it finds the color in the MAIN SCREEN (that's what MSX1, MSY1, MSX2, MSY2 are for) it will click on it, then wait until the inventory count is one more (which would be when it mined a rock or got a gem), and keep doing that until it gets a full load.. then it will drop everything (so wear your pickaxe.. if you can't let me know and I'll fix that ) then it will go back to mining..

    it will keep doing that until you stop the script (Ctr + Alt + S) or if you press F12..

    if you need more help.. talk to me on MSN

    panic._@live.com

  3. #3
    Join Date
    Mar 2009
    Location
    Scotland! Land of the Brave!
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks man - I just read one of the tutorials on the forums, just to get the basics, didnt check the date so it was probably out of date.
    "Friends help you move. Real friends help you move bodies."

  4. #4
    Join Date
    Feb 2007
    Location
    Access Violation at 0x00000000
    Posts
    2,865
    Mentioned
    3 Post(s)
    Quoted
    18 Post(s)

    Default

    PH.scar = waaaaaaaaay old.
    SRL is like the only working include left. That tut was outdated tootally
    Ce ne sont que des gueux


  5. #5
    Join Date
    Nov 2008
    Location
    Belgium
    Posts
    254
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You might wanne take a look at here to setup Scar the good way
    and after that, you could take a look here to learn the basics of scripting with srl ;-)

  6. #6
    Join Date
    Mar 2009
    Location
    Scotland! Land of the Brave!
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    k Thanks man
    appreciate the help
    "Friends help you move. Real friends help you move bodies."

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
  •