Results 1 to 13 of 13

Thread: Rob's iron autosmelter [Falador]

  1. #1
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Rob's iron autosmelter [Falador]

    Hey,
    this is my first script...
    I haven't really tested it, since my smithing lvl isn't lvl 15 because i got hacked...

    Instructions:
    - Be in East falador bank with full load of iron ores.
    - Run the script.
    - Go watch TV.

    Any errors?
    - Please reply to this topic

    The script:
    Code:
    program Autosmelter;
    {.include SRL\SRL.scar}
    
    //This program is created by Robbiej.
    //Master of the secret society of xD².
    
    var
    Banked: integer;
    
    const
    Ores= 56; //Change this to your number of ores.
    IronOreColor= 2503507; //You can change this if it doesn't work.
    BankIconColor= 6543871; //You can change this if it doesn't work.
    BankerColor= 195836; //You can change this if it doesn't work.
    BankBoothColor= 7570836; //You can change this if it doesn't work.
    FurnaceIconColor= 3504639; //You can change this if it doesn't work.
    FurnaceColor= 2763308; //You can change this if it doesn't work.
    IronBarColor= 3158069; //You can change this if it doesn't work.
    House1Color= 6443873; //You can change this if it doesn't work.
    House2Color= 3695784; //You can change this if it doesn't work.
    CloseBankBoothColor= 7308433; //You can change this if it doesn't work.
    
    procedure Grab;
    begin
     Writeln('Opening bank account...');
     Writeln('Searching iron ore to grab...');
     if(FindColorTolerance(x,y,IronOreColor,0,0,400,400,50)) then
     begin
      Writeln('Iron ore found!');
      Mouse(x,y,2,2,false);
      Wait(500+random(200));
      Mouse(x,y+65,2,2,true);
     end else
     begin
      Writeln('Iron ore not found!');
     end
    end;
    
    procedure BankIronOre;
    begin
     Writeln('Opening bank account...');
     if(FindColorTolerance(x,y,BankBoothColor,0,0,600,600,50)) then
     begin
      Writeln('Bank booth opened!');
      Wait(5000+random(500));
      Mouse(x,y,2,2,false);
      Wait(500+random(200));
      Mouse(x,y+40,2,2,true);
      Wait(1000+random(300));
      Writeln('Searching iron bar to bank...');
      if(FindColorTolerance(x,y,IronBarColor,300,300,600,600,50)) then
      begin
       Writeln('Iron bar found!');
       Mouse(x,y,2,2,false);
       Wait(500+random(100));
       Mouse(x,y+65,2,2,true);
       Banked:= Banked+1;
       Grab;
       if(FindColorTolerance(x,y,CloseBankBoothColor,0,0,600,600,50)) then
       begin
        Writeln('Closing bank booth...');
        Mouse(x,y,2,2,true);
        Writeln('Bank booth closed!');
       end else
       begin
        Writeln('Bank booth close not found!');
       end
      end else
      begin
       Writeln('Iron bar not found!');
      end
      end else
      begin
       Writeln('Bank booth not found!');
      end
    end;
    
    procedure FindBanker;
    begin
     Writeln('Searching for banker...');
     if(FindColorTolerance(x,y,BankerColor,0,50,700,700,50)) then
     begin
      Writeln('Banker found!');
      Mouse(x,y-10,2,2,true);
      Wait(6000+random(400));
      BankIronOre;
     end else
     begin
      Writeln('Banker not found!');
     end
    end;
    
    procedure MoveToBank;
    begin
     Writeln('Searching for bank...');
     if(FindColorTolerance(x,y,BankIconColor,0,0,720,720,50)) then
     begin
      Writeln('Bank found!');
      Mouse(x,y,2,2,true);
      Wait(6000+random(400));
      FindBanker;
     end else
     begin
      Writeln('Bank not found!');
     end
    end;
    
    procedure FurnaceToBank;
    begin
     Writeln('Moving to house 1...');
     if(FindColorTolerance(x,y,House1Color,0,0,700,700,50)) then
     begin
      Writeln('House 1 found!');
      Mouse(x+50,y+50,2,0,true);
      Writeln('Moving to house 2...');
      Wait(7000+random(450));
      if(FindColorTolerance(x,y,House2Color,0,0,700,700,50)) then
      begin
       Writeln('House 2 found!');
       Mouse(x,y-30,2,2,true);
       Writeln('Moving to halfway bank...');
       Wait(8000+random(550));
       Writeln('Halfway bank found!');
       Mouse(700,117,2,2,true);
       Wait(10000+random(700));
       MoveToBank;
      end else
      begin
       Writeln('House 2 not found!');
      end
     end else
     begin
      Writeln('House 1 not found!');
     end
    end;
    
    procedure Smelt;
    begin
     Writeln('Searching furnace...');
     if(FindColorTolerance(x,y,FurnaceColor,0,0,600,600,50)) then
     begin
      Writeln('Furnace found!');;
      Mouse(x,y,2,2,true);
      Writeln('Smelting iron bars...');
      Wait(3000+random(300));
      if(FindColorTolerance(x,y,IronBarColor,0,400,700,700,50)) then
      begin
       Writeln('Iron bar found!');
       Mouse(x,y,2,2,false);
       Wait(500+random(100));
       Mouse(x,y+30,2,2,true);
       Wait(800+random(150));
       SendKeys('28'+chr(13));
       Wait(40000+random(1000));
       FurnaceToBank;
      end else
      begin
       Writeln('Iron bar not found!');
      end
     end else
     begin
      Writeln('Furnace not found!');
     end
    end;
    
    procedure FindFurnace;
    begin
     Writeln('Searching furnace icon...');
     if(FindColorTolerance(x,y,FurnaceIconColor,0,0,700,700,50)) then
     begin
      Writeln('Furnace icon found!');
      Mouse(x,y,2,2,true);
      Wait(10000+random(700));
      Smelt;
     end else
      Writeln('Furnace icon not found!');
    end;
    
    procedure BankToFurnace;
    begin
     Writeln('Moving to halfway bank...');
     Writeln('Halfway bank found!');
     Mouse(583,52,2,2,true);
      Writeln('Moving to house 1...');
      Wait(10000+random(750));
      if(FindColorTolerance(x,y,House1Color,0,0,700,700,50)) then
      begin
       Writeln('House 1 found!');
       Mouse(x,y,2,2,true);
       Wait(7000+random(750));
       FindFurnace;
      end else
      begin
       Writeln('House 1 not found!');
      end
    end;
    
    begin
     Wait(1000+random(100));
     repeat
      SetupSRL;
      BankToFurnace;
     until(Banked = Ores/28)
     Writeln('--------------------');
     Writeln('Autosmelter results:');
     Writeln('--------------------');
     Writeln('Banked:');
     Writeln(IntToStr(Banked));
     Writeln('--------------------');
    end.
    Edited.

    Please post progress report.

    Tyvm,
    Rob

  2. #2
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    it wont work, you need tolerance in there, so instead of findcolor, use findcolortolerance. then it will work i think.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  3. #3
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Why don't you have it repeat doing that? Smelting and banking.

    And you should definately use a DTM for the ores/bars, and as said above, use Tolerance.

    MoveMouse, MoveMouseSmoothEx, MoveMouseSmooth and ClickMouse Will All Get You Banned! Use MMouse and Mouse. To read about those, check out my tutorial (links in sig) things the beginner tuts don't teach you.

    And as far as standards go, check out my tutorial learning the things to become a SRL member (links also in sig for that). That also has DTM/Bitmap explanation and how to use, and a lot more.

    Not sure if it'd be to advanced for you to read all of that tut, but you should definately read about standards and possibly DTMs in it.

    Good try for your first script, but this will get you banned, and wouldn't be very reliable.

  4. #4
    Join Date
    Mar 2007
    Posts
    276
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    its not bad for your first script, Change the clickmouse, to Mouse, or mmouse. lso u can make it bank more than 1 time, just make it repeat in main loop

  5. #5
    Join Date
    Jan 2007
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    hi, you need to change the clickmouse and turn it to mmouse as kool said
    and i also have thes proplems when i make my first script
    thes script is good for first script.
    best wishes for all
    dark evil

  6. #6
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by JAD View Post
    Why don't you have it repeat doing that? Smelting and banking.

    [..]
    Quote Originally Posted by My first post...
    And it only does 1 load from bank to bank since I haven't made that yet...
    Thanks for your comments I'll try MMouse and FindCOlorTolerance

    Ehm... i changed all MoveMouseSmooth(x,y); to MMouse(x,y,0,0); and got the following error:
    Line 30: [Error] (30:1): Unknown identifier 'MMouse' in script

  7. #7
    Join Date
    Feb 2007
    Location
    Alberta, Canada
    Posts
    4,615
    Mentioned
    50 Post(s)
    Quoted
    429 Post(s)

    Default

    you need
    SCAR Code:
    {.include SRL/SRL.scar}

    right under the program name part.

    and add

    SCAR Code:
    SetupSRL;

    to the beggining of your main loop.

    Scripts: Edgeville Chop & Bank, GE Merchanting Aid
    Tutorials: How to Dominate the Grand Exchange

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  8. #8
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I edited the script. Now it should work, but it still doesn't

  9. #9
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It comes up with this error:

    Quote Originally Posted by Scar error...
    Failed when compiling
    Line 9: [Error] (17344:1): Duplicate identifier 'x' in script

  10. #10
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Robbiej View Post
    It comes up with this error:
    x,y are already variables automatically, without needing to be declared if you are including SRL in a script. So you don't need a var x,y: Integer;, because its already in the SRL include, and it will give you an error if you try to like you did.

    I was confused about that a few months ago when I just started too

  11. #11
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ah ok, thanks!

    Now it's done to be tested..

  12. #12
    Join Date
    Feb 2007
    Posts
    3,616
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Robbiej View Post
    Ah ok, thanks!

    Now it's done to be tested..
    Just so you know, Mouse(x,y,0,0,true) does the exact same thing as

    MMouse(x,y,0,0)
    Mouse(x,y,0,0,true)

    because mouse moves the mouse to the spot and clicks, MMouse just moves it there.

    Whenever you do waits though (for the most part) You should always have a randomness to it or its very detectable. So

    Wait(500) Should be Wait(500+random(200));

    You should add random parameters to your mousing though or Jagex will notice your clicking on the same color over and over.

    Mouse(x,y,2,2,true) or Mouse(x,y,3,3,true) Would be good enough.

  13. #13
    Join Date
    May 2007
    Posts
    42
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Rofl, lots of just security mistakes..

    All fixed...

    Please post progress reports

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Rob's iron autosmelter [Falador]
    By Robbiej in forum RS3 Outdated / Broken Scripts
    Replies: 7
    Last Post: 01-05-2008, 10:11 AM
  2. Falador smither?
    By khar in forum RS3 Outdated / Broken Scripts
    Replies: 2
    Last Post: 03-05-2007, 09:54 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
  •