Results 1 to 14 of 14

Thread: Help With Lag

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

    Default Help With Lag

    I dunno why but my script lag's when i go to chop trees and its rather anoying and i wounder if some one can help


    Heres my script

    SCAR Code:
    {=========================================================================]
    [                   Draynor Willow Smasher                                ]
    [                                                                         ]
    [           NAME        : Draynor Willow Smasher                          ]
    [           WRITER      : Rune Killer                                     ]
    [           CATEGORY    : Woodcutter                                      ]
    [           DESCRIPTION : Below                                           ]
    [           USAGE       : Start in Draynor Bank read instructions below   ]
    [           AUTOCOLOR   : No                                              ]
    [                                                                         ]
    [                                                                         ]
    [=========================================================================]
    [                            Description.                                 ]
    [=========================================================================]
    [ This is my 1st script so bare with me                                   ]
    [ This script will cut willows in draynor and bank then bank them         ]
    [=========================================================================]
    [                           Instructions.                                 ]
    [=========================================================================]
    [ 1. USE Runescape with Low Detail, Very Bright.                          ]
    [ 2. Set your Screen to 32 bit TRUE color.                                ]
    [ 3. Set Playernames and Passwords                                        ]
    [ 4. Start script Logged In / Logged Out                                  ]
    [ 6. Have WC Axe wielded and more in the bank                             ]
    [ 7. Setup up lines 40-55                                                 ]
    [=========================================================================]
    [ Credits to:                                                             ]
    [ WT-Fakawi   --> For SRL + FindFastRandoms                               ]
    [ CharMz      --> For Axe Head finding and get best axe                   ]
    [=========================================================================}

    Program RuneKillers_Willow_Smasher;
    {.include srl/srl.scar}
    {.include srl/srl/skill/woodcutting.scar}

    Var
      WillowDTM, AxeMask, BrokenAxeHeadMask, AxesBroke, HeadCol,
      HeadCol2, HeadCol3 : integer;
      NoAxe : Boolean;

    const
      WillowColor = 2121808; //Color of the willow
      WillowColorB = 2592888; //Color of the willow
      WillowColorC = 2121808; //Color of the willow
     
    Procedure Declare_Players;
    begin
      HowManyPlayers:= 5;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:= 0;
     
      Players[0].Name   := ''; //UserName
      Players[0].Pass   := ''; //Password
      Players[0].Nick   := ''; //2-4 letters of username
      Players[0].Active := true;

      Players[1].Name   := ''; //UserName
      Players[1].Pass   := ''; //Password
      Players[1].Nick   := ''; //2-4 letters of username
      Players[1].Active := true;
     
      Players[2].Name   := ''; //UserName
      Players[2].Pass   := ''; //Password
      Players[2].Nick   := ''; //2-4 letters of username
      Players[2].Active := true;
     
      Players[3].Name   := ''; //UserName
      Players[3].Pass   := ''; //Password
      Players[3].Nick   := ''; //2-4 letters of username
      Players[3].Active := true;
     
      Players[4].Name   := ''; //UserName
      Players[4].Pass   := ''; //Password
      Players[4].Nick   := ''; //2-4 letters of username
      Players[4].Active := true;

    end;

    Procedure Login;
    begin
    if(not(LoggedIn))then
      LoginPlayer
    end;

    Procedure LoadDTMs;
    begin
      WillowDTM := DTMFromString('78DA63F466626058CAC8800CC27CE5181E026' +
           '990E87F20607401AA998BAA06220B2381B41F50CD1C026AC2816A' +
           'E61350130554B386801A1FA09A0D04D4D801D5AC25A0C601A8662' +
           '1AA9A102F6B14350072B40E25');
    end;

    function FindFastRandoms : Boolean; //WT-Fakawi's FindFastRandoms
    var
      i: Integer;
    begin
      for i := 1 to 17 do
      begin
        case I of
      1: CloseWindow;
      2: if FindTalk then
      Result := True;
      3: if FindDead then
      Result := True;
      4: if FindMod then
      Result := True;
      5: if FindMime then
      Result := True;
      6: if FindMaze then
      Result := True;
      7: if FindQuiz then
      Result := True;
      8: if FindDemon then
      Result := True;
      9: if FindScapeRune then
      Result := True;
      10: if FindTalk then
      Result := True;
      11: if FindLamp(LampSkill) then
      Result := True;
      12: if (FindNewBox) then
    begin
      Result := True;
      if (UseBoxSolver) then
      SolveBox
    else
      GambleNewBox;
    end;
      13: if FindTrade then
      Result := True;
      14:
    begin
      If NoGameTab then
    begin
      Result := True;
      Players[CurrentPlayer].loc := 'No GameTab';
      Logout;
      Exit;
    end;
    end;
      15: SaveToChatLog;
      16: if RC then
      Result := True;
    end;
      Wait(1);
    end;
      FindTalk;
      FindNormalRandoms;
      if (FindFight = true) then
    begin
      RunAwayDirection('N');
      Wait(10000 + random(2000));
      Runback;
    end;
    end;

    Procedure My_Anti_Ban;
    begin
      RandomRClickEvery(2 + Random(6));
      HoverSkill('Woodcutting',false);
      RotateEvery(20 + Random(10));
      LeaveScreenEvery(5 + Random(3));
      PickupMouse;
      SleepAndMoveMouse(500 + Random(1500));
    end;

    Procedure Find_Ent;
    begin
    if(FindEnt(Willowcolor))or
      (FindEnt(WillowcolorB))or
      (FindEnt(WillowcolorC))then
    begin
      RunAwayDirection('N');
      Wait(1000 + random(2000));
      Runback;
    end;
    end;

    function CharmzFindAxeHead: Boolean; //Mix from SRL Findhead and Charmz findaxehead procedures + walkback from RedDot
    var c, AxeHeadDTM, Tries, x, y: Integer;
        Start: Boolean;
    begin
      AxeHeadDTM := DTMFromString('78DA63CC62626078C180021C2312191E02694' +
        '620FE0F048C694035CF18D000231209A473816A9E12A1E6150135' +
        'A94035AF09A801B9F9090135994498930C54F392809A3CCCF0415' +
        '70300FB8311DF');
      GameTab(4);
      Result := True;

      c := CreateBitmapMaskFromText('You do not have an axe', SmallChars);
      if (FindBitmapMaskTolerance(c, x, y, 17, 410, 495, 452, 10, 85)) then
      begin
        if not EquipAxe then
        begin
          GameTab(4);
          Wait(50+Random(50));
          if(not(FindBitmapMaskTolerance(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10)))then Start:= True;
        end else
        if EquipAxe then
        begin
          GameTab(5);
          Wait(50+Random(50));
          if(not(FindBitmapMaskTolerance(AxeMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 10)))then Start:= True;
        end
      end;

      if Start then
      begin
        if(FindBitmapMaskTolerance(BrokenAxeHeadMask, x, y, MIX1, MIY1, MIX2, MIY2, 20, 25))then
        begin
          AxesBroke:= AxesBroke + 1;
          WriteLn('Found a Broken Axe!');
          NoAxe:= True;
          Mouse(x, y,0,0,false);
          ChooseOption(x, y, 'emove');
          Result:= False;
          Exit;
        end;
        Result := False;
        Tries := 0;
        repeat
          if not LoggedIn then Exit;
          if (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465)) then
            Break;
          if not (FindObjMulti('Take', HeadCol, HeadCol2, HeadCol3, 5)) then
          begin
            Tries := Tries + 1;
            WriteLn('Axe head not found. Taken ' + IntToStr(tries) + ' tries');
            Status('Axe Head not found - Rotating Screen');
            KeyDown(VK_LEFT);
            Wait(1000 + Random(1000));
            KeyUp(VK_LEFT);
            Wait(400 + Random(300));
            if not FindObjMulti('Take', HeadCol, HeadCol2, HeadCol3, 5) then
            begin
              Status('Axe Head not found - Moving to Red Dot');
              x := 648;
              y := 83;
              FindColorSpiral(x, y, 241, 570, 5, 725, 155)
                Mouse(x + 3, y + 3, 2, 2, True);
              Flag;
              Wait(500 + Random(300));
            end;
          end;
          if FindObjMulti('Take', HeadCol, HeadCol2, HeadCol3, 5) then
          begin
            Status('Found Axe Head');
            WriteLn('Axe head was found.  Picking it up');
            Wait(450 + Random(400));
            GetMousePos(x, y);
            Mouse(x, y, 0, 0, True);
            Flag;
            Wait(500 + Random(300));
          end;
        until (tries > 9) or
          (FindDTM(AxeHeadDTM, x, y, 550, 200, 745, 465))
          if not (tries > 9) then
          if (AttachHead) then
            Result := True;
      end;
      FreeBitmap(c);
      FreeDTM(AxeHeadDTM);
    end;

    procedure GetBestAxe;
    var RuneAxeMask, AddyAxeMask, MithAxeMask, SteelAxeMask, IronAxeMask, BronzeAxeMask, x ,y: integer;
    begin
      Status('Getting the best axe from the bank');
      Wait(5000);

      RuneAxeMask := BitmapFromString(5, 10, 'z78DA958C410E80400803BF040' +
           'B6DC2D58DFEFF49EAE281E86A620F3DCC14448EA8DCFB8A37045B' +
           'EDBA71C742266728247ED8FCA920B6891DFCDBD24F5E3B37B6C2D' +
           '09F3C6FAD4330E125FAC2650704733B67');
      AddyAxeMask := BitmapFromString(5, 10, 'z78DA7D8BB10DC0200C0457B2F' +
           '11B899208F65F8944503C58E48A2FEE6C91179573175057282FDF' +
           '203990A6CF455DCA56E9EB56ADA3598F75FAFF9AF179DE5BDD7E2' +
           'B1EABD113D12C06E4823B85');
      MithAxeMask := BitmapFromString(5, 10, 'z78DA8D90410AC0200C04BF94B' +
           '08992A394FAFF27D5AAA5DB16A11BD8C34C02A2488BCADD8F6047' +
           'F58D9B374D4DBD0E9E425D82EDBC6AE341567ED9CE51503CAD6CB' +
           '293734F3BAEDEFC7A5546767C3965F91B0716F53C9C');;
      SteelAxeMask := BitmapFromString(5, 10, 'z78DA758E490E80300C03BFE4' +
           '40EB28D7B2FCFF49A48B5028604B3E8CDB24804B30E79066EEDC6' +
           '2C6375A74712B4F1E34C9B047DB78FFF5D1F6992B8BFBDD36AEA0' +
           '55DF2D62CB5479CC3EC16F51F7CC87FC96543D6F0C921F8E0BF2C' +
           '73C7F');
      IronAxeMask := BitmapFromString(5, 10, 'z78DA958C310E80300C03BFE40' +
           '863292355E9FF9F44A1194251073C78B8930DF418E68EEC1B2B6B' +
           'EE97151BDBE02A26787E8895B1F0F86D1FCE934E5F59E9E6B9878' +
           'DD5CC63DB5F457D798A2D382EE20F3C76');
      BronzeAxeMask := BitmapFromString(5, 10, 'z78DA33300002430374120A4' +
           'C9C8D1D8D8C90496435C8E2669686A6069658642D8CCD8D0CB0C8' +
           '82C5299135330189239310352626C626862E98E250BD48B298FEC' +
           '5150E1000001FB63B4E');

      if ((Players[CurrentPlayer].level[20]) >= 41) and (FindBitmapToleranceIn(RuneAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20)) then
      begin
        WriteLn('Rune Axe is found')
        Wait(1000);
        repeat
         Mouse(x, y, 1, 1, True);
         Wait(3000);
        until (FindBitmapToleranceIn(RuneAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
      end else

      if ((Players[CurrentPlayer].level[20]) >= 31) and (FindBitmapToleranceIn(AddyAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20)) then
      begin
        WriteLn('Addy Axe is found')
        Wait(1000);
        repeat
          Mouse(x, y, 1, 1, True);
          Wait(3000);
        until (FindBitmapToleranceIn(AddyAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
      end else

      if ((Players[CurrentPlayer].level[20]) >= 41) and (FindBitmapToleranceIn(MithAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20)) then
      begin
        WriteLn('Mithril Axe is found')
        repeat
          Mouse(x, y, 1, 1, True);
          Wait(3000);
        until (FindBitmapToleranceIn(MithAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
      end else

      if ((Players[CurrentPlayer].level[20]) >= 6) and (FindBitmapToleranceIn(SteelAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20)) then
      begin
        WriteLn('Steel Axe is found')
        Wait(1000);
        repeat
          Mouse(x, y, 1, 1, True);
          Wait(3000);
        until (FindBitmapToleranceIn(SteelAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
      end else

     if FindBitmapToleranceIn(IronAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20) then
     begin
       WriteLn('Iron Axe is found');
       Wait(1000);
       repeat
         Mouse(x, y, 1, 1, True);
         Wait(3000);
       until (FindBitmapToleranceIn(IronAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
     end else

      if FindBitmapToleranceIn(BronzeAxeMask, x, y, MSX1,MSY1,MSX2,MSY2,20) then
      begin
        WriteLn('Bronze Axe is found')
        Wait(1000);
        repeat
          Mouse(x, y, 1, 1, True);
          Wait(3000);
        until (FindBitmapToleranceIn(BronzeAxeMask, x, y, MIX1,MIY1,MIX2,MIY2,20))
      end

      FreeBitmap(RuneAxeMask);
      FreeBitMap(AddyAxeMask);
      FreeBitmap(MithAxeMask);
      FreeBitmap(SteelAxeMask);
      FreeBitmap(IronAxeMask);
      FreeBitMap(BronzeAxeMask);
    end;


    Procedure Walk_By_Rock;
    Begin
      MakeCompass('W');
      wait(2000);
    begin
      Mouse(620+Random(5),75+Random(15),0,0,True);
      Flag;
      Wait(2000);
    end;
    end;
     
    Procedure Walk_To_Willows;
    begin
    If(FindSymbol(x, y, 'Fish'))then
    begin
      Writeln('We Found the willows');
      MMouse(x, y, 5, 5);
      Mouse(x, y, 5, 5, true);
      flag;
      Wait(5000 + Random(1000));
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
    End Else
    begin
      Writeln('Cant find Willows');
      Logout;
      NextPlayer(True);
    end;
    end;

    Procedure Chop_Willows;
    var Chopped : integer;
    begin
      Makecompass('N');
    Repeat
    If(FindColorSpiralTolerance(x,y,WillowColor,5,5,514,337,2))or
      (FindColorSpiralTolerance(x,y,WillowColorB,5,5,514,337,2))or
      (FindColorSpiralTolerance(x,y,WillowColorC,5,5,514,337,2))then
    begin
      Writeln('Chopping the willows');
      MMouse(x, y, 5, 5);
      Mouse(x, y, 5, 5, False);
      ChooseOption(x, y, 'Chop');
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
      Find_Ent;
      CharmzFindAxeHead;
      GetBestAxe;
      Chopped := Chopped + 27;
      ChooseOption(x, y, 'Cancel');
      end;
    Until(InvFull);
    end;

    Procedure Walk_To_Bank;
    var x, y : integer;
    begin
    If(FindSymbol(x, y, 'Bank'))then
    begin
      Writeln('We found the bank');
      MMouse(x, y, 5, 5);
      Mouse(x ,y ,5 ,5 ,true);
      Flag;
      Wait(5000 + Random(1000));
      FindTalk;
      FindNormalRandoms;
      FindFastRandoms;
    End Else
    Begin
      Writeln('Cant Find Bank');
      Logout;
      NextPlayer(True);
    end;
    end;

    Procedure Bank;
    var
      Tries : integer;
    begin
    MakeCompass('W');
    if not (BankScreen) then
    repeat
    if(FindObj(x,y,'ank',607067,10))then
      Mouse(x, y, 4, 4, false)
    else if(FindObj(x,y,'ank',608095,10))then
      Mouse(x, y, 4, 4, false)
      Wait(250);
    if(ClickOption('uickly', 1))then
    begin
      Flag;
    end;
    until(BankScreen) or (Tries=10);
    if(BankScreen)then
    begin
    if(existsitem(2))then
    begin
    if(FindDTM(WillowDTM, x, y, 555, 200, 705, 700))then
      Mouse(x, y, 0, 0, false);
      DepositAll;
      Wait(345+random(235));
      FixBank;
      CloseBank;
    end;
    end;
    end;

    Procedure Progress_Report;
    begin
      ClearDebug;
      Writeln('//////// Rune Killers Willow Chopper! //////////');
      Writeln('Worked for '+ TimeRunning)                      ;
      Writeln('Chopped '+ IntToStr(Chopped) + 'willow'        );
      Writeln('//////// Rune Killers Willow Chopper! //////////');
    end;

    Begin
      SetUpSRL;
      Declare_Players;
      Login;
    Repeat
      DisguiseScar('MSN');
      FindNormalRandoms;
      ActivateClient;
      LoadDTMs;
      FindFastRandoms;
      My_Anti_Ban;
      CharmzFindAxeHead;
      GetBestAxe;
      Walk_By_Rock;
      Walk_To_Willows;
      Chop_Willows;
      Walk_To_Bank;
      Bank;
      Progress_Report;
    Until(False);
    end.

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

    Default

    That would be because right after clicking the tree you have it do this:

    FindTalk;
    FindNormalRandoms;
    FindFastRandoms;
    Find_Ent;
    CharmzFindAxeHead;
    GetBestAxe;

    And not wait at all before clicking it again. So it looks for the randoms, then less then a millisecond later it tries to click again. Put some waiting in there and that should fix it. FindTalk; Wait(1) FindNormalRandoms; .....etc and waits after clicking so it doesn't repeatedly click the tree.

  3. #3
    Join Date
    Dec 2006
    Location
    Australia
    Posts
    698
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Try adding some waits in, if this doesnt work than check if you have freed any unused bitmaps.

  4. #4
    Join Date
    May 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Thanks

  5. #5
    Join Date
    May 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Omg lol its still lagging :s

    Can you help?

    SCAR Code:
    Procedure Chop_Willows;
    var Chopped : integer;
    begin
      Makecompass('N');
    Repeat
    If(FindColorSpiralTolerance(x,y,WillowColor,5,5,514,337,2))or
      (FindColorSpiralTolerance(x,y,WillowColorB,5,5,514,337,2))or
      (FindColorSpiralTolerance(x,y,WillowColorC,5,5,514,337,2))then
    begin
      Writeln('Chopping the willows');
      MMouse(x, y, 5, 5);
      Mouse(x, y, 5, 5, False);
      ChooseOption(x, y, 'hop');
      Wait(1000);
      FindFastRandoms;
      Wait(1000);
      Find_Ent;
      Wait(1000);
      CharmzFindAxeHead;
      Wait(1000);
      GetBestAxe;
      Wait(1000);
      Chopped := Chopped + 27;
      ChooseOption(x, y, 'ancel');
      end;
    Until(InvFull);
    end;

  6. #6
    Join Date
    Feb 2007
    Location
    USA
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Is it actual lag, where the game actually isn't responding for a few seconds and then suddenly jumps... or is it just taking la while between right clicking and clicking cancel?

  7. #7
    Join Date
    May 2007
    Posts
    102
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    It actully stops for a fews secs and then carries on but its very anoying!!!

  8. #8
    Join Date
    Apr 2007
    Posts
    13
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    the reason why it stops for a few seconds is because you added the four 1 second delays in between each chopping

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

    Default

    TY Problem Solved :P

  10. #10
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    This helped me too! Thanks guys.
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

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

    Default

    Quote Originally Posted by kikwit View Post
    This helped me too! Thanks guys.
    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB
    You, Kikwit, have been reported for being a NOOB.
    Your
    Current violations include
    1. Grave Digging for
    This brings you to a new total of (2) Noob Points!

    For more information on Kikwit please go Here.

    For more information from This database please go Here.

    For more information on The Noob Points System please go Here.

    For more information on Noobs please go Here.

    NOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOBNOOB


    Read the date of the most recent post before posting next time before bumping a very old thread please.

    Noob points are only temporary, so it's no big deal because they will go away as long as you don't keep doing noob-ish things..

  12. #12
    Join Date
    Jun 2006
    Posts
    3,861
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    (Can't believe I'm gonna defend him)
    Come on JAD, at least he used the search button

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

    Default

    Quote Originally Posted by bullzeye95 View Post
    (Can't believe I'm gonna defend him)
    Come on JAD, at least he used the search button
    What do you mean? I didn't report him for not searching; I reported him for grave digging. Someone who gets reported for breaking the forum rules (using this as an example) doesn't get off the hook just because they didn't make a bad members app

  14. #14
    Join Date
    Jul 2007
    Location
    America
    Posts
    421
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Woops, didn't see that.
    I dunno, those asians are pretty difficult to out-auto, legend has it they don't need sleep or food...~tim0suprem0
    Activity is on the decline - school's got me
    Check out my tutorial[s] on Color Finding!||Procedures and Functions!

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
  •