Results 1 to 7 of 7

Thread: Not searching for a color, even though i tell it to?

  1. #1
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Not searching for a color, even though i tell it to?

    this is my script; and there are no errors; but when it gets a trade, it completly ignores the fact that a trade color has been found. can someone help me plz?
    SCAR Code:
    program MerchantMaster;
    {.Include SRL/SRL.scar}
    {.include srl\srl\extended\xtext.scar}
    {.include srl/srl/misc/trade.scar}


    //PLEASE FILL OUT FIRST THREE LINES UNDER CONST//
    const
    howmany = 15;  //How many of your item are you buying?
    whatyouwannabuy='willows';  //What do you want to buy?
    eaprice=25;    //How much are you buying them each for?
    Var
    Message1:String;
    Fx, Fy : integer;




    //-----------------------------------------------------------------------//

    /////////////////////////////////////////////////////////////////////////
    //////////This will set up the right amount of money in the trade screen.
    /////////////////////////////////////////////////////////////////////////
      procedure BuyTrade;
      begin
      MoveMouse(470,292);
      Wait(10000);
      if Option2('Willow')then
      if lobsamount * eaprice;
    end;





    ///////////////////////////////////////////////////////////////////////////
    ////////Will search for the color of trade chat, and open the trade screen.
    ///////////////////////////////////////////////////////////////////////////
     procedure StartTrade;
    var cx, cy, Fx, Fy : integer;
    begin
    If (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425))then
      begin
        Wait(500);
        Mouse(cx+10,cy+3,0,0,True);
        Wait(500);
        BuyTrade;
    end;
      end;





    //////////////////////////////////////////////////////////////////////////
    //////////This is the statement for when you are talking.
    //////////////////////////////////////////////////////////////////////////

    procedure Buyingstatement;
    var Fx, Fy : integer;
    begin
    wait(1000);
    Message1:= 'buying up to '+ IntToStr(howmany) + ' ' + whatyouwannabuy +'! for ' +  IntToStr(eaprice) + 'ea!';
    typesend(Message1);
        if (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425)) then
        begin
        StartTrade;
    end;
    end;


    ///////////This repeats procedure BuyingStatement////////////////////

    begin
    repeat
    buyingstatement;
    until(AcceptTrade);

    end.    //Ends the script.

    ps- i really tried to organize my script
    pss- i feel like saying
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

  2. #2
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    maybe because the perple trade option goes really quick and it doesnt locate it put private chat on hide

  3. #3
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ah i see.
    ill try it out, thanks.
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

  4. #4
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    first off, 'if lobsamount * eaprice' isn't gonna do anything. It's gotta be something like:

    SCAR Code:
    if lobsamount * eaprice = 500 then....

    also, in the starttrade procedure, you really don't need to re-search for the color, because you have already searched for it in the buyingstatement procedure

    I think the double color scan may be the problem.

    EDIT: Nvm; its because in the starttrade procedure, you have mouse(cx,cy...) but the color's coords are in fx and fy.

    Also, you forgot to add in SetupSRL
    Interested in C# and Electrical Engineering? This might interest you.

  5. #5
    Join Date
    Dec 2006
    Posts
    2,244
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    o yh i didnt really check the script

  6. #6
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it still doesnt work....heres the updated script:
    SCAR Code:
    ////SETUP BELOW!/////
    //1.) Turn your private chat on hide.///////
    //2.) Fill out lines: 17,18,19   ///////////////////
    //3.) Fill out the line: 36 //////////////////
    //4.) Go to an awsome Merchanting spot! /////
    //5.) START! :D ///////////////////////////

    program MerchantMaster;
    {.include SRL/SetupSRL.scar}
    {.Include SRL/SRL.scar}
    {.include srl\srl\extended\xtext.scar}
    {.include srl/srl/misc/trade.scar}


    //PLEASE FILL OUT FIRST THREE LINES UNDER CONST//
    const
    howmany = 500;  //How many of your item are you buying?
    whatyouwannabuy='willows';  //What do you want to buy?
    eaprice=40;    //How much are you buying them each for?
    Var
    Message1:String;
    Fx, Fy : integer;




    //-----------------------------------------------------------------------//

    /////////////////////////////////////////////////////////////////////////
    //////////This will set up the right amount of money in the trade screen.
    /////////////////////////////////////////////////////////////////////////
      procedure BuyTrade;
      begin
      MoveMouse(470,292);
      Wait(10000);
      if Option2('Willow')then
    end;





    ///////////////////////////////////////////////////////////////////////////
    ////////Will search for the color of trade chat, and open the trade screen.
    ///////////////////////////////////////////////////////////////////////////
     procedure StartTrade;
    var cx, cy, Fx, Fy : integer;
    begin
    If (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425))then
      begin
        Wait(500);
        Mouse(Fx+10,Fy+3,0,0,True);
        Wait(500);
        BuyTrade;
    end;
      end;





    //////////////////////////////////////////////////////////////////////////
    //////////This is the statement for when you are talking.
    //////////////////////////////////////////////////////////////////////////

    procedure Buyingstatement;
    var Fx, Fy : integer;
    begin
    wait(1000);
    Message1:= 'buying up to '+ IntToStr(howmany) + ' ' + whatyouwannabuy +'! for ' +  IntToStr(eaprice) + 'ea!';
    typesend(Message1);
        if (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425)) then
        begin
        StartTrade;
    end;
    end;


    ///////////This repeats procedure BuyingStatement////////////////////

    begin
    repeat
    buyingstatement;
    until(AcceptTrade);

    end.    //Ends the script.

    Why the hell isnt this working?! it looks fine!
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

  7. #7
    Join Date
    Mar 2007
    Posts
    80
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i solved the problem myself; thanks for the attempts u guys.
    here was the problem; after remembering SCAR reads up to down, i had to fix:
    SCAR Code:
    procedure Buyingstatement;
    begin
    wait(1000);
        if (FindColor(Fx, Fy, 8388736, 21, 416, 29, 425)) then
        begin
        StartTrade;
    end;
    Message1:= 'buying up to '+ IntToStr(howmany) + ' ' + whatyouwannabuy +'! for ' +  IntToStr(eaprice) + 'ea!';
    typesend(Message1);      //MUCH THANKS TO THE PEOPLE WHO HELPED ME WITH THE ABOVE LINE.

    end;

    i basically switched the order of the procedure.
    http://www.fenjer.com/adnan/SRL/16/20/Merchampion.png
    Merchampion is going to be the ultimate autoing script! It will buy items for your set amount of price; trade people without you having to be there, and once your money is all out; guess what! It's going to sell the item for a different set amount of price! It's merchanting without you having to be there

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Searching a file
    By Bobzilla69 in forum Java Help and Tutorials
    Replies: 0
    Last Post: 05-03-2008, 09:10 AM
  2. script doesn't keep searching for the color.
    By warhawk881 in forum OSR Help
    Replies: 5
    Last Post: 08-19-2007, 07:54 PM
  3. Searching for Text...
    By Its Miller Time in forum OSR Help
    Replies: 4
    Last Post: 06-07-2007, 02:31 AM

Posting Permissions

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