Page 1 of 2 12 LastLast
Results 1 to 25 of 34

Thread: Crafting Guild Bowl Maker (beta)

  1. #1
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default Crafting Guild Bowl Maker (beta)

    My latest atrocity is now up and running (ish). I believe that it will work ok, but it is still a work in progress. detailed feedback is nice.

    I have had it work for 100 loads without a glitch, but results may vary.

    SETUP:
    Have a pickaxe equipped. (or in tool belt)
    Be on a free world (not members!)
    be inside the crafting guild.
    chose the number of loads to run.
    for smart, enter your username/pass in the usual field and remove the // where it says to.

    Notes:
    Random detection may not be perfect yet.
    no continue from break (but every time you run, you will empty all inv slots, and start over).

    Future Plans:
    Add urn support for better exp per hour. improve random detection, improve fail safes.

    Once again, Please note this is a BETA, and as such, bugs may be encountered. Feel free to make suggestions to improve the script if you have more programing experience.

    Update 0.1
    Added failsafes to the script, so if it fails, it will quit after a few tries, and give better feedback. also fixed some timing issues to make it seem more human.

    Update 0.2
    Fixed the wheel finding issue, and the update with the urns.

    Update 03
    Removed the bucket setup, as buckets are no longer needed. fixed some timing issues.

    Update 04
    Changed from static time to detection of the completion of each process. minor changes here and there, and improved the wheel finding (hopefully). Also added a few more failsafes.

    Update 05
    Fixed some timing issues, and some other errors found in my code. seems to work good so far. One minor issue is the uptext detection can sometimes not be read, but has not stopped the script as of yet. Please make sure you are on a FREE world for this script to work correctly. it may work on members, but I do not have the layout correct for crafting bowls on a members world.

    Update V1
    fixed wheel finding, and seems to be working great. I am not aware of any issues as of yet, and my testing has found none thus far. remember, this is made for free worlds only!!!
    Last edited by EtherFreak; 01-31-2012 at 07:15 AM.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  2. #2
    Join Date
    Aug 2007
    Posts
    984
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    I'll give it a run. exp per hour?
    SRL > Runescape

    Quote Originally Posted by brent8900 View Post
    when i download it its a FAWG.rar how to i get it to FAWG.exe

  3. #3
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I guess I should add in exp calculations. it takes about 5 min to complete a load of 14 bowls, which gives 462 exp. so in one hour, you will get about 5.5 k exp per hour. probably not the way to get to lvl 99, but a way to catch a few levels for free.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  4. #4
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    As of version 0.1 beta, it now takes about 4.5 minutes to complete a run. I am having an occasional hang on finding the potters wheel. I will try and setup a bitmap to find the wheel, but I will need to learn how to take bitmaps.

    As always, feedback is appreciated.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  5. #5
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I don't think bitmaps will work for the wheel since on the main map and it changes everytime, the easiest way would be using reflection and using tiletoms or if you feel like a challenge you could use tpa finding.

  6. #6
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    In your procedure names / function names, you should camel cap the names.
    From this: "findtpalrg"
    To something like this: "FindTPA_LRG" or something of the sorts depending on how you like.
    It makes for better readability.

    You should also do the same with your statements. Like: "dropallexcept" to "DropAllExcept".

    Also, you should work on your standards. Like this example:
    Simba Code:
    repeat
        // Code here
        until loadcount=count

    That should be:
    Simba Code:
    repeat
      // Code here
    until(Blagh blagh blagh);

    The previous was all about your standards, which you really need to work on.

    --

    You should use a procedure called "MainLoop" instead of using the "begin end." nest. That way you do not have to clutter your "begin end." nest and only have to call on one procedure to get everything started.

    Something like this:
    Simba Code:
    procedure MainLoop;
    begin
      SetupSRL;
      DeclarePlayers;
      LoginPlayer;
      Wait(1000); // I find this is amazing for slow computers - This is optional!

      Kill := 0;
      Count := 0;
      Wait(5000); // From your "InitRun" procedure
      SetAngle(True);
      SymbolAccuracy := 0.5;
      MouseSpeed := (7 + Random (3));
      FindNormalRandoms;

      {
        @ SymbolAccuracy :
          - This should not have to be declared at the start. It is automatically
          declared in SRL to be at 0.7. You should also ALWAYS use it "On the fly",
          and not declare it in the start and then revert it back to its default
          value once you done with it.

          PS: I may be wrong on the 0.7 value part. The point remains, though!

        @ MouseSpeed :
          - While this is a decent idea, the mouse would still be too slow. The SRL
          default MouseSpeed value is about 14 or so. Which is perfect. So try
          making your MouseSpeed randomizing something like this:
          "MouseSpeed := RandomRange(12, 17);"
      }

    end;

    --

    Also for your problem with finding the wheel that is used in the script:
    Learn how to use TPA object finding. Not only will it replace your standard "if FindObj*" stuff, it will also give you more experience at more "Advanced" things of scripting.

    Here is a good tutorial: HERE. The first two parts about the CTS and the advanced arrays are what you what. (Specifically TPointArrays for the array segment).

    You will notice a HUGE difference in your script after you learn how to properly use CTS and TPAs for object finding.

    --

    Overall, this is a nice script idea and a good base to start on. I really look forward to seeing what you create in the future. So don't give up with scripting, EtherFreak!

  7. #7
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Kongking, thank you for letting me know about the bitmaps, It saved me from trying to figure it out the hard way.
    Risk, I will look into improving my TPA. I tackled tpa once to get my mining procedures working good, and good they work. As for my mouse speed, I have the speed set to what I feel is most like me playing on my computer. I try to have my scripts look like me playing. I will work on getting my procedures up to standard, and I am working on expanding my knowledge with TPA finding. As for symbol finding, I did not know it started off at 0.7.

    Look for future releases of this script, I am working on it between school and work.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  8. #8
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Well, I am having no luck with my TPA to find the pottery wheel. I often find the wall, or other random things. If anyone is so inclined to take this script further, feel free and just credit where credit is due. I will continue to fool with it, and should I get a working wheel finding method, I will post my update.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  9. #9
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    Tried using reflection to find the wheel instead, its easier. If you don't want to use reflections then use FindObj to find the wheel, maybe that would make it easier.

  10. #10
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by KingKong View Post
    Tried using reflection to find the wheel instead, its easier. If you don't want to use reflections then use FindObj to find the wheel, maybe that would make it easier.
    He would have to use smart then wouldn't he?
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  11. #11
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    If he uses reflection, then yes you need smart, but if he uses findobj, then he doesn't need to, since its SRL function.

  12. #12
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Here's my crafter from just before I got Dev status.

    Simba Code:
    {==============================================================================]
    [==============================================================================]
    [                              RM Power Crafter                                ]
    [                                 By: Rasta Magician                           ]
    [==============================================================================]
    [                                  Features                                    ]
    [==============================================================================]
    [ 1. Debug                                                                     ]
    [ 2. AntiRandoms                                                               ]
    [ 3. AntiBan                                                                   ]
    [ 4. Multiplayer                                                               ]
    [ 5. Resting                                                                   ]
    [ 6. Progress Report                                                           ]
    [ 7. Local Control                                                             ]
    [ 8. Responder                                                                 ]
    [ 9. Proggy To File                                                            ]
    [ 10. Smart Cycleing                                                           ]
    [==============================================================================]
    [                                 Description                                  ]
    [==============================================================================]
    [ Mines clay, softens it, molds it into bowls(f2p),                            ]
    [ plant pots or pot lids (with needed quest), then fires the clay, drops it    ]
    [ and repeats the whole thing. All of this happens inside the Crafting Guild   ]
    [                                                                              ]
    [==============================================================================]
    [                               How To Use                                     ]
    [==============================================================================]
    [ 0. You need level 40 crafting                                                ]
    [ 1. Wield a pick                                                              ]
    [ 2. Wear a brown appron                                                       ]
    [ 3. Have jugs in inventory (I suggest 4 jugs)                                 ]
    [                                                                              ]
    [==============================================================================]
    [                               Credits                                        ]
    [==============================================================================]
    [ SRL Team                                                                     ]
    [ Ed, thx for testing                                                          ]
    [==============================================================================]
    [                    RM Power Crafter by Rasta Magician                        ]
    [==============================================================================]
    [==============================================================================}


    {
    add one more text for moulding clay
    mold and fire menu colors changed place
    }



    program RMScript;
    {$DEFINE SMART }
    {$DEFINE Reflection}
    //{$DEFINE FORM }

    {$IFDEF SMART }
    {.include srl/srl/misc/Smart.scar}
    {$ENDIF}
    {.include srl/srl.scar}
    {$IFDEF Reflection}
    {.include SRL\SRL\Reflection\Reflection.scar}
    {$ENDIF}
    {.include srl/srl/skill/mining.scar}

    {$IFDEF FORM }
    {.include srl/srl/misc/users.scar}
    {$ENDIF}

    Const
      WorkTime = (30*60*1000); //10 mins
      RestTime = (3*60*1000); //3 mins
     
      IsMember = true;

      UseDebug = True;
      UseResponder = True;
      SaveProggyToFile = True;
     
      ScriptName = 'RM Power Crafter';
      Version = '2.0';
     
      YourSRLID = '';   //your SRLID
      YourSRLPass = ''; //your SRL Stats pass
      MyScriptID = '1199'; // don't touch

    var
      Rested, Worked, Loads,
      PickColor, LadderColor, OvenColor,
      ClayDTM, SoftDTM, JugDTM, WJugDTM, GemDTM,
      JugCount, ClayCount,
      ClayMined :integer;
      ProggyStr: string;


    function IsSameIntArray(i1, i2:TIntegerArray):boolean;
    var i:integer;
    begin
      Result := false;
      if Length(i1) <> Length(i2) then exit;

      Result := true;
      for i:= 0 to high(i1) do
        if i1[i] <> i2[i] then
          Result := False;
    end;

    //for debugging TPAs, to help me perfect my finders
    //by Wizzup?
    Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;

    Var
       Width, Height, ClientBMP, I, L: Integer;
       xs, ys, xe, ye: Integer;

    Begin
      Try
      Begin
        xe := xs xor xs;
        ye := ys xor ys;
        xs := 1 shl 20;
        ys := 1 shl 20;

        For I := 0 To High(Points) Do
        Begin
          xs := Min(xs, Points[i].X);
          ys := Min(ys, Points[i].Y);

          xe := Max(xe, Points[i].X);
          ye := Max(ye, Points[i].Y);
        End;

        Width := xe - xs;
        Height := ye - ys;

        DisplayDebugImgWindow(0, 0);
        DisplayDebugImgWindow(Width, Height);
        ClientBMP := BitmapFromString(Width, Height, '');

        CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
        For I := 0 To High(Points) Do
          FastSetPixel(ClientBMP, Points[i].X - xs, Points[i].Y - ys, 255);
        If BmpName <> '' Then
          SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
        SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
        DisplayDebugImgWindow(Width, Height);

        FreeBitmap(ClientBMP);
      End
      Except
        FreeBitmap(ClientBMP);
      End;
      Result := True;
    End;

    //Declaring players
    Procedure DeclarePlayers;
    begin

      {$IFDEF Form}
        SRLPlayerForm(True, [], [], [], []);
        exit
      {$ENDIF}
     
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='RMagician';
      Players[0].Pass :='Th1sIsN0tMyPW!';
      Players[0].Nick :='agi';
      Players[0].Active := True;


    end;

    //Used for debugging and finding errors
    Procedure RMDebug(s:string);
    var name:string;
    begin
      if not UseDebug then exit;
      try name := Players[CurrentPlayer].Name +' : '; except name:= '' end;
      writeln(name+TheTime+' - '+s);
    end;


    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    {$IFDEF SMART}
    procedure Proggy; forward;
    Procedure EasyRC;
    var i:integer;
    begin
      if not IsFKeyDown(12) then exit;
      LogOut;

      Proggy;
      writeln('Fresh proggie on your right');
      writeln('');

      writeln('--- MENU ---');
      writeln('F9 --> Status');
      writeln('F10 --> Reset All');
      writeln('F11 --> manage players');
      writeln('F1 --> Keep on autoing');
      writeln('--- End Menu ---  ');
      writeln('');
      wait(2000);
      repeat
        if IsFKeyDown(9) then        //status
        begin
          for i:=0 to High(players) do
            writeln(IntToStr(i)+': '+Players[i].Nick+' - '+BoolToStr(Players[i].Active));
        end;

        if IsFKeyDown(10) then //Reset All
        begin
          for i:= 0 to High(Players) do
            Players[i].Active := true;
          writeln('Reset all :) ');
        end;

        if IsFKeyDown(11) then // Manage Players
        begin

        end;

        if IsFKeyDown(1) then break;
     until(false)
     writeln('Restarting to auto :)');
     LoginPlayer;
    end;

    {$ELSE}

    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    Procedure EasyRC;
    var
      i, h1, h2, x, y:integer;
      s, str: string;
    begin
      if not LoggedIn then exit;
      if IsFKeyDown(12) then
      begin
        RMDebug('Trying to use Easy RC');
        h1 := GetClientWindowHandle;
        GetMousePos(x, y);
        SetClientPos(False);
        Disguise('RM Easy RC');
        if FindWindowTitlePart('RM Easy RC', false) then writeln('Using Easy RC');
        h2 := GetClientWindowHandle;
        SetOnTop(h1, False);
        SetOnTop(h2, True);
        SetClientWindowHandle(h2);
        wait(100);
        ActivateClient;
        wait(100);

        repeat
          s:= ReadLn('What to do?'+chr(13)+'Status / Reset N / Reset All / Proggy / Exit');
          lowercase(s);
          if (s = 'exit') or (s = '') then break;

          if s= 'status' then
          begin
            for i:= 0 to High(Players) do
              if not Players[i].Active then str:= str+chr(13)+Players[i].Name;
            readln('these are set to false: '+chr(13)+str+chr(13)+'Press ok');
          end;


          if s = 'proggy' then
          begin
            Readln(ProggyStr+chr(13)+'Press ok');
          end;

          if Pos('reset', s) > 0 then
          begin
            str := TrimLetters(Trim(s));
            if str = '' then
            begin
              for i:= 0 to High(Players) do
                Players[i].Active:= True;
              ReadLn('All Players Active'+chr(13)+'Press ok');
            end else
            try begin
              i:= StrToInt(str);
              Players[i].Active := True;
              Readln('activated player: '+str+chr(13)+'Press ok');
            end except break end;
          end;
        until(false)

        SetOnTop(h2, False);
        SetOnTop(h1, True);
        SetClientWindowHandle(h1);
        ActivateClient;
        MMouse(x, y, 2, 2);
        wait(3000);
        Disguise(' A: '+IntToStr(PlayersActive)+'/'+IntToStr(Length(Players))+' Loads: '+IntToStr(loads));
        RMDebug('Done using Easy RC');
      end;
    end;
    {$ENDIF}


    type
      MyChat = record
      Chatter: TStringArray;
      Said: TStringArray;
      LastResponded: integer;
    end;
    var
      Trigger: Array of Array[0..1] of TStringArray; //questions, could make more triggers... if i
      Answers: Array of TStringArray;                //find i need them
      RMTalks: MyChat;
      Responses: Integer;



    // to setup the questions qnd qnswers for the auto responder
    procedure SetupRespond;
    begin

      SetLength(RMTalks.Chatter, 8);
      SetLength(RMTalks.Said, 8);

      SetLength(Trigger, 7); //how many questions
      SetLength(Answers, Length(Trigger));
      //you can have as many trigger words and rows as you want
      //you can have as many answers as you want

      Trigger[0][0]:= ['wc', 'woodcutting'];     // trigger words 1
      Trigger[0][1]:= ['lvl', 'level'];          // trigger words 2
    //Trigger[0][2]:= ['','','','','',''];       // trigger words 3
      Answers[0]:= [
                     'My Woodcutting Level is: '+IntToStr(Players[CurrentPlayer].Level[20]), //answer 1
                     'Wc: '+IntToStr(Players[CurrentPlayer].Level[20]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[20])+' wc lvl',                   //answer 3
                     'my wcing lvl is '+IntToStr(Players[CurrentPlayer].Level[20])           //answer 4
                   ]

      Trigger[1][0] := ['axe'];
      Trigger[1][1] := ['which', 'what'];
      Answers[1] := [
                      'I''m using a '+Players[CurrentPlayer].Strings[2]+' axe',
                      Players[CurrentPlayer].Strings[2],
                      'my axe is made out of '+Players[CurrentPlayer].Strings[2]
                    ]

      Trigger[2][0]:= ['good place', 'train'];
      Trigger[2][1]:= ['woodcutting', 'wc'];
      Answers[2] := [
                      'Try Training Woodcutting at Draynor',
                      'Draynor', 'Varrock', 'Edgy', 'Fally',
                      'Try Training Woodcutting at Edgeville',
                      'Try Training Woodcutting at Varrock Palace',
                      'Try Training Woodcutting at South of Falador'
                    ]
                   
                   
      Trigger[3][0]:= ['fish', 'fishing', '><>', '<><'];     // trigger words 1
      Trigger[3][1]:= ['lvl', 'level', 'levl', 'lvel'];          // trigger words 2
    //Trigger[3][2]:= ['','','','','',''];       // trigger words 3
      Answers[3]:= [
                     'My Fishing Level is: '+IntToStr(Players[CurrentPlayer].Level[17]), //answer 1
                     'Fishing: '+IntToStr(Players[CurrentPlayer].Level[17]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[17])+' '+chr(62)+chr(60)+chr(62)+' lvl',                   //answer 3
                     'my fishy lvl is '+IntToStr(Players[CurrentPlayer].Level[17])           //answer 4
                   ]


      Trigger[5][0]:= ['place', 'train'];
      Trigger[5][1]:= ['fishing', '><>', 'fish'];
      Answers[5] := [
                      'Try Training fishing at Draynor',
                      'Draynor', 'Edgy', 'Al-Kharid', 'Karamja',
                      'Try Training fishing at Edgeville',
                      'Try Training fishing at Al-Kharid, close to bank',
                      'Try Training fishing at lumbridge'
                    ]

      Trigger[6][0]:= ['hi','hey', 'hello', 'sup?'];     // trigger words 1
      Trigger[6][1]:= [''];          // trigger words 2
      Answers[6]:= ['hi','hey', 'hello', 'sup?', 'how do you do?'] ;
    end;

    //from srl, modded for any line
    function GetChatTextLine(var chat: string; line:integer): Boolean;
    var
      x, y: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      if findcolor(x, y, 16711680, textp.x, textp.y, textp.x + 200, textp.y + 14) then
      begin
        chat := LowerCase(Trim(GetTextAtEx(x - 3, textp.y - 2, 0, SmallChars, False,

          False, -1, 1, 16711680, 60, False, tr_allChars)));
        Result := True;
      end;
    end;

    //from srl, modded for any line
    function GetChatterLine(var name: string; line:integer): Boolean;
    var
      i: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      name := LowerCase(Trim(GetTextAtEx(textP.x - 2, textP.y - 2, 0, SmallChars, False, False, 0, 1,
        0, 60, False, tr_allChars)))
      i := Pos(':', name)
      if (i <> 0) then
      begin
        Delete(name, i, i);
        Result := True;
      end;
    end;

    //my responder, used as antiban to look more human
    procedure RMRespond;
    var
      str: string;
      i, h, t, k, triggered:integer;
      TSA:TStringArray;
    begin
      if not LoggedIn then exit;
      if (TimeFromMark(RMTalks.LastResponded) < 60000+Random(30000)) then exit;


      SetLength(TSA, 8)
      str:='';
      TSA:=['', '', '', '', '', '', '', ''];
      RMTalks.said := ['', '', '', '', '', '', '', ''];
      triggered := 0;

      // Getting text on all the lines
      for i:= 7 DownTo 0 do
      begin
        GetChatterLine(RMTalks.Chatter[i], i+1);
        if Pos(Lowercase(Players[CurrentPlayer].Nick), Lowercase(RMTalks.Chatter[i])) > 0 then
          break;     //if we already answered, it means we already checked further up.
        GetChatTextLine(RMTalks.said[i], i+1);
        TSA[i] := RMTalks.said[i];
      end;

        for i:=High(TSA) DownTo 0 do  //all text lines
          for h:= 0 to High(Trigger) do  //questions
          begin
            triggered:= 0;
            for t:=0 to High(Trigger[h]) do  //How many triggers

              for k:=0 to High(Trigger[h][t]) do //specific trigger

                if Pos(Trigger[h][t][k], TSA[i]) > 0 then
                begin
                  Inc(triggered);
                  if triggered >= 2 then
                  begin

                    Inc(Responses);
                    str:=(Answers[h][Random(Length(Answers[h]))]);

                    TypeSend(AddMistakes(str, RandomRange(10, 30)));

                    RMDebug('Question: '+Trigger[h][0][0]+ ' ' + Trigger[h][t][k]);
                    RMDebug('Responding: ' + str);

                    str := '';
                    MarkTime(RMTalks.LastResponded);
                    triggered := 0;
                    SetupRespond;

                    exit;
                  end;  //end if
                  break;
                end;  //end if
                //end k loop
          end; //end h loop
        //end of i loop
    end;

    //making sure we solve those annoying randoms :)
    Function NoRandoms: boolean;
    var
      x, y:integer;
      s:string;
    begin
      if not LoggedIn then exit;
      Result := False;
      GetMousePos(x, y);
      if UseResponder then RMRespond;
      if ClickToContinue then
      begin
        MMouse(x, y, 3, 3);
        Result := True;
      end;
      if FindNormalRandoms then Result:=true;
      if FindFight then
      begin
        //none of the run aways check for randoms....

          case random(4) of
            0: s:='n';
            1: s:='w';
            2: s:='s';
            3: s:='e';
          end;

        RMDebug('running to ' + s + ' and waiting for 8 - 10 s');
        RunTo(s, True);
        SleepAndMoveMouse(RandomRange(8000, 10000));

        case s of
          'n': s:= 'S';
          's': s:= 'N';
          'w': s:= 'E';
          'e': s:= 'W';
        end;

        RMDebug('Returning to ' + s);
        RunTo(s, True);

        Result:=True;

        NoRandoms;
      end;

      EasyRc;

    end;



    //Progress report
    procedure Proggy;
    var
      JX2, i, i2, xph:integer;
      str: string;
    begin
      ClearReport;
      SRLRandomsReport;

      AddToReport('');
      AddToReport('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      AddToReport('[              By Rasta Magician          ]');
      AddToReport('[=========================================]');
      AddToReport('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']')
      AddToReport('[ '+ Padr(TimeRunning, 40)+']');
      AddToReport('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      AddToReport('[ ' + Padr('Current Player: ' + Players[CurrentPlayer].Nick, 40) + ']');
      AddToReport('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      AddToReport('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      AddToReport('[ '+ Padr('Mining XP: '+IntToStr(ClayMined*5), 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']');
      xph := Round((ClayMined*40*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Lids: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*37.5*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Plant Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*33*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Bowls: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*25*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Dishes: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*12.6*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']')
      AddToReport('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      AddToReport('[================== RM ===================]');

      ProggyStr := '';
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[              By Rasta Magician          ]');
      ProggyStr := ProggyStr + chr(13) + ('[=========================================]');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr(TimeRunning, 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[================== RM ===================]');


      AddToReport('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      AddToReport('[-----------------------------------------]');

      ProggyStr := ProggyStr + chr(13) + ('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');

      for i:= 0 to HowManyPlayers - 1  do
      begin
        str := '[ ' + Padr(Players[i].Nick, 4) + ' | ';
        if Players[i].Active then
          str := str + 'T | '
        else
          str := str + 'F | ';

        str := str + Padr(IntToStr(Players[i].Banked), 2) + ' | ' + Padr(IntToStr(Players[i].Worked), 5) +'| ';
        str := str + Padr(Players[i].Rand, 16) + ' ]';
        AddToReport(str);
        ProggyStr := ProggyStr + chr(13) + str;
      end;

      str := ScriptName+' '+Version
      i := length(str);
      if (i mod 2) <> 0 then
        i2 := 1;

      AddToReport('[-----------------------------------------]');
      AddToReport('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      AddToReport('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      if SaveProggyToFile then
      begin
        JX2 := ReWriteFile((ScriptPath + ScriptName +' '+ Version + '.txt'), False);
        WriteFileString(JX2, ProggyStr);
        CloseFile(JX2);
        RMDebug('Progress report saved to: ' + ScriptPath + ScriptName + ' ' + Version + '.txt');
      end;
      Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
    end;

    //Antiban, basically just picks up the mouse, increases mouse speed
    //clicks a tab and resets everything back to the original.
    //just to make sure we stay logged in.
    procedure FastSwitchTabs;
    var x, y, i, h:integer;
    begin
      if not LoggedIn then exit;
      RMDebug('Inactive Move');
      GetMousePos(x, y);
      PickUpMouse;
      IncEx(MouseSpeed, 10);
      i := GetCurrentTab;
      repeat
        h := 1+Random(12);
      until(h <> i)
      GameTab(h);
      wait(500+Random(500));
      GameTab(i);
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 10);
    end;

    //will take "Time" + Random(1000) to complete the action, will return to original angle
    // By Rasta Magician, heavily based on RandomMovement by Krazy_Meerkat
    // will always move the compass around unlike in RandomMovement
    procedure CompassMove(Time:Integer);
    var
      Keys: array of Integer;
      I: Integer;
      Deg: Extended;
    begin
      if not LoggedIn then exit;
      Keys := [VK_RIGHT, VK_LEFT];
      I := Random(2);
      ActivateClient;
      Deg := rs_GetCompassAngleDegrees;
      Wait(100 + random(50));
      KeyDown(Keys[I]);
      Wait(Round(Time/2) + random(500));
      KeyUp(Keys[I]);
      Wait(Round(Time/2) + random(500));
      MakeCompass(FloatToStr(Deg));
    end;

    //Random Right Click Return by Rasta Magician,
    //Will right-click anywhere on he main map, choose "Cancel" and return the
    //mouse to it's original position
    procedure RRClickReturn;
    var x, y:integer;
    begin
      if not LoggedIn then exit;
      IncEx(MouseSpeed, 7);
      GetMousePos(x, y);
      ActivateClient;
      Mouse(MSX1, MSY1, MSX2, MSY2, False);
      wait(100 + Random(50));
      ChooseOption('ancel');
      wait(50 + Random(100));
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 7);
    end;

    //just antiban with a percentage
    Procedure AntiBan(percentage: integer);
    var p: integer;
    begin
      if not Loggedin then exit;
      if random(100) <= percentage then
      begin
        case random(14) of
          0, 1: FastSwitchTabs;
          2, 3: CompassMove(1000);
          4, 5: RRClickReturn;
          6, 7: SleepAndMoveMouse(2000);
          8, 9: HoverSkill('random', false);
          //10, 11: DoEmote(Random(37)+1);
          12, 13: PickUpMouse;
        end;
        Gametab(4);
      end;
    end;

    {$IFDEF SMART}
    Procedure SetupSmart(world: integer);
    begin

      SmartSetupEx(world, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);

    end;
    {$ENDIF}

    //Used to set up all the necessary things before the script starts running
    Procedure SetupScript;
    begin
      ClearDebug;
      Disguise(ScriptName + ' ' + Version);
      {$IFDEF SMART}
        SetupSmart(100);
        {$IFDEF Reflection}
          RMDebug('Checking hooks, if they''re outdated un-define reflection to run this');
          SetupReflection;
        {$ENDIF}
      {$ENDIF}
      SetupSRL;
      DeclarePlayers;
      if UseResponder then SetupRespond;

      SRLID := YourSRLID;
      SRLPassword := YourSRLPass;
      ScriptID := MyScriptID;
      ActivateClient;
      LoginPlayer;
    end;


    //for prepqring the playe and making sure he has all the requirements
    procedure SetupPlayer;
    begin
      if not LoggedIn then exit;
      SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
      CloseWindow;
      MarkTime(Worked);
      GameTab(4);
      wait(500);
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('Player has '+IntToStr(JugCount)+' jugs');
      SetAngle(true);
    end;

    //switching palyers, or in case of jsut one player making it rest
    // "not playing" for a while decreases the chance of getting a lot of randoms
    procedure SwitchPlayers;
    var Time: integer;
    begin
      if (TimeFromMark(Worked) >= (WorkTime + Random(3*60*1000)) )or(not LoggedIn) then
      begin
        if PlayersActive > 1 then
          NextPlayer(Players[CurrentPlayer].Active)
        else begin
            if not LoggedIn then TerminateScript;
            LogOut;
            RMDebug('resting....');
            Time := GetSystemTime;
            while (GetSystemTime - Time < RestTime) do
              Disguise('Rest: '+IntToStr(Round((RestTime - (GetSystemTime - Time))/1000))+' s');

            Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
            ActivateClient;
            LoginPlayer;
            Inc(Rested);
            MarkTime(Worked);
        end;
        SetupPlayer;
      end;
    end;

    procedure LoadDTMS;
    begin

      ClayDTM := DTMFromString('78DA6374626260E066644006D31BC218FE036' +
           '990E87F206004A96146550391859140DA03A8868D801A2FA01A4E' +
           '026A40760910506389E9660C353640351CF8D50000D181089F');

      SoftDTM := DTMFromString('78DA63B4676260E060644006B9417C0CFF813' +
           '448F43F10303A01D5FC6740038C4824900E00AA6163C4AFC605A8' +
           '4698801A33A01A3E026A2C816A5808A8F106AAE125A0C69AB07B0' +
           '05BEC0953');

      JugDTM := DTMFromString('78DA637462626078C68002DA6A6B184480342' +
           '310FF0702465BA09AEB0C6880918115AA06CCF304AAB949408D37' +
           '50CD3D026ABC806ADE1150630754F391801A4BA09AA744B8F93DA' +
           '61A0674735E1350630154F39C801A1BEC7E4751E38C3D9C51D4F8' +
           '03D53C2242CD1322ECFA44408D37613703001F0C187A');

      WJugDTM := DTMFromString('78DA63CC656260B8CB80024ACBCF31F003694' +
           '620FE0F048CE94035D719D00023032B540D985784690E869A72A0' +
           '9AD704D46403D57C22A02609A8E60501352037DFC7AF060021030' +
           'F2C');

           
    end;

    procedure FreeDTMS;
    begin
      FreeDTM(ClayDTM);
      FreeDTM(SoftDTM);
      FreeDTM(JugDTM);
      FreeDTM(WJugDTM);
    end;

    //Just a few things it does when the script ends.
    procedure ScriptTerminate;
    begin
      Proggy;
      FreeDTMS;
      writeln('');
      writeln('Thank for using my script, Rasta Magician');
      writeln('Script stopped at ' + TheTime + ' ' + TheDate(3));
      writeln('Please post the Progress Report');
    end;



    function AutoColorOven: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.60, 8.58);

        if not (FindColorsTolerance(arP, 661291, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
     // end except end;
    end;

    function AutoColorOven2: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.13, 1.16);

        if not (FindColorsTolerance(arP, 1126745, MMX1, MMY1, MMX2, MMY2, 4)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
    //  end except end;
    end;

    function AutoColorPick: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.38, 1.13);

        if not (FindColorsTolerance(arP, 2903683, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result. - pick');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - pick');
     // end except end;
    end;

    function AutoColorWaterSymbol: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.03, 0.32);

        if not (FindColorsTolerance(arP, 15549204, MMX1, MMY1, MMX2, MMY2, 10)) then
        begin
          Writeln('Failed to find the color, no result. - Water');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              //Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - water');
    //  end except end;
    end;

    procedure DoTheColors;
    var x, y: integer;
    begin
    {
      PickColor := AutoColorPick;
      LadderColor := FindLadderColor;
      OvenColor := AutoColorOven;
     
      if OvenColor = 0 then
        OvenColor := AutoColorOven2;
     
      if LadderColor = 0 then
        LadderColor := AutoColorWaterSymbol;
        }

    end;


    Function Relocate(place: string): boolean;
    var
      ATPA: T2DPointArray;
      TPA : TPointArray;
      TP: TPoint;
      Color: boolean;
      Str: string;
    begin
      if GetMMLevels('run', str) >= 25 then
        SetRun(true);

      Color := True;
      {$IFDEF Reflection}
        RMDebug('[REF] Relocating.. '+place);
        Color := False;
        RMDebug('before case');
        case lowercase(place) of
          'mine': if not WalkToTile(Point(2939, 3282), 1, 2) then Color := true;
          'water': if not WalkToTile(Point(2933, 3280), 1, 2) then Color := true;
          'wheel': if not WalkToTile(Point(2936, 3288), 1, 2) then Color := true;
          'oven': if not WalkToTile(Point(2930, 3290), 1, 2) then Color := true;
        end;
        RMDebug('aafter case');
        if Color then
          RMDebug('reflection failed, trying color')
        else begin
          RMDebug('At '+place);
          Result := true;
          wait(750+random(500));
          exit;
        end;
      {$ENDIF}
     
      Result := true;
      RMDebug('Relocating.. '+place);
      case lowercase(place) of
        'mine':
          begin
            if PickColor = 0 then
            begin
              PickColor := AutoColorPick;
              if PickColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, PickColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 1);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY2));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY2));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y + 8, 3, 3, true);
            end else Result := false;
          end;
       
        'water':
          begin
            if LadderColor = 0 then
            begin
              LadderColor := FindLadderColor;
              if LadderColor = 0 then
                LadderColor := AutoColorWaterSymbol;
              if LadderColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, LadderColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPASize(ATPA, true);
              TP := MiddleTPA(ATPA[0]);
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'wheel':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY1));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY1));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'oven':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              SortTPAFrom(TPA, IntToPoint(MMX1, MMCY));
              TP := TPA[0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
      end;

      if not Result then
      begin
        RMDebug('failed at relocating to ' + place);
        exit;
      end;
     
      FFlag(0);
      wait(1000+Random(750));

     // RMDebug('Arrived at destination. We hope to see you again soon, with RM Airways');
    end;

    function FindIt(var fx, fy: Integer; CTS, Color, Tol, H, W:integer; SCS2M1, SCS2M2:extended; text:TStringArray): Boolean;
    var
      arP: TPointArray;
      ararP: T2DPointArray;
      tmpCTS, i, arL: Integer;
      P: TPoint;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(SCS2M1, SCS2M2);

      if not(FindColorsTolerance(arP, Color, MSX1, MSY1, MSX2, MSY2, Tol)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      SortTPAFrom(arP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arP, H, W);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 0, 0);
        Wait(350);
        if IsUpTextMultiCustom(text) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;



    Function Find(s: string): boolean;
    var x, y:integer;
    begin
      case lowercase(s) of
        'clay': Result := FindIt(x, y, 2, 7250880, 9, 10, 10, 0.03, 1.24, ['ine', 'ock']);
        'water': Result := FindIt(x, y, 1, 11172192, 10, 5, 5, 0.2, 0.2, ['ink']);
        'wheel': Result := FindIt(x, y, 2, 8290185, 2, 20, 20, 0.08, 0.25, ['otter''s', 'heel']);
        'oven': Result := FindIt(x, y, 4, 660057, 4, 5, 5, 0.06, 0.40, ['ven']);
      end;
     
      if Result then
        Mouse(x, y, 0, 0, true);
      RMDebug('Looking for '+s+'... Found? '+BoolToStr(Result));
    end;

    Procedure MineIt;
    var x, y, t, tries:integer;
    begin
      if not LoggedIn then exit;
      if InvFull then exit;
      if not Relocate('mine') then exit;
     
      MarkTime(t);
      repeat
        if not LoggedIn then break;
       
        {
        if FindDTM(GemDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          DropItem(CoordsToItem(x, y));
          wait(200+Random(100));
          Inc(ReportVars[2]);
        end;
        }

       
        if InvFull then break;
        if Find('clay') then
        begin
          Tries := 0;

          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('swing your'))
         
          if GetSystemTime - x >= 5000 then Continue;
         
          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('manage to mine'))

        end else Inc(Tries);
       
        if Tries >= 5 then
          if not Relocate('mine') then
            break;
           
      until(InvFull)or(TimeFromMark(t) >= (60*5000))
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      ClayMined := ClayMined + ClayCount;
      ReportVars[1] := ClayCount;
      IncEx(Players[CurrentPlayer].Integers[0], ClayCount);
    end;

    Procedure SoftenClay;
    var x, y, WaterCount, ClayCount, i, Time:integer;
    begin
      if not LoggedIn then exit;
      if not InvFull then exit;
     
      Gametab(4);
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      if ClayCount <= 0 then exit;
     
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('2 - Player has '+IntToStr(JugCount)+' jugs');
     
      if JugCount <= 0 then
      begin
        RMDebug('Player has no jugs!');
        Players[CurrentPlayer].active := false;
        LogOut;
        exit;
      end;
     
      Time := GetSystemTime;
      if not Relocate('water') then exit;
      repeat
        if not LoggedIn then break;
       
        if not FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then break;

        if FindDTM(JugDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
          wait(350+Random(500));
          if Find('water')then
          begin
            FFlag(0);
            Wait(355*JugCount+500+Random(500));
            WaterCount := CountItems(WJugDTM, 'dtm', []);
            RMDebug(IntToStr(WaterCount)+' jugs are filled with water');

            if not WaterCount = JugCount then
            begin
              for i:= 0 to 5 do
              begin
                wait(500);
                WaterCount := CountItems(WJugDTM, 'dtm', []);
                if WaterCount = JugCount then break;
              end;
              if not WaterCount = JugCount then
              begin
                RMDebug('something wrong with filling the jugs...');
                Continue;
              end;
            end;

            ClayCount := CountItems(ClayDTM, 'dtm', []);
            RMDebug('Player has '+IntToStr(ClayCount)+' clay');

            Mouse(x, y, 3, 3, true); //clicking jug again
         
            if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              Mouse(x, y, 3, 3, true);

              wait(200+random(100));
              MMouse(247, 406, 18, 15);
              for i:= 0 to 9 do
              begin
                wait(100);
                if GetColor(254, 412) = 938605 then break;
              end;

              GetMousePos(x,y);
              Mouse(x, y, 0, 0, false);
              wait(250);
              if not ChooseOption('All') then
              begin
                RMDebug('problem choosing option');
                Continue;
              end;

              wait(1000+ 750*WaterCount + Random(500));

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  for i:= 0 to 5 do
                  begin
                    wait(500);

                    if CountItems(ClayDTM, 'dtm', []) = 0 then
                      exit;
                    if CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                      break;


                  end;
                end else break;

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  RMDebug('Problem softening the clay....');
                  Continue;
                end;
            end;
           
          end else begin
            RMDebug('Couldn''t find the water');
            if not Relocate('water') then break;
            Continue;
          end;
        end else begin
          RMDebug('found no jug');
          LogOut;
          Players[CurrentPlayer].Active := false;
          exit;
        end;

      until(GetSystemTime - Time >= 60*5000)
    end;

    Procedure MoldClay;
    var
      x, y, i, SoftCount, Time:integer;
      TPA: TPointArray;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;

      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      SoftCount := CountItems(SoftDTM, 'dtm', []);
      if SoftCount <= 0 then exit;

      if not Relocate('wheel') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      repeat
        if not LoggedIn then break;
       
        CFound := false;
        Gametab(4);
        if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
         
          if Find('wheel') then
          begin
            FFlag(0);
            for i:= 0 to 9 do
            begin
              wait(200);
              if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
              begin
                CFound := true;
                break;
              end;
            end;

            if not CFound then continue;
             
            if FindColorsTolerance(TPA, 0, 61, 439, 467, 457, 0) then
            begin
              SortTPAFrom(TPA, TP);
              Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
              wait(750);
              if not ChooseOption('ake X') then
              begin
                RMDebug('Problems choosing X');
                Continue;
              end else begin
                wait(350+Random(250));
                TypeSend(IntToStr(RandomRange(28, 99)));

                i := GetSystemTime;
                repeat
                  wait(250);
                  Antiban(RandomRange(2,4));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 750*SoftCount)

                i := GetSystemTime;
                repeat
                  wait(100);
                  Antiban(RandomRange(2,5));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 30000)

                if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  RMDebug('Something went wrong with moudling');
                  Continue;
                end;
              end;
            end;
          end;
        end else begin
          RMDebug('could not find soft clay');
          break;
        end;

        SoftCount := CountItems(SoftDTM, 'dtm', []);
        if SoftCount <= 0 then break;

        if not Relocate('wheel') then break;
      until (false);
    end;

    Procedure FireClay;
    var
      i, x, y, Time, TimeIt: integer;
      TPA, CTPA: TPointArray;
      TIA: TIntegerArray;
      TB: TBox;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;


      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if not Relocate('oven') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      Gametab(4);
      Time := GetSystemTime;
      repeat
        if not LoggedIn then break;
        CFound := false;
       
        for i:= 28 Downto 1 do
        begin
          TB := InvBox(i);
          if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
          begin
            SetLength(CTPA, 6);
            CTPA[0] := Point(TB.x1 + 20, TB.y1 + 5);
            CTPA[1] := Point(TB.x1 + 20, TB.y1 + 10);
            CTPA[2] := Point(TB.x1 + 20, TB.y1 + 15);
            CTPA[3] := Point(TB.x1 + 20, TB.y1 + 20);
            CTPA[4] := Point(TB.x1 + 20, TB.y1 + 25);
            CTPA[5] := Point(TB.x1 + 20, TB.y1 + 30);
            TIA := GetColors(CTPA);
          end;
        end;

        if Find('oven') then
        begin
          FFlag(0);

          for i:= 0 to 9 do
          begin
            wait(200);
            if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
            begin
              CFound := true;
              break;
            end;
          end;

          if not CFound then continue;

          if FindColorsTolerance(TPA, 0, 61, 438, 467, 457, 0) then
          begin
            SortTPAFrom(TPA, TP);
            Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
            wait(100);
            if not ChooseOption('ake X') then
            begin
              RMDebug('Problems choosing X');
              Continue;
            end else begin
              wait(350+Random(250));
              TypeSend(IntToStr(RandomRange(28, 99)));

              wait(1000);
              TimeIt := GetSystemTime;
              repeat
                wait(250);
               
                if FindNPCChatText('t have any', Nothing) then
                  break;
               
                if IsChatBoxTextAnyLine('have any more', 0) then
                  break;
                 
                 
                if random(100) <= 5 then CompassMove(1000);
                NoRandoms;
              until(GetSystemTime - TimeIt >= (4000*26))

              if not IsChatBoxTextAnyLine('have any more', 0) then
                if not FindNPCChatText('t have any', Nothing) then
                  Continue;
                 
              RMDebug('done waiting for fired stuff');
              for x := 0 to 9 do
              begin
                if not IsSameIntArray(TIA, GetColors(CTPA)) then
                  break;
                wait(750);
              end;
             
              RMDebug('all is done, dropping now');
              for i:= 1 to 28 do
              begin
                if i mod 3 = 0 then
                  NoRandoms;
                TB := InvBox(i);
                if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
                begin
                  DropItem(i);
                  wait(200+Random(150));
                end;
              end;
              Inc(Loads);
              Inc(Players[CurrentPlayer].Banked);
              Inc(ReportVars[0]);
              RMDebug('done dropping');
              break;
            end;
          end else begin
            RMDebug('Could not find the text color....');
            Continue;
          end;
        end else begin
          RMDebug('Problems Finding the Oven');
          if not Relocate('oven') then break;
          Continue;
        end;

        if GetSystemTime - Time >= 60000 then
          break;
      until(false)

    end;

    begin
      SetupScript;
      SetupPlayer;
      DoTheColors;
      LoadDTMS;

      repeat
        if not LoggedIn then break;
        MineIt;
        SoftenClay;
        MoldClay;
        FireClay;
        Proggy;
        SwitchPlayers;
      until(false)


    end.{==============================================================================]
    [==============================================================================]
    [                              RM Power Crafter                                ]
    [                                 By: Rasta Magician                           ]
    [==============================================================================]
    [                                  Features                                    ]
    [==============================================================================]
    [ 1. Debug                                                                     ]
    [ 2. AntiRandoms                                                               ]
    [ 3. AntiBan                                                                   ]
    [ 4. Multiplayer                                                               ]
    [ 5. Resting                                                                   ]
    [ 6. Progress Report                                                           ]
    [ 7. Local Control                                                             ]
    [ 8. Responder                                                                 ]
    [ 9. Proggy To File                                                            ]
    [ 10. Smart Cycleing                                                           ]
    [==============================================================================]
    [                                 Description                                  ]
    [==============================================================================]
    [ Mines clay, softens it, molds it into bowls(f2p),                            ]
    [ plant pots or pot lids (with needed quest), then fires the clay, drops it    ]
    [ and repeats the whole thing. All of this happens inside the Crafting Guild   ]
    [                                                                              ]
    [==============================================================================]
    [                               How To Use                                     ]
    [==============================================================================]
    [ 0. You need level 40 crafting                                                ]
    [ 1. Wield a pick                                                              ]
    [ 2. Wear a brown appron                                                       ]
    [ 3. Have jugs in inventory (I suggest 4 jugs)                                 ]
    [                                                                              ]
    [==============================================================================]
    [                               Credits                                        ]
    [==============================================================================]
    [ SRL Team                                                                     ]
    [ Ed, thx for testing                                                          ]
    [==============================================================================]
    [                    RM Power Crafter by Rasta Magician                        ]
    [==============================================================================]
    [==============================================================================}


    {
    add one more text for moulding clay
    mold and fire menu colors changed place
    }



    program RMScript;
    {$DEFINE SMART }
    {$DEFINE Reflection}
    //{$DEFINE FORM }

    {$IFDEF SMART }
    {.include srl/srl/misc/Smart.scar}
    {$ENDIF}
    {.include srl/srl.scar}
    {$IFDEF Reflection}
    {.include SRL\SRL\Reflection\Reflection.scar}
    {$ENDIF}
    {.include srl/srl/skill/mining.scar}

    {$IFDEF FORM }
    {.include srl/srl/misc/users.scar}
    {$ENDIF}

    Const
      WorkTime = (30*60*1000); //10 mins
      RestTime = (3*60*1000); //3 mins
     
      IsMember = true;

      UseDebug = True;
      UseResponder = True;
      SaveProggyToFile = True;
     
      ScriptName = 'RM Power Crafter';
      Version = '2.0';
     
      YourSRLID = '';   //your SRLID
      YourSRLPass = ''; //your SRL Stats pass
      MyScriptID = '1199'; // don't touch

    var
      Rested, Worked, Loads,
      PickColor, LadderColor, OvenColor,
      ClayDTM, SoftDTM, JugDTM, WJugDTM, GemDTM,
      JugCount, ClayCount,
      ClayMined :integer;
      ProggyStr: string;


    function IsSameIntArray(i1, i2:TIntegerArray):boolean;
    var i:integer;
    begin
      Result := false;
      if Length(i1) <> Length(i2) then exit;

      Result := true;
      for i:= 0 to high(i1) do
        if i1[i] <> i2[i] then
          Result := False;
    end;

    //for debugging TPAs, to help me perfect my finders
    //by Wizzup?
    Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;

    Var
       Width, Height, ClientBMP, I, L: Integer;
       xs, ys, xe, ye: Integer;

    Begin
      Try
      Begin
        xe := xs xor xs;
        ye := ys xor ys;
        xs := 1 shl 20;
        ys := 1 shl 20;

        For I := 0 To High(Points) Do
        Begin
          xs := Min(xs, Points[i].X);
          ys := Min(ys, Points[i].Y);

          xe := Max(xe, Points[i].X);
          ye := Max(ye, Points[i].Y);
        End;

        Width := xe - xs;
        Height := ye - ys;

        DisplayDebugImgWindow(0, 0);
        DisplayDebugImgWindow(Width, Height);
        ClientBMP := BitmapFromString(Width, Height, '');

        CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
        For I := 0 To High(Points) Do
          FastSetPixel(ClientBMP, Points[i].X - xs, Points[i].Y - ys, 255);
        If BmpName <> '' Then
          SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
        SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
        DisplayDebugImgWindow(Width, Height);

        FreeBitmap(ClientBMP);
      End
      Except
        FreeBitmap(ClientBMP);
      End;
      Result := True;
    End;

    //Declaring players
    Procedure DeclarePlayers;
    begin

      {$IFDEF Form}
        SRLPlayerForm(True, [], [], [], []);
        exit
      {$ENDIF}
     
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='RMagician';
      Players[0].Pass :='Th1sIsN0tMyPW!';
      Players[0].Nick :='agi';
      Players[0].Active := True;


    end;

    //Used for debugging and finding errors
    Procedure RMDebug(s:string);
    var name:string;
    begin
      if not UseDebug then exit;
      try name := Players[CurrentPlayer].Name +' : '; except name:= '' end;
      writeln(name+TheTime+' - '+s);
    end;


    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    {$IFDEF SMART}
    procedure Proggy; forward;
    Procedure EasyRC;
    var i:integer;
    begin
      if not IsFKeyDown(12) then exit;
      LogOut;

      Proggy;
      writeln('Fresh proggie on your right');
      writeln('');

      writeln('--- MENU ---');
      writeln('F9 --> Status');
      writeln('F10 --> Reset All');
      writeln('F11 --> manage players');
      writeln('F1 --> Keep on autoing');
      writeln('--- End Menu ---  ');
      writeln('');
      wait(2000);
      repeat
        if IsFKeyDown(9) then        //status
        begin
          for i:=0 to High(players) do
            writeln(IntToStr(i)+': '+Players[i].Nick+' - '+BoolToStr(Players[i].Active));
        end;

        if IsFKeyDown(10) then //Reset All
        begin
          for i:= 0 to High(Players) do
            Players[i].Active := true;
          writeln('Reset all :) ');
        end;

        if IsFKeyDown(11) then // Manage Players
        begin

        end;

        if IsFKeyDown(1) then break;
     until(false)
     writeln('Restarting to auto :)');
     LoginPlayer;
    end;

    {$ELSE}

    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    Procedure EasyRC;
    var
      i, h1, h2, x, y:integer;
      s, str: string;
    begin
      if not LoggedIn then exit;
      if IsFKeyDown(12) then
      begin
        RMDebug('Trying to use Easy RC');
        h1 := GetClientWindowHandle;
        GetMousePos(x, y);
        SetClientPos(False);
        Disguise('RM Easy RC');
        if FindWindowTitlePart('RM Easy RC', false) then writeln('Using Easy RC');
        h2 := GetClientWindowHandle;
        SetOnTop(h1, False);
        SetOnTop(h2, True);
        SetClientWindowHandle(h2);
        wait(100);
        ActivateClient;
        wait(100);

        repeat
          s:= ReadLn('What to do?'+chr(13)+'Status / Reset N / Reset All / Proggy / Exit');
          lowercase(s);
          if (s = 'exit') or (s = '') then break;

          if s= 'status' then
          begin
            for i:= 0 to High(Players) do
              if not Players[i].Active then str:= str+chr(13)+Players[i].Name;
            readln('these are set to false: '+chr(13)+str+chr(13)+'Press ok');
          end;


          if s = 'proggy' then
          begin
            Readln(ProggyStr+chr(13)+'Press ok');
          end;

          if Pos('reset', s) > 0 then
          begin
            str := TrimLetters(Trim(s));
            if str = '' then
            begin
              for i:= 0 to High(Players) do
                Players[i].Active:= True;
              ReadLn('All Players Active'+chr(13)+'Press ok');
            end else
            try begin
              i:= StrToInt(str);
              Players[i].Active := True;
              Readln('activated player: '+str+chr(13)+'Press ok');
            end except break end;
          end;
        until(false)

        SetOnTop(h2, False);
        SetOnTop(h1, True);
        SetClientWindowHandle(h1);
        ActivateClient;
        MMouse(x, y, 2, 2);
        wait(3000);
        Disguise(' A: '+IntToStr(PlayersActive)+'/'+IntToStr(Length(Players))+' Loads: '+IntToStr(loads));
        RMDebug('Done using Easy RC');
      end;
    end;
    {$ENDIF}


    type
      MyChat = record
      Chatter: TStringArray;
      Said: TStringArray;
      LastResponded: integer;
    end;
    var
      Trigger: Array of Array[0..1] of TStringArray; //questions, could make more triggers... if i
      Answers: Array of TStringArray;                //find i need them
      RMTalks: MyChat;
      Responses: Integer;



    // to setup the questions qnd qnswers for the auto responder
    procedure SetupRespond;
    begin

      SetLength(RMTalks.Chatter, 8);
      SetLength(RMTalks.Said, 8);

      SetLength(Trigger, 7); //how many questions
      SetLength(Answers, Length(Trigger));
      //you can have as many trigger words and rows as you want
      //you can have as many answers as you want

      Trigger[0][0]:= ['wc', 'woodcutting'];     // trigger words 1
      Trigger[0][1]:= ['lvl', 'level'];          // trigger words 2
    //Trigger[0][2]:= ['','','','','',''];       // trigger words 3
      Answers[0]:= [
                     'My Woodcutting Level is: '+IntToStr(Players[CurrentPlayer].Level[20]), //answer 1
                     'Wc: '+IntToStr(Players[CurrentPlayer].Level[20]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[20])+' wc lvl',                   //answer 3
                     'my wcing lvl is '+IntToStr(Players[CurrentPlayer].Level[20])           //answer 4
                   ]

      Trigger[1][0] := ['axe'];
      Trigger[1][1] := ['which', 'what'];
      Answers[1] := [
                      'I''m using a '+Players[CurrentPlayer].Strings[2]+' axe',
                      Players[CurrentPlayer].Strings[2],
                      'my axe is made out of '+Players[CurrentPlayer].Strings[2]
                    ]

      Trigger[2][0]:= ['good place', 'train'];
      Trigger[2][1]:= ['woodcutting', 'wc'];
      Answers[2] := [
                      'Try Training Woodcutting at Draynor',
                      'Draynor', 'Varrock', 'Edgy', 'Fally',
                      'Try Training Woodcutting at Edgeville',
                      'Try Training Woodcutting at Varrock Palace',
                      'Try Training Woodcutting at South of Falador'
                    ]
                   
                   
      Trigger[3][0]:= ['fish', 'fishing', '><>', '<><'];     // trigger words 1
      Trigger[3][1]:= ['lvl', 'level', 'levl', 'lvel'];          // trigger words 2
    //Trigger[3][2]:= ['','','','','',''];       // trigger words 3
      Answers[3]:= [
                     'My Fishing Level is: '+IntToStr(Players[CurrentPlayer].Level[17]), //answer 1
                     'Fishing: '+IntToStr(Players[CurrentPlayer].Level[17]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[17])+' '+chr(62)+chr(60)+chr(62)+' lvl',                   //answer 3
                     'my fishy lvl is '+IntToStr(Players[CurrentPlayer].Level[17])           //answer 4
                   ]


      Trigger[5][0]:= ['place', 'train'];
      Trigger[5][1]:= ['fishing', '><>', 'fish'];
      Answers[5] := [
                      'Try Training fishing at Draynor',
                      'Draynor', 'Edgy', 'Al-Kharid', 'Karamja',
                      'Try Training fishing at Edgeville',
                      'Try Training fishing at Al-Kharid, close to bank',
                      'Try Training fishing at lumbridge'
                    ]

      Trigger[6][0]:= ['hi','hey', 'hello', 'sup?'];     // trigger words 1
      Trigger[6][1]:= [''];          // trigger words 2
      Answers[6]:= ['hi','hey', 'hello', 'sup?', 'how do you do?'] ;
    end;

    //from srl, modded for any line
    function GetChatTextLine(var chat: string; line:integer): Boolean;
    var
      x, y: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      if findcolor(x, y, 16711680, textp.x, textp.y, textp.x + 200, textp.y + 14) then
      begin
        chat := LowerCase(Trim(GetTextAtEx(x - 3, textp.y - 2, 0, SmallChars, False,

          False, -1, 1, 16711680, 60, False, tr_allChars)));
        Result := True;
      end;
    end;

    //from srl, modded for any line
    function GetChatterLine(var name: string; line:integer): Boolean;
    var
      i: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      name := LowerCase(Trim(GetTextAtEx(textP.x - 2, textP.y - 2, 0, SmallChars, False, False, 0, 1,
        0, 60, False, tr_allChars)))
      i := Pos(':', name)
      if (i <> 0) then
      begin
        Delete(name, i, i);
        Result := True;
      end;
    end;

    //my responder, used as antiban to look more human
    procedure RMRespond;
    var
      str: string;
      i, h, t, k, triggered:integer;
      TSA:TStringArray;
    begin
      if not LoggedIn then exit;
      if (TimeFromMark(RMTalks.LastResponded) < 60000+Random(30000)) then exit;


      SetLength(TSA, 8)
      str:='';
      TSA:=['', '', '', '', '', '', '', ''];
      RMTalks.said := ['', '', '', '', '', '', '', ''];
      triggered := 0;

      // Getting text on all the lines
      for i:= 7 DownTo 0 do
      begin
        GetChatterLine(RMTalks.Chatter[i], i+1);
        if Pos(Lowercase(Players[CurrentPlayer].Nick), Lowercase(RMTalks.Chatter[i])) > 0 then
          break;     //if we already answered, it means we already checked further up.
        GetChatTextLine(RMTalks.said[i], i+1);
        TSA[i] := RMTalks.said[i];
      end;

        for i:=High(TSA) DownTo 0 do  //all text lines
          for h:= 0 to High(Trigger) do  //questions
          begin
            triggered:= 0;
            for t:=0 to High(Trigger[h]) do  //How many triggers

              for k:=0 to High(Trigger[h][t]) do //specific trigger

                if Pos(Trigger[h][t][k], TSA[i]) > 0 then
                begin
                  Inc(triggered);
                  if triggered >= 2 then
                  begin

                    Inc(Responses);
                    str:=(Answers[h][Random(Length(Answers[h]))]);

                    TypeSend(AddMistakes(str, RandomRange(10, 30)));

                    RMDebug('Question: '+Trigger[h][0][0]+ ' ' + Trigger[h][t][k]);
                    RMDebug('Responding: ' + str);

                    str := '';
                    MarkTime(RMTalks.LastResponded);
                    triggered := 0;
                    SetupRespond;

                    exit;
                  end;  //end if
                  break;
                end;  //end if
                //end k loop
          end; //end h loop
        //end of i loop
    end;

    //making sure we solve those annoying randoms :)
    Function NoRandoms: boolean;
    var
      x, y:integer;
      s:string;
    begin
      if not LoggedIn then exit;
      Result := False;
      GetMousePos(x, y);
      if UseResponder then RMRespond;
      if ClickToContinue then
      begin
        MMouse(x, y, 3, 3);
        Result := True;
      end;
      if FindNormalRandoms then Result:=true;
      if FindFight then
      begin
        //none of the run aways check for randoms....

          case random(4) of
            0: s:='n';
            1: s:='w';
            2: s:='s';
            3: s:='e';
          end;

        RMDebug('running to ' + s + ' and waiting for 8 - 10 s');
        RunTo(s, True);
        SleepAndMoveMouse(RandomRange(8000, 10000));

        case s of
          'n': s:= 'S';
          's': s:= 'N';
          'w': s:= 'E';
          'e': s:= 'W';
        end;

        RMDebug('Returning to ' + s);
        RunTo(s, True);

        Result:=True;

        NoRandoms;
      end;

      EasyRc;

    end;



    //Progress report
    procedure Proggy;
    var
      JX2, i, i2, xph:integer;
      str: string;
    begin
      ClearReport;
      SRLRandomsReport;

      AddToReport('');
      AddToReport('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      AddToReport('[              By Rasta Magician          ]');
      AddToReport('[=========================================]');
      AddToReport('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']')
      AddToReport('[ '+ Padr(TimeRunning, 40)+']');
      AddToReport('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      AddToReport('[ ' + Padr('Current Player: ' + Players[CurrentPlayer].Nick, 40) + ']');
      AddToReport('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      AddToReport('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      AddToReport('[ '+ Padr('Mining XP: '+IntToStr(ClayMined*5), 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']');
      xph := Round((ClayMined*40*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Lids: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*37.5*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Plant Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*33*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Bowls: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*25*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Dishes: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*12.6*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']')
      AddToReport('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      AddToReport('[================== RM ===================]');

      ProggyStr := '';
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[              By Rasta Magician          ]');
      ProggyStr := ProggyStr + chr(13) + ('[=========================================]');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr(TimeRunning, 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[================== RM ===================]');


      AddToReport('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      AddToReport('[-----------------------------------------]');

      ProggyStr := ProggyStr + chr(13) + ('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');

      for i:= 0 to HowManyPlayers - 1  do
      begin
        str := '[ ' + Padr(Players[i].Nick, 4) + ' | ';
        if Players[i].Active then
          str := str + 'T | '
        else
          str := str + 'F | ';

        str := str + Padr(IntToStr(Players[i].Banked), 2) + ' | ' + Padr(IntToStr(Players[i].Worked), 5) +'| ';
        str := str + Padr(Players[i].Rand, 16) + ' ]';
        AddToReport(str);
        ProggyStr := ProggyStr + chr(13) + str;
      end;

      str := ScriptName+' '+Version
      i := length(str);
      if (i mod 2) <> 0 then
        i2 := 1;

      AddToReport('[-----------------------------------------]');
      AddToReport('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      AddToReport('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      if SaveProggyToFile then
      begin
        JX2 := ReWriteFile((ScriptPath + ScriptName +' '+ Version + '.txt'), False);
        WriteFileString(JX2, ProggyStr);
        CloseFile(JX2);
        RMDebug('Progress report saved to: ' + ScriptPath + ScriptName + ' ' + Version + '.txt');
      end;
      Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
    end;

    //Antiban, basically just picks up the mouse, increases mouse speed
    //clicks a tab and resets everything back to the original.
    //just to make sure we stay logged in.
    procedure FastSwitchTabs;
    var x, y, i, h:integer;
    begin
      if not LoggedIn then exit;
      RMDebug('Inactive Move');
      GetMousePos(x, y);
      PickUpMouse;
      IncEx(MouseSpeed, 10);
      i := GetCurrentTab;
      repeat
        h := 1+Random(12);
      until(h <> i)
      GameTab(h);
      wait(500+Random(500));
      GameTab(i);
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 10);
    end;

    //will take "Time" + Random(1000) to complete the action, will return to original angle
    // By Rasta Magician, heavily based on RandomMovement by Krazy_Meerkat
    // will always move the compass around unlike in RandomMovement
    procedure CompassMove(Time:Integer);
    var
      Keys: array of Integer;
      I: Integer;
      Deg: Extended;
    begin
      if not LoggedIn then exit;
      Keys := [VK_RIGHT, VK_LEFT];
      I := Random(2);
      ActivateClient;
      Deg := rs_GetCompassAngleDegrees;
      Wait(100 + random(50));
      KeyDown(Keys[I]);
      Wait(Round(Time/2) + random(500));
      KeyUp(Keys[I]);
      Wait(Round(Time/2) + random(500));
      MakeCompass(FloatToStr(Deg));
    end;

    //Random Right Click Return by Rasta Magician,
    //Will right-click anywhere on he main map, choose "Cancel" and return the
    //mouse to it's original position
    procedure RRClickReturn;
    var x, y:integer;
    begin
      if not LoggedIn then exit;
      IncEx(MouseSpeed, 7);
      GetMousePos(x, y);
      ActivateClient;
      Mouse(MSX1, MSY1, MSX2, MSY2, False);
      wait(100 + Random(50));
      ChooseOption('ancel');
      wait(50 + Random(100));
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 7);
    end;

    //just antiban with a percentage
    Procedure AntiBan(percentage: integer);
    var p: integer;
    begin
      if not Loggedin then exit;
      if random(100) <= percentage then
      begin
        case random(14) of
          0, 1: FastSwitchTabs;
          2, 3: CompassMove(1000);
          4, 5: RRClickReturn;
          6, 7: SleepAndMoveMouse(2000);
          8, 9: HoverSkill('random', false);
          //10, 11: DoEmote(Random(37)+1);
          12, 13: PickUpMouse;
        end;
        Gametab(4);
      end;
    end;

    {$IFDEF SMART}
    Procedure SetupSmart(world: integer);
    begin

      SmartSetupEx(world, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);

    end;
    {$ENDIF}

    //Used to set up all the necessary things before the script starts running
    Procedure SetupScript;
    begin
      ClearDebug;
      Disguise(ScriptName + ' ' + Version);
      {$IFDEF SMART}
        SetupSmart(100);
        {$IFDEF Reflection}
          RMDebug('Checking hooks, if they''re outdated un-define reflection to run this');
          SetupReflection;
        {$ENDIF}
      {$ENDIF}
      SetupSRL;
      DeclarePlayers;
      if UseResponder then SetupRespond;

      SRLID := YourSRLID;
      SRLPassword := YourSRLPass;
      ScriptID := MyScriptID;
      ActivateClient;
      LoginPlayer;
    end;


    //for prepqring the playe and making sure he has all the requirements
    procedure SetupPlayer;
    begin
      if not LoggedIn then exit;
      SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
      CloseWindow;
      MarkTime(Worked);
      GameTab(4);
      wait(500);
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('Player has '+IntToStr(JugCount)+' jugs');
      SetAngle(true);
    end;

    //switching palyers, or in case of jsut one player making it rest
    // "not playing" for a while decreases the chance of getting a lot of randoms
    procedure SwitchPlayers;
    var Time: integer;
    begin
      if (TimeFromMark(Worked) >= (WorkTime + Random(3*60*1000)) )or(not LoggedIn) then
      begin
        if PlayersActive > 1 then
          NextPlayer(Players[CurrentPlayer].Active)
        else begin
            if not LoggedIn then TerminateScript;
            LogOut;
            RMDebug('resting....');
            Time := GetSystemTime;
            while (GetSystemTime - Time < RestTime) do
              Disguise('Rest: '+IntToStr(Round((RestTime - (GetSystemTime - Time))/1000))+' s');

            Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
            ActivateClient;
            LoginPlayer;
            Inc(Rested);
            MarkTime(Worked);
        end;
        SetupPlayer;
      end;
    end;

    procedure LoadDTMS;
    begin

      ClayDTM := DTMFromString('78DA6374626260E066644006D31BC218FE036' +
           '990E87F206004A96146550391859140DA03A8868D801A2FA01A4E' +
           '026A40760910506389E9660C353640351CF8D50000D181089F');

      SoftDTM := DTMFromString('78DA63B4676260E060644006B9417C0CFF813' +
           '448F43F10303A01D5FC6740038C4824900E00AA6163C4AFC605A8' +
           '4698801A33A01A3E026A2C816A5808A8F106AAE125A0C69AB07B0' +
           '05BEC0953');

      JugDTM := DTMFromString('78DA637462626078C68002DA6A6B184480342' +
           '310FF0702465BA09AEB0C6880918115AA06CCF304AAB949408D37' +
           '50CD3D026ABC806ADE1150630754F391801A4BA09AA744B8F93DA' +
           '61A0674735E1350630154F39C801A1BEC7E4751E38C3D9C51D4F8' +
           '03D53C2242CD1322ECFA44408D37613703001F0C187A');

      WJugDTM := DTMFromString('78DA63CC656260B8CB80024ACBCF31F003694' +
           '620FE0F048CE94035D719D00023032B540D985784690E869A72A0' +
           '9AD704D46403D57C22A02609A8E60501352037DFC7AF060021030' +
           'F2C');

           
    end;

    procedure FreeDTMS;
    begin
      FreeDTM(ClayDTM);
      FreeDTM(SoftDTM);
      FreeDTM(JugDTM);
      FreeDTM(WJugDTM);
    end;

    //Just a few things it does when the script ends.
    procedure ScriptTerminate;
    begin
      Proggy;
      FreeDTMS;
      writeln('');
      writeln('Thank for using my script, Rasta Magician');
      writeln('Script stopped at ' + TheTime + ' ' + TheDate(3));
      writeln('Please post the Progress Report');
    end;



    function AutoColorOven: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.60, 8.58);

        if not (FindColorsTolerance(arP, 661291, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
     // end except end;
    end;

    function AutoColorOven2: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.13, 1.16);

        if not (FindColorsTolerance(arP, 1126745, MMX1, MMY1, MMX2, MMY2, 4)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
    //  end except end;
    end;

    function AutoColorPick: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.38, 1.13);

        if not (FindColorsTolerance(arP, 2903683, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result. - pick');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - pick');
     // end except end;
    end;

    function AutoColorWaterSymbol: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.03, 0.32);

        if not (FindColorsTolerance(arP, 15549204, MMX1, MMY1, MMX2, MMY2, 10)) then
        begin
          Writeln('Failed to find the color, no result. - Water');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              //Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - water');
    //  end except end;
    end;

    procedure DoTheColors;
    var x, y: integer;
    begin
    {
      PickColor := AutoColorPick;
      LadderColor := FindLadderColor;
      OvenColor := AutoColorOven;
     
      if OvenColor = 0 then
        OvenColor := AutoColorOven2;
     
      if LadderColor = 0 then
        LadderColor := AutoColorWaterSymbol;
        }

    end;


    Function Relocate(place: string): boolean;
    var
      ATPA: T2DPointArray;
      TPA : TPointArray;
      TP: TPoint;
      Color: boolean;
      Str: string;
    begin
      if GetMMLevels('run', str) >= 25 then
        SetRun(true);

      Color := True;
      {$IFDEF Reflection}
        RMDebug('[REF] Relocating.. '+place);
        Color := False;
        RMDebug('before case');
        case lowercase(place) of
          'mine': if not WalkToTile(Point(2939, 3282), 1, 2) then Color := true;
          'water': if not WalkToTile(Point(2933, 3280), 1, 2) then Color := true;
          'wheel': if not WalkToTile(Point(2936, 3288), 1, 2) then Color := true;
          'oven': if not WalkToTile(Point(2930, 3290), 1, 2) then Color := true;
        end;
        RMDebug('aafter case');
        if Color then
          RMDebug('reflection failed, trying color')
        else begin
          RMDebug('At '+place);
          Result := true;
          wait(750+random(500));
          exit;
        end;
      {$ENDIF}
     
      Result := true;
      RMDebug('Relocating.. '+place);
      case lowercase(place) of
        'mine':
          begin
            if PickColor = 0 then
            begin
              PickColor := AutoColorPick;
              if PickColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, PickColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 1);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY2));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY2));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y + 8, 3, 3, true);
            end else Result := false;
          end;
       
        'water':
          begin
            if LadderColor = 0 then
            begin
              LadderColor := FindLadderColor;
              if LadderColor = 0 then
                LadderColor := AutoColorWaterSymbol;
              if LadderColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, LadderColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPASize(ATPA, true);
              TP := MiddleTPA(ATPA[0]);
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'wheel':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY1));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY1));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'oven':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              SortTPAFrom(TPA, IntToPoint(MMX1, MMCY));
              TP := TPA[0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
      end;

      if not Result then
      begin
        RMDebug('failed at relocating to ' + place);
        exit;
      end;
     
      FFlag(0);
      wait(1000+Random(750));

     // RMDebug('Arrived at destination. We hope to see you again soon, with RM Airways');
    end;

    function FindIt(var fx, fy: Integer; CTS, Color, Tol, H, W:integer; SCS2M1, SCS2M2:extended; text:TStringArray): Boolean;
    var
      arP: TPointArray;
      ararP: T2DPointArray;
      tmpCTS, i, arL: Integer;
      P: TPoint;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(SCS2M1, SCS2M2);

      if not(FindColorsTolerance(arP, Color, MSX1, MSY1, MSX2, MSY2, Tol)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      SortTPAFrom(arP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arP, H, W);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 0, 0);
        Wait(350);
        if IsUpTextMultiCustom(text) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;



    Function Find(s: string): boolean;
    var x, y:integer;
    begin
      case lowercase(s) of
        'clay': Result := FindIt(x, y, 2, 7250880, 9, 10, 10, 0.03, 1.24, ['ine', 'ock']);
        'water': Result := FindIt(x, y, 1, 11172192, 10, 5, 5, 0.2, 0.2, ['ink']);
        'wheel': Result := FindIt(x, y, 2, 8290185, 2, 20, 20, 0.08, 0.25, ['otter''s', 'heel']);
        'oven': Result := FindIt(x, y, 4, 660057, 4, 5, 5, 0.06, 0.40, ['ven']);
      end;
     
      if Result then
        Mouse(x, y, 0, 0, true);
      RMDebug('Looking for '+s+'... Found? '+BoolToStr(Result));
    end;

    Procedure MineIt;
    var x, y, t, tries:integer;
    begin
      if not LoggedIn then exit;
      if InvFull then exit;
      if not Relocate('mine') then exit;
     
      MarkTime(t);
      repeat
        if not LoggedIn then break;
       
        {
        if FindDTM(GemDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          DropItem(CoordsToItem(x, y));
          wait(200+Random(100));
          Inc(ReportVars[2]);
        end;
        }

       
        if InvFull then break;
        if Find('clay') then
        begin
          Tries := 0;

          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('swing your'))
         
          if GetSystemTime - x >= 5000 then Continue;
         
          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('manage to mine'))

        end else Inc(Tries);
       
        if Tries >= 5 then
          if not Relocate('mine') then
            break;
           
      until(InvFull)or(TimeFromMark(t) >= (60*5000))
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      ClayMined := ClayMined + ClayCount;
      ReportVars[1] := ClayCount;
      IncEx(Players[CurrentPlayer].Integers[0], ClayCount);
    end;

    Procedure SoftenClay;
    var x, y, WaterCount, ClayCount, i, Time:integer;
    begin
      if not LoggedIn then exit;
      if not InvFull then exit;
     
      Gametab(4);
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      if ClayCount <= 0 then exit;
     
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('2 - Player has '+IntToStr(JugCount)+' jugs');
     
      if JugCount <= 0 then
      begin
        RMDebug('Player has no jugs!');
        Players[CurrentPlayer].active := false;
        LogOut;
        exit;
      end;
     
      Time := GetSystemTime;
      if not Relocate('water') then exit;
      repeat
        if not LoggedIn then break;
       
        if not FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then break;

        if FindDTM(JugDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
          wait(350+Random(500));
          if Find('water')then
          begin
            FFlag(0);
            Wait(355*JugCount+500+Random(500));
            WaterCount := CountItems(WJugDTM, 'dtm', []);
            RMDebug(IntToStr(WaterCount)+' jugs are filled with water');

            if not WaterCount = JugCount then
            begin
              for i:= 0 to 5 do
              begin
                wait(500);
                WaterCount := CountItems(WJugDTM, 'dtm', []);
                if WaterCount = JugCount then break;
              end;
              if not WaterCount = JugCount then
              begin
                RMDebug('something wrong with filling the jugs...');
                Continue;
              end;
            end;

            ClayCount := CountItems(ClayDTM, 'dtm', []);
            RMDebug('Player has '+IntToStr(ClayCount)+' clay');

            Mouse(x, y, 3, 3, true); //clicking jug again
         
            if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              Mouse(x, y, 3, 3, true);

              wait(200+random(100));
              MMouse(247, 406, 18, 15);
              for i:= 0 to 9 do
              begin
                wait(100);
                if GetColor(254, 412) = 938605 then break;
              end;

              GetMousePos(x,y);
              Mouse(x, y, 0, 0, false);
              wait(250);
              if not ChooseOption('All') then
              begin
                RMDebug('problem choosing option');
                Continue;
              end;

              wait(1000+ 750*WaterCount + Random(500));

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  for i:= 0 to 5 do
                  begin
                    wait(500);

                    if CountItems(ClayDTM, 'dtm', []) = 0 then
                      exit;
                    if CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                      break;


                  end;
                end else break;

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  RMDebug('Problem softening the clay....');
                  Continue;
                end;
            end;
           
          end else begin
            RMDebug('Couldn''t find the water');
            if not Relocate('water') then break;
            Continue;
          end;
        end else begin
          RMDebug('found no jug');
          LogOut;
          Players[CurrentPlayer].Active := false;
          exit;
        end;

      until(GetSystemTime - Time >= 60*5000)
    end;

    Procedure MoldClay;
    var
      x, y, i, SoftCount, Time:integer;
      TPA: TPointArray;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;

      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      SoftCount := CountItems(SoftDTM, 'dtm', []);
      if SoftCount <= 0 then exit;

      if not Relocate('wheel') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      repeat
        if not LoggedIn then break;
       
        CFound := false;
        Gametab(4);
        if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
         
          if Find('wheel') then
          begin
            FFlag(0);
            for i:= 0 to 9 do
            begin
              wait(200);
              if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
              begin
                CFound := true;
                break;
              end;
            end;

            if not CFound then continue;
             
            if FindColorsTolerance(TPA, 0, 61, 439, 467, 457, 0) then
            begin
              SortTPAFrom(TPA, TP);
              Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
              wait(750);
              if not ChooseOption('ake X') then
              begin
                RMDebug('Problems choosing X');
                Continue;
              end else begin
                wait(350+Random(250));
                TypeSend(IntToStr(RandomRange(28, 99)));

                i := GetSystemTime;
                repeat
                  wait(250);
                  Antiban(RandomRange(2,4));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 750*SoftCount)

                i := GetSystemTime;
                repeat
                  wait(100);
                  Antiban(RandomRange(2,5));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 30000)

                if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  RMDebug('Something went wrong with moudling');
                  Continue;
                end;
              end;
            end;
          end;
        end else begin
          RMDebug('could not find soft clay');
          break;
        end;

        SoftCount := CountItems(SoftDTM, 'dtm', []);
        if SoftCount <= 0 then break;

        if not Relocate('wheel') then break;
      until (false);
    end;

    Procedure FireClay;
    var
      i, x, y, Time, TimeIt: integer;
      TPA, CTPA: TPointArray;
      TIA: TIntegerArray;
      TB: TBox;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;


      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if not Relocate('oven') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      Gametab(4);
      Time := GetSystemTime;
      repeat
        if not LoggedIn then break;
        CFound := false;
       
        for i:= 28 Downto 1 do
        begin
          TB := InvBox(i);
          if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
          begin
            SetLength(CTPA, 6);
            CTPA[0] := Point(TB.x1 + 20, TB.y1 + 5);
            CTPA[1] := Point(TB.x1 + 20, TB.y1 + 10);
            CTPA[2] := Point(TB.x1 + 20, TB.y1 + 15);
            CTPA[3] := Point(TB.x1 + 20, TB.y1 + 20);
            CTPA[4] := Point(TB.x1 + 20, TB.y1 + 25);
            CTPA[5] := Point(TB.x1 + 20, TB.y1 + 30);
            TIA := GetColors(CTPA);
          end;
        end;

        if Find('oven') then
        begin
          FFlag(0);

          for i:= 0 to 9 do
          begin
            wait(200);
            if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
            begin
              CFound := true;
              break;
            end;
          end;

          if not CFound then continue;

          if FindColorsTolerance(TPA, 0, 61, 438, 467, 457, 0) then
          begin
            SortTPAFrom(TPA, TP);
            Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
            wait(100);
            if not ChooseOption('ake X') then
            begin
              RMDebug('Problems choosing X');
              Continue;
            end else begin
              wait(350+Random(250));
              TypeSend(IntToStr(RandomRange(28, 99)));

              wait(1000);
              TimeIt := GetSystemTime;
              repeat
                wait(250);
               
                if FindNPCChatText('t have any', Nothing) then
                  break;
               
                if IsChatBoxTextAnyLine('have any more', 0) then
                  break;
                 
                 
                if random(100) <= 5 then CompassMove(1000);
                NoRandoms;
              until(GetSystemTime - TimeIt >= (4000*26))

              if not IsChatBoxTextAnyLine('have any more', 0) then
                if not FindNPCChatText('t have any', Nothing) then
                  Continue;
                 
              RMDebug('done waiting for fired stuff');
              for x := 0 to 9 do
              begin
                if not IsSameIntArray(TIA, GetColors(CTPA)) then
                  break;
                wait(750);
              end;
             
              RMDebug('all is done, dropping now');
              for i:= 1 to 28 do
              begin
                if i mod 3 = 0 then
                  NoRandoms;
                TB := InvBox(i);
                if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
                begin
                  DropItem(i);
                  wait(200+Random(150));
                end;
              end;
              Inc(Loads);
              Inc(Players[CurrentPlayer].Banked);
              Inc(ReportVars[0]);
              RMDebug('done dropping');
              break;
            end;
          end else begin
            RMDebug('Could not find the text color....');
            Continue;
          end;
        end else begin
          RMDebug('Problems Finding the Oven');
          if not Relocate('oven') then break;
          Continue;
        end;

        if GetSystemTime - Time >= 60000 then
          break;
      until(false)

    end;

    begin
      SetupScript;
      SetupPlayer;
      DoTheColors;
      LoadDTMS;

      repeat
        if not LoggedIn then break;
        MineIt;
        SoftenClay;
        MoldClay;
        FireClay;
        Proggy;
        SwitchPlayers;
      until(false)


    end.

    It won't work anymore cus of color updates, but it might give you some inspiration



    ~RM

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  13. #13
    Join Date
    Jul 2007
    Location
    Right now? Chair.
    Posts
    8,488
    Mentioned
    3 Post(s)
    Quoted
    12 Post(s)

    Default

    Here's my crafter from just before I got Dev status.

    Simba Code:
    {==============================================================================]
    [==============================================================================]
    [                              RM Power Crafter                                ]
    [                                 By: Rasta Magician                           ]
    [==============================================================================]
    [                                  Features                                    ]
    [==============================================================================]
    [ 1. Debug                                                                     ]
    [ 2. AntiRandoms                                                               ]
    [ 3. AntiBan                                                                   ]
    [ 4. Multiplayer                                                               ]
    [ 5. Resting                                                                   ]
    [ 6. Progress Report                                                           ]
    [ 7. Local Control                                                             ]
    [ 8. Responder                                                                 ]
    [ 9. Proggy To File                                                            ]
    [ 10. Smart Cycleing                                                           ]
    [==============================================================================]
    [                                 Description                                  ]
    [==============================================================================]
    [ Mines clay, softens it, molds it into bowls(f2p),                            ]
    [ plant pots or pot lids (with needed quest), then fires the clay, drops it    ]
    [ and repeats the whole thing. All of this happens inside the Crafting Guild   ]
    [                                                                              ]
    [==============================================================================]
    [                               How To Use                                     ]
    [==============================================================================]
    [ 0. You need level 40 crafting                                                ]
    [ 1. Wield a pick                                                              ]
    [ 2. Wear a brown appron                                                       ]
    [ 3. Have jugs in inventory (I suggest 4 jugs)                                 ]
    [                                                                              ]
    [==============================================================================]
    [                               Credits                                        ]
    [==============================================================================]
    [ SRL Team                                                                     ]
    [ Ed, thx for testing                                                          ]
    [==============================================================================]
    [                    RM Power Crafter by Rasta Magician                        ]
    [==============================================================================]
    [==============================================================================}


    {
    add one more text for moulding clay
    mold and fire menu colors changed place
    }



    program RMScript;
    {$DEFINE SMART }
    {$DEFINE Reflection}
    //{$DEFINE FORM }

    {$IFDEF SMART }
    {.include srl/srl/misc/Smart.scar}
    {$ENDIF}
    {.include srl/srl.scar}
    {$IFDEF Reflection}
    {.include SRL\SRL\Reflection\Reflection.scar}
    {$ENDIF}
    {.include srl/srl/skill/mining.scar}

    {$IFDEF FORM }
    {.include srl/srl/misc/users.scar}
    {$ENDIF}

    Const
      WorkTime = (30*60*1000); //10 mins
      RestTime = (3*60*1000); //3 mins
     
      IsMember = true;

      UseDebug = True;
      UseResponder = True;
      SaveProggyToFile = True;
     
      ScriptName = 'RM Power Crafter';
      Version = '2.0';
     
      YourSRLID = '';   //your SRLID
      YourSRLPass = ''; //your SRL Stats pass
      MyScriptID = '1199'; // don't touch

    var
      Rested, Worked, Loads,
      PickColor, LadderColor, OvenColor,
      ClayDTM, SoftDTM, JugDTM, WJugDTM, GemDTM,
      JugCount, ClayCount,
      ClayMined :integer;
      ProggyStr: string;


    function IsSameIntArray(i1, i2:TIntegerArray):boolean;
    var i:integer;
    begin
      Result := false;
      if Length(i1) <> Length(i2) then exit;

      Result := true;
      for i:= 0 to high(i1) do
        if i1[i] <> i2[i] then
          Result := False;
    end;

    //for debugging TPAs, to help me perfect my finders
    //by Wizzup?
    Function DebugTPA(Points: TPointArray; BmpName: String): Boolean;

    Var
       Width, Height, ClientBMP, I, L: Integer;
       xs, ys, xe, ye: Integer;

    Begin
      Try
      Begin
        xe := xs xor xs;
        ye := ys xor ys;
        xs := 1 shl 20;
        ys := 1 shl 20;

        For I := 0 To High(Points) Do
        Begin
          xs := Min(xs, Points[i].X);
          ys := Min(ys, Points[i].Y);

          xe := Max(xe, Points[i].X);
          ye := Max(ye, Points[i].Y);
        End;

        Width := xe - xs;
        Height := ye - ys;

        DisplayDebugImgWindow(0, 0);
        DisplayDebugImgWindow(Width, Height);
        ClientBMP := BitmapFromString(Width, Height, '');

        CopyClientToBitmap(ClientBMP, xs, ys, xe, ye);
        For I := 0 To High(Points) Do
          FastSetPixel(ClientBMP, Points[i].X - xs, Points[i].Y - ys, 255);
        If BmpName <> '' Then
          SaveBitmap(ClientBMP, ScriptPath + BmpName + '.bmp');
        SafeDrawBitmap(ClientBMP, GetDebugCanvas, 0, 0);
        DisplayDebugImgWindow(Width, Height);

        FreeBitmap(ClientBMP);
      End
      Except
        FreeBitmap(ClientBMP);
      End;
      Result := True;
    End;

    //Declaring players
    Procedure DeclarePlayers;
    begin

      {$IFDEF Form}
        SRLPlayerForm(True, [], [], [], []);
        exit
      {$ENDIF}
     
      NumberOfPlayers(1);
      CurrentPlayer := 0;

      Players[0].Name :='RMagician';
      Players[0].Pass :='Th1sIsN0tMyPW!';
      Players[0].Nick :='agi';
      Players[0].Active := True;


    end;

    //Used for debugging and finding errors
    Procedure RMDebug(s:string);
    var name:string;
    begin
      if not UseDebug then exit;
      try name := Players[CurrentPlayer].Name +' : '; except name:= '' end;
      writeln(name+TheTime+' - '+s);
    end;


    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    {$IFDEF SMART}
    procedure Proggy; forward;
    Procedure EasyRC;
    var i:integer;
    begin
      if not IsFKeyDown(12) then exit;
      LogOut;

      Proggy;
      writeln('Fresh proggie on your right');
      writeln('');

      writeln('--- MENU ---');
      writeln('F9 --> Status');
      writeln('F10 --> Reset All');
      writeln('F11 --> manage players');
      writeln('F1 --> Keep on autoing');
      writeln('--- End Menu ---  ');
      writeln('');
      wait(2000);
      repeat
        if IsFKeyDown(9) then        //status
        begin
          for i:=0 to High(players) do
            writeln(IntToStr(i)+': '+Players[i].Nick+' - '+BoolToStr(Players[i].Active));
        end;

        if IsFKeyDown(10) then //Reset All
        begin
          for i:= 0 to High(Players) do
            Players[i].Active := true;
          writeln('Reset all :) ');
        end;

        if IsFKeyDown(11) then // Manage Players
        begin

        end;

        if IsFKeyDown(1) then break;
     until(false)
     writeln('Restarting to auto :)');
     LoginPlayer;
    end;

    {$ELSE}

    //local control, F12 to activate and then text. used to check on proggies and
    //to reactivate players
    //untested with smart, might not work
    Procedure EasyRC;
    var
      i, h1, h2, x, y:integer;
      s, str: string;
    begin
      if not LoggedIn then exit;
      if IsFKeyDown(12) then
      begin
        RMDebug('Trying to use Easy RC');
        h1 := GetClientWindowHandle;
        GetMousePos(x, y);
        SetClientPos(False);
        Disguise('RM Easy RC');
        if FindWindowTitlePart('RM Easy RC', false) then writeln('Using Easy RC');
        h2 := GetClientWindowHandle;
        SetOnTop(h1, False);
        SetOnTop(h2, True);
        SetClientWindowHandle(h2);
        wait(100);
        ActivateClient;
        wait(100);

        repeat
          s:= ReadLn('What to do?'+chr(13)+'Status / Reset N / Reset All / Proggy / Exit');
          lowercase(s);
          if (s = 'exit') or (s = '') then break;

          if s= 'status' then
          begin
            for i:= 0 to High(Players) do
              if not Players[i].Active then str:= str+chr(13)+Players[i].Name;
            readln('these are set to false: '+chr(13)+str+chr(13)+'Press ok');
          end;


          if s = 'proggy' then
          begin
            Readln(ProggyStr+chr(13)+'Press ok');
          end;

          if Pos('reset', s) > 0 then
          begin
            str := TrimLetters(Trim(s));
            if str = '' then
            begin
              for i:= 0 to High(Players) do
                Players[i].Active:= True;
              ReadLn('All Players Active'+chr(13)+'Press ok');
            end else
            try begin
              i:= StrToInt(str);
              Players[i].Active := True;
              Readln('activated player: '+str+chr(13)+'Press ok');
            end except break end;
          end;
        until(false)

        SetOnTop(h2, False);
        SetOnTop(h1, True);
        SetClientWindowHandle(h1);
        ActivateClient;
        MMouse(x, y, 2, 2);
        wait(3000);
        Disguise(' A: '+IntToStr(PlayersActive)+'/'+IntToStr(Length(Players))+' Loads: '+IntToStr(loads));
        RMDebug('Done using Easy RC');
      end;
    end;
    {$ENDIF}


    type
      MyChat = record
      Chatter: TStringArray;
      Said: TStringArray;
      LastResponded: integer;
    end;
    var
      Trigger: Array of Array[0..1] of TStringArray; //questions, could make more triggers... if i
      Answers: Array of TStringArray;                //find i need them
      RMTalks: MyChat;
      Responses: Integer;



    // to setup the questions qnd qnswers for the auto responder
    procedure SetupRespond;
    begin

      SetLength(RMTalks.Chatter, 8);
      SetLength(RMTalks.Said, 8);

      SetLength(Trigger, 7); //how many questions
      SetLength(Answers, Length(Trigger));
      //you can have as many trigger words and rows as you want
      //you can have as many answers as you want

      Trigger[0][0]:= ['wc', 'woodcutting'];     // trigger words 1
      Trigger[0][1]:= ['lvl', 'level'];          // trigger words 2
    //Trigger[0][2]:= ['','','','','',''];       // trigger words 3
      Answers[0]:= [
                     'My Woodcutting Level is: '+IntToStr(Players[CurrentPlayer].Level[20]), //answer 1
                     'Wc: '+IntToStr(Players[CurrentPlayer].Level[20]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[20])+' wc lvl',                   //answer 3
                     'my wcing lvl is '+IntToStr(Players[CurrentPlayer].Level[20])           //answer 4
                   ]

      Trigger[1][0] := ['axe'];
      Trigger[1][1] := ['which', 'what'];
      Answers[1] := [
                      'I''m using a '+Players[CurrentPlayer].Strings[2]+' axe',
                      Players[CurrentPlayer].Strings[2],
                      'my axe is made out of '+Players[CurrentPlayer].Strings[2]
                    ]

      Trigger[2][0]:= ['good place', 'train'];
      Trigger[2][1]:= ['woodcutting', 'wc'];
      Answers[2] := [
                      'Try Training Woodcutting at Draynor',
                      'Draynor', 'Varrock', 'Edgy', 'Fally',
                      'Try Training Woodcutting at Edgeville',
                      'Try Training Woodcutting at Varrock Palace',
                      'Try Training Woodcutting at South of Falador'
                    ]
                   
                   
      Trigger[3][0]:= ['fish', 'fishing', '><>', '<><'];     // trigger words 1
      Trigger[3][1]:= ['lvl', 'level', 'levl', 'lvel'];          // trigger words 2
    //Trigger[3][2]:= ['','','','','',''];       // trigger words 3
      Answers[3]:= [
                     'My Fishing Level is: '+IntToStr(Players[CurrentPlayer].Level[17]), //answer 1
                     'Fishing: '+IntToStr(Players[CurrentPlayer].Level[17]),                      //answer 2
                     IntToStr(Players[CurrentPlayer].Level[17])+' '+chr(62)+chr(60)+chr(62)+' lvl',                   //answer 3
                     'my fishy lvl is '+IntToStr(Players[CurrentPlayer].Level[17])           //answer 4
                   ]


      Trigger[5][0]:= ['place', 'train'];
      Trigger[5][1]:= ['fishing', '><>', 'fish'];
      Answers[5] := [
                      'Try Training fishing at Draynor',
                      'Draynor', 'Edgy', 'Al-Kharid', 'Karamja',
                      'Try Training fishing at Edgeville',
                      'Try Training fishing at Al-Kharid, close to bank',
                      'Try Training fishing at lumbridge'
                    ]

      Trigger[6][0]:= ['hi','hey', 'hello', 'sup?'];     // trigger words 1
      Trigger[6][1]:= [''];          // trigger words 2
      Answers[6]:= ['hi','hey', 'hello', 'sup?', 'how do you do?'] ;
    end;

    //from srl, modded for any line
    function GetChatTextLine(var chat: string; line:integer): Boolean;
    var
      x, y: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      if findcolor(x, y, 16711680, textp.x, textp.y, textp.x + 200, textp.y + 14) then
      begin
        chat := LowerCase(Trim(GetTextAtEx(x - 3, textp.y - 2, 0, SmallChars, False,

          False, -1, 1, 16711680, 60, False, tr_allChars)));
        Result := True;
      end;
    end;

    //from srl, modded for any line
    function GetChatterLine(var name: string; line:integer): Boolean;
    var
      i: Integer;
      textP: TPoint;
    begin
      if not LoggedIn then exit;
      textP := TextCoords(line);
      name := LowerCase(Trim(GetTextAtEx(textP.x - 2, textP.y - 2, 0, SmallChars, False, False, 0, 1,
        0, 60, False, tr_allChars)))
      i := Pos(':', name)
      if (i <> 0) then
      begin
        Delete(name, i, i);
        Result := True;
      end;
    end;

    //my responder, used as antiban to look more human
    procedure RMRespond;
    var
      str: string;
      i, h, t, k, triggered:integer;
      TSA:TStringArray;
    begin
      if not LoggedIn then exit;
      if (TimeFromMark(RMTalks.LastResponded) < 60000+Random(30000)) then exit;


      SetLength(TSA, 8)
      str:='';
      TSA:=['', '', '', '', '', '', '', ''];
      RMTalks.said := ['', '', '', '', '', '', '', ''];
      triggered := 0;

      // Getting text on all the lines
      for i:= 7 DownTo 0 do
      begin
        GetChatterLine(RMTalks.Chatter[i], i+1);
        if Pos(Lowercase(Players[CurrentPlayer].Nick), Lowercase(RMTalks.Chatter[i])) > 0 then
          break;     //if we already answered, it means we already checked further up.
        GetChatTextLine(RMTalks.said[i], i+1);
        TSA[i] := RMTalks.said[i];
      end;

        for i:=High(TSA) DownTo 0 do  //all text lines
          for h:= 0 to High(Trigger) do  //questions
          begin
            triggered:= 0;
            for t:=0 to High(Trigger[h]) do  //How many triggers

              for k:=0 to High(Trigger[h][t]) do //specific trigger

                if Pos(Trigger[h][t][k], TSA[i]) > 0 then
                begin
                  Inc(triggered);
                  if triggered >= 2 then
                  begin

                    Inc(Responses);
                    str:=(Answers[h][Random(Length(Answers[h]))]);

                    TypeSend(AddMistakes(str, RandomRange(10, 30)));

                    RMDebug('Question: '+Trigger[h][0][0]+ ' ' + Trigger[h][t][k]);
                    RMDebug('Responding: ' + str);

                    str := '';
                    MarkTime(RMTalks.LastResponded);
                    triggered := 0;
                    SetupRespond;

                    exit;
                  end;  //end if
                  break;
                end;  //end if
                //end k loop
          end; //end h loop
        //end of i loop
    end;

    //making sure we solve those annoying randoms :)
    Function NoRandoms: boolean;
    var
      x, y:integer;
      s:string;
    begin
      if not LoggedIn then exit;
      Result := False;
      GetMousePos(x, y);
      if UseResponder then RMRespond;
      if ClickToContinue then
      begin
        MMouse(x, y, 3, 3);
        Result := True;
      end;
      if FindNormalRandoms then Result:=true;
      if FindFight then
      begin
        //none of the run aways check for randoms....

          case random(4) of
            0: s:='n';
            1: s:='w';
            2: s:='s';
            3: s:='e';
          end;

        RMDebug('running to ' + s + ' and waiting for 8 - 10 s');
        RunTo(s, True);
        SleepAndMoveMouse(RandomRange(8000, 10000));

        case s of
          'n': s:= 'S';
          's': s:= 'N';
          'w': s:= 'E';
          'e': s:= 'W';
        end;

        RMDebug('Returning to ' + s);
        RunTo(s, True);

        Result:=True;

        NoRandoms;
      end;

      EasyRc;

    end;



    //Progress report
    procedure Proggy;
    var
      JX2, i, i2, xph:integer;
      str: string;
    begin
      ClearReport;
      SRLRandomsReport;

      AddToReport('');
      AddToReport('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      AddToReport('[              By Rasta Magician          ]');
      AddToReport('[=========================================]');
      AddToReport('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']')
      AddToReport('[ '+ Padr(TimeRunning, 40)+']');
      AddToReport('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      AddToReport('[ ' + Padr('Current Player: ' + Players[CurrentPlayer].Nick, 40) + ']');
      AddToReport('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      AddToReport('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      AddToReport('[ '+ Padr('Mining XP: '+IntToStr(ClayMined*5), 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']');
      xph := Round((ClayMined*40*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Lids: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*37.5*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Plant Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*33*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Bowls: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*25*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Dishes: '+IntToStr(xph)+' xp/h', 40)+']');
      xph := Round((ClayMined*12.6*3600*1000) / GetTimeRunning);
      AddToReport('[ '+ Padr('Pots: '+IntToStr(xph)+' xp/h', 40)+']');
      AddToReport('[ '+ Padr('=== CRAFTING XP ===', 40)+']')
      AddToReport('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      AddToReport('[================== RM ===================]');

      ProggyStr := '';
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padr(ScriptName+' '+Version, 27)+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[              By Rasta Magician          ]');
      ProggyStr := ProggyStr + chr(13) + ('[=========================================]');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Written ' + (TheTime) + ' on ' + (TheDate(3)) + '.', 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr(TimeRunning, 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ ' + Padr('Players: ' + IntToStr(PlayersActive)+ ' / ' + IntToStr(HowManyPlayers), 40) + ']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Loads: '+IntToStr(Loads), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+ Padr('Clay Mined: '+IntToStr(ClayMined), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[ '+Padr('Rested: '+IntToStr(Rested), 40)+']');
      ProggyStr := ProggyStr + chr(13) + ('[================== RM ===================]');


      AddToReport('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      AddToReport('[-----------------------------------------]');

      ProggyStr := ProggyStr + chr(13) + ('[  P   | A | L  | Mins | Rand ' + Padl(']', 13));
      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');

      for i:= 0 to HowManyPlayers - 1  do
      begin
        str := '[ ' + Padr(Players[i].Nick, 4) + ' | ';
        if Players[i].Active then
          str := str + 'T | '
        else
          str := str + 'F | ';

        str := str + Padr(IntToStr(Players[i].Banked), 2) + ' | ' + Padr(IntToStr(Players[i].Worked), 5) +'| ';
        str := str + Padr(Players[i].Rand, 16) + ' ]';
        AddToReport(str);
        ProggyStr := ProggyStr + chr(13) + str;
      end;

      str := ScriptName+' '+Version
      i := length(str);
      if (i mod 2) <> 0 then
        i2 := 1;

      AddToReport('[-----------------------------------------]');
      AddToReport('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      AddToReport('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      ProggyStr := ProggyStr + chr(13) + ('[-----------------------------------------]');
      ProggyStr := ProggyStr + chr(13) + ('[====== '+Padl('', 14 - Trunc(i/2)) + str + Padr('', 13 + i2 - Trunc(i/2))+' ======]');
      ProggyStr := ProggyStr + chr(13) + ('[~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~]');

      if SaveProggyToFile then
      begin
        JX2 := ReWriteFile((ScriptPath + ScriptName +' '+ Version + '.txt'), False);
        WriteFileString(JX2, ProggyStr);
        CloseFile(JX2);
        RMDebug('Progress report saved to: ' + ScriptPath + ScriptName + ' ' + Version + '.txt');
      end;
      Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
    end;

    //Antiban, basically just picks up the mouse, increases mouse speed
    //clicks a tab and resets everything back to the original.
    //just to make sure we stay logged in.
    procedure FastSwitchTabs;
    var x, y, i, h:integer;
    begin
      if not LoggedIn then exit;
      RMDebug('Inactive Move');
      GetMousePos(x, y);
      PickUpMouse;
      IncEx(MouseSpeed, 10);
      i := GetCurrentTab;
      repeat
        h := 1+Random(12);
      until(h <> i)
      GameTab(h);
      wait(500+Random(500));
      GameTab(i);
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 10);
    end;

    //will take "Time" + Random(1000) to complete the action, will return to original angle
    // By Rasta Magician, heavily based on RandomMovement by Krazy_Meerkat
    // will always move the compass around unlike in RandomMovement
    procedure CompassMove(Time:Integer);
    var
      Keys: array of Integer;
      I: Integer;
      Deg: Extended;
    begin
      if not LoggedIn then exit;
      Keys := [VK_RIGHT, VK_LEFT];
      I := Random(2);
      ActivateClient;
      Deg := rs_GetCompassAngleDegrees;
      Wait(100 + random(50));
      KeyDown(Keys[I]);
      Wait(Round(Time/2) + random(500));
      KeyUp(Keys[I]);
      Wait(Round(Time/2) + random(500));
      MakeCompass(FloatToStr(Deg));
    end;

    //Random Right Click Return by Rasta Magician,
    //Will right-click anywhere on he main map, choose "Cancel" and return the
    //mouse to it's original position
    procedure RRClickReturn;
    var x, y:integer;
    begin
      if not LoggedIn then exit;
      IncEx(MouseSpeed, 7);
      GetMousePos(x, y);
      ActivateClient;
      Mouse(MSX1, MSY1, MSX2, MSY2, False);
      wait(100 + Random(50));
      ChooseOption('ancel');
      wait(50 + Random(100));
      MMouse(x, y, 3, 3);
      DecEx(MouseSpeed, 7);
    end;

    //just antiban with a percentage
    Procedure AntiBan(percentage: integer);
    var p: integer;
    begin
      if not Loggedin then exit;
      if random(100) <= percentage then
      begin
        case random(14) of
          0, 1: FastSwitchTabs;
          2, 3: CompassMove(1000);
          4, 5: RRClickReturn;
          6, 7: SleepAndMoveMouse(2000);
          8, 9: HoverSkill('random', false);
          //10, 11: DoEmote(Random(37)+1);
          12, 13: PickUpMouse;
        end;
        Gametab(4);
      end;
    end;

    {$IFDEF SMART}
    Procedure SetupSmart(world: integer);
    begin

      SmartSetupEx(world, False, True, False);
      Wait(5000);
      SetTargetDC(SmartGetDC);
      repeat
        wait(100);
      until(SmartGetColor(253, 233)<>1118604);

    end;
    {$ENDIF}

    //Used to set up all the necessary things before the script starts running
    Procedure SetupScript;
    begin
      ClearDebug;
      Disguise(ScriptName + ' ' + Version);
      {$IFDEF SMART}
        SetupSmart(100);
        {$IFDEF Reflection}
          RMDebug('Checking hooks, if they''re outdated un-define reflection to run this');
          SetupReflection;
        {$ENDIF}
      {$ENDIF}
      SetupSRL;
      DeclarePlayers;
      if UseResponder then SetupRespond;

      SRLID := YourSRLID;
      SRLPassword := YourSRLPass;
      ScriptID := MyScriptID;
      ActivateClient;
      LoginPlayer;
    end;


    //for prepqring the playe and making sure he has all the requirements
    procedure SetupPlayer;
    begin
      if not LoggedIn then exit;
      SetGraphics(4, 'current', 'always', 'off', 'low', 'few', 'off', 'few', 'off');
      CloseWindow;
      MarkTime(Worked);
      GameTab(4);
      wait(500);
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('Player has '+IntToStr(JugCount)+' jugs');
      SetAngle(true);
    end;

    //switching palyers, or in case of jsut one player making it rest
    // "not playing" for a while decreases the chance of getting a lot of randoms
    procedure SwitchPlayers;
    var Time: integer;
    begin
      if (TimeFromMark(Worked) >= (WorkTime + Random(3*60*1000)) )or(not LoggedIn) then
      begin
        if PlayersActive > 1 then
          NextPlayer(Players[CurrentPlayer].Active)
        else begin
            if not LoggedIn then TerminateScript;
            LogOut;
            RMDebug('resting....');
            Time := GetSystemTime;
            while (GetSystemTime - Time < RestTime) do
              Disguise('Rest: '+IntToStr(Round((RestTime - (GetSystemTime - Time))/1000))+' s');

            Disguise(' A: '+IntToStr(PlayersActive) + '/' + IntToStr(HowManyPlayers) +
      ' Loads: ' + IntToStr(Loads));
            ActivateClient;
            LoginPlayer;
            Inc(Rested);
            MarkTime(Worked);
        end;
        SetupPlayer;
      end;
    end;

    procedure LoadDTMS;
    begin

      ClayDTM := DTMFromString('78DA6374626260E066644006D31BC218FE036' +
           '990E87F206004A96146550391859140DA03A8868D801A2FA01A4E' +
           '026A40760910506389E9660C353640351CF8D50000D181089F');

      SoftDTM := DTMFromString('78DA63B4676260E060644006B9417C0CFF813' +
           '448F43F10303A01D5FC6740038C4824900E00AA6163C4AFC605A8' +
           '4698801A33A01A3E026A2C816A5808A8F106AAE125A0C69AB07B0' +
           '05BEC0953');

      JugDTM := DTMFromString('78DA637462626078C68002DA6A6B184480342' +
           '310FF0702465BA09AEB0C6880918115AA06CCF304AAB949408D37' +
           '50CD3D026ABC806ADE1150630754F391801A4BA09AA744B8F93DA' +
           '61A0674735E1350630154F39C801A1BEC7E4751E38C3D9C51D4F8' +
           '03D53C2242CD1322ECFA44408D37613703001F0C187A');

      WJugDTM := DTMFromString('78DA63CC656260B8CB80024ACBCF31F003694' +
           '620FE0F048CE94035D719D00023032B540D985784690E869A72A0' +
           '9AD704D46403D57C22A02609A8E60501352037DFC7AF060021030' +
           'F2C');

           
    end;

    procedure FreeDTMS;
    begin
      FreeDTM(ClayDTM);
      FreeDTM(SoftDTM);
      FreeDTM(JugDTM);
      FreeDTM(WJugDTM);
    end;

    //Just a few things it does when the script ends.
    procedure ScriptTerminate;
    begin
      Proggy;
      FreeDTMS;
      writeln('');
      writeln('Thank for using my script, Rasta Magician');
      writeln('Script stopped at ' + TheTime + ' ' + TheDate(3));
      writeln('Please post the Progress Report');
    end;



    function AutoColorOven: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.60, 8.58);

        if not (FindColorsTolerance(arP, 661291, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
     // end except end;
    end;

    function AutoColorOven2: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      //try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.13, 1.16);

        if not (FindColorsTolerance(arP, 1126745, MMX1, MMY1, MMX2, MMY2, 4)) then
        begin
          Writeln('Failed to find the color, no result.');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color.');
    //  end except end;
    end;

    function AutoColorPick: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.38, 1.13);

        if not (FindColorsTolerance(arP, 2903683, MMX1, MMY1, MMX2, MMY2, 6)) then
        begin
          Writeln('Failed to find the color, no result. - pick');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - pick');
     // end except end;
    end;

    function AutoColorWaterSymbol: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
     // try begin
        tmpCTS := GetColorToleranceSpeed;
        ColorToleranceSpeed(2);
        SetColorSpeed2Modifiers(0.03, 0.32);

        if not (FindColorsTolerance(arP, 15549204, MMX1, MMY1, MMX2, MMY2, 10)) then
        begin
          Writeln('Failed to find the color, no result. - Water');
          ColorToleranceSpeed(tmpCTS);
          SetColorSpeed2Modifiers(0.2, 0.2);
          Exit;
        end;

        arC := GetColors(arP);
        ClearSameIntegers(arC);
        arL := High(arC);

        for i := 0 to arL do
        begin
          if (rs_OnMinimap(arP[i].x, arP[i].y)) then
          begin
              Result := arC[i];
              //Writeln('AutoColor = ' + IntToStr(arC[i]));
              Break;
          end;
        end;

        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);

        if (i = arL + 1) then
          Writeln('AutoColor failed in finding the color. - water');
    //  end except end;
    end;

    procedure DoTheColors;
    var x, y: integer;
    begin
    {
      PickColor := AutoColorPick;
      LadderColor := FindLadderColor;
      OvenColor := AutoColorOven;
     
      if OvenColor = 0 then
        OvenColor := AutoColorOven2;
     
      if LadderColor = 0 then
        LadderColor := AutoColorWaterSymbol;
        }

    end;


    Function Relocate(place: string): boolean;
    var
      ATPA: T2DPointArray;
      TPA : TPointArray;
      TP: TPoint;
      Color: boolean;
      Str: string;
    begin
      if GetMMLevels('run', str) >= 25 then
        SetRun(true);

      Color := True;
      {$IFDEF Reflection}
        RMDebug('[REF] Relocating.. '+place);
        Color := False;
        RMDebug('before case');
        case lowercase(place) of
          'mine': if not WalkToTile(Point(2939, 3282), 1, 2) then Color := true;
          'water': if not WalkToTile(Point(2933, 3280), 1, 2) then Color := true;
          'wheel': if not WalkToTile(Point(2936, 3288), 1, 2) then Color := true;
          'oven': if not WalkToTile(Point(2930, 3290), 1, 2) then Color := true;
        end;
        RMDebug('aafter case');
        if Color then
          RMDebug('reflection failed, trying color')
        else begin
          RMDebug('At '+place);
          Result := true;
          wait(750+random(500));
          exit;
        end;
      {$ENDIF}
     
      Result := true;
      RMDebug('Relocating.. '+place);
      case lowercase(place) of
        'mine':
          begin
            if PickColor = 0 then
            begin
              PickColor := AutoColorPick;
              if PickColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, PickColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 1);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY2));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY2));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y + 8, 3, 3, true);
            end else Result := false;
          end;
       
        'water':
          begin
            if LadderColor = 0 then
            begin
              LadderColor := FindLadderColor;
              if LadderColor = 0 then
                LadderColor := AutoColorWaterSymbol;
              if LadderColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, LadderColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPASize(ATPA, true);
              TP := MiddleTPA(ATPA[0]);
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'wheel':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              ATPA := SplitTPA(TPA, 2);
              SortATPAFrom(ATPA, IntToPoint(MMX2, MMY1));
              SortTPAFrom(ATPA[0], IntToPoint(MMX2, MMY1));
              TP := ATPA[0][0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
         
        'oven':
          begin
            if OvenColor = 0 then
            begin
              OvenColor := AutoColorOven;
              if OvenColor = 0 then
                OvenColor := AutoColorOven2;
              if OvenColor = 0 then
              begin
                LogOut;
                Players[CurrentPlayer].Rand := 'AC Fail';
                exit;
              end;
            end;
            if FindColorsTolerance(TPA, OvenColor, MMX1, MMY1, MMX2, MMY2, 0) then
            begin
              SortTPAFrom(TPA, IntToPoint(MMX1, MMCY));
              TP := TPA[0];
              Mouse(TP.x, TP.y, 3, 3, true);
            end else Result := false;
          end;
      end;

      if not Result then
      begin
        RMDebug('failed at relocating to ' + place);
        exit;
      end;
     
      FFlag(0);
      wait(1000+Random(750));

     // RMDebug('Arrived at destination. We hope to see you again soon, with RM Airways');
    end;

    function FindIt(var fx, fy: Integer; CTS, Color, Tol, H, W:integer; SCS2M1, SCS2M2:extended; text:TStringArray): Boolean;
    var
      arP: TPointArray;
      ararP: T2DPointArray;
      tmpCTS, i, arL: Integer;
      P: TPoint;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(CTS);
      SetColorSpeed2Modifiers(SCS2M1, SCS2M2);

      if not(FindColorsTolerance(arP, Color, MSX1, MSY1, MSX2, MSY2, Tol)) then
      begin
        Writeln('Failed to find the color, no object found.');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

      SortTPAFrom(arP, Point(MSCX, MSCY));
      ararP := SplitTPAEx(arP, H, W);
      arL := High(ararP);

      for i := 0 to arL do
      begin
        P := MiddleTPA(ararP[i]);
        MMouse(P.x, P.y, 0, 0);
        Wait(350);
        if IsUpTextMultiCustom(text) then
        begin;
          Result := True;
          Break;
        end;
      end;

      ColorToleranceSpeed(tmpCTS);
      SetColorSpeed2Modifiers(0.2, 0.2);

      if (i = arL + 1) then
      begin
        Writeln('FindObject could not find object.');
        Exit;
      end;

      GetMousePos(fx, fy);
    end;



    Function Find(s: string): boolean;
    var x, y:integer;
    begin
      case lowercase(s) of
        'clay': Result := FindIt(x, y, 2, 7250880, 9, 10, 10, 0.03, 1.24, ['ine', 'ock']);
        'water': Result := FindIt(x, y, 1, 11172192, 10, 5, 5, 0.2, 0.2, ['ink']);
        'wheel': Result := FindIt(x, y, 2, 8290185, 2, 20, 20, 0.08, 0.25, ['otter''s', 'heel']);
        'oven': Result := FindIt(x, y, 4, 660057, 4, 5, 5, 0.06, 0.40, ['ven']);
      end;
     
      if Result then
        Mouse(x, y, 0, 0, true);
      RMDebug('Looking for '+s+'... Found? '+BoolToStr(Result));
    end;

    Procedure MineIt;
    var x, y, t, tries:integer;
    begin
      if not LoggedIn then exit;
      if InvFull then exit;
      if not Relocate('mine') then exit;
     
      MarkTime(t);
      repeat
        if not LoggedIn then break;
       
        {
        if FindDTM(GemDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          DropItem(CoordsToItem(x, y));
          wait(200+Random(100));
          Inc(ReportVars[2]);
        end;
        }

       
        if InvFull then break;
        if Find('clay') then
        begin
          Tries := 0;

          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('swing your'))
         
          if GetSystemTime - x >= 5000 then Continue;
         
          x := GetSystemTime;
          repeat
            wait(100);
            FindNormalRandoms;
            if GetSystemTime - x >= 5000 then break;
          until(FindBlackChatMessage('manage to mine'))

        end else Inc(Tries);
       
        if Tries >= 5 then
          if not Relocate('mine') then
            break;
           
      until(InvFull)or(TimeFromMark(t) >= (60*5000))
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      ClayMined := ClayMined + ClayCount;
      ReportVars[1] := ClayCount;
      IncEx(Players[CurrentPlayer].Integers[0], ClayCount);
    end;

    Procedure SoftenClay;
    var x, y, WaterCount, ClayCount, i, Time:integer;
    begin
      if not LoggedIn then exit;
      if not InvFull then exit;
     
      Gametab(4);
     
      ClayCount := CountItems(ClayDTM, 'dtm', []);
      if ClayCount <= 0 then exit;
     
      JugCount := CountItems(JugDTM, 'dtm', []);
      RMDebug('2 - Player has '+IntToStr(JugCount)+' jugs');
     
      if JugCount <= 0 then
      begin
        RMDebug('Player has no jugs!');
        Players[CurrentPlayer].active := false;
        LogOut;
        exit;
      end;
     
      Time := GetSystemTime;
      if not Relocate('water') then exit;
      repeat
        if not LoggedIn then break;
       
        if not FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then break;

        if FindDTM(JugDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
          wait(350+Random(500));
          if Find('water')then
          begin
            FFlag(0);
            Wait(355*JugCount+500+Random(500));
            WaterCount := CountItems(WJugDTM, 'dtm', []);
            RMDebug(IntToStr(WaterCount)+' jugs are filled with water');

            if not WaterCount = JugCount then
            begin
              for i:= 0 to 5 do
              begin
                wait(500);
                WaterCount := CountItems(WJugDTM, 'dtm', []);
                if WaterCount = JugCount then break;
              end;
              if not WaterCount = JugCount then
              begin
                RMDebug('something wrong with filling the jugs...');
                Continue;
              end;
            end;

            ClayCount := CountItems(ClayDTM, 'dtm', []);
            RMDebug('Player has '+IntToStr(ClayCount)+' clay');

            Mouse(x, y, 3, 3, true); //clicking jug again
         
            if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
            begin
              Mouse(x, y, 3, 3, true);

              wait(200+random(100));
              MMouse(247, 406, 18, 15);
              for i:= 0 to 9 do
              begin
                wait(100);
                if GetColor(254, 412) = 938605 then break;
              end;

              GetMousePos(x,y);
              Mouse(x, y, 0, 0, false);
              wait(250);
              if not ChooseOption('All') then
              begin
                RMDebug('problem choosing option');
                Continue;
              end;

              wait(1000+ 750*WaterCount + Random(500));

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  for i:= 0 to 5 do
                  begin
                    wait(500);

                    if CountItems(ClayDTM, 'dtm', []) = 0 then
                      exit;
                    if CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                      break;


                  end;
                end else break;

              if not CountItems(ClayDTM, 'dtm', []) = (ClayCount - WaterCount) then
                if not CountItems(ClayDTM, 'dtm', []) = 0 then
                begin
                  RMDebug('Problem softening the clay....');
                  Continue;
                end;
            end;
           
          end else begin
            RMDebug('Couldn''t find the water');
            if not Relocate('water') then break;
            Continue;
          end;
        end else begin
          RMDebug('found no jug');
          LogOut;
          Players[CurrentPlayer].Active := false;
          exit;
        end;

      until(GetSystemTime - Time >= 60*5000)
    end;

    Procedure MoldClay;
    var
      x, y, i, SoftCount, Time:integer;
      TPA: TPointArray;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;

      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      SoftCount := CountItems(SoftDTM, 'dtm', []);
      if SoftCount <= 0 then exit;

      if not Relocate('wheel') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      repeat
        if not LoggedIn then break;
       
        CFound := false;
        Gametab(4);
        if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
          Mouse(x, y, 3, 3, true);
         
          if Find('wheel') then
          begin
            FFlag(0);
            for i:= 0 to 9 do
            begin
              wait(200);
              if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
              begin
                CFound := true;
                break;
              end;
            end;

            if not CFound then continue;
             
            if FindColorsTolerance(TPA, 0, 61, 439, 467, 457, 0) then
            begin
              SortTPAFrom(TPA, TP);
              Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
              wait(750);
              if not ChooseOption('ake X') then
              begin
                RMDebug('Problems choosing X');
                Continue;
              end else begin
                wait(350+Random(250));
                TypeSend(IntToStr(RandomRange(28, 99)));

                i := GetSystemTime;
                repeat
                  wait(250);
                  Antiban(RandomRange(2,4));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 750*SoftCount)

                i := GetSystemTime;
                repeat
                  wait(100);
                  Antiban(RandomRange(2,5));
                  if not FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                    break;
                until((GetSystemTime - i) >= 30000)

                if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
                begin
                  RMDebug('Something went wrong with moudling');
                  Continue;
                end;
              end;
            end;
          end;
        end else begin
          RMDebug('could not find soft clay');
          break;
        end;

        SoftCount := CountItems(SoftDTM, 'dtm', []);
        if SoftCount <= 0 then break;

        if not Relocate('wheel') then break;
      until (false);
    end;

    Procedure FireClay;
    var
      i, x, y, Time, TimeIt: integer;
      TPA, CTPA: TPointArray;
      TIA: TIntegerArray;
      TB: TBox;
      TP: TPoint;
      CFound: boolean;
    begin
      if not LoggedIn Then exit;
      if not InvFull then exit;


      if FindDTM(ClayDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if FindDTM(SoftDTM, x, y, MIX1, MIY1, MIX2, MIY2) then
        exit;

      if not Relocate('oven') then exit;

      if IsMember then
        TP := IntToPoint(MCX2, MCY2)
      else
        TP := IntToPoint(314, 448);

      Gametab(4);
      Time := GetSystemTime;
      repeat
        if not LoggedIn then break;
        CFound := false;
       
        for i:= 28 Downto 1 do
        begin
          TB := InvBox(i);
          if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
          begin
            SetLength(CTPA, 6);
            CTPA[0] := Point(TB.x1 + 20, TB.y1 + 5);
            CTPA[1] := Point(TB.x1 + 20, TB.y1 + 10);
            CTPA[2] := Point(TB.x1 + 20, TB.y1 + 15);
            CTPA[3] := Point(TB.x1 + 20, TB.y1 + 20);
            CTPA[4] := Point(TB.x1 + 20, TB.y1 + 25);
            CTPA[5] := Point(TB.x1 + 20, TB.y1 + 30);
            TIA := GetColors(CTPA);
          end;
        end;

        if Find('oven') then
        begin
          FFlag(0);

          for i:= 0 to 9 do
          begin
            wait(200);
            if FindColor(x, y, 128, 229, 350, 239, 360) then   //won't break as often as getcolor
            begin
              CFound := true;
              break;
            end;
          end;

          if not CFound then continue;

          if FindColorsTolerance(TPA, 0, 61, 438, 467, 457, 0) then
          begin
            SortTPAFrom(TPA, TP);
            Mouse(TPA[0].x, TPA[0].y - 50, 3, 3, false);
            wait(100);
            if not ChooseOption('ake X') then
            begin
              RMDebug('Problems choosing X');
              Continue;
            end else begin
              wait(350+Random(250));
              TypeSend(IntToStr(RandomRange(28, 99)));

              wait(1000);
              TimeIt := GetSystemTime;
              repeat
                wait(250);
               
                if FindNPCChatText('t have any', Nothing) then
                  break;
               
                if IsChatBoxTextAnyLine('have any more', 0) then
                  break;
                 
                 
                if random(100) <= 5 then CompassMove(1000);
                NoRandoms;
              until(GetSystemTime - TimeIt >= (4000*26))

              if not IsChatBoxTextAnyLine('have any more', 0) then
                if not FindNPCChatText('t have any', Nothing) then
                  Continue;
                 
              RMDebug('done waiting for fired stuff');
              for x := 0 to 9 do
              begin
                if not IsSameIntArray(TIA, GetColors(CTPA)) then
                  break;
                wait(750);
              end;
             
              RMDebug('all is done, dropping now');
              for i:= 1 to 28 do
              begin
                if i mod 3 = 0 then
                  NoRandoms;
                TB := InvBox(i);
                if not FindDTM(JugDTM, x, y, TB.x1, TB.y1, TB.x2, TB.y2) then
                begin
                  DropItem(i);
                  wait(200+Random(150));
                end;
              end;
              Inc(Loads);
              Inc(Players[CurrentPlayer].Banked);
              Inc(ReportVars[0]);
              RMDebug('done dropping');
              break;
            end;
          end else begin
            RMDebug('Could not find the text color....');
            Continue;
          end;
        end else begin
          RMDebug('Problems Finding the Oven');
          if not Relocate('oven') then break;
          Continue;
        end;

        if GetSystemTime - Time >= 60000 then
          break;
      until(false)

    end;

    begin
      SetupScript;
      SetupPlayer;
      DoTheColors;
      LoadDTMS;

      repeat
        if not LoggedIn then break;
        MineIt;
        SoftenClay;
        MoldClay;
        FireClay;
        Proggy;
        SwitchPlayers;
      until(false)


    end.

    It won't work anymore cus of color updates, but it might give you some inspiration



    ~RM
    Last edited by Sir R. M8gic1an; 02-13-2011 at 02:05 PM.

    I & I know Zion. It is in the spirit, body and mind of every one of us
    RMouse(obj: TMSIObject): boolean;

  14. #14
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    fixed the wheel finding issue, and the issue with the urn update. I will look at adding urn support in the near future.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  15. #15
    Join Date
    Mar 2006
    Posts
    3,051
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    have 14 buckets in your first 14 inventory slots.
    Buckets should not be necessary anymore, since you can wet clay directly from any water source.


  16. #16
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    I was not aware of this. good to know, to have better exp per hour.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  17. #17
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    New update, removed the bucket requirements, due to buckets not being necessary. Improved some timing issues. look for future updates.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  18. #18
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    Moved to Public Scripts Section!

  19. #19
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    It has a problem when it's going to the pottery wheel, it mis-clicked like 5 times before it found the wheels, every time it was clicking above the actual wheel.

    it found it after a while though!

    will post proggy after a while


    Progress Report:
    [[(608, 41)], [(636, 49)]]
    going to throw
    failed to find wheel, trying again
    failed to find wheel, trying again
    failed to find wheel, trying again
    [[(592, 77)], [(619, 85)]]
    going to throw
    failed to find wheel, trying again
    failed to find wheel, trying again
    failed at throwing, logging out
    going to fire
    failed to click oven, trying again
    going to fire


    didn't execute after logging out (which it did log out so we know if it fails too much it will logoff)


    edit:

    after watching it for a while
    I'd add a failsafe for clicking the pottery wheel & the "create bowls" or whatever..
    also when firing the bowls / pots, add a failsafe for that too.. sometimes it doesn't click & just sits there for the wait time then drops

    mining & softening clay is working great, didn't see 1 problem with either of those.
    Last edited by grats; 04-04-2011 at 11:48 AM.
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  20. #20
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Thank you for the detailed feedback. I am looking into this issues now, and should have them resolved by tonight. I also plan on getting away from the time, and want to get to inventory detection for the stages. This will be coming over time, depending on how well tpa works with me.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  21. #21
    Join Date
    Jul 2010
    Location
    Western US
    Posts
    387
    Mentioned
    0 Post(s)
    Quoted
    4 Post(s)

    Default

    Update 04 is now up and running. I have removed all static wait times, and added a few more failsafes. I also have improved the wheel finding yet again, and hopefully it remains problem free. I probably will be lifting the beta title in the near future, when I believe I have worked out all the kinks.

    Once again, detailed feedback is appreciated so I can iron out all possible issues that may arise.
    Of all the things I have lost, I miss my mind the most.
    Current Projects:
    Addy bar miner and superheater

  22. #22
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Where did the download for 04 go? I have it at home, was going to test it out in class
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  23. #23
    Join Date
    Sep 2006
    Location
    New Jersey, USA
    Posts
    5,347
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    In class?
    Interested in C# and Electrical Engineering? This might interest you.

  24. #24
    Join Date
    Feb 2007
    Location
    Colorado, USA
    Posts
    3,716
    Mentioned
    51 Post(s)
    Quoted
    624 Post(s)

    Default

    Quote Originally Posted by Smartzkid View Post
    In class?
    Yea, I'm in my networking class and my teacher says I participate too much and to let other kids answer stuff lol.............
    The only true authority stems from knowledge, not from position.

    You can contact me via matrix protocol: @grats:grats.win or you can email me at the same domain, any user/email address.

  25. #25
    Join Date
    Jan 2010
    Posts
    5,227
    Mentioned
    6 Post(s)
    Quoted
    60 Post(s)

    Default

    Quote Originally Posted by grats View Post
    Yea, I'm in my networking class and my teacher says I participate too much and to let other kids answer stuff lol.............
    Happens to me, too. :<

Page 1 of 2 12 LastLast

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
  •