Page 4 of 10 FirstFirst ... 23456 ... LastLast
Results 76 to 100 of 230

Thread: Lumbridge Flax Spinner (my first release)

  1. #76
    Join Date
    Mar 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    wish it worked

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

    Default

    Help please
    [Error] C:\Documents and Settings\Alex\My Documents\Downloads\flaxspinner v3.simba(382:22): Invalid number of parameters at line 371
    Compiling failed.

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

    Default

    THANK YOU! for the first time ever it is spinning flax on its own, you sir are a god among men in my eyes

  4. #79
    Join Date
    Feb 2009
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by ThelMightylThor View Post
    THANK YOU! for the first time ever it is spinning flax on its own, you sir are a god among men in my eyes
    my pleasure!

  5. #80
    Join Date
    Dec 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    still abit too unstable for me, it sometimes misses the stairs going down then thinks its downstairs and starts looking for the spinning wheel, and vice versa (downstairs thinking its upstairs)...still a good script once that is sorted all it really needs is working anti randoms :/

  6. #81
    Join Date
    Mar 2013
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    I can confirm this script is not working.

  7. #82
    Join Date
    Feb 2009
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by heyaiam View Post
    I can confirm this script is not working.
    details please

  8. #83
    Join Date
    Dec 2012
    Posts
    30
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by dewrange View Post
    details please
    well like i posted before it will misclick the stairs coming up, then it thinks its made it upstairs but it hasnt and starts running around the 2nd floor...when it does make it upstairs it often cant find the bank(for me atleast) and runs around the top floor

    it usually does like 3-4loads no problem but then messes up :?

  9. #84
    Join Date
    Feb 2009
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    17 Post(s)

    Default

    Quote Originally Posted by kickassmagee View Post
    well like i posted before it will misclick the stairs coming up, then it thinks its made it upstairs but it hasnt and starts running around the 2nd floor...when it does make it upstairs it often cant find the bank(for me atleast) and runs around the top floor

    it usually does like 3-4loads no problem but then messes up :?
    okay, thank you! i will look into the procedures for coming upstairs, checking if it is upstairs, and update bank finding

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

    Default

    finally just got it to do one load by itself! after about 4-5 unsuccessful loads. The problems I see instantly are; the paths to and from bank, trouble climbing the stairs, and simple misclicks will throw the whole script off. The spinning aspect works pretty well though.

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

    Default

    ok its rly messed up, every time it goes to bank it just fails and can't find the bank. Also running from randoms when the random is long over
    Last edited by digunderme; 04-08-2013 at 03:03 PM.

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

    Default

    Script is working fine for me. It has a few hiccups every now and then. I'm still in the process of learning the syntax for all of this and will be adding to this script. If possible, setup a joint effort with Dewrange and see if we can get this script to be flawless.

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

    Default

    it's a good script, but unfortunatelly it still has some problems. after the first run, it missed the staircase, and it was stuck because the script tought it was upstairs. I restarted and after the spinning, it ran to the north instead of south. It also got stuck after I leveled up.
    Sometimes, if he can't find what he's looking for, hes just moving the mouse very very fast to some places on the screen, which increase the ban rate..
    Please ad a failsafe for this
    Last edited by Thibaultx; 04-08-2013 at 05:09 PM.

  14. #89
    Join Date
    Mar 2013
    Posts
    58
    Mentioned
    0 Post(s)
    Quoted
    24 Post(s)

    Default

    Quote Originally Posted by dewrange View Post
    details please
    Sometimes it just turns 3/4 or even half of the inventory into bowstrings and runs around crazy.
    It just gets stuck locating the bank when it's going to bank.
    It just takes the biggest detour at the flaxing level.
    It completely stuffs up when the door is open.
    When I disable smart because a random happens or something and then re enable with the bank open it suddenly becomes retarded and just walks around the bank. Sometimes it may or may not work in that case.
    And yes, I pressed f2 and stopped the script and guess what happened?
    It said my f***ing username out loud and basically typed my password out I was so f***ing pissed of and lucky that I JUST stopped the script before it would have pressed enter on my password.
    Generally, it's just not good at locating anything. I was on a streak of 3 - 4 runs then it stuffed up because of failing to locate the spinner by detouring OR failing to locate the bank. It would just walk to the cannon side and boom stops nothing.
    I also want to point out that when I disable and re enable smart for other scripts nothing goes wrong at all.
    It seems that most if not all simba scripts require luck to finally get it working by continuously restrarting
    Last edited by heyaiam; 04-08-2013 at 08:11 PM.

  15. #90
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Script is fucking up so bad when it levels up, it goes haywire and runs back and forth from the stairs to the spinning wheel back and forth

  16. #91
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    when it is about to choose the flax option and how many it's going to spin, it clicks on the wrench on the bottom of the inventory.

  17. #92
    Join Date
    Mar 2013
    Posts
    12
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Has hard time finding the flax and messes up on the stair case a lot, but otherwise good! I've never written a script before but I have a lot of respect to those who do!

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

    Default

    gets stuck so much

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

    Default

    Honestly this is a good script. It could definitely use some improvement though. I can get about 4-5 good runs before something goes awry. I noticed a common problem that keeps happening is the script will click to far to the right of the bank and then the script fails. Also when my crafting levels up like past people have said the script kind of freaks out. So maybe you could write a code so on the level up the script simply restarts spinning. If these two things are fixed the script will work perfectly for me. Thanks for this script it's the only decent one I found and now I can go AFK for up to 10 minutes at a time instead of flaxing myself.

    EDIT: I forgot idk about other randoms but on the Old Man Random the script ignores this random.

  20. #95
    Join Date
    Mar 2012
    Posts
    86
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    ideas

    set default place for flax that way you dont have to try to "find" it.. in the bank.. aka:first slot of bank

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

    Default

    Hey guys,

    I've made some minor tweaks to the code to make it run a bit smoother. This works on my computer, but since I can't test on another machine, I cannot guarantee it will work for you.


    Version:
    • Version 3.0 Revision 001


    Fixes:
    • Changed the coordinates for clicking near the spinwheel. Bot would randomly click outside the room causing the bot to run around and get lost.
    • Changed the coordinates when coming up from the stairs. Again, the bot would click outside the bank and cause errors.
    • Also updated a few colors and changed some tolerances to make clicking a little more accurate.


    Add Ons:
    • Added counter in the debug screen. Keeps track of times the script runs and how many flax flaxed.


    Note:
    • This does not fix any big time errors, but it should help with smaller ones. Will get stuck on randoms, so make sure you babysit.


    Picture Proof:


    Code:
    Code:
    Program DewrangeLumbridgeFlaxSpinner;
    
    
    {$DEFINE SMART8}
    {$I srl-osr/srl.simba}
    
    var
    flaxdtm: integer;
    bowstringdtm: integer;
    i: integer;
    clear: integer;
    count: integer;
    stairs: integer;
    menu: integer;
    spinning: integer;
    stairsup: integer;
    flaxspun: integer;
    numberOfTimes: integer;
    
    const
    
    // script version 3.0
    // swimdude rev. 001
    
    flaxtospin = 850; /// how much flax do you want to spin?
    
    
    
    
    procedure DeclarePlayers();
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Nick := '';
        Name := '';
        Pass := '';
        Active := true;
        Integers[0] := 1;
      end;
    end;
    
    
    
    
    procedure declarevariables;
    begin
    flaxdtm := DTMFromString('mlwAAAHicY2dgYHBgYmBwB2I7IDYHYm8g9oXynwHlH0DxEyB+BcT3gPgtEDPYcDLEHj7OELnnAEPErn0Mwes2McQfPwMWZwFK48KMeDAUAACZCxIF');
    bowstringdtm := DTMFromString('mrAAAAHic42BgYDjBxMBwCogPAvE2IN4BxPuBeCcQHwLiY4xAOSDeC8Q7gXgrEG8C4uNQ3FwRyVCQ7gOmYWxkPhfQDnyYkQCGAQAVoxZz');
    end;
    
    
    procedure customantiban;
    
    var
    x, y: integer;
    
    begin
      x := (random(1000));
      if (x >= 800) then
    begin
      y := (random(10));
      case(y) of
    1: boredhuman;
    2: boredhuman;
    3: randomrclick;
    4: mmouseoffclient('random');
    5: HoverMovingObject;
    6: randomtab(true);
    7: pickupmouse;
    8: hoverskill(skill_crafting, false);
    9: smallrandommouse;
    10: hoverskill(skill_crafting, false);
    end;
      end;
    end;
    
    
    
    
    procedure godownstairsfailsafe;
    var
    x, y: integer;
    
    begin
    if (not(findcolorspiraltolerance(x, y, 1917807, 628, 45, 692, 71, 35))) then
    begin
    if findobjcustom(x, y, ['Stair', 'case', 'ase'], [605015, 4145992], 15) then
    begin
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(700, 1000));
      writeln('we have made it downstairs');
      findnormalrandoms;
    end;
      end;
    end;
    end;
    
    
    
    
    procedure withdrawflax;
    var
    x, y: integer;
    
    begin
      if (bankscreen) then
    begin
      if (not(invempty)) then
    begin
      writeln('inventory not empty, depositing remaining items');
      deposit(1, 28, true);
      if finddtm(flaxdtm, x, y, 24, 60, 451, 282) then
    begin
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Flax', 'lax', 'ax'], randomrange(300, 600)) then
    begin
      clickmouse2(mouse_right);
      wait(randomrange(300, 350));
      chooseoption('All');
      sleep(randomrange(1000, 1500));
      if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
    begin
      closebank
      findnormalrandoms;
    end;
      end;
        end;
      end;
    end;
    end;
    
    procedure climbdownstairs;
    
    var
    x, y: integer;
    
    begin
      if (not(bankscreen)) then
    begin
      if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
    begin
      if findobjcustom(x, y, ['Stair', 'case', 'ase'], [604499, 4145992], 10) then
    begin
      writeln('found stairs, trying to go down');
      wait(200);
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(1000, 1500));
      if (findcolorspiraltolerance(x, y, 3630998, 649, 48, 670, 71, 35)) then
    begin
      sleep(1500 + randomrange(500, 1000));
      writeln('we have made it downstairs');
      sleep(1 + random(10));
      findnormalrandoms;
    end else
    repeat
    sleep(randomrange(1000, 2000));
    godownstairsfailsafe;
    inc(stairs);
    findnormalrandoms;
    until((findcolorspiraltolerance(x, y, 1917807, 626, 44, 693, 78, 35) or (stairs = 2)));
    end;
      end;
        end;
      end;
    end;
    
    
    
    
    
    procedure openbankflax;
    var
    x, y: integer;
    begin
      setangle(SRL_angle_high);
      makecompass('n')
      if (invempty) then
    begin
      writeln('inventory is empty, trying to open bank');
    end else
      if (not(bankscreen)) then
    begin
      if findobjcustom(x, y, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 10) then
    begin
      writeln('attempting to open bank');
      mmouse(x, y, 5, 5);
    begin
      if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], randomrange(300, 400)) then
      clickmouse2(mouse_left);
    while (not(bankscreen)) do
      writeln('bank not yet open');
      inc(count)
      sleep(500 + random(500));
      mmouse(x, y, 2, 2);
      wait(randomrange(200, 300));
      clickmouse2(mouse_left);
    end;
    begin
      if (bankscreen) then
    begin
      writeln('bank should now be open');
      sleep(2000);
    end else
    begin
    writeln('could not open the bank!');
    end;
      end;
        end;
      end;
    end;
    
    
    
    procedure gettostairsfrombank;
    var
    x, y: integer;
    
    begin
      if finddtm(flaxdtm, x, y, 561, 215, 723, 459) then
    begin
      mmouse(625, 128, 2, 2);  //
      wait(200);
      clickmouse2(mouse_left);
      sleep(randomrange(6000, 7000)); // arrived at first set of stairs
      findnormalrandoms;
    end;
      end;
    
    
    procedure walktowheelfromstairs;
    
    var
    x, y: integer;
    
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      if findcolorspiraltolerance(x, y, 1458038, 653, 46, 686, 82, 35) then
    begin
      mmouse(667, 63, 2, 2);
      wait(300);
      clickmouse2(mouse_left);
      makecompass('e');
      sleep(1500 + (randomrange(1500, 2000)));
      findnormalrandoms;
    end
      end;
    end;
    
    
    procedure spinflaxfailsafe;
    
    var
    x, y, s, w: integer;
    
    begin
      if (not(findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35))) then
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
    begin
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(1800, 2100));
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('spin menu open');
      wait(100);
    end else
      writeln('unable to open menu, trying again');
    end;
      end;
        end;
      end;
    end;
    
    
    
    procedure spinflax;
    
    var
    x, y, s, w: integer;
    
    begin
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      wait(randomrange(200, 300));
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(2200, 2400));
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('spin menu is now open');
      sleep(1000);
    end else
      repeat
        sleep(randomrange(1000, 1500));
        spinflaxfailsafe;
        inc(menu);
        sleep(randomrange(1900, 2100));
      until ((findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35)) or (menu = 2))
    end;
      end;
        end;
      end;
    
    
    
    procedure customfindallrandoms;
    
    var
    x, y, s, w, a, b: integer;
    
    begin
      if (findnormalrandoms) then
    begin
      findnormalrandoms;
      sleep(randomrange(2500, 5000));
      if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
    begin
      if findcolorspiraltolerance(a, b, 1789819, 586, 38, 669, 92, 35) then
    begin
      mmouse(a, b, 2, 2);
      wait(randomrange(500, 600));
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(900, 1000));
      if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
    begin
      mmouse(259, 142, 10, 5);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
    begin
      typesend('28');
    end;
    end;
      end;
        end;
       end;
      end;
     end;
    end;
    end;
    
    
    
    
    
    procedure customlevelup;
    var
    x, y, s, w: integer;
    
    begin
      if (levelup) then
    begin
      clickcontinue(true);
      sleep(randomrange(1000, 1500));
      clickcontinue(true);
      sleep(randomrange(2300, 2700));
      if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
    begin
       if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(900, 1000));
      if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
    begin
      mmouse(259, 142, 10, 5);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
    begin
      typesend('28');
    end;
    end;
      end;
        end;
       end;
      end;
     end;
    end;
    
    
    procedure startspinning;
    
    var
    x, y: integer;
    
    begin
      sleep(1000);
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('we found the color');
      mmouse(x, y, 2, 2);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
      writeln('we have made it this far');
      sleep(randomrange(400, 500));
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 25) then
    begin
      typesend('28');
    end;
    begin
      repeat
        sleep(randomrange(2400, 2700));
        customfindallrandoms;
        customantiban;
        customlevelup;
        customfindallrandoms;
        inc(spinning);
      until ((finddtm(bowstringdtm, x, y, 668, 416, 732, 471)));
    end;
      end;
    end;
    
    
    
    procedure walktostairsfromwheel;
    
    var
    x, y: integer;
    
    begin
      if (finddtm(bowstringdtm, x, y, 664, 424, 739, 474)) then
    begin
      mmouse(675, 93, 5, 5);
      wait(randomrange(200, 300));
      clickmouse2(mouse_left);
      sleep(randomrange(4000, 5000));
      findnormalrandoms;
    end else
      writeln('unable to walk to stairs');
    end;
    
    
    
    
    procedure climbupstairsfailsafe;
    
    var
    x, y, s, w: integer;
    
    begin
     if (not(findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 30))) then
    begin
     if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(500, 600));
      chooseoption('Climb-up');
      sleep(randomrange(1500, 2000));
      findnormalrandoms;
      //changeangleforbank;
    end;
      end;
      end;
    end;
    
    procedure climbupstairs;
    
    var
    x, y, s, w: integer;
    
    begin
      if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(500, 600));
      chooseoption('Climb-up');
      sleep(randomrange(1500, 2000));
      if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) then
      sleep(randomrange(1, 10));
      writeln('made it back upstairs');
      //changeangleforbank;
    end else
      repeat
        writeln('did not make it upstairs, trying again');
        findnormalrandoms;
        climbupstairsfailsafe;
        findnormalrandoms;
        sleep(randomrange(400, 500));
        //changeangleforbank;
        inc(stairsup);
      until((findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) or (stairsup = 2)));
    end;
    begin
    //changeangleforbank;
    end;
      end;
    
    
    
    procedure gettobank;
    
    var
    x, y, s, w: integer;
    
    begin
      //changeangleforbank;
      if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 75) then
    begin
      mmouse(610, 75, 3, 3);
      wait(200 + randomrange(100, 200));
      clickmouse2(mouse_left);
      makecompass('n');
      sleep(randomrange(4000, 5000));
      findnormalrandoms;
    begin
      if findobjcustom(s, w, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 15) then
    begin
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], (100 + randomrange(100, 50))) then
    begin
      clickmouse2(mouse_left);
      while (not(bankscreen)) do
      sleep(1);
      end;
      end;
    end;
    end;
    end;
    
    
    
    
    
    begin
    DeclarePlayers;
    setupsrl;
    declarevariables;
      if (not(loggedin)) then
    begin
      loginplayer;
      setrun(true);
    end;
      repeat
      clearDebug;
      writeln('================================');
      writeln('Flax spun: ' + IntToStr(flaxspun * 28));
      writeln('Script has run ' + IntToStr(numberOfTimes) + ' times');
      writeln('================================');
      declarevariables;
      openbankflax;
      withdrawflax;
      gettostairsfrombank;
      climbdownstairs;
      walktowheelfromstairs;
      spinflax;
      startspinning;
      walktostairsfromwheel;
      climbupstairs;
      //changeangleforbank;
      gettobank;
      inc(flaxspun);
      freedtm(bowstringdtm);
      freedtm(flaxdtm);
      inc(numberOfTimes);
      until((flaxspun * 28) >= (flaxtospin)) or (not(loggedin));
      writeln('congratulations, sinning comleted succesfully! =]');
    end.
    Attached Files Attached Files
    Last edited by swimdude; 04-09-2013 at 03:06 PM.

  22. #97
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Bot believes it has made it upstairs and it really hasn't...
    Stays on second floor

  23. #98
    Join Date
    Jul 2012
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Randomly stops spinning the flax out of nowhere and decides to run east...

  24. #99
    Join Date
    Mar 2013
    Posts
    18
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    are you even actually updating?

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

    Default

    works well... thanks
    Quote Originally Posted by swimdude View Post
    Hey guys,

    I've made some minor tweaks to the code to make it run a bit smoother. This works on my computer, but since I can't test on another machine, I cannot guarantee it will work for you.


    Version:
    • Version 3.0 Revision 001


    Fixes:
    • Changed the coordinates for clicking near the spinwheel. Bot would randomly click outside the room causing the bot to run around and get lost.
    • Changed the coordinates when coming up from the stairs. Again, the bot would click outside the bank and cause errors.
    • Also updated a few colors and changed some tolerances to make clicking a little more accurate.


    Add Ons:
    • Added counter in the debug screen. Keeps track of times the script runs and how many flax flaxed.


    Note:
    • This does not fix any big time errors, but it should help with smaller ones. Will get stuck on randoms, so make sure you babysit.


    Picture Proof:
    • Coming Soon!


    Code:
    Code:
    Program DewrangeLumbridgeFlaxSpinner;
    
    
    {$DEFINE SMART8}
    {$I srl-osr/srl.simba}
    
    var
    flaxdtm: integer;
    bowstringdtm: integer;
    i: integer;
    clear: integer;
    count: integer;
    stairs: integer;
    menu: integer;
    spinning: integer;
    stairsup: integer;
    flaxspun: integer;
    numberOfTimes: integer;
    
    const
    
    // script version 3.0
    // swimdude rev. 001
    
    flaxtospin = 850; /// how much flax do you want to spin?
    
    
    
    
    procedure DeclarePlayers();
    begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
      with Players[0] do
      begin
        Nick := '';
        Name := '';
        Pass := '';
        Active := true;
        Integers[0] := 1;
      end;
    end;
    
    
    
    
    procedure declarevariables;
    begin
    flaxdtm := DTMFromString('mlwAAAHicY2dgYHBgYmBwB2I7IDYHYm8g9oXynwHlH0DxEyB+BcT3gPgtEDPYcDLEHj7OELnnAEPErn0Mwes2McQfPwMWZwFK48KMeDAUAACZCxIF');
    bowstringdtm := DTMFromString('mrAAAAHic42BgYDjBxMBwCogPAvE2IN4BxPuBeCcQHwLiY4xAOSDeC8Q7gXgrEG8C4uNQ3FwRyVCQ7gOmYWxkPhfQDnyYkQCGAQAVoxZz');
    end;
    
    
    procedure customantiban;
    
    var
    x, y: integer;
    
    begin
      x := (random(1000));
      if (x >= 800) then
    begin
      y := (random(10));
      case(y) of
    1: boredhuman;
    2: boredhuman;
    3: randomrclick;
    4: mmouseoffclient('random');
    5: HoverMovingObject;
    6: randomtab(true);
    7: pickupmouse;
    8: hoverskill(skill_crafting, false);
    9: smallrandommouse;
    10: hoverskill(skill_crafting, false);
    end;
      end;
    end;
    
    
    
    
    procedure godownstairsfailsafe;
    var
    x, y: integer;
    
    begin
    if (not(findcolorspiraltolerance(x, y, 1917807, 628, 45, 692, 71, 35))) then
    begin
    if findobjcustom(x, y, ['Stair', 'case', 'ase'], [605015, 4145992], 15) then
    begin
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(700, 1000));
      writeln('we have made it downstairs');
      findnormalrandoms;
    end;
      end;
    end;
    end;
    
    
    
    
    procedure withdrawflax;
    var
    x, y: integer;
    
    begin
      if (bankscreen) then
    begin
      if (not(invempty)) then
    begin
      writeln('inventory not empty, depositing remaining items');
      deposit(1, 28, true);
      if finddtm(flaxdtm, x, y, 24, 60, 451, 282) then
    begin
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Flax', 'lax', 'ax'], randomrange(300, 600)) then
    begin
      clickmouse2(mouse_right);
      wait(randomrange(300, 350));
      chooseoption('All');
      sleep(randomrange(1000, 1500));
      if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
    begin
      closebank
      findnormalrandoms;
    end;
      end;
        end;
      end;
    end;
    end;
    
    procedure climbdownstairs;
    
    var
    x, y: integer;
    
    begin
      if (not(bankscreen)) then
    begin
      if finddtm(flaxdtm, x, y, 553, 213, 726, 459) then
    begin
      if findobjcustom(x, y, ['Stair', 'case', 'ase'], [604499, 4145992], 10) then
    begin
      writeln('found stairs, trying to go down');
      wait(200);
      mmouse(x, y, 5, 5);
      if waituptextmulti(['Staircase', 'Stair', 'air', 'case', 'ase'], randomrange(300, 500)) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(1000, 1500));
      if (findcolorspiraltolerance(x, y, 3630998, 649, 48, 670, 71, 35)) then
    begin
      sleep(1500 + randomrange(500, 1000));
      writeln('we have made it downstairs');
      sleep(1 + random(10));
      findnormalrandoms;
    end else
    repeat
    sleep(randomrange(1000, 2000));
    godownstairsfailsafe;
    inc(stairs);
    findnormalrandoms;
    until((findcolorspiraltolerance(x, y, 1917807, 626, 44, 693, 78, 35) or (stairs = 2)));
    end;
      end;
        end;
      end;
    end;
    
    
    
    
    
    procedure openbankflax;
    var
    x, y: integer;
    begin
      setangle(SRL_angle_high);
      makecompass('n')
      if (invempty) then
    begin
      writeln('inventory is empty, trying to open bank');
    end else
      if (not(bankscreen)) then
    begin
      if findobjcustom(x, y, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 10) then
    begin
      writeln('attempting to open bank');
      mmouse(x, y, 5, 5);
    begin
      if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], randomrange(300, 400)) then
      clickmouse2(mouse_left);
    while (not(bankscreen)) do
      writeln('bank not yet open');
      inc(count)
      sleep(500 + random(500));
      mmouse(x, y, 2, 2);
      wait(randomrange(200, 300));
      clickmouse2(mouse_left);
    end;
    begin
      if (bankscreen) then
    begin
      writeln('bank should now be open');
      sleep(2000);
    end else
    begin
    writeln('could not open the bank!');
    end;
      end;
        end;
      end;
    end;
    
    
    
    procedure gettostairsfrombank;
    var
    x, y: integer;
    
    begin
      if finddtm(flaxdtm, x, y, 561, 215, 723, 459) then
    begin
      mmouse(625, 128, 2, 2);  //
      wait(200);
      clickmouse2(mouse_left);
      sleep(randomrange(6000, 7000)); // arrived at first set of stairs
      findnormalrandoms;
    end;
      end;
    
    
    procedure walktowheelfromstairs;
    
    var
    x, y: integer;
    
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      if findcolorspiraltolerance(x, y, 1458038, 653, 46, 686, 82, 35) then
    begin
      mmouse(667, 63, 2, 2);
      wait(300);
      clickmouse2(mouse_left);
      makecompass('e');
      sleep(1500 + (randomrange(1500, 2000)));
      findnormalrandoms;
    end
      end;
    end;
    
    
    procedure spinflaxfailsafe;
    
    var
    x, y, s, w: integer;
    
    begin
      if (not(findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35))) then
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
    begin
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(1800, 2100));
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('spin menu open');
      wait(100);
    end else
      writeln('unable to open menu, trying again');
    end;
      end;
        end;
      end;
    end;
    
    
    
    procedure spinflax;
    
    var
    x, y, s, w: integer;
    
    begin
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 1073551, 5987427], 15) then
    begin
      if finddtm(flaxdtm, x, y, 554, 205, 596, 248) then
    begin
      wait(randomrange(200, 300));
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(2200, 2400));
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('spin menu is now open');
      sleep(1000);
    end else
      repeat
        sleep(randomrange(1000, 1500));
        spinflaxfailsafe;
        inc(menu);
        sleep(randomrange(1900, 2100));
      until ((findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35)) or (menu = 2))
    end;
      end;
        end;
      end;
    
    
    
    procedure customfindallrandoms;
    
    var
    x, y, s, w, a, b: integer;
    
    begin
      if (findnormalrandoms) then
    begin
      findnormalrandoms;
      sleep(randomrange(2500, 5000));
      if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
    begin
      if findcolorspiraltolerance(a, b, 1789819, 586, 38, 669, 92, 35) then
    begin
      mmouse(a, b, 2, 2);
      wait(randomrange(500, 600));
      if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(900, 1000));
      if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
    begin
      mmouse(259, 142, 10, 5);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
    begin
      typesend('28');
    end;
    end;
      end;
        end;
       end;
      end;
     end;
    end;
    end;
    
    
    
    
    
    procedure customlevelup;
    var
    x, y, s, w: integer;
    
    begin
      if (levelup) then
    begin
      clickcontinue(true);
      sleep(randomrange(1000, 1500));
      clickcontinue(true);
      sleep(randomrange(2300, 2700));
      if (not(finddtm(bowstringdtm, x, y, 668, 416, 733, 471))) then
    begin
       if findobjcustom(s, w, ['Spin', 'wheel', 'eel'], [13684950, 6447721, 806258], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Spin', 'wheel', 'eel'], (100 + (randomrange(100, 200)))) then
    begin
      clickmouse2(mouse_left);
      sleep(randomrange(900, 1000));
      if findcolorspiraltolerance(x, y, 2070783, 220, 31, 262, 49, 30) then
    begin
      mmouse(259, 142, 10, 5);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 35) then
    begin
      typesend('28');
    end;
    end;
      end;
        end;
       end;
      end;
     end;
    end;
    
    
    procedure startspinning;
    
    var
    x, y: integer;
    
    begin
      sleep(1000);
      if findcolorspiraltolerance(x, y, 65024, 224, 125, 300, 166, 35) then
    begin
      writeln('we found the color');
      mmouse(x, y, 2, 2);
      if waituptextmulti(['Make', 'ake', '1'], randomrange(200, 300)) then
      writeln('we have made it this far');
      sleep(randomrange(400, 500));
      clickmouse2(mouse_right);
      sleep(randomrange(300, 500));
      chooseoption('Make X');
      sleep(randomrange(1000, 1200));
      if findcolorspiraltolerance(x, y, 8388608, 248, 424, 274, 439, 25) then
    begin
      typesend('28');
    end;
    begin
      repeat
        sleep(randomrange(2400, 2700));
        customfindallrandoms;
        customantiban;
        customlevelup;
        customfindallrandoms;
        inc(spinning);
      until ((finddtm(bowstringdtm, x, y, 668, 416, 732, 471)));
    end;
      end;
    end;
    
    
    
    procedure walktostairsfromwheel;
    
    var
    x, y: integer;
    
    begin
      if (finddtm(bowstringdtm, x, y, 664, 424, 739, 474)) then
    begin
      mmouse(675, 93, 5, 5);
      wait(randomrange(200, 300));
      clickmouse2(mouse_left);
      sleep(randomrange(4000, 5000));
      findnormalrandoms;
    end else
      writeln('unable to walk to stairs');
    end;
    
    
    
    
    procedure climbupstairsfailsafe;
    
    var
    x, y, s, w: integer;
    
    begin
     if (not(findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 30))) then
    begin
     if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(500, 600));
      chooseoption('Climb-up');
      sleep(randomrange(1500, 2000));
      findnormalrandoms;
      //changeangleforbank;
    end;
      end;
      end;
    end;
    
    procedure climbupstairs;
    
    var
    x, y, s, w: integer;
    
    begin
      if findobjcustom(s, w, ['Stair', 'case', 'ase', 'tair'], [540253, 7831172], 15) then
    begin
      mmouse(s, w, 3, 3);
      if waituptextmulti(['Stair', 'case', 'tair'], (randomrange(200, 300))) then
    begin
      clickmouse2(mouse_right);
      sleep(randomrange(500, 600));
      chooseoption('Climb-up');
      sleep(randomrange(1500, 2000));
      if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) then
      sleep(randomrange(1, 10));
      writeln('made it back upstairs');
      //changeangleforbank;
    end else
      repeat
        writeln('did not make it upstairs, trying again');
        findnormalrandoms;
        climbupstairsfailsafe;
        findnormalrandoms;
        sleep(randomrange(400, 500));
        //changeangleforbank;
        inc(stairsup);
      until((findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 45) or (stairsup = 2)));
    end;
    begin
    //changeangleforbank;
    end;
      end;
    
    
    
    procedure gettobank;
    
    var
    x, y, s, w: integer;
    
    begin
      //changeangleforbank;
      if findcolorspiraltolerance(x, y, 5167352, 592, 14, 711, 93, 75) then
    begin
      mmouse(610, 75, 3, 3);
      wait(200 + randomrange(100, 200));
      clickmouse2(mouse_left);
      makecompass('n');
      sleep(randomrange(4000, 5000));
      findnormalrandoms;
    begin
      if findobjcustom(s, w, ['Bank', 'ank', 'booth', 'ooth'], [7702677, 4680317], 15) then
    begin
      mmouse(s, w, 2, 2);
      if waituptextmulti(['Bank', 'ank', 'booth', 'ooth'], (100 + randomrange(100, 50))) then
    begin
      clickmouse2(mouse_left);
      while (not(bankscreen)) do
      sleep(1);
      end;
      end;
    end;
    end;
    end;
    
    
    
    
    
    begin
    DeclarePlayers;
    setupsrl;
    declarevariables;
      if (not(loggedin)) then
    begin
      loginplayer;
      setrun(true);
    end;
      repeat
      clearDebug;
      writeln('================================');
      writeln('Flax spun: ' + IntToStr(flaxspun * 28));
      writeln('Script has run ' + IntToStr(numberOfTimes) + ' times');
      writeln('================================');
      declarevariables;
      openbankflax;
      withdrawflax;
      gettostairsfrombank;
      climbdownstairs;
      walktowheelfromstairs;
      spinflax;
      startspinning;
      walktostairsfromwheel;
      climbupstairs;
      //changeangleforbank;
      gettobank;
      inc(flaxspun);
      freedtm(bowstringdtm);
      freedtm(flaxdtm);
      inc(numberOfTimes);
      until((flaxspun * 28) >= (flaxtospin)) or (not(loggedin));
      writeln('congratulations, sinning comleted succesfully! =]');
    end.

Page 4 of 10 FirstFirst ... 23456 ... LastLast

Thread Information

Users Browsing this Thread

There are currently 2 users browsing this thread. (0 members and 2 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
  •