Results 1 to 2 of 2

Thread: Need help

  1. #1
    Join Date
    Jun 2015
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default Need help

    I'm having trouble with my script. I'm making a Evergreen cutter and it works pretty well cutting the trees but once it has to burn them it well struggles. this is my burning procedure
    Simba Code:
    procedure burnLogs();
        begin
          tabBackPack.mouseSlot(1, MOUSE_RIGHT);
          wait(randomRange(2000, 3000));
          //chose light logs
          tabBackpack.waitForShift(randomRange(2500, 5000));
          tabBackPack.mouseSlot(2, MOUSE_RIGHT);
          wait(randomRange(2000, 3000));
          //chose use logs then add to fire
          mouseOffClient(OFF_CLIENT_RANDOM);
          repeat
            wait(gaussRangeInt(10, 100));
          until (not tabBackpack.waitForShift(randomRange(2000, 3000)));
          stats_IncVariable('23', 28);
          stats_IncVariable('79', 28 * 50);
          stats_commit();
        end;

    I want it to burn the first log then start bonfire on the next wait untill that goes out then do it again untill the bag is empty.

    Thanks
    Last edited by jup; 08-20-2015 at 03:31 AM. Reason: Faster XP

  2. #2
    Join Date
    Apr 2015
    Location
    FireFox
    Posts
    528
    Mentioned
    10 Post(s)
    Quoted
    227 Post(s)

    Default

    Try using this code, I altered how it waits. See below for more information.

    Simba Code:
    1. procedure burnLogs();
    2. begin
    3.   typebyte(vk_1);
    4.   wait(randomRange(2000, 3000));
    5.   toolScreen.select('Tinderbox');
    6.   tabBackpack.waitForShift(randomRange(2500, 5000));
    7.   typebyte(vk_1);
    8.   wait(randomRange(2000, 3000));
    9.   toolScreen.select('Add to bonfire');
    10.   mouseOffClient(OFF_CLIENT_RANDOM);
    11.   repeat //Repeats a small wait(a)
    12.     wait(gaussRangeInt(10, 100)); //this is (a)
    13.   until (not tabBackpack.waitForShift(randomRange(7500, 10000))); //until there hasn't been a change in backpack count for 2-3 seconds
    14.   stats_IncVariable('23', 28);
    15.   stats_IncVariable('79', 28 * 50);
    16.   stats_commit();
    17. end;


    Reason for edit: Faster XP
    Simba Code:
    1. procedure burnLogs();
    2. begin
    3.     tabBackPack.mouseSlot(1, MOUSE_RIGHT);
    4.     wait(randomRange(2000, 3000));
    5.     {if chooseOption.isOpen(gaussRangeInt(2000, 3000)) then //waits between x and y until its open
    6.        chooseOption.select(['//text']); } //selects option with x text
    7.     tabBackpack.waitForShift(randomRange(2500, 5000));
    8.     tabBackPack.mouseSlot(2, MOUSE_RIGHT);
    9.     wait(randomRange(2000, 3000));
    10.     {if chooseOption.isOpen(gaussRangeInt(2000, 3000)) then //waits between x and y until its open
    11.        chooseOption.select(['//text']); } //selects option with x text
    12.     mouseOffClient(OFF_CLIENT_RANDOM);
    13.     repeat
    14.        wait(gaussRangeInt(10, 100));
    15.     until (not tabBackpack.waitForShift(randomRange(2000, 3000)));
    16.     stats_IncVariable('23', 28);
    17.     stats_IncVariable('79', 28 * 50);
    18.     stats_commit();
    19. end;
    Scripting with ogLib

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
  •