Results 1 to 2 of 2

Thread: Willow log auto chopper/burner

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

    Post Willow log auto chopper/burner

    Hey guys,
    I'm really new to scripting and any feedback would be appreciated. I also modified alot of YoHoJo's scripting from his bot tutorial and added bonfire support.


    program new3;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/SPS.simba}
    var
    X: Integer;
    Y: Integer;
    fire:Integer;
    tree1:Integer;
    tree2:Integer;
    v, z:Integer;
    k, j:Integer;
    q : Integer;
    log:Integer;
    g, h:Integer;
    o ,l : Integer;
    m, n:Integer;

    CONST
    SRLStats_Username = '';
    SRLStats_Password = '';
    BreakEvery = '120';
    BreakFor = '10';
    Version = '1.0';
    NumbOfPlayers = 1;
    StartPlayer = 0;
    procedure DeclarePlayers;
    var
    i: integer;
    begin
    NumberOfPlayers(NumbofPlayers);
    CurrentPlayer := StartPlayer;
    for i :=0 to NumbofPlayers-1 do
    Players [i]. BoxRewards := ['XP', 'oins'];

    with Players[0] do
    begin
    Name := '';
    Pass := '';
    Active := True;
    end;
    end;
    Procedure Setup;
    begin
    Smart_FixSpeed := true;
    SRL_SixHourFix := true;
    SetupSRL;
    DeclarePlayers;
    LoginPlayer;
    q := 0;
    end;
    Procedure StatsGuise (wat:String);
    Begin
    Status(wat);
    Disguise(wat);
    End;

    Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
    Begin
    MMouse(x, y, 5, 5);
    If WaitUptext(UpText, 1500+Random(500)) Then
    Begin
    Result:=True;
    GetMousePos(x, y);
    If RClick Then
    Begin
    Mouse(x, y, 0, 0, False);
    Result:= WaitOption(Option, 2000);
    If Result Then FFlag(0);
    End Else
    Begin
    Mouse(x, y, 0, 0,True);
    Wait(100+Random(50));
    FFlag(0);
    End;
    End;
    End;


    Procedure Antiban;
    Begin
    Case Random(250) Of
    0: Begin StatsGuise('AntiBan') GameTab (tab_Stats) HoverSkill ('Woodcutting', False) GameTab(28) End;
    1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
    2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
    4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab (28); End;
    5: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); HoverSkill('random', False); GameTab(28); End;
    end;
    end;

    Procedure FailSafe(Reason:String);
    Begin
    Players[CurrentPlayer].Loc:=Reason;
    Logout;
    Stats_Commit;
    TerminateScript;
    End;

    procedure SetCustomAngle(Highest: Boolean);
    begin
    KeyDown((Integer(not Highest) * 2) + 38);
    Sleep(1000 + Random(300));
    KeyUp((Integer(not Highest) * 2) + 38);
    Wait(1000);
    Mouse(656, 290, 4, 4, true);
    ClickMouse(656, 290, 1);
    end;


    Function chopping:Boolean;
    var
    Time: Integer;
    i : Integer;
    t : Integer;
    begin
    MarkTime(t);
    MakeCompass('E');
    fire := DTMFromString('mQwAAAHicY2ZgYFBiZGDQAWJpIH4G5L8D4v dA/HuTLUNDmQdDTZEbgwiQD8OMSBgIADmCB84=')
    tree1 := DTMFromString('mggAAAHicY2NgYHBmYmDwAGIzIHYE4gAgtg ZiS0agHBCbA7EhI4TvDsTVMWZAXUxYMHbAiANDAACS4wQn');
    tree2 := DTMFromString('mlwAAAHicY2dgYHBgYmAwA2J3IHYE4kAo2x eIRRgZGASAmBuIFYFYAojlgZgfiOPdNYG6mXBg3IARD4YCAJfN A3g=');
    log := DTMFromString('mggAAAHicY2NgYHBkYmBwBWJnIPYD4kAg9g FiQUYGBgUg5gViASCWAGI5IHa0EgHqYsKCsQNGHBgCAC0nAvA= ');
    i := 1;
    FindDTM(fire, k, j, MSX1, MSY1, MSX2, MSY2);
    Mouse(k, j, 5, 5, 1);
    if LobbyScreen then
    LoginPlayer;
    SetCustomAngle(True);
    repeat
    if FindObjCustom(x, y, ['Willow'], [3098440, 2438970, 2109488, 2702398], 1) Then
    MarkTime(Time);
    begin
    GetMousePos(x, y);
    case Random(1) of
    0: begin
    FindNormalRandoms;
    Mouse(x, y, 5, 5, false);
    WaitOption('Chop', 500);
    Wait(3000);
    end;
    end;
    Wait(1000);
    end;
    if not FindObjCustom(x, y, ['Chop', 'Down'], [3098440, 2438970, 2109488, 2702398], 1) Then
    MakeCompass('S');
    FindObjCustom(x, y, ['Chop', 'Down'], [3098440, 2438970, 2109488, 2702398], 1)
    begin
    GetMousePos(x, y);
    case Random(1) of
    0: begin
    FindNormalRandoms;
    Mouse(x, y, 5, 5, false);
    WaitOption('Chop', 500);
    end;
    end;
    Wait(1000);
    MakeCompass('E');
    end;
    until (InvFull);
    if InvFull then
    repeat
    MouseItem(i, mouse_Right);
    WaitOption('ight', 500);
    Wait (1500);
    i := (i + 1);
    until FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) or (i = 10);
    if not FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) then
    MakeCompass('N');
    FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2);
    if ExistsItem(28) then
    begin
    MouseItem(28, mouse_Left);
    Wait(500);
    Mouse(360, 190, 1, 1, true);
    repeat
    FindNormalRandoms;
    Wait(1000);
    MMouse(Random(200), Random(300), 20, 20);
    if FindDTM(tree1, o, l, 550, 210, 740, 465) or FindDTM(tree2, m, n, 550, 210, 740, 465) then
    DropAll;
    until InvEmpty or ((GetSystemTime - t) > 1000000)
    end;
    if not FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) then
    MouseItem(28, mouse_Right);
    WaitOption('ight', 500);
    begin
    MouseItem(28, mouse_Left);
    Wait(500);
    Mouse(360, 190, 1, 1, true);
    repeat
    FindNormalRandoms;
    Wait(1000);
    MMouse(Random(200), Random(300), 20, 20);
    if FindDTM(tree1, o, l, 550, 210, 740, 465) or FindDTM(tree2, m, n, 550, 210, 740, 465) then
    DropAll;
    until InvEmpty or ((GetSystemTime - t) > 1000000)
    end;
    q := q + 1;
    WriteLn('Finished ' + IntToStr(q) + ' loads');
    Antiban;
    GameTab(Tab_Inv);
    FreeDTM(fire);
    FreeDTM(log);
    FreeDTM(tree1);
    end;

    begin
    Setup;
    Wait(1000);
    SetCustomAngle(True);
    repeat
    chopping;
    until (false);
    end.

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

    Default

    Quote Originally Posted by periphery View Post
    Hey guys,
    I'm really new to scripting and any feedback would be appreciated. I also modified alot of YoHoJo's scripting from his bot tutorial and added bonfire support.


    Simba Code:
    program new3;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i SPS/SPS.simba}
    var
      X: Integer;
      Y: Integer;
      fire:Integer;
      tree1:Integer;
      tree2:Integer;
      v, z:Integer;
      k, j:Integer;
      q : Integer;
      log:Integer;
      g, h:Integer;
      o ,l : Integer;
      m, n:Integer;

    CONST
      SRLStats_Username = '';
      SRLStats_Password = '';
      BreakEvery        = '120';
      BreakFor          = '10';
      Version           = '1.0';
      NumbOfPlayers     = 1;
      StartPlayer       = 0;
    procedure DeclarePlayers;
    var
     i: integer;
    begin
      NumberOfPlayers(NumbofPlayers);
      CurrentPlayer := StartPlayer;
      for i :=0 to NumbofPlayers-1 do
        Players [i]. BoxRewards   := ['XP', 'oins'];

      with Players[0] do
      begin
        Name          := '';
        Pass          := '';
        Active        := True;
      end;
    end;
    Procedure Setup;
    begin
      Smart_FixSpeed := true;
      SRL_SixHourFix := true;
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      q := 0;
    end;
    Procedure StatsGuise (wat:String);
    Begin
      Status(wat);
      Disguise(wat);
    End;

    Function CheckAndClick(UpText, Option:String; X,Y:Integer; RClick:Boolean) :Boolean;
    Begin
      MMouse(x, y, 5, 5);
      If WaitUptext(UpText, 1500+Random(500)) Then
      Begin
        Result:=True;
        GetMousePos(x, y);
        If RClick Then
        Begin
          Mouse(x, y, 0, 0, False);
          Result:= WaitOption(Option, 2000);
          If Result Then FFlag(0);
        End Else
        Begin
          Mouse(x, y, 0, 0,True);
          Wait(100+Random(50));
          FFlag(0);
        End;
      End;
    End;


    Procedure Antiban;
    Begin
      Case Random(250) Of
        0: Begin StatsGuise('AntiBan') GameTab (tab_Stats) HoverSkill ('Woodcutting', False) GameTab(28) End;
        1: Begin StatsGuise('AntiBan') SleepAndMoveMouse(7000 + Random(500)); End;
        2: Begin StatsGuise('AntiBan') GameTab(tab_Inv) ExamineInv; GameTab(28); End;
        4: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); Wait(3000 + Random(500)); GameTab (28); End;
        5: Begin StatsGuise('AntiBan') GameTab(Tab_Stats); HoverSkill('random', False); GameTab(28); End;
        end;
    end;

    Procedure FailSafe(Reason:String);
    Begin
      Players[CurrentPlayer].Loc:=Reason;
      Logout;
      Stats_Commit;
      TerminateScript;
    End;

    procedure SetCustomAngle(Highest: Boolean);
    begin
      KeyDown((Integer(not Highest) * 2) + 38);
      Sleep(1000 + Random(300));
      KeyUp((Integer(not Highest) * 2) + 38);
      Wait(1000);
      Mouse(656, 290, 4, 4, true);
      ClickMouse(656, 290, 1);
    end;


    Function chopping:Boolean;
    var
      Time: Integer;
      i : Integer;
      t : Integer;
    begin
      MarkTime(t);
      MakeCompass('E');
      fire := DTMFromString('mQwAAAHicY2ZgYFBiZGDQAWJpIH4G5L8D4vdA/HuTLUNDmQdDTZEbgwiQD8OMSBgIADmCB84=')
      tree1 := DTMFromString('mggAAAHicY2NgYHBmYmDwAGIzIHYE4gAgtgZiS0agHBCbA7EhI4TvDsTVMWZAXUxYMHbAiANDAACS4wQn');
      tree2 := DTMFromString('mlwAAAHicY2dgYHBgYmAwA2J3IHYE4kAo2xeIRRgZGASAmBuIFYFYAojlgZgfiOPdNYG6mXBg3IARD4YCAJfNA3g=');
      log := DTMFromString('mggAAAHicY2NgYHBkYmBwBWJnIPYD4kAg9gFiQUYGBgUg5gViASCWAGI5IHa0EgHqYsKCsQNGHBgCAC0nAvA=');
      i := 1;
      FindDTM(fire, k, j, MSX1, MSY1, MSX2, MSY2);
      Mouse(k, j, 5, 5, 1);
      if LobbyScreen then
      LoginPlayer;
      SetCustomAngle(True);
      repeat
      if FindObjCustom(x, y, ['Willow'], [3098440, 2438970, 2109488, 2702398], 1) Then
      MarkTime(Time);
      begin
        GetMousePos(x, y);
        case Random(1) of
          0: begin
              FindNormalRandoms;
              Mouse(x, y, 5, 5, false);
              WaitOption('Chop', 500);
              Wait(3000);
            end;
        end;
      Wait(1000);
      end;
      if not FindObjCustom(x, y, ['Chop', 'Down'], [3098440, 2438970, 2109488, 2702398], 1) Then
        MakeCompass('S');
        FindObjCustom(x, y, ['Chop', 'Down'], [3098440, 2438970, 2109488, 2702398], 1)
        begin
        GetMousePos(x, y);
        case Random(1) of
          0: begin
              FindNormalRandoms;
              Mouse(x, y, 5, 5, false);
              WaitOption('Chop', 500);
            end;
        end;
      Wait(1000);
      MakeCompass('E');
      end;
      until (InvFull);
      if InvFull then
        repeat
        MouseItem(i, mouse_Right);
        WaitOption('ight', 500);
        Wait (1500);
        i := (i + 1);
        until FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) or (i = 10);
        if not FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) then
          MakeCompass('N');
          FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2);
          if ExistsItem(28) then
          begin
            MouseItem(28, mouse_Left);
            Wait(500);
            Mouse(360, 190, 1, 1, true);
            repeat
            FindNormalRandoms;
            Wait(1000);
            MMouse(Random(200), Random(300), 20, 20);
            if FindDTM(tree1, o, l, 550, 210, 740, 465) or FindDTM(tree2, m, n, 550, 210, 740, 465) then
              DropAll;
            until InvEmpty or ((GetSystemTime - t) > 1000000)
          end;
        if not FindDTM(fire, v, z, MSX1, MSY1, MSX2, MSY2) then
          MouseItem(28, mouse_Right);
          WaitOption('ight', 500);
          begin
            MouseItem(28, mouse_Left);
            Wait(500);
            Mouse(360, 190, 1, 1, true);
            repeat
            FindNormalRandoms;
            Wait(1000);
            MMouse(Random(200), Random(300), 20, 20);
            if FindDTM(tree1, o, l, 550, 210, 740, 465) or FindDTM(tree2, m, n, 550, 210, 740, 465) then
              DropAll;
            until InvEmpty or ((GetSystemTime - t) > 1000000)
          end;
          q := q + 1;
          WriteLn('Finished ' + IntToStr(q) + ' loads');
          Antiban;
          GameTab(Tab_Inv);
        FreeDTM(fire);
        FreeDTM(log);
        FreeDTM(tree1);
    end;

    begin
      Setup;
      Wait(1000);
      SetCustomAngle(True);
      repeat
        chopping;
      until (false);
    end.

    use [simba] tags to make it easier to read

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
  •