Page 20 of 22 FirstFirst ... 101819202122 LastLast
Results 476 to 500 of 526

Thread: CrafterMaster

  1. #476
    Join Date
    Oct 2006
    Posts
    206
    Mentioned
    2 Post(s)
    Quoted
    45 Post(s)

    Default

    Sometimes it gets stuck at the somewhere, i got a pic here and a proggy.

    Found Craft Alter with FindObject
    Found Portal with FindObject
    Player is in the bank
    Trip 1 of 8
    Main Loop: Opening Bank
    Found Altar Enterance with SortATPASize MiddleTPA
    Found Craft Alter with FindObject
    Found Portal with FindObject
    Trip 2 of 8
    Main Loop: Opening Bank
    Found Altar Enterance with SortATPASize MiddleTPA
    Found Craft Alter with FindObject
    Found Portal with FindObject
    Trip 3 of 8
    Main Loop: Opening Bank
    DDTMMaster(4) OffMiniMap helper was just called from Main Loop:
    Found Altar Enterance with SortATPASize MiddleTPA
    Found Craft Alter with FindObject
    Found Portal with FindObject
    Trip 4 of 8
    Main Loop: Opening Bank
    Found Altar Enterance with SortATPASize MiddleTPA
    Found Craft Alter with FindObject
    Found Portal with FindObject
    Trip 5 of 8
    Main Loop: Opening Bank
    Found Altar Enterance with SortATPASize MiddleTPA
    Found Craft Alter with FindObject
    Successfully executed







  2. #477
    Join Date
    Feb 2007
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    okay, I am having problems with bank counting (members fix) but once that is fixed and I look at the altar functions things will be working again

  3. #478
    Join Date
    Oct 2006
    Posts
    585
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    why dont you just ask if someone has the VER before you screwed up your HDD?

    Quote Originally Posted by YoHoJo View Post
    I like hentai.

  4. #479
    Join Date
    Jul 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    so i declare players and set up the script and it runs but says (my name) and says player logged in is not in player array...

  5. #480
    Join Date
    Jul 2008
    Location
    In hell
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    =============== Air Crafter Master .79C By King Vash ===============
    P=R=O=G=R=E=S=S= =R=E=P=O=R=T= =T=I=M=E=
    :3 Minutes and 29 Seconds:

    Saved 0 Users with 0 Attempts. Waited 0 times, and performed 2 AntiBans

    0:*** =F RC:42, 224 Airs in 2 Trips, 56/56 Ess! Loc: Near, In, Outside Altar

    2 Banks! CrafterMaster used 56 / 56 ess! that's 98 percent
    Banked: 224 Air Runes (15GP) = 3360 GP - 2128 GP for Ess = 1456 GP Profit
    ======================= Air Crafter Master ! =======================
    Successfully executed

    For some reason, the script terminates after 2-3 loads always after entering the ruins and i can't count the amount of ess i have in the bank.
    Earn money for RS Membership now by clicking the link! http://buxp.info/?r=azandrias

  6. #481
    Join Date
    Jul 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ]so any help???????
    i keep getting logged in player is not in player array.....
    i declared players like i normally do and it still does says so

  7. #482
    Join Date
    May 2007
    Location
    Vancouver, Canada , eh?
    Posts
    320
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by m 4 h u View Post
    ]so any help???????
    i keep getting logged in player is not in player array.....
    i declared players like i normally do and it still does says so
    dude stop spamming you already said this once in jukkas crafter the answer is right here jeez... http://www.srl-forums.com/forum/show...05&postcount=1 use the search button!
    I had to change this from my old one...?

  8. #483
    Join Date
    Mar 2007
    Location
    tha ghettoo
    Posts
    84
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    haha i just started running it again, and theres a shitload or air crafters in world 142 XD

  9. #484
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    OOO nice script i'll run and post proggy later after i get ess

  10. #485
    Join Date
    Jul 2008
    Location
    Canada
    Posts
    1,612
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Noob

    Quote Originally Posted by m 4 h u View Post
    ]so any help???????
    i keep getting logged in player is not in player array.....
    i declared players like i normally do and it still does says so
    Seriously just use the search button don't the spam that isnoob and i hate nooobs!

  11. #486
    Join Date
    Mar 2008
    Posts
    41
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Might just be me... but where is the script attachment. I cant see it anywhere...
    Nvm... it was right infront of me...
    Code:
    http://img147.imageshack.us/img147/9...trycopyyh0.png
    Siggy made by me using Photoshop CS3.
    Willing to test any script that isn't member or pointless.

  12. #487
    Join Date
    Feb 2007
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I logged in for the first time in weeks. Rune Ess 57 each! I have 110K I bought at 36 gp!

  13. #488
    Join Date
    Jan 2008
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  14. #489
    Join Date
    Nov 2007
    Posts
    236
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Line 57: [Error] (16347:1): Identifier expected in script C:\Users\sondre\AppData\Local\Temp\CrafterMaster79 CRelease.scar

    i get that

  15. #490
    Join Date
    Dec 2006
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Randomly stops at bank and logs out(Script ends).

    Other than that, great script, quick and effective.

    Edit:
    Actually it just randomly stops not just at the bank but in a few spots.

  16. #491
    Join Date
    Jan 2008
    Posts
    154
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

  17. #492
    Join Date
    Dec 2006
    Posts
    28
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    lol dude, kay.

  18. #493
    Join Date
    May 2008
    Location
    Mental Hospital
    Posts
    414
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    Line 42: [Error] (16332:1): colon (':') expected in script C:\Documents and Settings\Owner\Local Settings\Temporary Internet Files\Content.IE5\3XEJDBV0\CrafterMaster79CRelease[1].scar


    erm :\?

  19. #494
    Join Date
    May 2007
    Location
    Vancouver, Canada , eh?
    Posts
    320
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by noobking21 View Post
    Line 42: [Error] (16332:1): colon (':') expected in script C:\Documents and Settings\Owner\Local Settings\Temporary Internet Files\Content.IE5\3XEJDBV0\CrafterMaster79CRelease[1].scar


    erm :\?
    First of all it's outdated. Second of all if it says it needs a ";" why don't you just add one..
    I had to change this from my old one...?

  20. #495
    Join Date
    Mar 2007
    Location
    tha ghettoo
    Posts
    84
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    and 3. its still working for me

  21. #496
    Join Date
    Aug 2007
    Location
    Where do you live?
    Posts
    934
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Doesn't seem to be outdated... but jus incase King Vash still checks this (and plans on updating ever) you should get rid of alot of the anti-ban cuz it freezes up the script... Also for the running, it looks in the gametab for the run % instead of by the minimap... other than that its a pretty sweet script..

  22. #497
    Join Date
    Feb 2007
    Posts
    419
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I do check this but I do not have much time to update the script. If someone posts the fixes I can apply them and re upload it

  23. #498
    Join Date
    Aug 2008
    Posts
    23
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    it tells me to set the user setting correctly, i did! except for the fact that i didnt put anything for bankpin because i dont have 1, wats wrong?

  24. #499
    Join Date
    May 2007
    Location
    Vancouver, Canada , eh?
    Posts
    320
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Copy it and show it here? (don't show us your password and username though -.-)
    I had to change this from my old one...?

  25. #500
    Join Date
    Mar 2007
    Location
    tha ghettoo
    Posts
    84
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    79A is still working for me ;o

    here u go:

    SCAR Code:
    {---------------------------------------------------------------
    # ScriptName  = Air Crafter Master
    # Author      = King Vash
    # Description = Crafts air runes with an air tiara (equip before start)
    # Date        = 03/08/08
    # Comments    = Set options in line 28-61.
    # Thanks To   = yourock12345 and unl!
    ---------------------------------------------------------------}

    program AirCrafterMaster;
    {.include SRL/SRL/Misc/Smart.scar}
    {.include SRL/SRL.scar}
    {.include SRL/SRL/skill/Runecrafting.scar}

    type color = integer;
    var
       x, y,                                  // Provides temporary coordinates
       NeededSave,                            // Count of users that need to be saved
       SavedUsers,                            // Count of users that have been saved
       WaitCount,                             // Counts the number of time waited
       WaitTimer: Integer;                    // Time spent in wait loop
       FRoadsColor, FWaterColor, RoadsColor,  // Colors used throughout the program
       RockColor, RuneCliffColor : color;
       LastReportTimer, Reporter,             // Records the time from last report
       AntiBanCount: Integer;                 // Counts Number of AntiBans performed
       Run : Boolean;                         // Indicates whether player is running
       DDTMfailed : array[1..10] of Integer;  // DDTM failure count
       loop : string;                         // stores current loop, Values are "Main Loop", "User Save Loop"
    {-----USER SETTINGS --- SET THESE --- }
    const Version          = '.79A';          // DON'T CHANGE!
          SMARTWorld       = 'world142';               // Which world? I suggest 142
          StartPlayer      = 0;               // Player to start with
          TotalPlayerCount = 1;               // Number of players
          LoadsPerLogin    = 7;               // How many loads per login plus random 3
          TotalWait        = 1;               // Added time at the end of player list plus up to a minute
          UseRun           = True;            // Do you want to your characture to run?
          CleanDebug       = False;           // Do you want to clear debug after every load
          PayingAttn       = 1;               // Set This greater than 0 or script won't run. Ff you don't I'll know you didn't set the user variables

    var  UserSaved, BankEss, AirsCrafted, TripsToRun : array[0..TotalPlayerCount] of Integer;

    procedure DeclarePlayers;
    begin
      SRLId         := '';        //SRL stats ID
      SRLPassword   := '';        //SRL stats password
      CurrentPlayer := StartPlayer;
      NumberOfPlayers(TotalPlayerCount);

      Players[0].Name :='';      //Name
      Players[0].Pass :='';      //Password
      Players[0].Nick :='';      //3 or 4 letters of your name (don't use first three)
      Players[0].Active := True;     //Do you want to use this player?
      Players[0].Pin := '';      //BankPin
     
    end;
    {-----END USER SETTINGS ---}

    procedure AutoTalker(action : integer);                                       forward;
    function  FindRockColorMine: Integer;                                          forward;
    function  FindRuneCliffColor: Integer;                                        forward;
    procedure FlagFinder(Distance:integer);                                       forward;
    function  HaveEss : Boolean;                                                  forward;
    function  InAltar(Refresh : Boolean) : Boolean;                               forward;
    procedure SetRunState;                                                        forward;
    function  SetUpDDTM(casedtm, AddedTol:integer; RefreshColor:Boolean):integer; forward;
    procedure ProggyToFile(Proggy:array of string);                               forward;

    function ActivePlayers : Integer;
    //Returns the number of active players
    var i: Integer;
    begin
      Result := 0;
      for i:=0 to (HowManyPlayers - 1) do if (Players[i].Active = True) then Result := Result + 1;
    end;

    procedure AntiRandom(number:integer);
    //Checks for random events
    begin
      if not LoggedIn then Exit;
      Status('Performing Anti-Random');
      case number of
        1:FindNormalRandoms;
        2:FindTalk;
      end;
    end;

    procedure AntiBan;
    //Attemps to look more human by during random actions, and performs a random check
    var z:integer;
    begin
      if not LoggedIn then Exit;
      z := random(75);
      if z > 50 then Exit;
      Inc(AntiBanCount);
      status(loop + 'Antiban case: ' + IntToStr(z));
      AntiRandom(randomrange(1,2));
      case z of
        1,2,3,4,5,6,7:     HoverSkill('RuneCrafting',False);
        8,9,10,11,12:      HoverSkill('random',False);
        12,13,14,15:       GetAllLevels;
        16,17,18,19:       Gametab(randomrange(5,7));
        20,21,22,23:       Gametab(randomrange(8,9));
        24,25,26,27:       Gametab(13);
        28,29,30,31:       AutoTalker(random(2));
        32,33,34,35:       BoredHuman;
        36,37,38:          RandomMovement;
        39,40,41:          RandomRClick;
        42,43,44:          FTWait(1);
        45,46:             DoEmote(random(36)+1);
        47,48:             MouseSpeed := RandomRange(10,14);
        49,50:             MMouse(random(600),random(600),50,50);
      end;
    end;

    function AreaLoading:boolean;
    //Checks if loading (the black box in the corner)
    var LoadingScreen:integer;
    begin
      LoadingScreen := BitmapFromString(47, 4, 'beNr7/x8IGJAAGpds' +
           'ADeHJAOJccx/GCAoiF8cLotLPUHHIItg9S9+BcgMPLK43EmMY5B9h' +
           'N+FRMqC2AA/tJVr');
      Result:= FindBitmapin(loadingscreen, x, y, 6, 14, 53, 18);
      FreeBitmap(loadingscreen);
      wait(10)
    end;

    Function AreaWaitTillLoaded(MaxLoadingTime,MaxWaitTime:Integer): Boolean;
    //Waits till area is loaded
    var WaitTimer:Integer;
    begin
      Result := False;
      if not LoggedIn then Exit;
      MarkTime(WaitTimer);
      while not AreaLoading do if (TimeFromMark(WaitTimer)>MaxWaitTime) then Exit else wait(100);
      MarkTime(WaitTimer)
      while AreaLoading     do if (TimeFromMark(WaitTimer)>MaxLoadingTime) then Exit else wait(100);
      wait(1200 + random(500));
      Result := True;
    end;

    Procedure AutoTalker(action : integer);
    //Some automated Talking
    begin
      case action of
        0:if (0 <> pos('alter',Players[CurrentPlayer].Loc)) then TypeSend('Runecrafting level?');
        1:if InChat('runecrafting level') or InChat('rc level') or InChat('rc lvl') then
            case random(2) of
              0: TypeSend('rc level ' + IntToStr(Players[CurrentPlayer].level[7]));
              1: SayCurrentLevels('runecrafting');
              2: TypeSend('rc ' + IntToStr(Players[CurrentPlayer].level[7]) + ' u?');
            end;
      end;
    end;

    function DDTMmaster(Number:integer; Recursive:boolean):boolean;
    //Handles moving from one DDTM to the next
    var
    xoff,yoff,MouseRan,ddtm,flagger:integer;
    colorrefresh:Boolean;
    begin
      if not LoggedIn then Exit;
      Writeln('DDTMMaster(' + inttostr(number) + ') was just called from ' + loop);
      MakeCompass('n');
      SetRunState;
      Result   := False; //Initilized to False
      Flagger  := 12;    //Wait till your with in 14 pixels of flag before performing next search
      MouseRan := 5;     //Clicks with in a 10 x 10 box (centered around found poiont)
      xoff     := 0;     //Standard offset is 0 in the x and y direction
      yoff     := 0;
      if ((loop = 'Main Loop: ') and Recursive) then ColorRefresh := False else ColorRefresh := True;
      if (Number = 4) or (Number = 8) or (Number = 9) then Flagger := 5;
      if (Number = 5) then Flagger := 20;
      case Number of      //Sets up MouseRan
        1: MouseRan := 4;
        2: MouseRan := 6;
        9: MouseRan := 4;
      end;
      case Number of      //Sets up the mouse offsets
        3: yoff := 5;
        4: begin
             xoff := -35;
             yoff := -5;
           end;
        5: begin
             yoff := -5;
             xoff := -40;
           end;
        6: begin
             yoff := -10;
             xoff := -15;
           end;
        7: begin
             yoff := -20;
             xoff := -5;
           end;
        8: begin
             yoff := -5;
             xoff := 2;
           end;
        9: begin
             xoff := -5;
             yoff := -10;
          end;
        10:   yoff := -11;
      end;
      case Number of                              // This case setups up the DDTM
       1,9: ddtm := setupddtm(1, 0, ColorRefresh);// 1 & 9 are on the road between bank and gate, next to mining guild
       2,8: ddtm := setupddtm(2, 0, ColorRefresh);// 2 & 8 are tree and water just above gate
       3,7: ddtm := setupddtm(3, 0, ColorRefresh);// 3 & 7 are tree on right side of the road after gate (not a symbol)
       4,6: ddtm := setupddtm(4, 0, ColorRefresh);// 4 & 6 are the single rock on right side of the road below the tree (4 is off to the side)
       5:   ddtm := setupddtm(5, 0, ColorRefresh);// 5     is multi rock group (5 is off to the side)
       10:  ddtm := setupddtm(6, 0, ColorRefresh);// 10 is banker in bank
      end;
      if (DTMRotated(ddtm, x, y, mmx1 , mmy1, mmx2, mmy2)) then                                           // Attempts to find DDTM
      begin                                                                                                 // Success : found DDTM
        Status(Loop + 'Found DDTM(' + inttostr(number) + ')');                                              // Set status to found
        if rs_onminimap(x+xoff-MouseRan, y+yoff-MouseRan) and rs_onminimap(x+xoff+MouseRan, y+yoff+MouseRan)// Is the point to click onscreen?
          then Mouse(x + xoff, y + yoff, MouseRan, MouseRan, true)                                            // Yes: Click there
          else begin                                                                                          // No : DDTM plus offset is not onscreen
            Writeln('DDTMMaster(' + inttostr(number) + ') OffMiniMap helper was just called from ' + loop)      // Debug this fact                                                                      // Yes : Click somewhere to DDTM
            Mouse(x, y, 3, 3, True);                                                                            // Click close to DDTM
            FFlag(9);                                                                                           // Wait till your Close
            if (DTMRotated(ddtm, x, y, mmx1 , mmy1, mmx2, mmy2))                                                // Find The DDTM again
              then Mouse(x + xoff, y + yoff, MouseRan, MouseRan, true)                                            // Found and Clicked properly
          end;
        Result:=True;                                                                                         // Result is True!
        Ftwait(4);                                                                                            // Look for Bad Stuff
        FlagFinder(flagger);                                                                                  // Wait Till player is appropiate distance away
      end;
      FreeDTM(ddtm);                                                                                        // Free the DDTM
      if not Result then
      begin
        if Recursive then Result := DDTMMaster(number, False)
        else begin
          Players[CurrentPlayer].Loc := ('F in DDTMMaster(' + inttostr(number) + ')');
          Writeln(Players[CurrentPlayer].Loc);
          Inc(DDTMfailed[number]);
        end;
      end;
    end;

    function FindColorPro(color:string; Refresh:Boolean):Integer;
    //Finds Colors
    begin
      if not LoggedIn then Exit;
      case lowercase(color) of
        'fallyroad': if ((FRoadsColor<>0) and (CountColor(FRoadsColor, MMX1, MMY1, MMX2, MMY2) > 300) and (not Refresh))
                       then Result := FRoadsColor    else Result := FindFallyRoadColor;
                       
        'water':     if ((FWaterColor<>0) and (CountColor(FWaterColor, MMX1, MMY1, MMX2, MMY2) > 100) and (not Refresh))
                       then Result := FWaterColor    else Result := FindWaterColor;
                       
        'road':      if ((RoadColor<>0) and (CountColor(RoadColor, MMX1, MMY1, MMX2, MMY2) > 200) and (not Refresh))
                       then Result := RoadsColor     else Result := FindRoadColor;
                       
        'rock':      if ((RockColor<>0) and (CountColor(RockColor, MMX1, MMY1, MMX2, MMY2) > 8) and (not Refresh))
                       then Result := RockColor      else Result := FindRockColorMine;
                       
        'runecliff': if ((RuneCliffColor<>0) and ((CountColor(RuneCliffColor, MMX1, MMY1, MMX2, MMY2) > 2000)) and (not Refresh))
                       then Result := RuneCliffColor else Result := FindRuneCliffColor;
      end;
      if (0 <> Pos('Color = ',GetDebugLine(GetDebugLineCount-1))) then DeleteDebugLine(GetDebugLineCount-1); // Deletes all color = messages
      if (Result = 0) then Result := 999999999;                               // 0 is black and might be found accidentally
    end;

    function FindThatAltar:Boolean;
    // Finds and Clicks the entrance to the altar
    var
      altarTPA, altar2TPA: TPointArray;
      TPAA: T2DPointArray;
    begin
      Result := False;
      if not LoggedIn then Exit;
      FFlag(0);
      Status(Loop + 'Finding Alter');
      FindColorsSpiralTolerance(180, 200, altarTPA, 5133140, msx1, msy1, msx2, msy2, 10);
      FindColorsSpiralTolerance(180, 200, altar2TPA, 8678738, msx1, msy1, msx2, msy2, 4);
    //OLD  Mid := MiddleTPA(CombineTPA(altarTPA,altar2TPA))        //joins the TPA arrays and looks at the middle point
      TPAA := TPAToATPAEx(CombineTPA(altarTPA,altar2TPA), 75, 75); //combines the TPA then makes 75x75 boxes
      SortATPASize(TPAA, True);                                    //organizes the boxes by number of points in box
      MiddleTPAEx(TPAA[0], X, Y);                                  //finds the middle point in the box with most points
      MMouse(X, Y, 4, 4);                                          //moves mouse to that spot
      Wait(RandomRange(100, 150));                                 //random wait
      if IsUpTextMultiCustom(['Mysteri','Enter Mys','erious ru']) then //is the uptext correct?
      begin
        Writeln('Found Altar Enterance with SortATPASize MiddleTPA');
        Mouse(X, Y, 2, 2, true);
      end else
      if FindObjTPA(x, y, 6646892, 10, -1, 30, 30, 10, ['Craft','raft','aft-rune','rune Al']) Then
      begin
        Writeln('Found Altar Enterance with FindObjTPA');
        Mouse(x, y, 2, 2, true);
      end;
      if InAltar(False) then Result := True;
      if Result = True then AreaWaitTillLoaded(5000,7500);
    end;

    Function FindClickAltar:Boolean;
    //Finds and Clicks the Crafter
    var
      altarTPA, altar2TPA : TPointArray;
      TPAA: T2DPointArray;
    begin
      Result := False;
      if not LoggedIn       then Exit;
      if not InAltar(False) then Exit;
      if not HaveEss        then Exit;
      Status(Loop + 'clicking that darn altar');
      FindColorsSpiralTolerance(400, 200, altarTPA, 6910321, msx1, msy1, msx2, msy2, 10);
      FindColorsSpiralTolerance(400, 200, altar2TPA, 8292482, msx1, msy1, msx2, msy2, 6);
    //OLD  Mid := MiddleTPA(CombineTPA(altarTPA,altar2TPA))        //joins the TPA arrays and looks at the middle point
      TPAA := TPAToATPAEx(CombineTPA(altarTPA,altar2TPA), 75, 75); //combines the TPA then makes 75x75 boxes
      SortATPASize(TPAA, True);                                    //organizes the boxes by number of points in box
      MiddleTPAEx(TPAA[0], X, Y);                                  //finds the middle point in the box with most points
      MMouse(X, Y, 4, 4);                                          //moves mouse to that spot
      Wait(RandomRange(100, 150));                                 //random wait
      if IsUpTextMultiCustom(['Craft','raft','aft-rune','rune Al','Alter']) then
      begin
        Writeln('Found Craft Altar with SortATPASize MiddleTPA');
        Mouse(X, Y, 2, 2, true);
        Result := True;
      end else
      If FindObjTPA(x, y, 6582135, 10, -1, 30, 30, 10, ['Craft','raft','aft-rune','rune Al']) Then
      begin
        Writeln('Found Craft Alter with FindObject');
        Mouse(x, y, 2, 2, true);
        Result := True;
      end;
      FFlag(6);
      Wait(RandomRange(1500, 2500));
    end;

    Function FindEscapeAltar:Boolean;
    //Finds and Clicks portal to exit
    begin
      Result := False;
      if not LoggedIn then Exit;
      if not InAltar(False)  then Exit;
      Status(Loop + 'Escaping An Altar');
      if (FindObjTPA(x, y, 6655639, 10, -1, 25, 25, 15, ['Portal','Porta','ortal','rtal']) or
          FindObjTPA(x, y, 5996680, 25, -1, 15, 15,  5, ['Portal','Porta','ortal','rtal'])) then
      begin
        Mouse(x, y, 2, 2, true);
        Result := True;
        Writeln('Found Portal with FindObject');
        AreaWaitTillLoaded(5000,7500);
      end;
    end;

    Function FindEscapeAltarMouse:Boolean;
    //Moves down a lot ad tries to exit through the portal again
    begin
      if not LoggedIn then Exit;
      if InAltar(False) then Mouse(600,125,10,10,True);   //only called when in altar upper corner
      Flag;
      Result := FindEscapeAltar;
    end;

    Function FindThreeAltar: Boolean;
    //Strings all the altar functions together
    begin
      Result := False;
      if not FindThatAltar   then Exit;
      if not FindClickAltar  then Exit;
      Antiban;
      if not FindEscapeAltar then if not FindEscapeAltarMouse then Exit;
      Result := True;
    end;

    function FindRockColorMine: Integer;
    //Finds Rock Color
    var
      GC, a, l, TestColor: integer;
      P:array of Tpoint;
    begin
      GC := 6444639;
      Flag;
      FindColorsSpiralTolerance(MMCX,MMCY, P, GC, MMX1,MMY1,MMX2,MMY2, 75);
      l:=GetArrayLength(P);
      for a:= 0 to l-1 do
      begin
        TestColor := GetColor(P[a].x,P[a].y);
        if (GetColor(P[a].x-1,P[a].y)=TestColor-723980) then
        begin
          Result := TestColor;
          WriteLn('Rock Color = ' + IntToStr(TestColor));
          Exit;
        end;
      end;
      WriteLn('Could not find Rock Color!');
      Result := 0;
    end;

    function FindRuneCliffColor: Integer;   //Uses Tarajunky's format and CTS v2 style
    //Finds rune cliff color
    var
      i, l, TColor   : integer;
      Red,Green,Blue : integer;
      P              : TPointArray;
    begin
      Result := 0;
      if not LoggedIn then Exit;
      Flag;
      FindColorsTolerance(P, 4354170, MMX1, MMY1, MMX2, MMY2, 65);
      l := (GetArrayLength(P)-1);
      for i := 0 to l do
      begin
        if rs_OnMinimap(P[i].x,P[i].y) then
        begin
          TColor := GetColor(P[i].x,P[i].y);
          ColortoRGB(TColor,Red,Green,Blue);
          if (InRange(Red-Green,4,30) and InRange(Red-Blue,45,64) and InRange(Green-Blue,25,60)) then      //R-G R-B G-B inrange
            if (InRange(Red,90,150) and InRange(Green,80,140) and InRange(Blue,45,90)) then                //Red Green Blue inrange
              if (CountColor(TColor, MMX1, MMY1, MMX2, MMY2) > 2000) then
              begin
                Result := TColor;
                Writeln('RuneCliff Color = ' + IntToStr(Result));
                Exit;
              end;
        end;
      end;
    end;

    procedure FlagFinder(Distance:integer);
    //Waits till falg is within distance (measured in pixels)
    var CurrentDistance, StartTime : integer;
    begin
      if not LoggedIn then Exit;
      if Distance <= 6 then Distance := 6;
      StartTime := GetTickCount;
      repeat
        CurrentDistance := FlagDistance;
        status('flag is ' + Inttostr(currentdistance) + ' away');
        wait(40);
      until (((GetTickCount - StartTime) > 25000) or (CurrentDistance <= Distance));
    end;


    function HaveEss : Boolean;
    //Checks if character has ess in your inventory
    var Ess : integer;
    begin
      if not LoggedIn then Exit;
      GameTab(4);
      Ess := DTMFromString('78DA63EC616060F06740015121210C5C409A1' +
           '188FF0301E3649020031A6084AB01F36603092F026A5A80442401' +
           '350D40C21DBF1A00CD7D0990');
    // OLD Result := (CountItemsDtm('inventory', Ess) > 25)
      Result := (ItemAmount('inventory', 'dtm', Ess, [5]) > 25);
      FreeDTM(Ess);
    end;


    function InAltar(Refresh : Boolean) : Boolean; //Thanks Markus
    //Check if character is in altar
    begin
      if not LoggedIn then Exit;
      RuneCliffColor := FindColorPro('RuneCliff', Refresh);
      Result := (RuneCliffColor <> 999999999)
      if Result = False then Writeln('InAltar is False');
    end;


    function MoveFromAltarToBank:Boolean;
    //Moves your character from the Altar to the Bank and returns true if successful.
    var i : integer;
    begin
      Result := False;
      if not LoggedIn then Exit;
      AntiRandom(1);                                                   //Checks and handles if a random event is happening right now
      MakeCompass('n');                                                //Makes the compass North so that the next mouse clicks works
      Mouse(676,48,10,7,true)                                          //Moves the character back to the left so that a DDT point is in view.
      FFlag(7);                                                        //Wait until the character is within 7 pixels of the flag.
      if not DDTMmaster(6, True) then Exit;                            //Walk to the 5th point on the path back to the bank.
      FFlag(5);                                                        //This guarantees the character has stopped moving
      RadialRoadWalk(FindColorPro('Road', False), 300, 420, 40, 5, 3); //Plant a flag (4rd point) on the road
      FFLag(15);                                                       //Wait until the character is near the flag
      for i:= 7 to 10 do if not DDTMMaster(i, True) then Exit;         //Walks 4th, 3rd, 2nd and 1st point ending at bank
      Antiban;                                                         //Anti Random
      Players[CurrentPlayer].loc:='You Won the Game!';
      Result := True;
    end;

    function MoveFromBankToAltar:Boolean;
    //Moves your character from the Bank to the Altar and returns true if successful.
    var i : integer;
    begin
      Result := False;
      if not LoggedIn then Exit;
      AntiRandom(2);
      for i := 1 to 5 do if not DDTMMaster(i, True) then Exit;
      Antiban;
      Result := True;
    end;

    Procedure MoveToBank(CurrentLocation:String);
    //Moves from current location to altar and crafts (if needed) then to the bank
    var i : integer;
    begin
      if HaveEss then
      begin
       case CurrentLocation of
          'Found at DDTM(1)'  : if MoveFromBankToAltar then FindThreeAltar;
          'Found at DDTM(2)'  : begin for i := 2 to 5 do if not DDTMmaster(i, True) then Exit; FindThreeAltar end;
          'Found at DDTM(3)'  : begin for i := 3 to 5 do if not DDTMmaster(i, True) then Exit; FindThreeAltar end;
          'Found at DDTM(4)'  : begin for i := 4 to 5 do if not DDTMmaster(i, True) then Exit; FindThreeAltar end;
          'Found at DDTM(5)'  : if DDTMmaster(5, True) then FindThreeAltar;
          'Found near PORTAL',
          'Found near CRAFTER': if FindClickAltar then FindEscapeAltar;
          'Found near Entry'  : if FindThreeAltar then MoveFromAltarToBank;
          'Could not be found but is InAltar': begin Mouse(600,125,10,10,True); if FindClickAltar then FindEscapeAltar end;
        end
        MoveFromAltarToBank;
      end else
       case CurrentLocation of
          'Found at DDTM(1)'  :  for i := 9 to 10 do if not DDTMmaster(i, True) then Exit;
          'Found at DDTM(2)'  :  for i := 8 to 10 do if not DDTMmaster(i, True) then Exit;
          'Found at DDTM(3)'  :  for i := 7 to 10 do if not DDTMmaster(i, True) then Exit;
          'Found at DDTM(4)'  :  begin
                                   if not DDTMmaster(6, True) then Exit;
                                   FFLag(5); RadialRoadWalk(FindColorPro('Road', False), 300, 420, 40, 3, 5);
                                   for i := 7 to 10 do if not DDTMmaster(i, True) then Exit;
                                 end;
          'Found at DDTM(5)'  :  MoveFromAltarToBank;
          'Found near PORTAL' :  if FindEscapeAltar then MoveFromAltarToBank else if FindEscapeAltarMouse then MoveFromAltarToBank;
          'Found near CRAFTER':  if FindEscapeAltar then MoveFromAltarToBank else if FindEscapeAltarMouse then MoveFromAltarToBank;
          'Found near Entry'  :  MoveFromAltarToBank;
          'Could not be found but is InAltar': if FindEscapeAltarMouse then MoveFromAltarToBank;
        end;
    end;

    function OpenABank:boolean;
    //Retrieves Ess from Bank
    var Ess, Air, CountAir: Integer;
    begin
      Result := False;
      Writeln('Debug: OpenABank started');
      if not LoggedIn then Exit;
      Flag;
      AutoTalker(2);
      if not (DTMRotated(SetUpDDTM(6, 0, True), x, y, mmx1, mmy1, mmx2, mmy2)) then Exit; //SetUpDDTM(6) is the bank ddtm
      if HaveEss then begin Result := True; Exit; end;                                    //listed 2nd so that if it detects your not in the bank it can fail
      if not (Inrange(y,80,115) and InRange(x,600,660)) then begin DDTMMaster(10, True); Flag; end;
      Writeln(Loop + 'Opening Bank');
      if not OpenBankFast('feb') then if not OpenBankGlass('feb', true, true) then Players[CurrentPlayer].Loc := 'F at OpenABank : Opening Bank';
      if PinScreen Then InPin(Players[CurrentPlayer].Pin);
      if BankScreen then
      begin
        FixBank;
        Air := DTMFromString('78DA630C61626068656440064F1F3E64E002D' +
         '220D1FF40C0E80654D380AA0624CB045503E67902793D04D4C400' +
         '79FD04D4240279F5F8D50000B6250B12');
        if DTMRotated(Air, x, y, MIX1, MIY1, MIX2, MIY2) then
        begin
    //    OLD  CountAir := AmountDtm('inventory',Air)
          CountAir := ItemAmount('inventory', 'dtm', Air, [5]);
          IncEx(AirsCrafted[CurrentPlayer], CountAir);
          IncEx(ReportVars[6], CountAir); //Increases the SRL Stat variable for airs [15] for me [6] for others
        end;
        FreeDTM(air);
        DepositAll;
        Ess := DTMFromString('78DA63EC616060F06740015121210C5C409A1' +
         '188FF0301E3649020031A6084AB01F36603092F026A5A80442401' +
         '350D40C21DBF1A00CD7D0990');
        Wait(RandomRange(500,1000));
        if DTMRotated(Ess, x, y, msx1, msy1, msx2, msy2) then
        begin                  //Found essances in bank
          MMouse(x, y, 3, 3);
          wait(RandomRange(150,300));
          if IsUpTextMultiCustom(['Withdraw-1 Ru', 'Rune ess', 'une ess']) then
          begin
            Status('Found Ess DTM');
            Mouse(x, y, 3, 3, False);
            if RBoolEx(2) then
            begin
               ChooseOption('Withdraw-X');
               wait(RandomRange(750,1250));
               Typesend('28');
            end else ChooseOption('Withdraw-All');
            Wait(RandomRange(800,1200));
            Inc(Players[CurrentPlayer].Banked);
            Inc(ReportVars[9]);                                   //Increases the SRL Stat variable for banks [13] for me [9] for others
    //      OLD  IncEx(ReportVars[14],CountItemsDtm('inventory', Ess)); //Increases the SRL Stat variable for ess used [14] for me [5] for others
            IncEx(ReportVars[5],ItemAmount('inventory', 'dtm', Ess, [5]));//Increases the SRL Stat variable for ess used [14] for me [5] for others
          end else   writeln('F at OpenABank : "Ess" Item returned Uptext: ' + GetUpText);
        end else     writeln('F at OpenABank : Ess not found in bank');
        if HaveEss then
        begin
            Result := True;
            Players[CurrentPlayer].Loc := 'Got Ess from da Bank'
        end else writeln('F at OpenABank : Withdrew but do not HaveEss');
    //  OLD  BankEss[CurrentPlayer] := AmountDtm('bank', Ess);
        BankEss[CurrentPlayer]  := ItemAmount('bank', 'dtm', Ess, [5]);
    //  OLD  if BankEss[CurrentPlayer] = 0 then if AmountDtm('inv', Ess) <> 0 then  // no ess in bank, some in inventory
        if BankEss[CurrentPlayer] = 0 then if ItemAmount('inv', 'dtm', Ess, [5]) <> 0 then  // no ess in bank, some in inventory
        begin
          Result := True;
          Players[CurrentPlayer].Loc := 'Out Of Ess';
          Players[CurrentPlayer].Active := False;
        end;
        FreeDTM(ess);
        if BankScreen Then CloseBank;
      end;
    end;

    Procedure Proggies(StatusWindow : Boolean);
    //Displays Proggies
    var
      i, TotalCrafted, InBankEss, TotalUsed : integer;
      Active : string;
      Proggy : array[0..11+2*(TotalPlayerCount-1)] of string;
    begin
      if CleanDebug then ClearDebug;
      InBankEss    := 0; Banks        := 0;
      TotalCrafted := 0; TotalUsed    := 0;
      for i := 0 to (HowManyPlayers-1) do
      begin
        Banks        := Players[i].Banked + Banks;
        TotalUsed    := 28 * Players[i].Banked + TotalUsed;
        TotalCrafted := AirsCrafted[i] + TotalCrafted;
        InBankEss    := BankEss[i] + InBankEss;
      end;
      if (TimeFromMark(LastReportTimer) > (120000)) then //Waits 20 minutes before it will update again but seems not to work
      begin
        SRLRandomsReport;
        MarkTime(LastReportTimer);
      end;
      Proggy[0] := ('');
      Proggy[1] := ('=============== Air Crafter Master ' + version + ' By King Vash ===============');
      Proggy[2] := ('               P=R=O=G=R=E=S=S= =R=E=P=O=R=T= =T=I=M=E=');
      Proggy[3] := ('                  :' + TimeRunning + ':');
      for i := 1 to 10 do if (DDTMfailed[i] > 0) then Proggy[4] := Proggy[4] + ', ' + IntToStr(i) + '=' + IntToStr(DDTMfailed[i]);
      if (Proggy[4] <> '') then Proggy[4] := ('Failed DDTM''s: ') + Proggy[4];
      Proggy[5] := ('Saved ' + IntToStr(SavedUsers) + ' Users with ' + IntToStr(NeededSave) + ' Attempts. Waited ' + IntToStr(WaitCount) + ' times, and performed ' + IntToStr(AntiBanCount) + ' AntiBans');
      Proggy[6] := ('');
      for i:=0 to (HowManyPlayers-1) do
      begin
        if Players[i].Active = True then Active := 'T' else Active := 'F';
        Proggy[7 + (i*2)] := (IntToStr(i) + ':' +  Padr(Players[i].Nick,4) + '=' + Active + ' RC:' + IntToStr(Players[i].Level[7]) + ', ' + IntToStr(AirsCrafted[i]) + ' Airs in ' + IntToStr(Players[i].Banked) + ' Trips, ' + IntToStr(Players[i].Banked*28) + '/' + IntToStr(BankEss[i] + Players[i].Banked*28) + ' Ess! Loc: ' + Players[i].Loc );
        if Players[i].Level[7] > Players[i].Integers[0] then Proggy[8 + (i*2)] := ('  LEVEL GAIN!!! ' + IntToStr(Players[i].Integers[0]) + ' to ' + IntToStr(Players[i].Level[7])) else Proggy[8 + (i*2)] := '';
      end;
      Proggy[9 + ((HowManyPlayers-1)*2)] := (IntToStr(Banks) + ' Banks! CrafterMaster used ' + IntToStr(TotalUsed) + ' / ' + IntToStr(InBankEss + TotalUsed) + ' ess! that''s ' + IntToStr((100*TotalUsed)/(InBankEss + TotalUsed)) + ' percent');
      Proggy[10 + ((HowManyPlayers-1)*2)] := ('Banked: ' + IntToStr(TotalCrafted) + ' Air Runes (15GP) = ' + IntToStr(TotalCrafted*15) + ' GP - ' + IntToStr(TotalUsed*38) + ' GP for Ess = ' + IntToStr(TotalCrafted*15 - TotalUsed*34) + ' GP Profit');
      Proggy[11 + ((HowManyPlayers-1)*2)] := ('======================= Air Crafter Master ! =======================');
      if StatusWindow then for i := 1 to High(Proggy) do AddToReport(Proggy[i])
        else for i := 1 to High(Proggy) do Writeln(Proggy[i]);
      ProggyToFile(Proggy);
    end;

    procedure ProggyToFile(Proggy:array of string);
    //Writes proggies to files
    var i, filepath:integer;
    begin
      FilePath := RewriteFile(ScriptPath + 'Debug\LastProggy.txt', False);
      for i := 1 to high(Proggy) do WriteFileString(FilePath, (Proggy[i] + Chr(13)));
      CloseFile(FilePath);
    end;

    procedure SetRunState;
    //Sets the Run State
    var Runcolor:String;
    begin
      if not LoggedIn then Exit;
      GetMMLevels('run',RunColor);
      if (((Run = True) and (RunColor = 'Red')) or RboolEx(7)) then Run := False;   // random 10 to unset run after user switching
      if ((UseRun = True) and (Run = False) and (((RunColor = 'Yellow') and RboolEx(7)) or ((RunColor = 'Green') and RBoolEX(4)))) then
      begin
        SetRun(True);
        Run := True;
      end;
      if RBool then GameTab(4);
    end;


    function SetUpDDTM(casedtm, AddedTol:integer; RefreshColor:Boolean):integer;
    //creates DDTM for walking
    var Tolerance: integer;
        BankMain,Road1Main,Road2Main,RoadRockMain,RockMain: TDTMPointDef;
        BankTDTM,Road1TDTM,Road2TDTM,RoadRockTDTM,RockTDTM: TDTM;
        BankSubpoint,Road1Subpoint,Road2Subpoint,RoadRockSubpoint,RockSubpoint: array[0..3] of TDTMPointDef;
    begin
    Tolerance := 1 + AddedTol;
    case casedtm of
    1: begin
            FRoadsColor := FindColorPro('FallyRoad', RefreshColor);
            FWaterColor := FindColorPro('Water', RefreshColor);

            BankMain.x:=614;
            BankMain.y:=148;
            BankMain.areasize:=1;
            BankMain.areashape:=0;
            BankMain.color:=FRoadsColor;
            BankMain.tolerance:=Tolerance;
            BankSubpoint[0].x:=615;
            BankSubpoint[0].y:=153;
            BankSubpoint[0].areasize:=2;
            BankSubpoint[0].areashape:=0;
            BankSubpoint[0].color:=FRoadsColor;
            BankSubpoint[0].tolerance:=Tolerance;
            BankSubpoint[1].x:=623;
            BankSubpoint[1].y:=134;
            BankSubpoint[1].areasize:=2;
            BankSubpoint[1].areashape:=0;
            BankSubpoint[1].color:=FRoadsColor;
            BankSubpoint[1].tolerance:=Tolerance;
            BankSubpoint[2].x:=609;
            BankSubpoint[2].y:=131;
            BankSubpoint[2].areasize:=2;
            BankSubpoint[2].areashape:=0;
            BankSubpoint[2].color:=FRoadsColor;
            BankSubpoint[2].tolerance:=Tolerance;
            BankSubpoint[3].x:=598;
            BankSubpoint[3].y:=148;
            BankSubpoint[3].areasize:=2;
            BankSubpoint[3].areashape:=0;
            BankSubpoint[3].color:=FWaterColor;
            BankSubpoint[3].tolerance:=Tolerance;
            BankTDTM.MainPoint := BankMain;
            BankTDTM.SubPoints := BankSubpoint;
            Result             := AddDTM(BankTDTM);
      end;
    2: begin
            FRoadsColor := FindColorPro('FallyRoad', RefreshColor);
            FWaterColor := FindColorPro('Water', RefreshColor);

            Road1Main.x:=618;
            Road1Main.y:=28;
            Road1Main.areasize:=1;
            Road1Main.areashape:=0;
            Road1Main.color:=FRoadsColor;
            Road1Main.tolerance:=255;
            Road1Subpoint[0].x:=614;
            Road1Subpoint[0].y:=43;
            Road1Subpoint[0].areasize:=2;
            Road1Subpoint[0].areashape:=0;
            Road1Subpoint[0].color:=FRoadsColor;
            Road1Subpoint[0].tolerance:=Tolerance;
            Road1Subpoint[1].x:=624;
            Road1Subpoint[1].y:=49;
            Road1Subpoint[1].areasize:=2;
            Road1Subpoint[1].areashape:=0;
            Road1Subpoint[1].color:=FRoadsColor;
            Road1Subpoint[1].tolerance:=Tolerance;
            Road1Subpoint[2].x:=604;
            Road1Subpoint[2].y:=46;
            Road1Subpoint[2].areasize:=2;
            Road1Subpoint[2].areashape:=0;
            Road1Subpoint[2].color:=FRoadsColor;
            Road1Subpoint[2].tolerance:=Tolerance;
            Road1Subpoint[3].x:=582;
            Road1Subpoint[3].y:=34;
            Road1Subpoint[3].areasize:=2;
            Road1Subpoint[3].areashape:=0;
            Road1Subpoint[3].color:=FWaterColor;
            Road1Subpoint[3].tolerance:=Tolerance;
            Road1TDTM.MainPoint := Road1Main;
            Road1TDTM.SubPoints := Road1Subpoint;
            Result              :=AddDTM(Road1TDTM);
       end;
    3: begin
            FRoadsColor := FindColorPro('FallyRoad', RefreshColor);
            RoadsColor := FindColorPro('Road', RefreshColor);
            Tolerance := 3 + AddedTol;

            Road2Main.x:=625;
            Road2Main.y:=133;
            Road2Main.areasize:=1;
            Road2Main.areashape:=0;
            Road2Main.color:=RoadsColor;
            Road2Main.tolerance:=255;
            Road2Subpoint[0].x:=625;
            Road2Subpoint[0].y:=133;
            Road2Subpoint[0].areasize:=2;
            Road2Subpoint[0].areashape:=0;
            Road2Subpoint[0].color:=RoadsColor;
            Road2Subpoint[0].tolerance:=Tolerance;
            Road2Subpoint[1].x:=623;
            Road2Subpoint[1].y:=103;
            Road2Subpoint[1].areasize:=2;
            Road2Subpoint[1].areashape:=0;
            Road2Subpoint[1].color:=FRoadsColor;
            Road2Subpoint[1].tolerance:=Tolerance;
            Road2Subpoint[2].x:=630;
            Road2Subpoint[2].y:=123;
            Road2Subpoint[2].areasize:=2;
            Road2Subpoint[2].areashape:=0;
            Road2Subpoint[2].color:=RoadsColor;
            Road2Subpoint[2].tolerance:=Tolerance;
            Road2Subpoint[3].x:=622;
            Road2Subpoint[3].y:=148;
            Road2Subpoint[3].areasize:=2;
            Road2Subpoint[3].areashape:=0;
            Road2Subpoint[3].color:=RoadsColor;
            Road2Subpoint[3].tolerance:=Tolerance;
            Road2TDTM.MainPoint := Road2Main;
            Road2TDTM.SubPoints := Road2Subpoint;
            Result              := AddDTM(Road2TDTM);
         end;
      4: begin
            RoadsColor := FindColorPro('Road', RefreshColor);
            RockColor := FindColorPro('Rock', RefreshColor);

            RoadRockMain.x:=621;
            RoadRockMain.y:=148;
            RoadRockMain.areasize:=1;
            RoadRockMain.areashape:=0;
            RoadRockMain.color:=RockColor;
            RoadRockMain.tolerance:=Tolerance;
            RoadRockSubpoint[0].x:=608;
            RoadRockSubpoint[0].y:=143;
            RoadRockSubpoint[0].areasize:=2;
            RoadRockSubpoint[0].areashape:=0;
            RoadRockSubpoint[0].color:=RoadsColor;
            RoadRockSubpoint[0].tolerance:=Tolerance;
            RoadRockSubpoint[1].x:=619;
            RoadRockSubpoint[1].y:=134;
            RoadRockSubpoint[1].areasize:=2;
            RoadRockSubpoint[1].areashape:=0;
            RoadRockSubpoint[1].color:=RoadsColor;
            RoadRockSubpoint[1].tolerance:=Tolerance;
            RoadRockSubpoint[2].x:=613;
            RoadRockSubpoint[2].y:=153;
            RoadRockSubpoint[2].areasize:=2;
            RoadRockSubpoint[2].areashape:=0;
            RoadRockSubpoint[2].color:=RoadsColor;
            RoadRockSubpoint[2].tolerance:=Tolerance;
            RoadRockSubpoint[3].x:=621;
            RoadRockSubpoint[3].y:=132;
            RoadRockSubpoint[3].areasize:=2;
            RoadRockSubpoint[3].areashape:=0;
            RoadRockSubpoint[3].color:=RoadsColor;
            RoadRockSubpoint[3].tolerance:=Tolerance;
            RoadRockTDTM.MainPoint := RoadRockMain;
            RoadRockTDTM.SubPoints := RoadRockSubpoint;
            Result                 :=AddDTM(RoadRockTDTM);
         end;
      5: begin
            RoadsColor := FindColorPro('Road', RefreshColor);
            RockColor := FindColorPro('Rock', RefreshColor);

            RockMain.x:=607;
            RockMain.y:=134;
            RockMain.areasize:=1;
            RockMain.areashape:=0;
            RockMain.color:=RockColor;
            RockMain.tolerance:=Tolerance;
            RockSubpoint[0].x:=619;
            RockSubpoint[0].y:=115;
            RockSubpoint[0].areasize:=1;
            RockSubpoint[0].areashape:=0;
            RockSubpoint[0].color:=RockColor;
            RockSubpoint[0].tolerance:=Tolerance;
            RockSubpoint[1].x:=636;
            RockSubpoint[1].y:=125;
            RockSubpoint[1].areasize:=1;
            RockSubpoint[1].areashape:=0;
            RockSubpoint[1].color:=RockColor;
            RockSubpoint[1].tolerance:=Tolerance;
            RockSubpoint[2].x:=632;
            RockSubpoint[2].y:=139;
            RockSubpoint[2].areasize:=1;
            RockSubpoint[2].areashape:=0;
            RockSubpoint[2].color:=RoadsColor;
            RockSubpoint[2].tolerance:=Tolerance;
            RockSubpoint[3].x:=636;
            RockSubpoint[3].y:=148;
            RockSubpoint[3].areasize:=1;
            RockSubpoint[3].areashape:=0;
            RockSubpoint[3].color:=RoadsColor;
            RockSubpoint[3].tolerance:=Tolerance;
            RockTDTM.MainPoint := RockMain;
            RockTDTM.SubPoints := RockSubpoint;
            Result             :=AddDTM(RockTDTM);
         end;
      6: begin //Bank DDTM is constant as it uses the yellow npc as referance
            Result := DTMFromString('78DA636C616260F8C38002FEFC61626005D28' +
           'C30DC0154F31BB79AFF40C0D84E84393D44A89980DF2E10060040' +
           'B115A9');
         end;
      end;
    end;

    Function UserSaveFindPlayerLocAltar:string;
    //Finds the player if he is in the altar
    begin
      if not LoggedIn then Exit;
      Result := ('Could not be found but is InAltar');
      if ((FindObjTPA(x, y, 6655639, 15, -1, 20, 20, 5, ['Portal','Porta','ortal','rtal'])) or
         (FindObjTPA(x, y, 5996680, 25, -1, 15, 15, 5, ['Portal','Porta','ortal','rtal']))) then  Result := ('Found near PORTAL')
      else
        if ((FindObjTPA(x, y, 6582135, 10, -1, 40, 40, 10, ['Craft','raft','aft-rune','rune Al'])) or
           (FindObjTPA(x, y, 6582135, 10, -1, 15, 15, 5, ['Craft','raft','aft-rune','rune Al'])))  then
          Result := ('Found near CRAFTER');

    end;

    Function UserSaveFindPlayerLoc : string;
    //Finds the player
    var i,DDTMUpDown,DDTMSearch:integer;
    begin
      Result := ('Not Found');
      if not LoggedIn then Exit;
      Antiban;
      if (DTMRotated(setupddtm(6, 0, True), x, y, mmx1 , mmy1, mmx2, mmy2)) then begin Result := ('Found at BANK'); Exit; end;//Bank Find
      if InAltar(True) then begin Result := UserSaveFindPlayerLocAltar Exit; end;
      if HaveEss then DDTMUpDown := 0 else DDTMUpDown := 1;
      for i:=1 to 5 do
      begin
        if DDTMUpDown = 1 then DDTMSearch := i else DDTMSearch := 6-i;
        Status('Looking For DDTM(' + inttostr(DDTMSearch) + ')');
        if ((FindDTM(setupddtm(DDTMSearch, 0, True), x, y, mmx1 , mmy1, mmx2, mmy2)) and ((i<>4) or (FindSymbol(x, y, 'tree')))) then //DDTM Find
        begin Result := ('Found at DDTM(' + inttostr(6-i) + ')'); Exit; end;
      end;
      if ((FindObjTPA(x, y, 3423283, 5, -1, 30, 30, 5,['Mysteri','Enter Mys','erious ru'])) or
         (FindObjTPA(x, y, 3423283, 8, -1, 10, 10, 4,['Mysteri','Enter Mys','erious ru']))) then
         begin Result := ('Found near Entry'); Exit; end;
      if FindSymbol(x, y, 'Bank') then begin Mouse(x, y, 5, 5, True); Result := ('Found at BANK'); Exit; end;  //Can see bank symbol but not bankers when N/NW/NE
      Result := UserSaveFindPlayerLocAltar;
      if (Result = ('Could not be found but is InAltar')) then
        if Pos('Not Found',Players[CurrentPlayer].loc) = 0 then Players[CurrentPlayer].loc :=  'Not Found';
    end;

    Function UserSave(Player:integer):Boolean;
    //Saves the user (moves to the bank)
    var msg : string;
    begin
      Result := False;
      Loop := ('UserSave Player(' + IntToStr(Player) +'): ');                             //Changes Debug variable "loop" to appropriate loop
      if (Players[Player].Active = False) then Exit;                                      //If your done, then your done
      if (CurrentPlayer <> Player) then                                                   //if not the correct player switches that player out
      begin
        writeln('CurrentPlayer is ' + inttostr(CurrentPlayer) + ', attempting save on: ' + inttostr(Player));
        if LoggedIn then Logout;
        CurrentPlayer := Player;
      end;
      if not LoggedIn then LoginPlayer;                                                   //if you have right player then it makes sure their logged in
      SetAngle(True);                                                                     //Highest Angle
      Antiban;                                                                            //Stall for a little time...
      if 'F at OpenABank :' = Left(Players[CurrentPlayer].Loc,16) then begin if OpenABank then Result := True; Exit; end;//If charater is out of ess or bank open failed, will retry OpenABank
      Status('Finding Player');
      Players[CurrentPlayer].loc := UserSaveFindPlayerLoc;                                //Finds charater and sets Player.loc to Current Location
      if (Players[CurrentPlayer].loc = 'Found at BANK')                                   //Checks if your at the bank
        then Result := (FindColorPro('FallyRoad', True) <> 999999999) and (FindColorPro('Water', True) <> 999999999)
        else begin
        Inc(NeededSave);                                                                  //Charater really does need to be saved
        if HaveEss then msg := 'With' else msg := 'Without';                              //Check for essances in the Inventor
        writeln('Saving Players[' + IntToStr(CurrentPlayer) + '] ' + msg + ' Ess at: ' + Players[CurrentPlayer].loc)
        MoveToBank(Players[CurrentPlayer].loc);                                           //Moves the charater to the bank
      end;
      if (DTMRotated(setupddtm(6, 0, True), x, y, mmx1 , mmy1, mmx2, mmy2)) then          //Check if charater ended in the bank
      begin
        Result := True;
        if not (Players[CurrentPlayer].loc = 'Found at BANK') then Inc(SavedUsers);       //Increments number of saves if player needed to be moved
        UserSaved[CurrentPlayer] := 1;                                                    //Sets number of fails in UserSaved back to 1
      end else
      begin
        Writeln('Failed in UserSave, this was attempt ' + IntToStr(UserSaved[CurrentPlayer]));
        Inc(UserSaved[CurrentPlayer]);                                                           //If character fails then incriments UserSaved
      end;                                                                                       //If character's UserSaved is greater then 5 makes that character false
      if UserSaved[CurrentPlayer] > 5 then begin Players[CurrentPlayer].Active := False; UserSaved[CurrentPlayer] := 0; end;
      if (Result = True) then
        begin
          writeln('Player is in the bank')
          Players[CurrentPlayer].loc := 'Found At BANK';
        end else Writeln('Player is not in the bank');
    end;

    Procedure UserSaveAll;
    //Attempts save of all active users
    var i : integer;
    begin
      for i:= 0 to (HowManyPlayers-1) do if (Players[i].Active = True) then UserSave(i);    //for all the players if their active try to save them.
    end;

    Procedure SwitchToNextPlayer;
    //Switches to next player
    var i, Waited, Waiter:integer;
    begin
      If (ActivePlayers < 2) and not ((ActivePlayers = 1) and (TotalPlayerCount = 1)) then
      begin
        i := CurrentPlayer;
        UserSaveAll;
        CurrentPlayer := i;
      end;
      If Loggedin then Logout;
      If (ActivePlayers > 0) then
      begin
        For i := CurrentPlayer to (HowManyPlayers-1) do if (Players[i].Active = True) then Waiter := -1;   //Determines if their is another active player after you
        if (Waiter = -1) Then Waiter := (TotalWait * 60000 + random(60000)) else Waiter := random(60000);
        marktime(Waited);
        writeln('Waiting ' + IntToStr(waiter/1000) + ' seconds in SwitchToNextPlayer');
        repeat
          Status('User Wait / TotalWait :' + IntToStr(TimeFromMark(Waited)/1000) + '/ ' + IntToStr(Waiter/1000) + ' waited');
          Wait(randomrange(1250,2500));
        until(TimeFromMark(Waited) >= Waiter)
        WaitTimer := WaitTimer + TimeFromMark(Waited);
        NextPlayer(Players[CurrentPlayer].Active);
        Inc(WaitCount);
      end
    end;

    Procedure SetupScript;
    //Sets up the script
    var i: integer;
    begin
      if PayingAttn = 0 then begin Writeln('SET THE "USER SETTING" IN LINE 28 - 61 CORRECTLY! OR THIS WON''T RUN') TerminateScript; end;
      Disguise('Craft that Master Air');
      SmartSetup(SMARTWorld, True, True, False); // Thanks Smartzkid for SmartSetup
      SetTargetDC(SmartGetDC);
      SetupSRL;
      ScriptID := '619';
      DeclarePlayers;
      for i := 0 to 19 do ReportVars[i] := 0;
      for i := 0 to (HowManyPlayers-1) do
      begin
        Players[i].Banked      := 0;     //Banks
        TripsToRun[i]          := 0;     //Banks + Loads per login + random(4)
        AirsCrafted[i]         := 0;     //Airs Runes Crafted
        BankEss[i]             := 1;    //Ess in Bank (so you don't fail in repeat loop at bottom)
        Players[i].Integers[0] := 100;   //Level of RC
        Players[i].Loc         := '';    //Location
        UserSaved[i]           := 1;     //UserSaved 0 is Player is inactive, 1-5 is number of saves, 6 sets you to 0(False)
      end;
      for i:=1 to 10 do DDTMfailed[i]:=0;
      Reporter := 0; WaitCount := 0; NeededSave := 0; SavedUsers := 0; WaitTimer := 0; AntiBanCount  := 0;
      LoginPlayer;
      MarkTime(LastReportTimer);
    end;

    procedure SetupPlayer;
    //Sets up the character
    begin
      if not LoggedIn then Exit;                                   //Determines number of runs, limit user imput to 0 - 10
      TripsToRun[CurrentPlayer] := Players[CurrentPlayer].Banked + Min(Max(LoadsPerLogin,0),10) + random(3);
      if Players[0].Banked > TripsToRun[CurrentPlayer] Then IncEx(TripsToRun[CurrentPlayer],random(2)); //Prevents charature from falling behind
      Wait(RandomRange(1000,2000));              //delay first action after login
      if Players[CurrentPlayer].Banked = 0 then  //if this is first SetupPlayer then we should do certian things
      begin
        if RBoolEx(4) then                       //randomly set chat options with 1 in 4 chance to friends only
        begin
          SetChat('Friends', 1)
          SetChat('Friends', 2);
        end else
        begin
          SetChat('on',1);
          SetChat('on', 2);
        end;
        Wait(RandomRange(500,1000));
        GetAllLevels;                           //Get all level inso
        Players[CurrentPlayer].Integers[0] := Players[CurrentPlayer].Level[7]; //Stores Starting RC level into Integers[0]
        Wait(RandomRange(250,1000));
      end;
      SetAngle(True);
      FindNormalRandoms;
      if  RBoolEx(3) then GetAllLevels;  //1 in 3 times get the players levels.
    end;

    function CraftAirs : boolean;
    //Crafts Airs
    begin
      Loop := 'Main Loop: ';
      Writeln('Trip ' + IntToStr(Players[CurrentPlayer].Banked) + ' of ' + IntToStr(TripsToRun[CurrentPlayer]));
      Result := True;
      if not OpenABank            then Exit;
      if not MoveFromBankToAltar  then Exit;
      if not FindThreeAltar       then Exit;
      if not MoveFromAltarToBank  then Exit;
      Result := False;
    end;

    procedure MainLoop;
    begin
      repeat
        SetupPlayer;                                   //Set Player Setting
        repeat
          if CraftAirs then                            //If character succeeds in crafting air runes then loop
            if not UserSave(CurrentPlayer) then Break; //because character failed, we attempt to return them to the bank
        until((Players[CurrentPlayer].Banked > TripsToRun[CurrentPlayer]) or (BankEss[CurrentPlayer] = 0) or (not LoggedIn)) //Stop if complete, out of ess, or not logged in
        Proggies(False);                               // Displays Proggy in Debug Window
        SwitchToNextPlayer;                            //Logouts out current player and logs in the next player
      until(ActivePlayers = 0)
      Disguise('POST THE Proggy PLEASE!');
    end;

    procedure DebugItAll;
    begin
      repeat
      loop := '0' + readln('what action')
      if GetLetters(loop)='ddtm' then DDTMmaster(StrtoInt(GetNumbers(loop)),true);
      if loop='0enteraltar' then FindThatAltar;
      if loop='0craftaltar' then FindThatAltar;
      if loop='0escapealtar' then FindEscapeAltar;
      if loop='0altar' then FindThreeAltar;
      if loop='0bank' then OpenABank;
      if loop='0movefrombanktoaltar' then movefrombanktoaltar;
      if loop='0movefromaltartobank' then movefromaltartobank;
      if loop='0wait' then wait(30000);
      until(strtoint(GetNumbers(loop))>100);
    end;

    Begin
      ClearDebug;
      SetupScript;
      MainLoop;
    End.

Page 20 of 22 FirstFirst ... 101819202122 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
  •