Results 1 to 4 of 4

Thread: Please help me

  1. #1
    Join Date
    Jan 2008
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Please help me

    Where can i find the


    The Scripts id Of this scripts




    SCAR Code:
    {------------------------- <<--PriSoner-->> -------------------------------
     --------------- Simple Yew Cutter & Banker (Edgeville) -------------------
     ---------------                 V1.0                   -------------------
     ---------------     Requires Scar 3.12c & SRL 10       -------------------
     --------------------------------------------------------------------------
     -------------------------   Description   --------------------------------
     ---------------   Chops yews just south of edgeville   -------------------
     ---------------   and banks them. Deals with randoms   -------------------
     ---------------  where possible & has basic Anti-Ban.  -------------------
     ---------------       only deals with 1 player         -------------------
     --------------------------------------------------------------------------
     ---------------     Put axe into backpack or hand,     -------------------
     ---------------  place you character in the edgeville  -------------------
     ---------------    bank and run the script. Simple!    -------------------
     --------------------------------------------------------------------------
     --------------- Fill in your username, password, bank  -------------------
     --------------- pin if you have one set, time you want -------------------
     --------------- the script to run & max loads/yews.    -------------------
     --------------- See end of script for version notes.   -------------------
     --------------------------------------------------------------------------

     ##########################################################################
     ##########################################################################
     #####                                                                #####
     #####         THIS IS MY FIRST SCRIPT USE WITH CAUTION AND           #####
     #####                 SUPERVISE WHILST IN USE!                       #####
     #####                                                                #####
     #####                  YOU HAVE BEEN WARNED!!                        #####
     #####                                                                #####
     ##########################################################################
     ##########################################################################}


    program Simple_Yew_Cut_n_Bank_Ed;
    {.include SRL\SRL.scar}
    {.include SRL\SRL\skill\WoodCutting.scar}

    // -----------------------------------------------------------------------
    // -------------- Change your details in this section --------------------
    // -----------------------------------------------------------------------
    const
    PlayerName = ''; // Enter your runescape username here.
    PlayerPass = '';   // Enter your Runescape password here.
    PlayerNick = 'nick';        // Enter a 3-4 letter version of your username here: i.e. evilbob may be just bob
    PlayerPin  = 0000;         // If you have a Bank Pin set enter it here. If you don't leave it at 0000
    PickSkill  = 'woodcutting';  // Choose skill you want any genie lamps aquired to be used on. (Must be spelt exactly as it is in skill list)
    HideScar   = 'NAV32';  // Enter the name of any program you want scar to disguise itself as.

    SRL_ID     = ';    // Get them here [url]http://www.stats.srl-forums.com/[/url] - This is not the same as your SRL Forum Username & Pass
    SRL_PASS   = '
    ';    // If you do not have one leave empty.

    // -----------------------------------------------------------------------
    // ----- Enter the maximums below. Your player will go to the bank, bank all items in your
    // ----- back pack & log out if any condition is met. Enter 0 for infinite.
    // -----------------------------------------------------------------------
    maxloads   = 50;          // Enter the number of loads to collect.
    maxyews    = 1310;          // Enter the number of yews to chop.
    maxtime    = 300;          // Enter the maximum time to run in minutes.
    maxlevel   = 99;          // Enter Maximum Woodcutting Level you wish to achieve.

    // -----------------------------------------------------------------------
    // ---- Do not alter below this line unless you know what your doing! ----
    // -----------------------------------------------------------------------

    YewColour         = 1865575; // Colour of Yew Tree Foliage. Yew Should not have to change this. LoL
    BankCashierColour = 195836;  // Colour of Bank Cashier in Mini Map. The Yellow Dot. You Should not have to change this.

    type AllAxes = record
        AxeDTM: word;
        AxeName: string;
    end;

    var
    AxeList: Array of AllAxes;
    YewCoords: TPointArray;
    YewDTM, YewCount, NestSeedDTM, NestCountSeeds, NestRingDTM, NestCountRings, RndItemCount: integer;
    x, y, i, DTMAxe, BirdsNestsMissed, LoadsBanked, CurrentTree, BankIconColour, TreeIconColour:integer;
    CIBReason: String;
    First: boolean;

    // -----------------------------------------------------------------------
    // Basic Standard Setup of Players.. Only 1 player currently supported.
    // -----------------------------------------------------------------------
    procedure DeclarePlayers;
    begin
        NumberOfPlayers(1);
        CurrentPlayer := 0;

        HowManyPlayers:= 1;
        CurrentPlayer:= 0;
        NumberOfPlayers(HowManyPlayers);

        SRLID       := SRL_ID;          
        SRLPassword := SRL_PASS;        

        Players[0].Name        := PlayerName;
        Players[0].Pass        := PlayerPass;
        Players[0].Nick        := PlayerNick;
        Players[0].Active      := True;
        Players[0].pin         := PlayerPin;
        Players[0].Integers[1] := 0;
       
        Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars);
    end;

    // -----------------------------------------------------------------------
    // CountItemDTM Function by ???
    // -----------------------------------------------------------------------
    function CountItemDTM(DTM: Integer): Integer;
    var
      x, y, i: Integer;
      TB: TBox;
    begin
      for i := 1 to 28 do
      begin
        TB := InvBox(i);
        if(ExistsItem(i)) then
          if(FindDTM(DTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2)) then
            Inc(Result);
      end;
    end;

    // -----------------------------------------------------------------------
    // Procedure: MyFindBirdsNest;
    //        By: Prisoner
    //            Beta Testing
    // Attempts to a Find Birds Nest if one is dropped & Pick it up.
    // If it can'
    t find one within 90 seconds it exits as Fallen Birds Nests do not last that long.
    // beta version Records a failure to find the birds nest.
    // -----------------------------------------------------------------------
    procedure MyFindBirdsNest;
    var OriginalDegrees, NewDegree, StartFBN, x, y: Integer;
        b: boolean;
    begin
        if Pos('nest falls', GetNewChatMsg) = 10 then
        begin
            b := false;
            writeln('Birds Nest Drop Detected. Attempting To Find It...');
            MarkTime(StartFBN);
            SetAngle(true);
            OriginalDegrees := Round(rs_GetCompassAngleDegrees);
            NewDegree := OriginalDegrees;
            repeat
                if (FindObj(x, y, 'Take Bird', 3623505, 6)) then
                begin
                    WriteLn('Birds Nest Found. Picking Up...');
                    Mouse(x, y, 1, 1, True);
                    Flag;
                    Wait(500 + Random(500));
                    Birdsnest := Birdsnest + 1;
                    GameTab(4);
                    Mouse(575, 225, 5, 5, False);
                    ChooseOption('Examine');
                    Wait(1000 + Random(1000));
                    SetAngle(true);
                    MakeCompass(IntToStr(OriginalDegrees));
                    exit;
                end else
                begin
                    if b then
                    begin
                        SetAngle(false);
                        b := false;
                    end else
                    begin
                        SetAngle(True);
                        NewDegree := NewDegree + 50; // Deliberately not a factor of 360
                        MakeCompass(IntToStr(NewDegree));
                        b := true;
                    end;
                end;
            until TimeFromMark(StartFBN) > 90000;
        WriteLn('Birds Nest Not Found Within Required Time. Aborting...');
        BirdsNestsMissed := BirdsNestsMissed + 1; // Temporary reporting to see how effective function is.
        ReportVars[4] := ReportVars[4] + 1;       // Temporary reporting to SRL Stats see how effective function is.
        MakeCompass(IntToStr(OriginalDegrees));
        end;
    end;

    // -----------------------------------------------------------------------
    // Just a small little procedure to drop unwanted items..
    // ongoing depending on what other useless items I find that randoms give
    // -----------------------------------------------------------------------
    procedure DropUnwanted;
    var x, y, i, DTMa2z: integer;
          UnwantedDTM: Array of Integer;
    begin
        SetLength(UnwantedDTM, 4);
        UnwantedDTM[0] := DTMFromString('78DA63E4656060E0624001F764EF307000694' + // Security Book
           '620FE0F048C4C408610031A60442281340F906021A0460A487010' +
           '50230C24C4F1AB0100A6DF0671');
        UnwantedDTM[1] := DTMFromString('78DA631461606010604001CB26C7337000694' + // Baguette
           '620FE0F048CEC408604031A60442281B434906021420D1F013502' +
           '84ED020096E3065E');
        UnwantedDTM[2] := DTMFromString('78DA631460606010624001FC45CE0C1C409A1' + // Frog Token
           '188FF0301232B90C1C4800618914820AD00245808A89103120A04' +
           'D480EC91C3AF06000AB00582');
        UnwantedDTM[3] := DTMFromString('78DA63E46160601067400117CF9B31B002694' + // Strength Potion (2)
           '620FE0F048C1C40060F031A60442281343F906025A0461848C812' +
           '50C34A580D00B1530683');      

        GameTab(4);

        for i := 0 to High(UnwantedDTM) do
        begin
            DTMa2z := UnwantedDTM[i]
            if FindDTM(DTMa2z, x, y, 546, 203, 737, 466) then
            begin
                mouse(x, y, 2, 2, false);
                wait(500 + Random(500));
                ChooseOption('rop');
                wait(1000 + Random(1000));
            end;
            FreeDTM(DTMa2z);
        end;

    {    if CoinAmount('Inv') > 0 and CoinAmount('Inv') < 299 then  // Drop Coins if less than 299 (Not Working Yet)
        begin
            coinbmp := loadcoinbmp;
            FindBitmapToleranceIn(coinbmp, x, y, 546, 203, 737, 466, 1);
            writeln(IntToStr(x) + ' ' + IntToStr(y));
            mouse(x, y, 3, 3, false);
            wait(500 + Random(500));
            ChooseOption('rop');
            wait(1000 + Random(1000));
            FreeBitmap(coinbmp);
        end;  }

    end;

    // -----------------------------------------------------------------------
    // Displays Report when called on current totals.
    // Quits and Saves/Displays a Debug image when appropriate.
    //
    // SYCBReport(ReasonCalled: String; FinalSYBCReport, DebugImage: boolean);
    // ReasonCalled: String explaing why, when, where it SYCBReport was called.
    // FinalSYBCReport: Boolean, If true will end script and display final report along with ReasonCalled
    // DebugImage: Boolean, If true will save & display a screen capture of moment script ended.
    // -----------------------------------------------------------------------
    procedure SYCBReport(ReasonCalled: String; FinalSYBCReport, DebugImage: boolean);
    var x, y: integer;
    begin
        if DebugImage then
        begin
            SaveScreenshot('SYCBDebug.bmp');
            GetClientDimensions(x, y);
            DisplayDebugImgWindow(x, y);
            LoadDebugBitmap('SYCBDebug.bmp');
        end;


        // I did want to have the GetSkillInfo Check in CheckIfBank procedure however it created
        // a conflict with CountItemDTM constantly switching between GameTabs..
        if (maxlevel > 0) and (maxlevel <= GetSkillInfo('woodcutting',False)) then
        begin
            FinalSYBCReport := true;
            ReasonCalled := 'Woodcutting Skill Level ' + IntToStr(GetSkillInfo('woodcutting',False)) + ' Reached';
        end;

        writeLn('##################################################################');
        writeLn('        Simple Yew Cutter & Banker (Edgeville)');
        writeLn('                   Ran for: ' + TimeRunning);
        writeLn('              Loads Banked: ' + IntToStr(LoadsBanked));
        writeLn('           Yew Logs Banked: ' + IntToStr(YewCount));

        if NestCountSeeds > 0 then writeLn('Birds Nests (Seeds) Banked: ' + IntToStr(NestCountSeeds));
       
        if NestCountRings > 0 then writeLn('Birds Nests (Rings) Banked: ' + IntToStr(NestCountRings));
       
        if BirdsNestsMissed > 0 then writeLn('        Birds Nests Missed: ' + IntToStr(BirdsNestsMissed));

        if RndItemCount > 0 then writeLn(' Random Event Items Banked: ' + IntToStr(RndItemCount));

        if (maxloads > 0) and (maxloads <= LoadsBanked) then
        begin
            writeLn('              Script Ended: Maximum Loads Banked Limit Reached.');
            writeLn('##################################################################');
            if LoggedIn then LogOut;
            SendSRLReport;
            TerminateScript;
        end;

        if FinalSYBCReport then
        begin
            writeLn('              Script Ended: ' + ReasonCalled);
            writeLn('##################################################################');
            if LoggedIn then LogOut;
            SendSRLReport;
            TerminateScript;
        end;
       
        writeLn('##################################################################');
        writeLn(' ');
        SendSRLReport;
    end;

    // -----------------------------------------------------------------------
    // Returns True if any condition that may require banking is met.
    // -----------------------------------------------------------------------
    Function CheckIfBank: Boolean;
    begin
        result := false;
        GameTab(4);
        if InvFull then result := true;

        if (maxtime > 0) and (maxtime <= ((GetTimeRunning div 1000) div 60)) then
        begin
            writeLn('maxtime true');
            result := true;
            CIBReason := 'Maximum Time Limit Reached';
            exit;
        end;

        if (maxyews > 0) and (maxyews <= YewCount + CountItemDTM(YewDTM)) then
        begin
            writeLn('maxyews true');
            result := true;
            CIBReason := 'Maximum Yew Logs Cut Limit Reached';
            exit;
        end;
    end;

    // -----------------------------------------------------------------------
    // Add all items in the back pack to a running total before banking.
    // -----------------------------------------------------------------------
    procedure CountBankedItems;
    var a, b, c, d: integer;
    begin
        a := InvCount;
        b := CountItemDTM(YewDTM);
        c := CountItemDTM(NestSeedDTM);
        d := CountItemDTM(NestRingDTM);

        RndItemCount   := (RndItemCount + (a - b - c - d));    
        YewCount       := (YewCount + b);
        NestCountSeeds := (NestCountSeeds + c);
        NestCountRings := (NestCountRings + d);
        LoadsBanked    := LoadsBanked + 1;
                       
                       
        // SRL Stats Reporting
        ReportVars[0] := ReportVars[0] + b;                 // Yews Banked Reported to SRL Stats
        ReportVars[1] := (ReportVars[1] + (c + d));         // Birds Nests Banked Reported to SRL Stats
        ReportVars[2] := (ReportVars[2] + (a - b - c -d));  // Randoms Items Banked Reported to SRL Stats
        ReportVars[3] := ReportVars[3] + 1;                 // Loads Banked Reported to SRL Stats
        Banks         := Banks + 1;                          // Official Banked Stats for Global SRL Report
    end;

    // -----------------------------------------------------------------------
    // Get Current Colour of Bank and Tree Icons in Mini Map
    // -----------------------------------------------------------------------
    Procedure GetIconColours;
    var StartFind: integer;
    var i: integer;
    begin
        if not LoggedIn then SYCBReport('Not Logged in During Procedure: GetIconColours.', true, false);
        MarkTime(StartFind);
        i := 0;
        repeat
        if TimeFromMark(StartFind) >= 20000 then
        begin
            i := i + 1;
            writeLn('Cannot Find Bank Icon.. Logging Out and In Again to Change Icon Position.');
            if i >= 5 then SYCBReport('Could Not Find Bank Icon After 5 Login Attempts.', true, true);
            Logout;
            LoginPlayer;
            MarkTime(StartFind);
        end;

        until FindSymbol(x, y, 'bank');
       
        BankIconColour:= GetColor(x + 1, y);

        If FindSymbol(x, y, 'tree') then
        begin
          TreeIconColour:= GetColor(x + 2, y);
        end else
        begin
            SYCBReport('Cannot find tree icon. Quitting', true, true);
        end;
    end;

    // -----------------------------------------------------------------------
    // Populate AxeList with all Axe DTM's and Names
    // -----------------------------------------------------------------------
    procedure InitAxeTypes;
    begin

        SetLength(AxeList, 8);
        AxeList[0].AxeDTM  := DTMFromString('78DA6314616060E0664001A962BC0CFC409A1' +
            '188FF0301231790C1C58006189148202D03243809A81106124204' +
            'D430010919FC6A00E8B5053D');
        AxeList[0].AxeName := 'Dragon Axe';

        AxeList[1].AxeDTM  := DTMFromString('78DA639CCEC4C0F09401051485F1318800694' +
            '620FE0F048C4B806AEEA2AA718E4864E082AA0101C6C54035F751' +
            'D5D887C6A1AA590A547313558D4B740A8A1A00CFA10E03');
        AxeList[1].AxeName := 'Rune Axe';

        AxeList[2].AxeDTM  := DTMFromString('78DA6374606060686440014D497C0C22409A1' +
            '188FF0301A337905187AAC6C6D786810BAA0604187D804415AA1A' +
            '7B7F7B5435BE40A21C558D73B0338A1A00C1660AA8');
        AxeList[2].AxeName := 'Adamant Axe';

        AxeList[3].AxeDTM  := DTMFromString('78DA633CC4C4C010C0C8800C5A53F81852803' +
            '448F43F10309E05AAF14155636111CCC0055503028CE7816A5C51' +
            'D5D839C4A2AA3981A9C6C52D0D450D0061FC0C64');
        AxeList[3].AxeName := 'Mithril Axe';

        AxeList[4].AxeDTM  := DTMFromString('78DA63E4656060E06240038C0C1C609281E13' +
            'F1030F200194C986A1024901606126CA82AC4444450D5B0020919' +
            'FCE60000E9AC04AD');
        AxeList[4].AxeName := 'Black Axe';

        AxeList[5].AxeDTM  := DTMFromString('78DA63CC636260D8C3C8800C5A53F81852803' +
            '448F43F10305602D5EC4055939B9ACAC0055503028CD540351B51' +
            'D594E5E5A2AA29C154D3545989A20600C3BC0E32');
        AxeList[5].AxeName := 'Steel Axe';

        AxeList[6].AxeDTM  := DTMFromString('78DA63BCC9C4C0309191010498182020C6859' +
            '34103488344FF0301E353A04C2F230332F0707161E082AA0101C6' +
            '0740356DA86A22838351D5BC00AAE94655932ACA89AAE639A6394' +
            '1DEDE286A00B1F90F6D');
        AxeList[6].AxeName := 'Iron Axe';

        AxeList[7].AxeDTM  := DTMFromString('78DA63EC626060086140016DA97C0C22409A1' +
            '188FF0301E33420C307558D97A5220317540D08304E051201A86A' +
            'DCCCE451D54C07129EA86AFC6C5450D40000D77E0AA2');
        AxeList[7].AxeName := 'Bronze Axe';
    end;

    // -----------------------------------------------------------------------
    // Find the axe and move it to hand if in back pack. Returns False if no axe found.
    // -----------------------------------------------------------------------
    function FindTheAxe: boolean;
    var ax, ay: integer;
    var i: integer;
    begin
        for i := 0 to High(AxeList) do
        begin
            DTMAxe := AxeList[i].AxeDTM;
            GameTab(4);
            if FindDTM(DTMAxe, ax, ay, 546, 203, 737, 466) then
                begin
                    writeLn('Found ' + AxeList[i].AxeName + ' Moving to Hand.');
                    Mouse(ax, ay, 10, 4, true);
                    wait(500 + Random(400));
                    result:= true;
                    exit;
                end else
                begin
                    GameTab(5);
                    if FindDTM(DTMAxe, ax, ay, 568, 285, 603, 321) then
                    begin
                        writeLn('Found ' + AxeList[i].AxeName);
                        result:= true;
                        exit;
                end;
            end;
        result:= false;
        end;
    end;

    // -----------------------------------------------------------------------
    // Find Both Tree Icons in Mini Map
    // -----------------------------------------------------------------------

    function FindBothYews: boolean;
    var x2, y2, y3: integer;
    begin
        if not LoggedIn then SYCBReport('Not Logged in During Procedure: FindBothYews.', true, false);
        MakeCompass('N');
        SetAngle(true);
        x2:= 626; y2:= 25; y3:= 140;
        if FindColorSpiral(x2, y2, TreeIconColour, 550, 7, 703, 161) then
        begin
            if FindColorSpiral(x2, y3, TreeIconColour, 550, 7, 703, 161) then
            begin
                if y3 - y2 > 25 then
                begin
                  result:= true
                  exit;
                end else result:= False;
            end else result:= False;
        end else result:= False;
        SYCBReport('Could Not Find Both Yew Symbols (Function: FindBothYews)', true, true);
    end;

    // -----------------------------------------------------------------------
    // Find Top and Bottom Trees Based on Icon Colour and Area of Map..
    // Needs Tweaking Searches whole of Mini Map instead of small area
    // -----------------------------------------------------------------------
    function FindTopYew: integer;
    var y2: integer;
    begin
        x:= 626; y:= 25; y2:= y;
        if FindColorSpiral(x, y, TreeIconColour, 550, 7, 703, 161) then
        begin
            result:= y - y2;
        end else result:= -1;
    end;

    function FindBottomYew: integer;
    var y2: integer;
    begin
        x:= 626; y:= 140; y2:= y;
        if FindColorSpiral(x, y, TreeIconColour, 550, 7, 703, 161) then
        begin
            result:= y2 - y;
        end else result:= -1;
    end;

    // -----------------------------------------------------------------------
    // Tries to Find Bank and Bank all Items
    // -----------------------------------------------------------------------
    Procedure GoToBank;
    begin
        if not LoggedIn then SYCBReport('Not Logged in During Procedure: GoToBank.', true, false);
        SetRun(True);
        If FindTopYew >= 0 then
        begin
            Mouse(x + 16, y - 10, 10, 10, true);
            writeLn('Running to Bank');
            Flag;
            wait(500 + Random(1000));
            If FindColor(x, y, BankIconColour, 550, 7, 682, 161) then
            begin
                If FindColorSpiralTolerance(x, y, BankCashierColour, x - 18, y - 15, x + 35, y + 35, 2) then
                begin
                    Mouse(x, y, 2, 2, true);
                    Flag;
                    wait(500 + Random(1000));
                    If OpenBankFast('eb') then
                    begin
                        if (PinScreen) then InPin(IntToStr(Players[CurrentPlayer].Pin));
                        CountBankedItems;
                        Deposit(1,28,2);
                        wait(500 + Random(1000));
                        Deposit(1,28,2); // Just as a Double Check because, although it rarely happens, it does occasionally fail to bank all items.
                        wait(500 + Random(1000));
                        CloseBank;
                        if CheckIfBank and not InvFull then
                        begin
                            SYCBReport(CIBReason, true, false);
                        end else SYCBReport('Just Finished Banking in GoToBank', false, false);
                    end else SYCBReport('OpenBankFast cannot find the Bank Booth', true, true);
                end;
            end else If FindTopYew >= 0 then
            begin
                GoToBank;
                exit;
            end else SYCBReport('GoToBank Procedure Could Not Find Bank or Tree Icons.', true, true);
        end else SYCBReport('GoToBank Procedure Could Not Find Tree Icons.', true, true);
    end;

    // -----------------------------------------------------------------------
    // Basic AntiBan Proceedure.
    // -----------------------------------------------------------------------
    procedure AntiBan;
    begin
        case random(6) of
            0: RandomRClick;
            1: HoverSkill('woodcutting', False);
            2: PickUpMouse;
            3: BoredHuman;
            4: RandomMovement;
            5: BoredHuman;
        end;
        MakeCompass('N');
        SetAngle(true);
    end;

    // -----------------------------------------------------------------------
    // Moves to Top or Bottom Yew tree assuming you are in the bank.
    // -----------------------------------------------------------------------
    Procedure MoveToYews;
    begin
        if not LoggedIn then SYCBReport('Not Logged in During Procedure: MoveToYews.', true, false);

        if Random(2) = 1 then
        begin
            writeLn('Moving to Top Yew');
            CurrentTree := 1;
            if FindTopYew >= 0 then
            begin
                SetRun(true);
                Mouse(x + 3, y + 5, 5, 5, true);
                Flag;
                SetRun(false);
                GameTab(4);
            end else
            begin
                MoveToYews;
                exit;
            end;
        end else
        begin
            writeLn('Moving to Bottom Yew');
            CurrentTree := 0;
            If FindBottomYew >= 0 then
            begin
                SetRun(true);
                Mouse(x + 23, y, 7, 20, true);
                Flag;
                FindBottomYew;
                Mouse(x + 4, y - 4, 5, 3, true);
                Flag;
                SetRun(false);
                GameTab(4);
            end else
            begin
                MoveToYews;
                exit;
            end;
        end;
    end;

    // -----------------------------------------------------------------------
    // Custom Run Away Procedure as the SRL RunAway Procedure usually fails to come back.
    // WaitTime is MilliSeconds. Recomemded period is 30000 to 120000 or (Random(90000) + 30000)
    // This has not been fully tested (BETA)
    // -----------------------------------------------------------------------
    Procedure CustomRunAway(WaitTime: integer);
    var StartedWaiting: integer;
    begin;
       if not LoggedIn then SYCBReport('Not Logged in During Procedure: CustomRunAway.', true, false);
        SetRun(True);
        If FindTopYew >= 0 then
        begin
            Mouse(x + 16, y - 5, 10, 5, true);
            writeLn('Running Away From Fight');
            Flag;
            If FindColor(x, y, BankIconColour, 550, 7, 682, 161) then
            begin
                Mouse(x, y, 3, 3, true);
                Flag;
                wait(800 + Random(2000));
                Mouse(600, 40, 4, 4, true);
                Flag;
                wait(800 + Random(2000));
                Mouse(570, 50, 4, 4, true);
                Flag;
                MarkTime(StartedWaiting);

                repeat
                    FTWait(Random(10));
                    AntiBan;
                    if FindFight then SYCBReport('Still Fighting Even After RunAway: Random May have Poisoned or Followed you.', true, true);
                until WaitTime <= TimeFromMark(StartedWaiting);
     
                Mouse(690, 130, 4, 4, true);
                Flag;
                wait(800 + Random(2000));

                If FindColor(x, y, BankIconColour, 550, 7, 682, 161) then
                begin
                    Mouse(x, y + 10, 3, 3, true);
                    Flag;
                    wait(800 + Random(2000));
                end else
                begin;
                    Mouse(660, 140, 4, 4, true);
                    Flag;
                    wait(800 + Random(2000));
                end;
            end else
            begin
                SYCBReport('Could Not Find Bank To RunAway to during Fight. Procedure: CustomRunAway', true, true);
            end;
        end else If FindTopYew >= 0 then
        begin
            CustomRunAway((Random(90000) + 30000));
            exit;
        end else SYCBReport('Could Not FindTopYew During Procedure: CustomRunAway', true, true);
        MoveToYews;
    end;
               
    // -----------------------------------------------------------------------
    // Basic Check For all Randoms, Uses Standard SRL Checks.
    // -----------------------------------------------------------------------
    procedure CheckForAllRandoms;
    begin
       MyFindBirdsNest;
       FindNormalRandoms;
       FindInventoryRandoms;
       FindNonInventoryRandoms;
       FindTalk;
       DwarfItem;
       DropUnwanted;
       if FindFight then CustomRunAway((Random(90000) + 30000));
    end;

    // -----------------------------------------------------------------------
    // Checks for Randoms, Occasionally Re-Clicks On Yew & Performs an AntiBan Functions
    // Until Yew Tree has Been Fully Cut Down.
    // -----------------------------------------------------------------------
    Procedure CutTillDown;
    var StartCut, RandWait: integer;
    begin
        MarkTime(StartCut);
        RandWait := (12000 + Random(33000));
        repeat
            if not LoggedIn then SYCBReport('CutTillDown: Not Logged In. Lost Connection or Unsolveable Random?', true, true);
            FindEnt(YewCoords[i].x, YewCoords[i].y, true)
            CheckForAllRandoms;
            if TimeFromMark(StartCut) > RandWait then
            begin
                if not FindEnt(YewCoords[i].x, YewCoords[i].y, true) then
                begin
                    CheckForAllRandoms;
                    if IsUptext('down Yew') then
                    begin
                    if random(100) >= 70 then
                        begin
                            AntiBan;
                        end else Mouse(YewCoords[i].x, YewCoords[i].y, 5, 5, true);
                    CheckForAllRandoms;
                    end else exit;
                end;
                CheckForAllRandoms;
                MarkTime(StartCut);
                RandWait := (12000 + Random(33000));
            end;
            MyFindBirdsNest;
        until not IsUpText('down Yew') or CheckIfBank;
    end;

    // -----------------------------------------------------------------------
    // Find Yew Tree Foliage and Populate YewCoords
    // -----------------------------------------------------------------------
    Function FindYew: boolean;
    begin
        FindColorsSpiralTolerance(255, 166, YewCoords, YewColour, 5, 5, 515, 337, 4);
        If Length(YewCoords) <= 0 then result := false
        else for i:= 0 to High(YewCoords) do
        begin
            MMouse(YewCoords[i].x, YewCoords[i].y, 3, 3)
            If IsUpText('down Yew') then
            begin
                result:= true;
                exit;
            end;
        end;
        result := false;
    end;

    // -----------------------------------------------------------------------
    // Changes Tree. Moves up if your at Bottom Yew and VisaVersa.
    // -----------------------------------------------------------------------
    Procedure ChangeTree;
    begin
        if FindBothYews then
        begin
        CheckForAllRandoms;
            If FindTopYew < FindBottomYew then
            begin
                FindTopYew;
                Mouse(x + 4, y + 15, 5, 5, true);
                Flag;
            end else if FindTopYew > FindBottomYew then
            begin
                FindBottomYew;
                Mouse(x + 4, y - 15, 5, 5, true);
                Flag;
            end;
            First:= true;
        end;
    end;

    // -----------------------------------------------------------------------
    // Start Cutting Down Tree
    // -----------------------------------------------------------------------
    Procedure CutDownTree;
    begin
        if not LoggedIn then SYCBReport('CutDownTree: Not Logged In. Lost Connection or Unsolveable Random?', true, true);
        First:= True;
        repeat
            if not LoggedIn then SYCBReport('CutDownTree: Not Logged In. Lost Connection or Unsolveable Random?', true, true);
            If FindYew then
            begin
                First:= False;
                If not FindEnt(YewCoords[i].x, YewCoords[i].y, true) then
                begin
                    Mouse(YewCoords[i].x, YewCoords[i].y, 4, 4, true);
                    CheckForAllRandoms;
                    CutTillDown;
                    MyFindBirdsNest;
                end;
            end else If not First and not CheckIfBank then
            begin
            ChangeTree;
            end else if random(1000) <= 200 then AntiBan;
            CheckForAllRandoms;      
        until CheckIfBank;
    end;

    // -----------------------------------------------------------------------
    // Sets up all the initial items.
    // -----------------------------------------------------------------------
    Procedure SetupSYCB;
    begin
        Disguise(HideScar);
        ScriptID := '611';
        DeclarePlayers;
        InitAxeTypes;
        if not LoggedIn then LoginPlayer else Players[CurrentPlayer].NickTPA := CreateTPAFromText(Players[CurrentPlayer].Nick, UpChars);
        YewDTM := DTMFromString('78DA6314666060E06740017ED65C60214620F' +
           'E0F048C9C40061B031A60442281B434906026A04611D32E0C3562' +
           '404282801A907BC4F1AB0100B63D057D');
        NestSeedDTM := DTMFromString('78DA6314646060E0614001FE11DC0CFC409A1' +
           '188FF0301232790C1CA8006189148202D0C245808A891C1B40B43' +
           '8D08901025A006E41E61FC6A00BFF8057E');
        NestRingDTM := DTMFromString('78DA63E4636060E06240013B168A33F003694' +
           '620FE0F048CEC40062B031A60442281B430906021A0461A48F011' +
           '5003B25884801A2620C18B5F0D00489B0623');
        ActivateClient;
        YewCount := 0;
        LoadsBanked := 0;
        TreeIconColour := 0;
        BankIconColour := 0;
        NestCountSeeds := 0;
        NestCountRings := 0;
        BirdsNestsMissed := 0;
        LampSkill := PickSkill;
        ClearDebug;
        ClearReport;
        if not FindTheAxe then SYCBReport('Could not find any axes.', true, false);
        repeat
            GetIconColours;
        until (BankIconColour > 0) and (TreeIconColour > 0);
        MakeCompass('N');
        SetAngle(true);
    end;

    // --------------------- Program Starts --------------------------

    begin
        SetupSRL;
        SetupSYCB;
        repeat
          MoveToYews;
          CutDownTree;
          GoToBank;
        until not LoggedIn;
    end.

    // Version History:
    // V1.0 beta First public beta release
    // V1.01 beta Minor Tweaks to a few Coordinates & small counting fix.
    // V1.02 beta Fixed a few bugs introduced when I cleaned up the script for release.
    //       Improved Item Count Function & Fixed intermitent problems with it.
    //       Created Custom Runaway From Fight Routine just for Edgeville Yew Area. (beta)
    // V1.03 beta Fixed the intermittent FindTalk Random bug.
    //       Improved CustomRunAway procedure.
    //       Integrated SRL Stats.
    //       Minor bug fixes and optimisations.
    // V1.04 beta Updated to work with SRL 11
    //       increased speed of cutting.
    // V1.05 beta Fixed Minor Reorting issue for RandomItemsBanked
    //       Lots of small improvements.
    //       Last Version Posted in First Scripts, If you want further versions become a Junior Member.
    // V1.06 beta Added Custom Procedure to Find Birds Nests when dropped from tree. (beta)
    //       Record failed attempts to find Birds Nest.
    //       added procedure to drop low value items from Random events
    //       improved random detection.
    Jagex Failed



























    FagetHax0r

  2. #2
    Join Date
    May 2006
    Posts
    702
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    It says at the bottom of the script, doesn't it?

    ScriptID := '611';

    Also, please add [scar] tags around the whole script you posted.

    1-99 fletching from pure autoing

    My account unlocks: 92 mage 90 range lvl 80 | 94 mage 87 range lvl 91 | 85 mining lvl 41 | Rich lvl 65

  3. #3
    Join Date
    Jan 2008
    Posts
    168
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Ok thank you really much
    Jagex Failed



























    FagetHax0r

  4. #4
    Join Date
    Dec 2007
    Location
    192.168.1.73
    Posts
    2,439
    Mentioned
    6 Post(s)
    Quoted
    119 Post(s)

    Default

    In future if you want to find the script ID in a scrip then you can just do the search in text thing and type ScriptID

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
  •