Page 33 of 33 FirstFirst ... 23313233
Results 801 to 825 of 825

Thread: AshamanGnomeAgility

  1. #801
    Join Date
    Jan 2012
    Posts
    35
    Mentioned
    0 Post(s)
    Quoted
    9 Post(s)

    Default

    Quote Originally Posted by MaxC69 View Post
    @ph33r, what did you tweak, it's like 2k xp an hour for me?
    i'm wondering the same thing

  2. #802
    Join Date
    Jan 2015
    Posts
    15
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Just look at the script and when you find FindNormalRandoms; put //FindNormalRandoms; and it will speed it up

  3. #803
    Join Date
    Jan 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    ...
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly.

  4. #804
    Join Date
    Jan 2011
    Posts
    335
    Mentioned
    0 Post(s)
    Quoted
    23 Post(s)

    Default

    F_AntiRandoms.simba

    can't seem to find a download for it XD
    If I see you autoing with level 3/default clothes/crap name I WILL report you. Auto Correctly.

  5. #805
    Join Date
    Nov 2011
    Location
    root@fsociety:~#
    Posts
    106
    Mentioned
    1 Post(s)
    Quoted
    44 Post(s)

    Default

    Quote Originally Posted by vashanddou View Post
    F_AntiRandoms.simba

    can't seem to find a download for it XD
    That's because of the fact that OSRS removed forced random events. They are optional now and will eventually go away. F_AnitRandoms.simba is an old include that doesnt serve any purpose anymore. Since this is an old (outdated) script, it still uses some functions from the include.
    Home sweet home.

  6. #806
    Join Date
    Mar 2015
    Posts
    1
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    I don't know if you're still replying to this thread but I'm having a problem I can't seem to figure out. The bot just sits at the log in the beginning of the course clicking on the mini-map while Simba says "wrong uptext for cross long: walk here." Any suggestions? agl bot.jpg

  7. #807
    Join Date
    Dec 2011
    Posts
    38
    Mentioned
    1 Post(s)
    Quoted
    19 Post(s)

    Default

    Quote Originally Posted by Krouton View Post
    I don't know if you're still replying to this thread but I'm having a problem I can't seem to figure out. The bot just sits at the log in the beginning of the course clicking on the mini-map while Simba says "wrong uptext for cross long: walk here." Any suggestions? agl bot.jpg
    I'd advise you to take a quick look at the "CrossLog" function in the script and double check the uptext. I believe this is the line.

    Simba Code:
    If WaitUpTextMulti(['Log','lance','balan','alan'],RandomRange(200,300))

    Now check what text appears in the top left hand corner of the screen when you hover over the log and adjust the text accordingly and see if that helps.
    Last edited by Beoz; 03-06-2015 at 12:02 AM.

  8. #808
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Flawless! Removed some of the extra filler, re-arranging randomness.. so its seemingly random and takes breaks..

    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 5 Minutes and 59 Seconds
    Experience Earned: 605.5
    Experience/Hour: 6062
    =====================================

    **Hint - it was only completing the final section from pipe - log via default time loop; fail-safe. I have amended this and its awesome.

    <------------------>



  9. #809
    Join Date
    Jan 2012
    Posts
    468
    Mentioned
    3 Post(s)
    Quoted
    200 Post(s)

    Default

    Post the code!

  10. #810
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Man! Some manners would have been great. I have taken taken the liberty to provide you with Ashamans Gnome Agility - 'Refurbished'.

    I take no credit for this except to update a few loops.

    (This works best with full camo gear and santa hat)

    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 14 Minutes and 52 Seconds
    Experience Earned: 1730
    Experience/Hour: 6978
    =====================================

    PS. I never have long 'reports' as i'm always stopping and starting.. someone please post a lengthy report!










    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 42 Minutes and 44 Seconds
    Experience Earned: 4325
    Experience/Hour: 6071
    =====================================


    (i was using private chat; hence why the xp dropped a little)
    Attached Files Attached Files

    <------------------>



  11. #811
    Join Date
    May 2012
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Error: The bitmap[-1] does not exist at line 32

  12. #812
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by Spartak View Post
    Error: The bitmap[-1] does not exist at line 32
    Presuming that you have only made a couple posts? i would presume you haven't installed your "includes correctly"

    https://villavu.com/forum/forumdisplay.php?f=661 - should get you started.

    Cheers


    FoolsPottato

    <------------------>



  13. #813
    Join Date
    Apr 2014
    Posts
    96
    Mentioned
    1 Post(s)
    Quoted
    35 Post(s)

    Default

    @Ashaman88 @FullPottatoHarry
    Hello, I was helped by KeepBotting and I just wanted to say thank you to him for atleast trying! But I am having troubles with the script!

    This is what is happening. If yall know a fix for this, thank you so much!

    EDIT: Fixed it! But is kind of slow:\

  14. #814
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    I am sorry for my absence; due to a few life dramas. some say they come in three... i believe they come in Rock Slides. I will be going a vacation so to clear my head and coding is part of that && and due to many recent bans (i have heard and many of the people i yarn to have disappeared.. i have taken a back seat releasing my scripts publicly atm. (but this is short term)

    I think the vital flaw at the moment it entering the the initial log walk. therefore a ATP need to be updated. As i am migrating to AERO. but i will get on to this.

    I made a noob account to test this and is was flawless until the new updates. - One suggestion i do have
    ]

    CTRL - Alt - Delete. Set your JAVA to run time and SRL to priorirty. this avoided me getting stuck for a 10 hour marathon.

    but please unless your only scripting like me knowledge. ( im a suicide botter) Watch your accounts

    <------------------>



  15. #815
    Join Date
    Mar 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by FullPottatoHarry View Post
    Man! Some manners would have been great. I have taken taken the liberty to provide you with Ashamans Gnome Agility - 'Refurbished'.

    I take no credit for this except to update a few loops.

    (This works best with full camo gear and santa hat)

    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 14 Minutes and 52 Seconds
    Experience Earned: 1730
    Experience/Hour: 6978
    =====================================

    PS. I never have long 'reports' as i'm always stopping and starting.. someone please post a lengthy report!










    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 42 Minutes and 44 Seconds
    Experience Earned: 4325
    Experience/Hour: 6071
    =====================================


    (i was using private chat; hence why the xp dropped a little)
    nice job man ill be testing this out, currently got me 1-10 agility, will let you know an bugs

    Edit: Working great right now only got stuck once out of 3 runs so far. Thanks Ashaman and FullPottatoHarry
    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 1 Hours, 33 Minutes and 29 Seconds
    Experience Earned: 8823
    Experience/Hour: 5662
    =====================================
    31 agility
    Last edited by iownyou23; 04-27-2015 at 12:25 AM.

  16. #816
    Join Date
    Apr 2015
    Posts
    20
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    FullPotatoHarry's refurbished script worked amazing for me.

    Ashaman's works, it's just ~3x slower atm.

  17. #817
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by spaderdabomb View Post
    FullPotatoHarry's refurbished script worked amazing for me.

    Ashaman's works, it's just ~3x slower atm.
    Thanks for the feedback. =D

    I will be working on my own release very soon, using AreoLib =D

    <------------------>



  18. #818
    Join Date
    Dec 2011
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    18 Post(s)

    Default

    If someone could add the advanced version of this course I would be really happy

  19. #819
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    I am honestly not sure why anybody is having trouble with the refurbished edition of this script. I am on a different computer; So i downloaded the script as i had posted previously...

    =========AshamanGnomeAgility=========
    ============Version: 1.3=============
    Time Running: 9 Minutes and 48 Seconds
    Experience Earned: 1038
    Experience/Hour: 6351
    =====================================


    **** i will leave this for as long as i can & get a decent progress report. The only thing that comes to my attention that i will fix soon. Is the run function doesn't work. Because of Bonds being introduced

    <------------------>



  20. #820
    Join Date
    May 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Spartak View Post
    Error: The bitmap[-1] does not exist at line 32
    I'm getting this same error for the refurbished version, rechecked my includes and I'm pretty sure they're up to date. Can anyone help with this?

  21. #821
    Join Date
    Aug 2015
    Posts
    2
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Error: Access violation at line 56
    Execution failed.
    The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge, 2, 3, 4, 5]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3]


    any ideas?

  22. #822
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Quote Originally Posted by maltman View Post
    Error: Access violation at line 56
    Execution failed.
    The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge, 2, 3, 4, 5]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3]


    any ideas?
    Errm have you got all your include up-to date and in the correct file??


    Code:
    Program AshamanGnomeAgility;
      {$IFDEF RAYMONDPOWNS}{wrappers} function FloodFillTPAWrap(const TPA: TPointArray): T2DPointArray; var tempATPA: T2DPointArray; begin tempATPA:= FloodFillTPA(TPA); Result:= tempATPA; SetLength(tempATPA, 0); end; function FindTPAEdges(const p: TPointArray): TPointArray; begin FindTPAEdgesWrap(p, result); end; Function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray; begin RotatePointsWrap(P, A, cx, cy, result); end; function TPAFromCircle(const CX, CY, Radius: Integer): TPointArray; begin TPAFromCircleWrap(CX, CY, Radius, result); end; function TPAFromEllipse(const CX, CY, XRadius, YRadius : Integer): TPointArray; begin TPAFromEllipseWrap(CX, CY, XRadius, YRadius, result); end; function TPAFromBox(const Box : TBox) : TPointArray; begin TPAFromBoxWrap(Box, result); end; Function ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray; begin ReturnPointsNotInTPAWrap(TotalTPA, Box, result); end; function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray; begin CombineIntArrayWrap(Ar1, Ar2, result); end; function ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray; begin ReArrangeandShortenArrayWrap(a, Dist, result); end; function ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray; begin ReArrangeandShortenArrayExWrap(a, w, h, result); end; function CombineTPA(const Ar1, Ar2: TPointArray): TPointArray; begin CombineTPAWrap(Ar1, Ar2, Result); end; function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray; begin RemoveDistTPointArrayWrap(x, y, dist, ThePoints, RemoveHigher, Result); end; function TPAFromText(const text, font: String; var w,h: Integer): TPointArray; begin TPAFromTextWrap(text, font, w, h, result); end; function GetColors(const Coords: TPointArray): TIntegerArray; begin GetColorsWrap(Coords, Result); end; function Explode(del, str: string): TStringArray; begin ExplodeWrap(del, str, Result); end; function MergeATPA(const ATPA : T2DPointArray): TPointArray; begin MergeATPAWrap(ATPA, Result); end; function SplitTPA(arr : TPointArray; dist : Integer) : T2DPointArray; begin SplitTPAWrap(arr, dist, result); end; function SplitTPAEx(arr : TPointArray; w, h : integer) : T2DPointArray; begin SplitTPAExWrap(Arr, w, h, result); end; function ClearTPAFromTPA(arP, ClearPoints : TPointArray) : TPointArray; begin ClearTPAFromTPAWrap(arP, ClearPoints, result); end; function TPAToATPAEx(arP : TPointArray; w, h : integer) : T2DPointArray; begin TPAtoATPAExWrap(arP, w, h, result); end; function TPAToATPA(arP : TPointArray; dist : Integer) : T2DPointArray; begin TPAtoATPAWrap(arP, dist, result); end; function FindGapsTPA(TPA : TPointArray; MinPixels : integer) : T2DPointArray; begin FindGapsTPAWrap(tpa, MinPixels, result); end; {$ENDIF}
      {$Define Smart}
      {$I SRL-OSR/SRL.Simba}
      {$I SRL-OSR/SRL/misc/SmartGraphics.Simba}
      {$I SRL-OSR/SRL/misc/Debug.Simba}
    
    ///////////////////////////////////////////////////////////////////////
    //                                                                   //
    //                  Begin of user setup                              //
    //                Fill in the fields below                           //
    //                                                                   //
    ///////////////////////////////////////////////////////////////////////
    
    Const
      HairColor = 924541;  // ***What is your hair color? Or unique color on outfit***
      HairTolerance = 3;    // ***Tolerance of your hair/outfit***
      TestHair=False;        // ***If you want to test the count of hair colors you have, Result must be greater than 5***
    
    Procedure DeclarePlayers;
    Begin
      HowManyPlayers := 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;
    
      Players[0].Name := 'Username';          // ***Username***
      Players[0].Pass := 'Password';          // ***PW***
      Players[0].WorldInfo  := [];    // ***Desired World, leave blank if random***
      Players[0].Nick := 'Doesnt work';          // ***Portion of display name, IMPORTANT FOR RANDOMS***
      Players[0].LampSkill := Skill_Slayer;
      Players[0].Active := True;
    End;
    
    ///////////////////////////////////////////////////////////////////////////////////////////
    //                                                                                       //
    //                            End of user setup                                          //
    //           Don't touch below this line unless you know what you're doing!!             //
    //                                                                                       //
    ///////////////////////////////////////////////////////////////////////////////////////////
    
    Const
      Debug=True;
      POSDebug=True;
      ScriptVersion = '1.3(b)' ;
    
    
    Var
      XP,XPH: Extended;
      Timeout: Integer;
    
    Procedure ProgressReport;
    Begin
      If Not Debug Then
        ClearDebug;
    
      XP := XP + 86.5;
      XPH := Round(XP * (3600.0 / (GetTimeRunning / 1000.0)));
    
      Writeln('=========AshamanGnomeAgility=========');
      Writeln('============Version: 1.3=============');
      Writeln('Time Running: ' + TimeRunning);
      Writeln('Experience Earned: ' + ToStr(XP));
      Writeln('Experience/Hour: ' + ToStr(XPH));
      Writeln('=====================================');
    End;
    
    
    var
      LogDTM,UpBranchDTM,RopeDTM,DownTreeDTM: Integer;
    
    Procedure SetDTM;
    Begin
      LogDTM := DTMFromString('mrAAAAHic42BgYFBgZGD4DqQ7gfQNIO0BpB2AuBaIDwD5N4H4HRCzAfk8QPwQyP4IFfsGxGl2nAwRTpwMflacDHZ6DGA62J6ToSRWiyHIUYbhP1ANPx7MSADDAABaNRBv');
      UpBranchDTM := DTMFromString('mlwAAAHicY2dgYOBiZGCwBtKHgfRkII4AsrcA6UAgXQnE0UAsAMSqQLEKIL0RiPcBsbeVEEOEECeDZPFhhoIoezA7JU+GIa9SjuE/UJ4fB2bEg6EAANSMDR0=');
      RopeDTM := DTMFromString('m1gAAAHic42JgYAgF4mAg9mZkYJgIxI1AtiMQ5wJxOpBvAqQLgPgEEH8FYmcgngDElkBcD8SmQDXvgfQ9IFYB4sYMT4YIIU6G2FI5hsxaOYbwPBmGsi5lhvQiGYZcIAbJrVu0iEEOqJafCMxIJEYAAJFCE9w=');
      DownTreeDTM := DTMFromString('mlwAAAHicY2dgYFgIxBuAOIaRgUEFiOuBeAGQbw6kK4G0KBAfBOILQHwXiLmA4slA2ttKiCG9SIYhQogTjrualBlyGxQZ5IDy/DgwIx4MBQDICww+');
    End;
    
    Procedure F33DTM;
    Begin
      FreeDTM(LogDTM);
      FreeDTM(UpBranchDTM);
      FreeDTM(RopeDTM);
      FreeDTM(DownTreeDTM);
    End;
    
    procedure SetAngle2(Angle: Integer);
    begin
      if ((Angle = SRL_ANGLE_NONE) or (not LoggedIn)) then
        Exit;
    
      KeyDown((Angle * 2) + 38);
      Sleep(800 + Random(300));
      KeyUp((Angle * 2) + 38);
      Wait(100 + Random(100));
    end;
    
    function WaitFindDTMRotatedEx(DTM: integer; var x, y: integer; xs, ys, xe, ye, WaitPerLoop, MaxTime: integer): boolean;
    var
      t: integer;
      afound: extended;
    begin
      t := (getSystemTime + MaxTime);
    
      while (getSystemTime < t) do
      begin
        if (findDTMrotated(DTM, x, y, xs, ys, xe, ye,-Pi,Pi,Pi/30,aFound)) then
        begin
          result := true;
          break;
        end;
    
        wait(WaitPerLoop);
      end;
    end;
    
    Function StartPresent:Boolean;
    Var
      CTS: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      LogBox: TBox;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 0, MMX1, MMY1, MMX2, MMY2, 2);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,3);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If POSDebug Then
          Writeln('No Start Colors Found');
        Exit;
      End;
    
      If POSDebug Then
        DebugATPABounds(ATPA);
    
      LogBox:= GetTPABounds(ATPA[0]);
      If POSDebug Then
        Writeln('Length of possible Start Point: '+tostr(Length(ATPA[0])));
    
      If Length(ATPA[0]) < 20 then
        Exit;
    
      Result:=True;
    End;
    
    Procedure Failsafe;
    Begin
      //MouseBox(258,155,273,167,Mouse_Left);
      Wait(RandomRange(100,1400));
    End;
    
    Function WalkToStart:Boolean;
    Var
      CTS,H,I,T: Integer;
      TPA,TPA2: TPointArray;
      ATPA,ATPA2: T2DPointArray;
      LogBox,LogBox2: TBox;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
      If Debug Then
        Writeln('Entering Walk to Start');
      MakeCompass('N');
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.31, 1.16);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1785167, MMX1, MMY1, MMX2-15, MMY2, 12);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,10);
      SortATPASize(ATPA,True);
    
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Brown MM Colors Found');
        Exit;
      End;
    
      H:=High(ATPA);
    
      For I:=0 To H Do
      Begin
        LogBox:= GetTPABounds(ATPA[I]);
        FindColorsSpiralTolerance(MSCX, MSCY, TPA2, 0, LogBox.X1-3, LogBox.Y1-3, LogBox.X2+3, LogBox.Y2+3, 5);
        ColorToleranceSpeed(CTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
    
        If Debug Then
          Writeln('Length of possible TPA Start Point: '+tostr(Length(TPA2)));
    
        If Length(TPA2) < 50 then
          Continue;
    
        SplitTPAExWrap(TPA2,1,3,ATPA2);
        SortATPASize(ATPA2,True);
    
        If Debug Then
          DebugATPABounds(ATPA2);
    
        LogBox2:= GetTPABounds(ATPA2[0]);
        If Debug Then
          Writeln('Length of possible Start Point: '+tostr(Length(ATPA2[0])));
    
    
        MMouse(LogBox2.X1+2,LogBox2.Y1-2,2,4);
        ClickMouse2(True);
        Wait(Random(300));
        Case Random(10) Of
          0://RunEnergy(20);
        End;
        Wait(RandomRange(800,1200));
        MarkTime(T);
        While IsMoving Do
        Begin
          If TimeFromMark(T)>8000 Then
            Exit;
          Wait(Random(400));
        End;
        Result:=True;
        MarkTime(Timeout);
        Break;
      End;
    End;
    
    Function BrownMM(SX,SY,MX,MY:Integer): Boolean;
    Var
      CTS: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.31, 1.16);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1785167, SX, SY, MX, MY, 12);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,10);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If POSDebug Then
          Writeln('No Brown MM Colors Found');
        Exit;
      End;
    
      Result:= Length(ATPA[0])>40;
      If POSDebug Then
        Writeln('Brown Length: '+ToStr(Length(ATPA[0])));
    End;
    
    Function CompassCheck(Direction: Variant): Boolean;
    var
      StartAngle, DirectionDeg: Extended;
    begin
      Result := False;
      StartAngle := (rs_GetCompassAngleDegrees);
      if ((StartAngle < 0) or (not LoggedIn)) then Exit;
    
      // convert from variant to direction:
      DirectionDeg := variantToDirection(Direction);
    
      if (__MakeCompass_MinCheck(StartAngle, DirectionDeg) <= 8.0) then
      begin
        Result := True;
      end;
    End;
    
    Function WhereAmI(MoveCompass: Boolean): Integer;
    Var
      X,Y: Integer;
    Begin
    
      If PercentBlackMM>50 Then
        If CountDots('Yellow')>1 Then
          Result:= 2 Else
          Begin
            MakeCompass('S');
            If CountColorTolerance(15921903,MMX1,38,600,118,30)>0 Then
              Result:= 3 Else
              Result:= 4;
          End;
    
      If MoveCompass Then
        MakeCompass('N');
    
      If CompassCheck('N') Then
      Begin
        If ((FindSymbol(X,Y,'rare trees')) Or (FindSymbol(X,Y,'spinning wheel'))) And (BrownMM(579,54,605,79)) And (BrownMM(MMX1,MMY1,614,48)) And (BrownMM(631,16,658,49)) Then
        Begin
          If POSDebug Then
            Writeln(CountColorTolerance(10843745,687,31,MMX2,80,30));
          Result:= 5;
        End;
      End Else
        If POSDebug Then
          Writeln('Compass not north');
    
      If CompassCheck('N') Then
        If Result=0 Then
          If (Not (FindSymbol(X,Y,'rare trees')) And (Not FindSymbol(X,Y,'spinning wheel'))) And (StartPresent) And (BrownMM(585,78,613,116)) And (BrownMM(620,92,658,110)) Then
            Result:=7;
    
    
      If CompassCheck('N') Then
        If Result=0 Then
          If (Not FindSymbol(X,Y,'arrow')) And (StartPresent) And (BrownMM(620,43,665,72)) And (BrownMM(MMX1,49,627,85)) And (BrownMM(MMX1,70,629,122)) Then
          Begin
            Result:=6;
          End;
    
      If MoveCompass Then
        MakeCompass('S');
    
      If CompassCheck('S') Then
      Begin
        If Result=0 Then
          If (BrownMM(634,96,654,107)) And (BrownMM(633,49,659,72)) Then
          Begin
            Result:=1;
          End;
      End Else
        If POSDebug Then
          Writeln('Compass not south');
    
    
      If POSDebug Then
        Writeln('We are at position: '+ToStr(Result));
    
    End;
    
    Function LogBounds:TBox;
    Var
      CTS: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.08, 0.42);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1852246, MSX1, MSY1, MSX2, MSY2, 10);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      SplitTPAExWrap(TPA,15,12,ATPA);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Log Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
      Result:=GetTPABounds(ATPA[0]);
    End;
    
    
    Function CrossLog:Boolean;
    Var
      H,I,CTS,X,Y,T: Integer;
      TPA: TPointArray;
      LogBox: TBox;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
      Wait(200 + random(500));
    
      If Debug Then
        Writeln('Entering CrossLog');
    
      MakeCompass('N');
    
      LogBox:=LogBounds;
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.09, 2.07);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 274771, LogBox.X1-1, LogBox.Y1-1, LogBox.X2+5, LogBox.Y2+5, 8);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      SortTPAByY(TPA,True);
    
      If (Length(TPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Log Colors Found');
        Exit;
      End;
    
      H := High(TPA);
    
      For I := 0 To Min(H,5) Do
    
    
      SetLength(TPA,0);
    
      If WaitFindDTMRotatedEx(LogDTM,X,Y,MSX1,MSY1,MSX2,MSY2,100,RandomRange(1220,900)) Then
      Begin
        If Debug Then
          Writeln('Found LogDTM');
        MMouse(X,Y,2,2);
        If WaitUpTextMulti(['Log','alk','balan','alan'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Log Uptext');
          ClickMouse2(True);
          If Not DidYellowClick Then
          Begin
            If Debug Then
              Writeln('No Click Yellow');
            MakeCompass('S');
            //MouseBox(237,10,268,33,Mouse_Move);
            MarkTime(T);
            Repeat
              Wait(100);
              If TimeFromMark(T)>10000 Then
                Break;
              If ClickToContinue Then
                Break;
            Until (FindBlackChatMessage('..P')) Or (FindBlackChatMessage('...Y')) Or (FindBlackChatMessage('..Y')) Or (FindBlackChatMessage('other')) Or (FindBlackChatMessage('safely'));
            If Debug Then
              Writeln(GetBlackChatMessage);
            Result:=True;
            MarkTime(Timeout);
            Exit;
          End Else
            Failsafe;
        End;
      End Else
        If Debug Then
          Writeln('DTM Crosslog Failed');
    End;
    
    Function ClimbNet:Boolean;
    Var
      H,I,CTS,X,Y,T: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
      MakeCompass('S');
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(8.34, 13.89);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 197637, MSX1, MSY1, MSX2, MSY2, 2);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,20);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Net Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
    
      H := High(ATPA);
    
      For I := 0 To H Do
      Begin
        MiddleTPAEx(ATPA[I],X,Y);
    
        If Debug Then
          Writeln('Length of possible ClimbNet: '+tostr(Length(ATPA[I])));
    
        If Length(ATPA[I]) < 100 then
          Continue;
    
        MMouse(X,Y,10,10);
        If WaitUpTextMulti(['Climb','imb-','stacle','acle'],RandomRange(200,300)) Then
        Begin
          ClickMouse2(True);
          If Not DidYellowClick Then
          Begin
            Result:=True;
            MarkTime(T);
            MouseBox(258,96,267,116,Mouse_Move);
            Repeat
              Wait(100);
              If TimeFromMark(T)>10000 Then
                Exit;
            Until PercentBlackMM>50;
            Wait(RandomRange(300,400));
            MarkTime(Timeout);
            SetLength(TPA,0);
            SetLength(ATPA,0);
            Exit;
          End Else
            Failsafe;
        End Else
          Writeln('Failed Uptext is: '+GetUpText);
      End;
    
    End;
    
    Function BranchBounds:TBox;
    Var
      CTS: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.40, 0.70);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 2374223, MSX1, MSY1, MSX2, MSY2, 4);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,15);
      SortATPASize(ATPA,True);
      If Length(ATPA)=0 Then
      Begin
        If Debug Then
          Writeln('No Branch ground colors found');
        Exit;
      End;
      Result:=GetTPABounds(ATPA[0]);
      SetLength(TPA,0);
      SetLength(ATPA,0);
    End;
    
    Function ClimbBranch:Boolean;
    Var
      H,I,CTS,X,Y,T: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
      SearchBox: TBox;
    Begin
    
      If Not LoggedIn Then
        Exit;
       MakeCompass('S');
    
      SearchBox:=BranchBounds;
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.06, 1.57);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3041669, SearchBox.X1, SearchBox.Y1-2, SearchBox.X2, SearchBox.Y2-10, 8);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,5);
      SortATPAFrom(ATPA,Point(266,191));
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Climb Branch Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
    
      H := High(ATPA);
    
      For I := 0 To H Do
      Begin
        MiddleTPAEx(ATPA[I],X,Y);
    
        If Debug Then
          Writeln('Length of possible Branch: '+tostr(Length(ATPA[I])));
    
        MMouse(X,Y,1,1);
        If WaitUpTextMulti(['Climb','imb-','branch','anch'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Branch Uptext');
          ClickMouse2(False);
          If WaitOptionMulti(['Climb','imb-','branch','anch'],RandomRange(800,900)) Then
          Begin
            Result:=True;
            MarkTime(T);
            MouseBox(94,170,101,172,Mouse_Move);
            Repeat
              Wait(100);
              If TimeFromMark(T)>5000 Then
                Exit;
              If ClickToContinue Then
                Break;
            Until (FindBlackChatMessage('..P')) Or (FindBlackChatMessage('...T')) Or (FindBlackChatMessage('bove')) Or (FindBlackChatMessage('form')) Or (FindBlackChatMessage('..T'));
            If Debug Then
              Writeln('Found Message: '+GetBlackChatMessage);
    
            MarkTime(T);
            Repeat
              Wait(100);
              If TimeFromMark(T)>5000 Then
                Exit;
            Until WhereAmI(False)=3;
            Wait(RandomRange(1000,1300));
            SetLength(TPA,0);
            SetLength(ATPA,0);
            MarkTime(Timeout);
            Exit;
          End;
        End;
      End;
    
      SetLength(TPA,0);
      SetLength(ATPA,0);
    
      If WaitFindDTMRotatedEx(UpBranchDTM,X,Y,MSX1,MSY1,MSX2,MSY2,100,1200) Then
      Begin
        MMouse(X,Y,2,2);
        If WaitUpTextMulti(['Climb','imb-','branch','anch'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Branch Uptext');
          ClickMouse2(False);
          If WaitOptionMulti(['Climb','imb-','branch','anch'],RandomRange(800,900)) Then
          Begin
            Result:=True;
            MarkTime(T);
            MouseBox(94,170,101,172,Mouse_Move);
            Repeat
              Wait(100);
              If TimeFromMark(T)>5000 Then
                Exit;
            Until (FindBlackChatMessage('..P')) Or (FindBlackChatMessage('...T')) Or (FindBlackChatMessage('bove')) Or (FindBlackChatMessage('form')) Or (FindBlackChatMessage('..T'));
            If Debug Then
              Writeln('Found Message: '+GetBlackChatMessage);
    
            MarkTime(T);
            Repeat
              Wait(100);
              If TimeFromMark(T)>5000 Then
                Exit;
            Until WhereAmI(False)=3;
            Wait(RandomRange(1000,1300));
            MarkTime(Timeout);
            Exit;
          End;
        End;
      End Else
        If Debug Then
          Writeln('DTM Failed');
    
    End;
    
    Function BalanceBounds:TBox;
    Var
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 528468, MSX1, MSY1, MSX2, MSY2, 9);
    
      SplitTPAExWrap(TPA,70,30,ATPA);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Log Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
      Result:=GetTPABounds(ATPA[0]);
    End;
    
    Function BalanceRope:Boolean;
    Var
      X,Y,H,I,CTS,T: Integer;
      TPA: TPointArray;
      BalanceBox: TBox;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
    
    
      MakeCompass('S');
    
      BalanceBox:=BalanceBounds;
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.03, 0.09);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 4876932, BalanceBox.X1, BalanceBox.Y1-20, BalanceBox.X2+20, BalanceBox.Y2+3, 11);
      If Debug Then
        //Smart_DrawBox(IntToBox(BalanceBox.X1, BalanceBox.Y1-20, BalanceBox.X2+20, BalanceBox.Y2+3));
    
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      SortTPAByX(TPA,False);
    
      If (Length(TPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Log Colors Found');
        Exit;
      End;
    
      H := High(TPA);
      H := Min(H,10);
    
      For I := 0 To H Do
      Begin
        MMouse(TPA[I].X,TPA[I].Y,1,1);
        If WaitUpTextMulti(['rope','cing','Balancing','anci'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Rope Uptext');
          ClickMouse2(False);
          If WaitOptionMulti(['Balancing','anci','alanc'],RandomRange(800,900)) Then
          Begin
            If Debug Then
              Writeln('Found Balance Option');
            If Not DidYellowClick Then
            Begin
              MarkTime(T);
              MouseBox(132,117,156,131,Mouse_Move);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for message to appear');
                  Exit;
                End;
                ClickToContinue;
              Until (FindBlackChatMessage('care')) Or (FindBlackChatMessage('crose'));
              If Debug Then
                Writeln('Found Message: '+GetBlackChatMessage);
              Wait(RandomRange(1500,2000));
              MarkTime(T);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for colors to disappear');
                  Break;
                End;
                ClickToContinue;
                If Debug Then
                Begin
                  Writeln('Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                  Writeln('Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
                End;
              Until (CountColorTolerance(1258308,238,174,262,188,30)>150);
              If Debug Then
              Begin
                Writeln('Final Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                Writeln('Final Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
              End;
              Wait(Random(200));
              Result:=True;
              MarkTime(Timeout);
              Exit;
            End Else
              Failsafe;
          End;
        End Else
          If IsUpTextMultiCustom(['Gnome','trainer','ainer','aine','nome']) Then
            exit;
    
      End;
    
      SetLength(TPA,0);
    
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.05, 0.08);
      FindColorsSpiralTolerance(17, 178, TPA, 5008518, 0, 134, 122, 216, 6);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      SortTPAByX(TPA,False);
    
      If (Length(TPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Balance Rope Colors Found');
        Exit;
      End;
    
      H := High(TPA);
    
      For I := 0 To Min(H,5) Do
      Begin
        MMouse(TPA[I].X,TPA[I].Y,2,1);
        If WaitUpTextMulti(['rope','cing','Balancing','anci'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Rope Uptext');
          ClickMouse2(False);
          If WaitOptionMulti(['Balancing','anci','alanc'],RandomRange(800,900)) Then
          Begin
            If Debug Then
              Writeln('Found Balance Option');
            If Not DidYellowClick Then
            Begin
              MarkTime(T);
              MouseBox(132,117,156,131,Mouse_Move);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for message to appear');
                  Exit;
                End;
                ClickToContinue;
              Until (FindBlackChatMessage('care')) Or (FindBlackChatMessage('cross'));
              If Debug Then
                Writeln('Found Message: '+GetBlackChatMessage);
              Wait(RandomRange(1500,2000));
              MarkTime(T);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for colors to disappear');
                  Break;
                End;
                ClickToContinue;
                If Debug Then
                Begin
                  Writeln('Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                  Writeln('Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
                End;
              Until (CountColorTolerance(1258308,238,174,262,188,30)>150);
              If Debug Then
              Begin
                Writeln('Final Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                Writeln('Final Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
              End;
              Wait(Random(200));
              Result:=True;
              MarkTime(Timeout);
              Exit;
            End Else
              Failsafe;
          End;
        End;
      End;
    
      If WaitFindDTMRotatedEx(RopeDTM,X,Y,MSX1,MSY1,MSX2,MSY2,100,1200) Then
      Begin
        If Debug Then
          Writeln('Found RopeDTM');
        MMouse(X,Y,2,1);
        If WaitUpTextMulti(['rope','cing','Balancing','anci'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found Rope Uptext');
          ClickMouse2(False);
          If WaitOptionMulti(['Balancing','anci','alanc'],RandomRange(800,900)) Then
          Begin
            If Debug Then
              Writeln('Found Balance Option');
            If Not DidYellowClick Then
            Begin
              MouseBox(132,117,156,131,Mouse_Move);
              MarkTime(T);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for message to appear');
                  Exit;
                End;
                ClickToContinue;
              Until (FindBlackChatMessage('care')) Or (FindBlackChatMessage('cross'));
              If Debug Then
                Writeln('Found Message: '+GetBlackChatMessage);
              Wait(RandomRange(1500,2000));
              MarkTime(T);
              Repeat
                Wait(100);
                If TimeFromMark(T)>5000 Then
                Begin
                  If Debug Then
                    Writeln('Took too long for colors to disappear');
                  Break;
                End;
                ClickToContinue;
                If Debug Then
                Begin
                  Writeln('Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                  Writeln('Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
                End;
              Until (CountColorTolerance(1258308,238,174,262,188,30)>150);
              If Debug Then
              Begin
                Writeln('Final Brown Color Count: '+ToStr(CountColorTolerance(1258308,238,174,262,188,30)));
                Writeln('Final Green Color Count: '+ToStr(CountColorTolerance(1997159,238,174,262,188,40)));
              End;
              Wait(Random(200));
              Result:=True;
              MarkTime(Timeout);
              Exit;
            End Else
              Failsafe;
          End;
        End;
      End;
    End;
    
    Function DownTree:Boolean;
    Var
      H,I,CTS,X,Y,T: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
      MakeCompass('S');
    
      If IsUpTextMultiCustom(['Climb','imb-','branch','anch']) Then
      Begin
        ClickMouse2(True);
        If Not DidYellowClick Then
        Begin
          Result:=True;
          MakeCompass('N');
          SetAngle2(SRL_ANGLE_LOW);
    
          MarkTime(T);
          Repeat
            Wait(100);
            If TimeFromMark(T)>5000 Then
              Exit;
          Until PercentBlackMM<50;
          MarkTime(Timeout);
          Exit;
        End Else
          Failsafe;
      End;
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.07, 5.81);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 204072, 29, 115, 253, 225, 3);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,5);
      SortATPASize(ATPA,False);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Down Tree Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
    
      H := High(ATPA);
    
      For I := 0 To Min(30,H) Do
      Begin
        MiddleTPAEx(ATPA[I],X,Y);
    
        If Debug Then
          Writeln('Length of possible Tree: '+ tostr(I)+ '  '+tostr(Length(ATPA[I])));
    
        If (Length(ATPA[I]) < 100) Or (Length(ATPA[I]) > 300) then
          Continue;
    
            MMouse(X+4,Y,2,2);
        If WaitUpTextMulti(['Climb','imb-','branch','anch'],RandomRange(200,300)) Then
        Begin
          ClickMouse2(True);
          If Not DidYellowClick Then
          Begin
            Result:=True;
            MakeCompass('N');
            SetAngle(SRL_ANGLE_LOW);
            MarkTime(T);
            Repeat
              //If FindNormalRandoms Then
               // Exit;
              Wait(100);
              If TimeFromMark(T)>5000 Then
                Exit;
            Until PercentBlackMM<50;
            MarkTime(Timeout);
            Exit;
          End Else
            Failsafe;
        End;
      End;
    
      If WaitFindDTMRotatedEx(DownTreeDTM,X,Y,MSX1,MSY1,MSX2,MSY2,100,3000) Then
      Begin
        MMouse(X,Y,2,2);
        If WaitUpTextMulti(['Climb','imb-','branch','anch'],RandomRange(200,300)) Then
        Begin
          ClickMouse2(True);
          If Not DidYellowClick Then
          Begin
            Result:=True;
            MakeCompass('N');
            SetAngle2(SRL_ANGLE_LOW);
            MarkTime(T);
            Repeat
              Wait(100);
              If TimeFromMark(T)>5000 Then
              Begin
                Writeln('Took to long for Black to go away, exiting');
                SetAngle(SRL_ANGLE_HIGH);
                MakeCompass('S');
                Exit;
              End;
            Until PercentBlackMM<50;
            MarkTime(Timeout);
            Exit;
          End Else
            Failsafe;
        End;
      End Else
        If Debug Then
          Writeln('DownTreeDTM Failed, TPA Backup');
    End;
    
    Function ClimbNet2:Boolean;
    Var
      H,I,CTS,X,Y,T: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
    
      MakeCompass('N');
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.09, 1.31);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 3560304, MSX1, MSY1, MSX2, MSY2, 10);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,10);
      SortATPASize(ATPA,True);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No ClimbNet2 Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
    
      H := High(ATPA);
    
      For I := 0 To H Do
      Begin
        MiddleTPAEx(ATPA[I],X,Y);
    
        If Debug Then
          Writeln('Length of possible ClimbNet2: '+tostr(Length(ATPA[I])));
    
        If Length(ATPA[I]) < 20 then
          Continue;
    
        MMouse(X,Y,10,10);
        If WaitUpTextMulti(['Climb','imb-','stacle','acle'],RandomRange(200,300)) Then
        Begin
          If Debug Then
            Writeln('Found TPA Net2');
          ClickMouse2(True);
          If Not DidYellowClick Then
          Begin
            Result:=True;
            SetAngle(SRL_ANGLE_HIGH);
            MarkTime(T);
            Repeat
              Wait(100);
              If TimeFromMark(T)>6000 Then
                Exit;
            Until WhereAmI(False)=6;
            MarkTime(Timeout);
            Exit;
          End Else
            Failsafe;
        End;
      End;
    
    End;
    
    Function HasHair:Boolean;
    Begin
      Result:=CountColorTolerance(HairColor,227,111,300,180,HairTolerance)>5;
      Writeln('Hair Color Count: '+ToStr(CountColorTolerance(HairColor,227,111,273,180,HairTolerance)));
    End;
    
    Function Pipe:Boolean;
    Var
      H,I,CTS,X,Y: Integer;
      TPA: TPointArray;
      ATPA: T2DPointArray;
    Begin
    
      If Not LoggedIn Then
        Exit;
    
    
      MakeCompass('N');
    
      CTS:= GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
    
      SetColorSpeed2Modifiers(0.43, 0.39);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 5593442, MSX1, MSY1, MSX2, MSY2, 12);
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(0.2, 0.2);
    
      ATPA:=SplitTPA(TPA,10);
    
      If (Length(ATPA) = 0) Then
      Begin
        If Debug Then
          Writeln('No Pipe Colors Found');
        Exit;
      End;
    
      If Debug Then
        DebugATPABounds(ATPA);
    
      H := High(ATPA);
    
      For I := 0 To H Do
      Begin
        MiddleTPAEx(ATPA[I],X,Y);
    
        If Debug Then
          Writeln('Length of possible Pipe: '+tostr(Length(ATPA[I])));
    
        If Length(ATPA[I]) < 300 then
          Continue;
    
        MMouse(X,Y,3,3);
        If WaitUpTextMulti(['Squeeze','ze-','stacle','acle'],RandomRange(200,300)) Then
        Begin
          ClickMouse2(True);
          Result:=True;
          MarkTime(Timeout);
          MouseBox(596,79,605,90,Mouse_Move);
          Exit;
        End;
      End;
    End;
    
    Procedure Tests;
    Begin
      Writeln('Hair Color Count: '+ToStr(CountColorTolerance(HairColor,227,111,273,180,HairTolerance)));
      If CountColorTolerance(HairColor,227,111,273,180,HairTolerance) <= 5 Then
        Writeln('HairColor Not Good enough must be at least 5!!');
    End;
    
    Procedure Mainloop;
    Var
      T: Integer;
      Lost: Boolean;
    Begin
      If TimeFromMark(Timeout)>6000 Then
      Begin
        Lost:=True;
        //RunEnergy(50);
      End;
      If TimeFromMark(Timeout)>20000 Then
        If PercentBlackMM<50 Then
          WalkToStart;
    
      If TimeFromMark(Timeout)>300000 Then
      Begin
        Writeln('Nothing has happended for too long, shutting down and taking screenshot.');
        SaveScreenshot(ScriptPath + '/fail_.bmp');
        Writeln('Screenshot saved to same folder as script, please send to Ashaman');
        TerminateScript;
      End;
    
    
      Case WhereAmI(Lost) Of
        0:  If Not WaitFunc(@CrossLog,100,RandomRange(4000,5000)) Then
            Begin
              MakeCompass('N');
              WalkToStart;
            End;
        1:  If Not WaitFunc(@ClimbNet,100,RandomRange(4000,5000)) Then
            Begin
              MakeCompass('S');
              SetAngle(SRL_ANGLE_HIGH);
            End;
    
        2:  If Not WaitFunc(@ClimbBranch,100,RandomRange(4000,5000)) Then
            Begin
              MakeCompass('S');
              SetAngle(SRL_ANGLE_HIGH);
            End;
    
        3:  If Not WaitFunc(@BalanceRope,100,RandomRange(4000,5000)) Then
            Begin
              MakeCompass('S');
              SetAngle(SRL_ANGLE_HIGH);
            End;
    
        4:  If Not WaitFunc(@DownTree,100,RandomRange(4000,5000)) Then
            Begin
              MakeCompass('S');
              SetAngle(SRL_ANGLE_HIGH);
            End;
    
        5:  If Not ClimbNet2 Then
            Begin
              MakeCompass('N');
              SetAngle(SRL_ANGLE_LOW);
              WaitFunc(@ClimbNet2,100,RandomRange(4000,4600));
            End;
    
        6:  If WaitFunc(@Pipe,100,RandomRange(5000,6000)) Then
            Begin
              MarkTime(T);
              Repeat
                Wait(RandomRange(200,700));
                If TimefromMark(T)>20000 Then
                  Exit;
                If Debug Then
                  Writeln('Pipe color count :'+ToStr(CountColorTolerance(2703189,70,0,427,119,20)));
                If (HasHair) And ((FindBlackChatMessage('prpe')) Or (FindBlackChatMessage('use'))) And (CountColorTolerance(2703189,70,0,427,119,20)>15000) Then
                  Pipe;
              Until (CountColorTolerance(2703189,70,0,427,119,20)<1000) Or (Not HasHair);
              If Debug Then
                Writeln('Final Pipe color count :'+ToStr(CountColorTolerance(2703189,70,0,427,119,20)));
              Wait(RandomRange(500,700));
              Repeat
                Wait(RandomRange(600,1000));
                If TimefromMark(T)>30000 Then
                  Exit;
                If Debug Then
                  Writeln('Pipe color count :'+ToStr(CountColorTolerance(2703189,70,0,427,119,20)));
                If (HasHair) And ((FindBlackChatMessage('prpe')) Or (FindBlackChatMessage('use'))) And (CountColorTolerance(2703189,70,0,427,119,20)>15000) Then
                  Pipe;
              Until (CountColorTolerance(2703189,70,0,427,119,20)<1000) Or (HasHair);
    
              Wait(RandomRange(500,700));
              MarkTime(Timeout);
              ProgressReport;
            End Else
            Begin
              MakeCompass('N');
              SetAngle(SRL_ANGLE_HIGH);
            End;
        7: WaitFunc(@WalkToStart,100,RandomRange(2500,3000));
      End;
    
    End;
    
    Procedure Setup;
    Var
      I: Integer;
    Begin
      DeclarePlayers;
      SetupSRL;
      SetDTM;
      AddOnTerminate('F33DTM');
      Smart_ClearCanvas;
      ClearDebug;
      SRL_COMBATRANDOMS:=FALSE;
      If POSDebug Then
        If Not Debug Then
          Repeat
            Writeln('Location: ' + ToStr(WhereAmI(False)));
            Wait(125);
          Until False;
      If Not LoggedIn Then
      Begin
        Loginplayer;
        Wait(RandomRange(2000,3000));
      End;
      SetAngle(SRL_ANGLE_HIGH);
      MakeCompass('N');
      //FixGraphics;
      //Retaliate(False);
    End;
    
    Begin
      Setup;
      If Not TestHair Then
      Begin
        WalkToStart;
        MarkTime(Timeout);
        Repeat
          Mainloop;
          If Not LoggedIn Then
            LoginPlayer;
        Until AllPlayersInactive;
      End Else
        Repeat
          Tests;
          Wait(100);
        Until False;
    end.
    Copy and past that code.

    <------------------>



  23. #823
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    Read

    https://villavu.com/forum/showthread...cess+violation

    The access violation could be related to smart.

    <------------------>



  24. #824
    Join Date
    Mar 2015
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Quote Originally Posted by AFools View Post
    Read

    https://villavu.com/forum/showthread...cess+violation

    The access violation could be related to smart.
    I'm getting this error:

    Error: The bitmap[-1] does not exist at line 32
    Execution failed.
    The following DTMs were not freed: [SRL - Lamp bitmap, SRL - Book of Knowledge, 2, 3, 4, 5]
    The following bitmaps were not freed: [SRL - Mod bitmap, SRL - Admin bitmap, SRL - Minimap Mask bitmap, 3]

  25. #825
    Join Date
    Apr 2013
    Posts
    680
    Mentioned
    13 Post(s)
    Quoted
    341 Post(s)

    Default

    pascal is outdated now.. so these scripts wont work..

    <------------------>



Page 33 of 33 FirstFirst ... 23313233

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
  •