Results 1 to 8 of 8

Thread: Powerminer don't work!

  1. #1
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Powerminer don't work!

    Hi everyone, this is my first script, but it doesn't work good. I don't get any errors but when i run it, it only moves mouse to left up corner and does nothing. Does someone know whats wrong with this?
    It doesn't have dropping procedure yet but i'll make it soon.

    PHP Code:
    program PowerMiner;
    {.include 
    SRL/SRL.Scar}

    var 
    RColor1,RColor2,RColor3,RColor4,RocksMined integer;

    procedure DeclarePlayers;
    begin
      HowManyPlayers
    :=1;
      
    NumberOfPlayers(HowManyPlayers);
      
    CurrentPlayer:= 0;
      
      
    Players[0].Name        :='Username';
      
    Players[0].Pass        :='Password';
      
    Players[0].Nick        :='Nick';
      
    Players[0].Active      := True;
      
    Players[0].Strings[0]  :='Tin';        //Rock to mine: Tin,Copper
    end;

    procedure SetRock;
    begin
      
    Case LowerCase(Players[CurrentPlayer].Strings[0]) of
        
    'Tin':
          
    begin
            RColor1 
    :=8289924;
            
    RColor2 :=7237235;
            
    RColor3 :=6842477;
            
    RColor4 :=8619145;
          
    end;
        
    'Copper':
          
    begin
            RColor1 
    :=11;
            
    RColor2 :=11;
            
    RColor3 :=11;
            
    RColor4 :=11;
          
    end;
      
    end;
    end;

    procedure FindRock;
    var
      
    x,y,iinteger;
      
    ColorsTIntegerArray;
    begin
      RocksMined 
    := 0;
    repeat
      
    if not LoggedIn then
        LoginPlayer
    ;
      
    Colors := [RColor1,RColor2,RColor3,RColor4];
      For 
    i:=0 to 3 do
      
    begin
        
    if FindObjTPA(xyColors[i], 0, -1221, ['Mine','Rocks'])then
        begin
          Writeln
    ('Found the rock!');
          
    Mouse(x,y,0,0,false);
          
    ChooseOption('ine Rock');
          
    RocksMined := RocksMined +1;
          
    Wait(6000+Random(1000));
        
    end;
      
    end;
    until(InvFull);
    end;

    procedure Proggy;
    begin
    Writeln
    ('//////////////////////////////');
    Writeln('//   PowerMiner By: -Mato-  //');
    Writeln('//   Rocks Mined:'inttostr(RocksMined)+'.   //');
    Writeln('//////////////////////////////');
    end;

    begin
    SetupSRL
    ;
    DeclarePlayers;
    SetRock;
    repeat
      FindRock
    ;
      
    Proggy;
    until(false);
    end

  2. #2
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Add "ActivateClient;" before Declare Players.

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

    Default

    Also you have
    SCAR Code:
    Case LowerCase(Players[CurrentPlayer].Strings[0]) of
        'Tin':
    (Theres an upprcase T in your tin and C in your copper silly!)
    Change Tin to tin and Copper to copper in your setrock.

    I think you may have the parameters wrong on this, but im not 100% sure.
    SCAR Code:
    if FindObjTPA(x, y, Colors[i], 0, -1, 2, 2, 1, ['Mine','Rocks'])then
    SCAR Code:
    {*******************************************************************************
    function FindObjTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
    By: Wizzup?
    Description: Finds object using WizzyPlugin functions.
    Starts with a Spiral from x and y.
    Put in the color, Tolerance and ColorToleranceSpeed.
    If you don't know what colortolerancespeed to choose, put in -1.
    ObjWidth and ObjHeight are the parameters TPAToATPAEx uses, thus filtering
    the MS's FindColorsSpiralTolerance points in boxes defined by
    ObjWidth and ObjHeigth.
    minCount is the amount of colors it should at least find in a Object box.
    UpText, is ofcourse the text the object should have. In the Multi variant the
    UpText is a string array.

    *******************************************************************************}

  4. #4
    Join Date
    Oct 2007
    Location
    #srl
    Posts
    6,102
    Mentioned
    39 Post(s)
    Quoted
    62 Post(s)

    Default

    Quote Originally Posted by -Mato- View Post
    I don't get any errors but when i run it...
    Quote Originally Posted by YoHoJo View Post
    Also you have
    I think you may have the parameters wrong on this, but im not 100% sure.
    SCAR Code:
    if FindObjTPA(x, y, Colors[i], 0, -1, 2, 2, 1, ['Mine','Rocks'])then
    SCAR Code:
    {*******************************************************************************
    function FindObjTPA(var x, y: integer; color, tol, cts, ObjWidth, ObjHeight, minCount :Integer; UpText: tstringarray): Boolean;
    By: Wizzup?
    Description: Finds object using WizzyPlugin functions.
    Starts with a Spiral from x and y.
    Put in the color, Tolerance and ColorToleranceSpeed.
    If you don't know what colortolerancespeed to choose, put in -1.
    ObjWidth and ObjHeight are the parameters TPAToATPAEx uses, thus filtering
    the MS's FindColorsSpiralTolerance points in boxes defined by
    ObjWidth and ObjHeigth.
    minCount is the amount of colors it should at least find in a Object box.
    UpText, is ofcourse the text the object should have. In the Multi variant the
    UpText is a string array.

    *******************************************************************************}
    Then it wouldn't compile though?

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

    Default

    Parameters wrong as in, bad choices of parameters.
    I could have something like FindColorSpiral(x,y,6666,1,1,2,2) and it would fail because 1,1,2,2 isnt a very large search space.

    -Mato- IMO you need some TOLERANCE on your rock color, also its not very reliable to use const colors , maybe use ACA or some other auto coloring method to get the rock color instead of having one already in the script, since colors change A LOT on runescape.

  6. #6
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thank you guys the script works perfectly now and i'll try to autocolor too. This was my first script so i'll read more tuts and learn more and make better scripts.

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

    Default

    Yay! No problem. Talk to me on MSN (if you have it) and I can help you out. But feel free to make threads here in the help section whenever you're having trouble! Try to find some tutorials about "AutoColor Aid" made my Nielsie (I think that's how you spell it?) Its an amazing and easy autocoloring tool.

  8. #8
    Join Date
    Oct 2009
    Location
    Finland
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thank i'll try it out!

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
  •