Results 1 to 5 of 5

Thread: Need help with a procedure.

  1. #1
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Need help with a procedure.

    SCAR Code:
    procedure Sell;
    begin

    if(FindColor(x,y,ShopKeep,0,0,400,500))then
        MMouse(x,y,0,0);
        wait(100+random(50));

        If(IsUpText('hop K'))then
        Mouse(x,y,0,0,false);
        wait(100+random(50));

    end;

    I want it to trade with the shop keeper then sell all logs in inventory then close the shop keeper box.

    Help would be great. Thanks
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  2. #2
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    never tried to sell anything to store before but try this

    SCAR Code:
    procedure Sell;
    begin
      if(FindColor(x,y,ShopKeep,0,0,400,500))then
          MMouse(x,y,0,0);
          wait(100+random(50));
          If(IsUpText('hop K'))then
            begin
              Mouse(x,y,0,0,false);
              wait(100+random(50));
              ChooseOption(x,y,'rade');
              Wait(300+random(150));
              If(FindBitmap(YouItem,x,y))then
                begin
                  Mouse(x,y,0,0,False);
                  Wait(100+random(5));
                  ChooseOption('ell 10');
                end;
            end;
    end;
    STOP PM'ING ME

  3. #3
    Join Date
    Feb 2007
    Location
    Toronto, Ontario, Canada
    Posts
    586
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Try this:
    SCAR Code:
    procedure Sell;
    begin
     
    if(FindMSColor(x,y,ShopKeep))then  //Find MainScreen colour-so much easier!
      begin
        MMouse(x,y,0,0);
        wait(100+random(50));
      end;
     
    If(IsUpText('hop K'))then
      begin
        Mouse(x,y,1,1,false); // make sure you put random values, or be banned!
        ChooseOption(x,y,'Trade')//You right clicked last line,now choose an option
        wait(100+random(50));
      end;
    end;

    Notice how after the conditional statements, I put begin and end. This is important, because if you don't, the conditions will always be true.

    EDIT: Bah, hobbit posted while i was still thinking!

  4. #4
    Join Date
    Jan 2007
    Posts
    580
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    thanks
    I like cats.
    Narcle's AK Smelter 1.1.6
    Run Time : 7 Hr 53 Min 5 Sec
    Total Bars : 3371
    Total XP : 58995

  5. #5
    Join Date
    Mar 2006
    Posts
    13,241
    Mentioned
    228 Post(s)
    Quoted
    267 Post(s)

    Default

    Quote Originally Posted by A G E N T 83 View Post
    Try this:
    SCAR Code:
    procedure Sell;
    begin
     
    if(FindMSColor(x,y,ShopKeep))then  //Find MainScreen colour-so much easier!
      begin
        MMouse(x,y,0,0);
        wait(100+random(50));
      end;
     
    If(IsUpText('hop K'))then
      begin
        Mouse(x,y,1,1,false); // make sure you put random values, or be banned!
        ChooseOption(x,y,'Trade')//You right clicked last line,now choose an option
        wait(100+random(50));
      end;
    end;

    Notice how after the conditional statements, I put begin and end. This is important, because if you don't, the conditions will always be true.

    EDIT: Bah, hobbit posted while i was still thinking!

    beat yah...but there is a flaw in your easy to miss...

    the way you have it is it will look for color or uptext...if it finds either of those it will do what is told to come next...what it needed is the way i have it, if..then statements within other if...then statements
    STOP PM'ING ME

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Procedure?
    By shadowrec0n in forum OSR Help
    Replies: 3
    Last Post: 02-11-2008, 09:04 PM
  2. Procedure TypeSendRandom & Procedure AutoResponder!
    By Ultra in forum Research & Development Lounge
    Replies: 12
    Last Post: 01-08-2008, 07:04 PM
  3. Help with Procedure
    By Esteban in forum OSR Help
    Replies: 8
    Last Post: 07-06-2007, 03:45 AM
  4. Replies: 8
    Last Post: 05-24-2007, 11:57 PM
  5. Procedure that calls random procedure?
    By Secet in forum OSR Help
    Replies: 2
    Last Post: 03-03-2007, 03:56 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
  •