Page 1 of 2 12 LastLast
Results 1 to 25 of 29

Thread: Swimdude's Port Phasmatys Smelter v1.0

  1. #1
    Join Date
    Apr 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Swimdude's Port Phasmatys Smelter v1.0

    Hey guys,

    Swimdude here with another simple bot. It's not the best bot but it does the repetitive work for you while you watch Netflix etc. Let me know if you find any bugs/errors.

    Program:
    • Swimdude's Port Phasmatys Smelter v1.1


    Description:
    • Script will smelt iron ore in Port Phasmatys. The script also uses rings of forgings.
    • This version will only do iron bars at the moment. Adding other bars in the near future.


    How To Use:
    1. Put iron ore in first slot of bank
    2. Put iron bars in the second slot of bank
    3. Put rings of forging in the third slot of bank
    4. Equip a 100% capacity ring of forging (aka 140 smelts left)
    5. Adjust script to allow rings of forging or not and how many bars you want to make
    6. Start script with inventory empty and bankscreen up


    Changelog:
    • v1.0 - Initial Release
    • v1.1 - Code has been rewritten to allow for more failsafes


    Features:
    • Uses rings of forging to make iron bars 100% of the time
    • Uses closed door detection and will open the door when it is closed
    • Has backups in case it gets stuck


    Note(s):
    • Does not have random's support because it's buggy. Babysit this bot like every other bot


    Picture Proof:
    Untitled.jpg

    Video:


    Code:
    Code:
    program Swimdudes_Port_Phasmatys_Smelter;
    
    // Swimdude's Port Phasmatys Smelter v1.1 \\
    
    {$DEFINE SMART8}
    {$I SRL-OSR/SRL.simba}
    {$I SRL/SRL/Misc/Debug.Simba}
    {$I SRL-OSR/SRL/Misc/SmartGraphics.Simba}
    
    var
    x, y: integer;
    forges: integer;
    ironBarDTM, ironOreDTM: integer;
    barsMade: integer;
    doorOpen: boolean;
    
    const
      // *** DO NOT CHANGE THESE *** \\
      bankcolour1 = 5204065;
      bankcolour2 = 4479573;
      maxForges = 140;
    
      // *** YOU CAN CHANGE THESE *** \\
      useForgingRing = true; // Use forging rings?
      barsToMake = 6357;     // How many bars are you making?
    
    Procedure DeclarePlayer;
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      Players[0].Name := '';  //Username goes here
      Players[0].Pass := '';  //Password goes here
      Players[0].Nick := '';  //Character name goes here (used for anti
      Players[0].Active := True;                //-randoms)
    end;
    //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    //---------------------------^User Config ends here^-------------------------\\
    //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    
    procedure declarevariables;
    begin
      ironBarDTM := DTMFromString('m6wAAAHicjcxBCkBAHEbxbzYWHAcrEUVzB7Obiyg2bJQS1/VqNpb/V7/tKySdWfLiwYEVCzbsuHCjdZJHhxoVGvQYMaHEgBhm7s4klz3bMfn1AZsQCjU=');
      ironOreDTM := DTMFromString('mPwEAAHic42dgYEgAYn8ojoDiOCBOBOIQIM4E4hwgzgPibCDOgIqlALEfFIdCcRQQRwNxMBC7A7ELELsCsScQ+0LtAMmFAbGPnhKQZCQLczGQD8izEYLRAAANBAsj');
    end;
    
    Procedure randomWaitTime;
    begin
      case random(1000) of
        1..800:    Wait(RandomRange(300, 700));
        801..960:  Wait(RandomRange(400, 900));
        961..1000: Wait(RandomRange(500, 1000));
      end;
    end;
    
    Procedure antiBan;
    begin
      //writeln('antiban debug!');
      Case Random(130) Of
        1: HoverSkill(skill_smithing, false);
        3: Boredhuman;
        4: Wait(2500 + random(4500));
        5: PickUpMouse;
        6: RandomMovement;
        7: RandomRClick;
        8: MakeCompass('random');
      end;
    end;
    
    procedure openScreen;
    begin
      if(FindObjCustom(x, y, ['Bank', 'ank', 'booth', 'ooth'], [bankcolour1, bankcolour2], 5)) then repeat
        begin
          if(FindObjCustom(x, y, ['Bank', 'ank', 'booth', 'ooth'], [bankcolour1, bankcolour2], 5)) then
            begin
              writeln('Trying to open the bank.');
              mmouse(x, y, 2, 2);
              wait(RandomRange(300, 600));
              ClickMouse2(mouse_right);
              wait(RandomRange(500, 700));
              ChooseOptionMulti(['Bank']);
              Flag;
              wait(RandomRange(1000, 2000));
            end;
        end;
      until(bankscreen);
    end;
    
    procedure openDoor;
    begin
      if(WaitUptext('Open', randomRange(300, 600))) then
        begin
          repeat
            Writeln('Door is closed!');
            mmouse(x, y, 1, 1);
            wait(RandomRange(300, 600));
            ClickMouse2(mouse_left);
            wait(RandomRange(300, 600));
            Flag;
            wait(RandomRange(1000, 2000));
          until(not(WaitUptext('Open', randomRange(300, 600))));
          doorOpen := true;
        end
      else if(WaitUptext('Close', randomRange(300, 600))) then
        begin
          writeln('Door is open!');
          doorOpen := true;
        end
      else
        begin
          writeln('Could not find the door!');
          doorOpen := true;
        end;
    end;
    
    procedure customlevelup;
    var
    x, y: integer;
    
    begin
      if(levelup) then
        begin
          clickcontinue(true);
          sleep(randomrange(1000, 1500));
          clickcontinue(true);
          sleep(randomrange(2300, 2700));
          if(not(finddtm(ironBarDTM, x, y, 686, 430, 732, 471))) then
            begin
              if(FindObjEx(x, y, ['urnace'], [4013378, 3421241, 4276549], 20, 50, MSX1, MSY1 + 50, MSCX, MSY2)) then
                begin
                  mmouse(x, y, 3, 3);
                  if(waituptextmulti(['Smelt', 'furnace', 'urnace'], (100 + (randomrange(100, 200))))) then
                    begin
                      clickmouse2(mouse_left);
                      sleep(randomrange(900, 1000));
                      if(findcolorspiraltolerance(x, y, 12151401, 0, 343, 515, 476, 10)) then repeat
                        begin
                          writeln('Smelting bars');
                          mmouse(153, 409, 3, 3);
                          wait(RandomRange(300, 500));
                          ClickMouse2(mouse_right);
                          wait(RandomRange(300, 500));
                          chooseOptionMulti(['X']);
                          wait(RandomRange(1200, 1500));
                          TypeSend('33');
                          wait(RandomRange(2000, 3000));
                        end
                      until(not(findcolorspiraltolerance(x, y, 12151401, 0, 343, 515, 476, 10)))
                    end;
                end;
            end;
        end;
    end;
    
    procedure withdrawOre;
    begin
      makecompass(180.0);
      if(bankscreen) then
        begin
          if(useForgingRing) then
            begin
              if((forges = maxForges)) then
                begin
                  writeln('Replacing Forging Ring');
                  forges := 0;
                  DepositAll;
                  mmouse(185, 75, 3, 3);
                  wait(RandomRange(500, 800));
                  ClickMouse2(mouse_left);
                  wait(RandomRange(500, 800));
                  CloseBank;
                  wait(RandomRange(700, 900));
                  if(not(GameTab(tab_Inv))) then
                    begin
                      GameTab(tab_Inv);
                    end;
                  wait(RandomRange(300, 600));
                  repeat
                    mmouse(575, 230, 1, 1);
                    ClickMouse2(mouse_left);
                    wait(RandomRange(500, 800));
                  until(not(InvEmpty));
                  withdrawOre;
                end;
            end;
    
          if(InvFull and (finddtm(ironBarDTM, x, y, 686, 430, 732, 471))) then
            begin
              writeln('Banking Inventory');
              DepositAll;
              randomWaitTime;
            end;
    
          mmouse(97, 77, 3, 3);
          wait(RandomRange(300, 600));
          ClickMouse2(mouse_right);
          wait(RandomRange(300, 600));
          ChooseOptionMulti(['All']);
          wait(RandomRange(1000, 1500));
        end
      else
        begin
          openScreen;
        end;
    end;
    
    
    procedure walkToFurnace;
    begin
      if(InvFull and (finddtm(ironOreDTM, x, y, 686, 430, 732, 471))) then
        begin
          if(FindColor(x, y, 11843261, 565, 120, 665, 160)) then
            begin
              writeln('Inventory Full. Running to furnace');
              mmouse(x + 5, y, 3, 3);
              ClickMouse2(mouse_left);
              Flag;
              wait(RandomRange(500, 1000));
            end
          else
            begin
              writeln('Could not find color');
            end;
        end
      else
        begin
          writeln('CANT FIND THE ORE');
          withdrawOre;
        end;
    end;
    
    procedure findSmelter;
    var
    i: integer;
    furnaceFound: boolean;
    
    begin
      doorOpen := false;
      furnaceFound := false
      makecompass(180.0);
      writeln('Checking if door is open');
      if(FindObj(x, y, 'oor', 596760, 20)) then repeat
        begin
          openDoor;
          inc(i);
        end
      until(doorOpen);
      writeln('i is: ' + IntToStr(i));
      writeln('Finding furnace');
      if(FindObjEx(x, y, ['urnace'], [4013378, 3421241, 4276549], 20, 50, MSX1, MSY1 + 50, MSCX, MSY2)) then
        begin
          furnaceFound := true;
          mmouse(x, y, 3, 3);
          wait(RandomRange(300, 600));
          ClickMouse2(mouse_left);
          Flag;
          wait(RandomRange(1000, 1500));
        end;
      if(not(furnaceFound)) then
        begin
        writeln('Furnace not found.');
          if(FindColor(x, y, 11843261, 577, 1, 650, 57)) then
            begin
              mmouse(x, y, 3, 3);
              wait(RandomRange(300, 600));
              ClickMouse2(mouse_left);
              wait(RandomRange(300, 600));
              Flag;
              findSmelter;
            end;
        end;
    end;
    
    procedure smeltOre;
    begin
      if(findcolorspiraltolerance(x, y, 12151401, 0, 343, 515, 476, 10)) then repeat
        begin
          writeln('Smelting bars');
          mmouse(153, 409, 3, 3);
          wait(RandomRange(300, 500));
          ClickMouse2(mouse_right);
          wait(RandomRange(300, 500));
          chooseOptionMulti(['X']);
          wait(RandomRange(1200, 1500));
          TypeSend('33');
          wait(RandomRange(2000, 3000));
        end
      until(not(findcolorspiraltolerance(x, y, 12151401, 0, 343, 515, 476, 10)));
    
      // REPEAT UNTIL IRON BARS ARE MADE \\
      repeat
        antiBan;
        customlevelup;
        Wait(RandomRange(1074, 3142));
        if(not(GameTab(tab_Inv))) then
          begin
            GameTab(tab_Inv);
          end;
      until(finddtm(ironBarDTM, x, y, 686, 430, 732, 471));
    
      makecompass(180.0);
      writeln('Done smelting');
    
      barsMade := barsMade + 28;
      forges := forges + 28;
    
    end;
    
    procedure walkFromFurnace;
    begin
      if(FindObj(x, y, 'oor', 596760, 20)) then repeat
        begin
          openDoor;
        end
      until(doorOpen);
    
      if(FindColor(x, y, 11843261, 577, 1, 650, 57)) then
        begin
          wait(RandomRange(500, 700));
          mmouse(x, y, 3, 3);
          wait(RandomRange(500, 700));
          ClickMouse2(mouse_left);
          Flag;
        end;
    end;
    
    
    
    //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    //-----------------------------v|Main Method|v-------------------------------\\
    //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
    begin
      DeclarePlayer;
      SetupSRL();
      declarevariables;
      ClearDebug;
      if(not LoggedIn) then
        begin
          LogInPlayer;
          wait(750);
        end;
      repeat
        clearDebug;
        writeln('================================');
        writeln('Bars Made: ' + IntToStr(barsMade));
        writeln('Forging Ring Status: ' + IntToStr(forges) + '/' + IntToStr(maxForges));
        writeln('================================');
        declarevariables;
        withdrawOre;
        walkToFurnace;
        findSmelter;
        smeltOre;
        walkFromFurnace;
        openScreen;
        freedtm(ironBarDTM);
        freedtm(ironOreDTM);
      until(barsMade > barsToMake);
    end.
    Last edited by swimdude; 04-26-2013 at 04:47 PM.

  2. #2
    Join Date
    Mar 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    19 Post(s)

    Default

    Very nice man, been waiting for a furnace smelter. Will try it out later tonight and post proggy. Thanks!

  3. #3
    Join Date
    Apr 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    nice! i will for sure use this bot. iron bars are really not my thing tho so i won't use it for a long time. Would it be possible for you to add the ability to smith Cannonballs in the near future?

  4. #4
    Join Date
    Apr 2013
    Posts
    8
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Clasic1 View Post
    nice! i will for sure use this bot. iron bars are really not my thing tho so i won't use it for a long time. Would it be possible for you to add the ability to smith Cannonballs in the near future?
    Yeah, I will be adding in other ores. Great idea on cannonballs. Didn't think of those until you mentioned them.

  5. #5
    Join Date
    May 2012
    Location
    John's Creek, Georgia, United States
    Posts
    392
    Mentioned
    0 Post(s)
    Quoted
    86 Post(s)

    Default

    Would love to see mith or steel bar support. Tired of tribot xd

  6. #6
    Join Date
    Mar 2013
    Posts
    38
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    cannonballs support would be great too

  7. #7
    Join Date
    Apr 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    withdraws iron and just sits there
    Last edited by bins69; 04-27-2013 at 02:37 PM.

  8. #8
    Join Date
    Mar 2013
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    ================================
    Bars Made: 0
    Forging Ring Status: 0/140
    ================================
    Could not find color
    Checking if door is open
    Successfully executed.
    The following DTMs were not freed: [2, 3, 4, 5]


    Every time i start it it takes out all the iron ore then just moves the mouse randomly around my bank window.

  9. #9
    Join Date
    Apr 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Is it possible to make this work in Al-Kharid?

  10. #10
    Join Date
    Mar 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    This script looks good, but I think you flip the order around on purpose because it just open the bank, take out ore then look for the door and it does not click. I just looked at your post and video carefully, the script you posted and the one you had on video is two different scripts. Thank you for your time making this script and I hope you can fix it as soon as possible.

  11. #11
    Join Date
    Apr 2013
    Posts
    6
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Reckon you could add Gold Bars too? Cause that'd be great. :P

  12. #12
    Join Date
    Apr 2013
    Posts
    7
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    this script would be very helpful and one of a kind. i've tried it out and i've noticed a few bugs that it doesn't know how to close my bank display nor was it able to find the bank. these bugs are minor and should be fixed with small tweeks. thankyou
    Last edited by eastside; 04-30-2013 at 07:20 PM.

  13. #13
    Join Date
    Mar 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Would love to see more of this. I plan to be using it. Will post progress using it.

  14. #14
    Join Date
    Dec 2012
    Posts
    11
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    would be awesome if you could add molten glass to the list

  15. #15
    Join Date
    Mar 2012
    Location
    Ca
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Does this script still work? Anyone whos used this post a proggy please.

  16. #16
    Join Date
    May 2013
    Posts
    103
    Mentioned
    0 Post(s)
    Quoted
    47 Post(s)

    Default

    Quote Originally Posted by pcelite11 View Post
    Does this script still work? Anyone whos used this post a proggy please.
    why dont you try it?

  17. #17
    Join Date
    Mar 2012
    Location
    Ca
    Posts
    60
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    Quote Originally Posted by bigblacknerd View Post
    why dont you try it?
    If you have nothing productive to say, don't say it.

  18. #18
    Join Date
    Mar 2013
    Posts
    5
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Not working

  19. #19
    Join Date
    Apr 2013
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Looks nice, it takes the iron from the bank correctly, then just says "Checking if door is open
    i is: 0
    Finding furnace
    Furnace not found." And can't go out of the bank screen.

  20. #20
    Join Date
    Mar 2013
    Location
    Shaolin
    Posts
    863
    Mentioned
    24 Post(s)
    Quoted
    519 Post(s)

    Default

    Its nice that you made a script, but superheating beats the hell out of smelting. Doing rune bars I make 1.4M a day and I get about 500k xp Smith and 600k Magic for a total of 1.1M xp all day.
    Smithing at a furnace is like 20K/hr
    You have permission to steal anything I've ever made...

  21. #21
    Join Date
    Feb 2013
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Good script, I will continue to use it to smelt steel bars. Thanks

  22. #22
    Join Date
    Feb 2013
    Posts
    40
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    add gold ore too, please..

  23. #23
    Join Date
    May 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    This inspired me to make a Port Phastmatys Cball maker. I've also been considering writing a script that would do any kind of bar you just set your bar type but not sure if I will yet.

  24. #24
    Join Date
    Jul 2013
    Posts
    3
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Whenever i run the script it manages to withdraw the iron ore, but the script for some reason can't find the close button on the bank window and the cursor just darts around the bank window.

  25. #25
    Join Date
    Nov 2011
    Posts
    165
    Mentioned
    0 Post(s)
    Quoted
    40 Post(s)

    Default

    could u make a script that super heat iron bars? :P

Page 1 of 2 12 LastLast

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
  •