Results 1 to 6 of 6

Thread: function skipping

  1. #1
    Join Date
    Sep 2006
    Posts
    457
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default function skipping

    Ok so i made a chicken killing script. The problem i have it that i have tried multiple feather picking procedures and functions but none have worked.

    SCAR Code:
    function PickUpFeathers(Color1,Color2,Color3 :Integer): Boolean;

    var
    P: Integer;
    var Color: array[1..3] of Integer;
    begin

        Color[1]:= 10790340;
        Color[2]:= 9728;
        Color[3]:= 9869499;


      for P := 1 to 3 do
      begin
          if FindColorSpiral(x,y, Color[1],0,0,0,0)then
          begin
            Result := True;
            Mouse(x,y,0,0,False);
            ClickOption('fea',1);
          end else
        Writeln('Missed the feathers');
      end;
    end;


    it seems like it should work, but it doesn't.
    Finished my curser ---> it's in mage section.

  2. #2
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    is the 'Missed the feathers' part in your debug box or does it not work at all?


    and I think you want to change

    SCAR Code:
    if FindColorSpiral(x,y, Color[1],0,0,0,0)then // to
    if FindColorSpiral(x,y, Color[P],MSX1,MSY1,MSX2,MSY2)then

    beacuse it would only be searching for color[1] and in a box with an area of ZERO the way you have it
    MSX1,MSY1,MSX2,MSY2 will search the entire main RS screen. You can decrease it to the coords you want if you want to be more precise on where to look.

    and also you should change

    SCAR Code:
    ClickOption('fea',1); //to
    ChooseOption('ake');


  3. #3
    Join Date
    Jun 2006
    Location
    The Netherlands
    Posts
    2,984
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    if FindColorSpiral(x,y, Color[1],0,0,0,0)then

    Your always searching for Color[1], you should be searching for Color[P].

    Also, your searching in the area 0, 0, 0, 0, so that is nothing...

    Try :

    MSX1, MSY1, MSX2, MSY2
    Administrator's Warning:


  4. #4
    Join Date
    Sep 2006
    Posts
    457
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok thanks alot lol, that's basic i forgot :P
    Finished my curser ---> it's in mage section.

  5. #5
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Derek- View Post
    is the 'Missed the feathers' part in your debug box or does it not work at all?


    and I think you want to change

    [SCAR]
    and also you should change

    SCAR Code:
    ClickOption('fea',1); //to
    ChooseOption('ake');

    not to take if you do that it will take stuff iwth the same color
    ~Hermen

  6. #6
    Join Date
    Aug 2007
    Posts
    429
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    That's why you use the IsUpText function.. So you don't click something that's not a feather

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problem With Skipping Procedures
    By Blumblebee in forum OSR Help
    Replies: 2
    Last Post: 08-31-2008, 08:06 PM
  2. Skipping RW
    By rkroxpunk in forum OSR Help
    Replies: 14
    Last Post: 04-29-2007, 02:13 PM
  3. keeps skipping steps
    By del_signo in forum OSR Help
    Replies: 2
    Last Post: 03-05-2007, 01:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •