Results 1 to 14 of 14

Thread: TPA-Emergency!

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    TPA-Emergency!

    yes its an emergency,
    I need the quickest help I can get, for I was trying to do this *** **** for 2 weeks NOW.I might as well stop scripting, but too bad I love it too much. I can't get this to work Please help all will be repped
    This is the TPa
    the problem is that it keeps randomly clicking on the floor...
    SCAR Code:
    function FindOres:boolean;
    var
      tx,ty,i: integer;
      IronPoints: TPointArray;
      Iron2D : T2DPointArray;
      IronPoint : TPoint;
    begin
      if not LoggedIn then exit;
      x:= MSCX;
      y:= MSCY;
      begin
        FindColorsSpiralTolerance(x,y,IronPoints,2898527,MSX1,MSY1,MSX2,MSY2,1);
        Iron2D:= TPAtoATPAEx(IronPoints,3,3);
        for i:= 0 to length(Iron2D)-1 do
        begin
          if not LoggedIn then exit;
          Ironpoint:= MiddleTPA(Iron2D[i]);
          tx:= IronPoint.X;
          ty:= IronPoint.Y;
          MMouse(tx,ty,2,2);
          wait(90+random(50));
          if isuptext('ine')then
          begin
            GetMousePos(tx,ty);
            result:= true;
          end else Continue;
        end;
      end;
    end;

  2. #2
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    I'm not too good with TPA's and RS, but I'm pretty sure the problem is that you use a set colour and RS has dynamic colours, so in one world it will work perfectly and in others it will find the road. Look into ACA2 (Auto-Colour Aid; should be in the first few pages of Public Test Corner) by Sumilion and someone else (I can never remember ><) and that will help with the problem as it will give you the colours depending on the world
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  3. #3
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    thanks ill look into it. anymore solutions?

  4. #4
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    It clicks the floor even with uptext? Something is VERY wrong here...

  5. #5
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    ye apparently it doesnt find the text..even... I HATE TPAS

  6. #6
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Its not the tpa. Someone want to test uptext?

    Edit:It click!?!?!? Wow ghost scar...

  7. #7
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    ooo...well it doesnt even like go to a rock...maybe i shud add "if not find uptext"?

  8. #8
    Join Date
    Jun 2007
    Location
    Wednesday
    Posts
    2,446
    Mentioned
    3 Post(s)
    Quoted
    1 Post(s)

    Default

    Actually you don't tell it to click - only move (but that's so the UpText will come up) - so that problem is outside the function. Also, may I suggest calling it FindRock rather than ore as it finds a rock, not an ore Also, a check to make sure FindColors actually finds any colours is a good idea (normally if not FindColors() then Exit; or something like that is ok) as it will give you errors when it can't find any (like if you get logged off before the function is called but after a if not LoggedIn check)
    By reading this signature you agree that mixster is superior to you in each and every way except the bad ways but including the really bad ways.

  9. #9
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    k thx..
    anymor advice ppl ??LOL

  10. #10
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    post the rest of what you have...because the clicking problem is outside of this function

    also how did you find the color did you just log onto a world and then pick 1 color?

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  11. #11
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by HyperSecret View Post
    post the rest of what you have...because the clicking problem is outside of this function

    also how did you find the color did you just log onto a world and then pick 1 color?
    rawr im trustin u guys on replying fast to this then...Please do so..its LONG eh?
    YUP member worth..hehe
    SCAR Code:
    program Miner;
    {.include SRL/SRL/misc/SMART.scar}
    {.include SRL/SRL.scar}

    var LoadsNum, Level, PickStick, Tries, GasNum, TryTofind, Pickaxe, bankz : integer;
        WaitForGasTime, Stick, BrokenPick, x, y, WaitPerRock, Pickaxehead, lvl, lvll : integer;

    //-----------------NOTE!!!!!! DO NOT WIELD PICKAXE------------------------//
    //==============TRY TO HAVE EXTRA PICKAXES FIRST BANK SLOT!!============///

         // ============FILL OUT BELOW===============//
    const
      //YOU NEED TO HAVE SRL STATS!!!//
      SRLStatsID      = '0000';  //your srl stats id example : '0000'
      SRLStatsPass    = 'fasdd';  // your srl stats password example : 'password'

      //Smart Setup//
      SmartWorld      = 108;   //  what world do you want to login to??
      Signed          = True;  // leave alone..
     
      Bank            = 'True';  // True or False? if True it will bank ore, if False it will drop ore
      LoadsPerPlayer  = 100;     // how many loads per player?
      MorePickaxe     = 'True';  // True means you have more pickaxes in first bankslot and false if you have no extra pickaxes


    //-----------------NOTE!!!!!! DO NOT WIELD PICKAXE------------------------//

    procedure DeclarePlayers;
      begin
      HowManyPlayers :=1;  // how many players do you want
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer:=0
      Players[0].Name        := 'username';      //Character Name
      Players[0].Pass        := 'pasword';    //Character Pass
      Players[0].Nick        := 'balh';     //Nickname 3 - 4 Letter's of char name
      Players[0].Active      := True;   //true if you want this player to be ran in the script false if you dont want it to run
    end;

    // ===========DO NOT TOUCH BELOW UNLESS YOU KNOW WHAT YOUR DOING!!!================//


    procedure Signature;
      begin
       ClearDebug;
       writeln(' BoBo presents mine picker:');
       wait(250);
       writeln(' __________   _________    ___     ___ ');
       wait(250);
       writeln('|   ____   | |         |  |   |   |   |');
       wait(250);
       writeln('|  |    |  | |  _____  |  |   |   |   |');
       wait(250);
       writeln('|  |____|  | | |     | |  |   |___|   |');
       wait(250);
       writeln('|   _______| | |     | |  |    ___    |');
       wait(250);
       writeln('|   ____   | | |_____| |  |   |   |   |');
       wait(250);
       writeln('|  |    |  | |         |  |   |   |   |');
       wait(250);
       writeln('|  |____|  | |_________|  |___|   |___|');
       wait(250);
       writeln('|__________| Made To Succeed!          ');
       wait(3000 + random(750));
    end;


    procedure Proggy;

      begin
      ClearDebug;

      Writeln('-------------------------------------');
      Writeln('Please post proggies to the place');
      Writeln('     you got this script from!   ');
      Writeln('-------------------------------------');
      Writeln('|| Worked For: '   +TimeRunning+    '||');
       if Bank = 'False' then
      Writeln('|| Dropped '+ IntToStr(LoadsNum)+ ' Ores||');
       if Bank = 'True' then
      Writeln('|| Banked ' + IntToStr(LoadsNum)+ ' Load(s)||');
      Writeln('|| Gasses Found ' + IntToStr(GasNum)+ ' ||');
      Writeln('Current Mining Level Is ' +IntToStr(Level));
      Writeln('-------------------------------------');
      SRLRandomsReport;
    end;
     
    procedure SetupSmart;
      begin
      SmartSetupEx(SmartWorld, false, Signed);
      ClearDebug;
      WriteLn('Setting up Smart... Please Hold...');
      Wait(10000 + random(5000));
      SetTargetDC(SmartGetDC);
      While not(SmartReady) do Wait(100);
    end;

    procedure Checkpick;
    var  Runepick, PickaxeHead, Addypick, Mithpick, Steelpick, Ironpick, Bronzepick : integer;
    begin
      if (not(LoggedIn)) then Exit;
      begin
        GameTab(4);
      RunePick := DTMFromString('78DA6394646060E064400141B915609A11CA6' +
           '7940312020C688011550D1F90E021A0460A48F01150A30C240409' +
           'A811226C170061D0022D');
      AddyPick := DTMFromString('78DA6314666060E06440010E818E609A11CA6' +
           '7640312DC0C688011550D37116A2481043F0135D2408287801A3E' +
           '20C1815F0D00F4EF018C');
      MithPick := DTMFromString('78DA6314666060606140013EBE85609A11CA6' +
           '79406123C0C688011558D2890E022A0066406070135EC44A89100' +
           '12DCF8D5000022AF01BF');
      SteelPick:= DTMFromString('78DA631464606060654001A5B9B9609A11CA6' +
           '79402123C0C688011558D2890E026A0860548701050C345841A21' +
           '20C1855B0DC81A00530401FB');
      IronPick := DTMFromString('78DA631464606060674001198909609A11CA6' +
           '704C97331A001465435CC44A89100127C44A8E126A0461C48F0E2' +
           '56C302C4002EF501E2');
      BronzePick := DTMFromString('78DA6314626060E0604001218EEA609A11CA6' +
           '71403127C0C688011558D0C901024A0860D48701150C30D24B809' +
           'A891C6629782028A1A00F47801CA');
      end;

      begin
        if FindDTM(Runepick, x, y, mix1, miy1, mix2, miy2)then
        Writeln('Good choice, rune pick.');
        WaitPerRock :=(3000+ random(500));
        exit;
      end;
      begin
        if FindDTM(Addypick, x, y, mix1, miy1, mix2, miy2) then
        Writeln('Addy Pick, ok but remmeber script works better with rune pick.');
        WaitPerRock :=(4000+ random(500));
        exit;
      end;
      begin
        if FindDTm(Mithpick, x, y, mix1, miy1, mix2, miy2) then
        Writeln('Mith Pick, not recommended try to use Rune pickaxe next time.');
        WaitPerRock :=(6000+ random(500));
        exit;
      end;
      begin
        if FindDTM(Steelpick, x, y, mix1, miy1, mix2, miy2) then
        Writeln('Steel Pick, STRONGLY not recommended be sure to use something higher next time.');
        WaitPerRock :=(8000+ random(500));
        exit;
      end;
      begin
        if FindDTM(Ironpick, x, y, mix1, miy1, mix2, miy2) then
        Writeln('Dude, IRON PICK?! Please dont use this script till you have a better pickaxe!');
        Logout;
        NextPlayer(false);
        exit;
      end;
      begin
        if FindDTM(Bronzepick, x, y, mix1, miy1, mix2, miy2) then
        Writeln('DUDE! BRONZE PICK?!!! Seriously get at LEAST a steel pick!');
        Logout;
        NextPlayer(false);
        exit;
      end;
    end;

    procedure CheckLevel;
    begin
     if (not(LoggedIn)) then Exit;
     Level := GetSkillInfo('mining', false);
    end;


    Procedure Myrandom;
      begin
      if(FindFight)then
      RunAway('N', True,1,15000);
      FindNormalRandoms;
    end;

    procedure Antiban;
      begin
      if(not(LoggedIn)) then Exit;
      case Random(40) of
      1: RandomRClick;
      2: HoverSkill('Mining', False);
      3: begin
         RandomMovement;
         SetAngle(true);
         end;
      4: BoredHuman;
      5: AlmostLogout;
      6: PickUpMouse;
      end;
      begin
        ReportVars[1] := ReportVars[1] + 1;
      end;
    end;

    function InChatMulti(text: TStringArray): boolean;
    var
      i : integer;
      s: string;
    begin
      for i:=0 to high(text) do
      begin
        if (not (GetLastChatText(s))) then
          LastChatter(s);
          Result := (Pos(Text[i], s) > 0);
      end;
    end;

    procedure ReplyMining;
    begin
      if not InChatMulti(['Mining lvl', 'Minin lvl', 'Mine lvl', 'Mining level', 'Minin level', 'Mine level']) then
      begin
        exit;
      end else
      begin
        lvl  := GetSkillInfo('Mining', False);
        case random (6) of
          0: TypeSend (inttostr(lvl)+' you');
          1: TypeSend (inttostr(lvl));
          2: TypeSend ('almost '+inttostr(lvl+1));
          3: TypeSend ('im almost'+inttostr(lvl+1));
          4: TypeSend ('kinda high..lvl '+inttostr(lvl));
          5: TypeSend ('im lvl '+inttostr(lvl));
      end;
      exit;
    end;
    end;

    procedure ReplyBye;
    begin
      if not InChatMulti(['cya', 'bye', 'bye guys', 'later', 'im out', 'see ya', 'peace out']) then
      begin
        ReplyMining;
      end else
      begin
        case random (6) of
          0: TypeSend ('c ya');
          1: TypeSend ('peace');
          2: TypeSend ('see ya');
          3: TypeSend ('peace out');
          4: TypeSend ('laterr');
          5: TypeSend ('byee');
        end;
        exit;
      end;
    end;

    procedure ReplyGreeting;
    begin
      if not InChatMulti(['hey', 'hi', 'helo', 'sup', 'hello', 'hey', 'wasup']) then
      begin
      ReplyBye;
      end else
      begin
        case random (6) of
          0: TypeSend ('heyy');
          1: TypeSend ('sup');
          2: TypeSend ('hi');
          3: TypeSend ('heloo');
          4: TypeSend ('sup, this geting so boring..');
          5: TypeSend ('hey, im soo bored');
        end;
        exit;
      end;
    end;

    procedure ReplyName;
    begin
      if not InChatMulti([Players[CurrentPlayer].Name]) then
      begin
        ReplyGreeting;
      end else
        begin
        case random (9) of
          0: TypeSend ('yaa?? srry im busy..');
          1: TypeSend ('wat..cant talk too busy :)');
          2: TypeSend ('wat? so bord here..dont feel like tlking');
          3: TypeSend ('ye? too bord to talk sory');
          4: TypeSend ('sup? this geting so boring..');
          5: TypeSend ('ye? wat u want? sory so bordd..');
          6: TypeSend ('wat up..');
          7: TypeSend ('yep??');
          8: TypeSend ('.....what?');
        end;
        exit;
      end;
    end;

    procedure ReplySmith;
    begin
      if not InChatMulti(['Smithing lvl?', 'Smith lvl?', 'Smith level', 'Smithing level?', 'Smithing levels?']) then
      begin
      ReplyName;
    end else
    begin
      lvll := GetSkillInfo('Smithing', False);
      case random (6) of
        0: TypeSend (inttostr(lvll)+' you');
        1: TypeSend (inttostr(lvll));
        2: TypeSend ('almost '+inttostr(lvll+1));
        3: TypeSend ('im almost'+inttostr(lvll+1));
        4: TypeSend ('kinda  low..lvl '+inttostr(lvll));
        5: TypeSend ('im lvl '+inttostr(lvll));
        end;
        exit;
      end;
    end;

    procedure Replylaugh;
    begin
      if not InChatMulti(['Lol', 'Rofl', 'Lmao', 'haha']) then
      begin
      ReplySmith;
    end else
    begin
      case random (6) of
        0: TypeSend ('lol!');
        1: TypeSend ('lolz');
        2: TypeSend ('loll..');
        3: TypeSend ('lol');
        4: TypeSend ('lol...');
        5: TypeSend ('..lol');
        end;
        exit;
      end;
    end;

    function Leveled:boolean;
    var x, y : integer;
    begin
      if(not(LoggedIn)) then Exit;
      Result:=FindColor(x, y, 8388608, 14, 372, 495, 389)
      if (result) then
      begin
        WriteLn(' ===Advanced A Mining Level==');
        Wait(1500 +random(500));
        clicktocontinue;
      end;
    end;

    procedure FixHead;
    begin
      if(not(LoggedIn)) then Exit;
      PickaxeHead := DTMFromString('78DA6314666060106040038C482490960112B' +
           'C04D470020951026A0481841801355244980352C3895F0D0073E1' +
           '00F6');
      PickStick := DTMFromString('78DA6314666060906140038C4824901601124' +
           '204D44801095E026A40F2CA04D408000929026A048184220135E2' +
           '404214BF1A00B23A014A');
      GameTab(4);
      Wait(550 + random(450));
      if DTMRotated(PickaxeHead, x, y, 525, 182, 745, 473) then
      Mouse(x, y, 1, 2, True);
      If DTMRotated(PickStick, x, y, 525, 182, 745, 473) then
      Mouse(x, y, 2, 1, True);
      ReportVars[4] := ReportVars[4] + 1;
    end;


    function SearchHead:boolean;
    begin
      if(not(LoggedIn)) then Exit;
      SetAngle(false);
      Trytofind := 0;
      repeat
        Case Players[CurrentPlayer].strings[0] of
          'Rune': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [8944476], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
          'Addy': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [5070925], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
          'Mith': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [4205098], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
         'Steel': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [9079701], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
          'Iron': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [7039858], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
         'Bronze': begin
                    If FindObjCustom(x, y, ['ead', 'ick'], [2704730], 10) then
                    Mouse(x, y, 2, 2, True);
                  end;
        end;
        if (not (FindDTM(PickaxeHead, x, y, 525, 182, 745, 473))) then
        begin
          WriteLn(' Uh-oh attempted  ' + IntToStr(Trytofind) + 'to find pickaxe head');
          Trytofind := Trytofind + 1;
          Wait(4000);
        end else
        begin
          Writeln('  WOOOT!! FOUND PICKAXE HEAD!!  ');
          Result := true;
          FixHead;
        end;
        Pickaxe := DTMFromString('78DA6314606060E06540038C4824909605125' +
           'C04D470020976026A40662810502302245808A801B9590CBF1A00' +
           '612000CF');
        if FindDTM(Pickaxe,x, y, 525, 182, 745, 473) then
        begin
          WriteLn('     ' + Players[CurrentPlayer].Name + ': "yay found pickaxehead!!"');
          if Players[CurrentPlayer].Booleans[0] then
          Mouse(x, y, 0, 0, True);
          Trytofind := 5;
          PickAxeAttached := PickAxeAttached + 1;
        end;
        if (Trytofind = 2) then MakeCompass('W');
        if (Trytofind = 3) then MakeCompass('E');
        if (Trytofind = 4) then MakeCompass('S');
        if (Trytofind = 1) then MakeCompass('N');
      until (Trytofind = 5)
      if (not (FindDTM(Pickaxe,x, y, 525, 182, 745, 473))) then
      begin
        if Morepickaxe = 'True'then
        begin
          Writeln(' Dang Sorry, Could not find the pickaxe head, going to bank to get new one ');
          if Morepickaxe = 'False'then
          begin
            Writeln(' Sorry, but we could not find the pickaxe head, logging out! ');
            Proggy;
            Exit;
            Logout;
          end;
        end;
      end;
    end;

    function Loadiron: Integer;  // DONT.. bother ask why i use this as a DDTM, just love DDTMS and nothing bad with using this.
    var
      ironMP: TDTMPointDef;
      ironSP: array of TDTMPointDef;
      ironDDTM: TDTM;

    begin
      SetArrayLength(ironSP, 5);

      ironMP.x := 20;
      ironMP.y := 17;
      ironMP.areasize := 1;
      ironMP.areashape := 0;
      ironMP.color := 2305870;
      ironMP.tolerance := 9;

      ironSP[0].x := 6;
      ironSP[0].y := 23;
      ironSP[0].areasize := 1;
      ironSP[0].areashape := 0;
      ironSP[0].color := 65536;
      ironSP[0].tolerance := 0;

      ironSP[1].x := 13;
      ironSP[1].y := 7;
      ironSP[1].areasize := 1;
      ironSP[1].areashape := 0;
      ironSP[1].color := 65536;
      ironSP[1].tolerance := 0;

      ironSP[2].x := 24;
      ironSP[2].y := 8;
      ironSP[2].areasize := 1;
      ironSP[2].areashape := 0;
      ironSP[2].color := 65536;
      ironSP[2].tolerance := 0;

      ironSP[3].x := 30;
      ironSP[3].y := 15;
      ironSP[3].areasize := 1;
      ironSP[3].areashape := 0;
      ironSP[3].color := 65536;
      ironSP[3].tolerance := 0;

      ironSP[4].x := 18;
      ironSP[4].y := 26;
      ironSP[4].areasize := 1;
      ironSP[4].areashape := 0;
      ironSP[4].color := 65536;
      ironSP[4].tolerance := 0;

      ironDDTM.MainPoint := ironMP;
      ironDDTM.SubPoints := ironSP;
      result := AddDTM(ironDDTM);
    end;

    function Gorock: Integer;
    var
      rockMP: TDTMPointDef;
      rockSP: array of TDTMPointDef;
      rockDDTM: TDTM;
      rockcolor : integer;
    begin
      RockColor :=FindRockColor;
      SetArrayLength(rockSP, 5);

      rockMP.x := 17;
      rockMP.y := 6;
      rockMP.areasize := 1;
      rockMP.areashape := 0;
      rockMP.color := 1;
      rockMP.tolerance := 255;

      rockSP[0].x := 22;
      rockSP[0].y := 13;
      rockSP[0].areasize := 1;
      rockSP[0].areashape := 0;
      rockSP[0].color := rockcolor;
      rockSP[0].tolerance := 1;

      rockSP[1].x := 13;
      rockSP[1].y := 13;
      rockSP[1].areasize := 1;
      rockSP[1].areashape := 0;
      rockSP[1].color := rockcolor;
      rockSP[1].tolerance := 1;

      rockSP[2].x := 16;
      rockSP[2].y := 17;
      rockSP[2].areasize := 1;
      rockSP[2].areashape := 0;
      rockSP[2].color := rockcolor;
      rockSP[2].tolerance := 1;

      rockSP[3].x := 19;
      rockSP[3].y := 16;
      rockSP[3].areasize := 1;
      rockSP[3].areashape := 0;
      rockSP[3].color := rockcolor;
      rockSP[3].tolerance := 1;

      rockSP[4].x := 23;
      rockSP[4].y := 17;
      rockSP[4].areasize := 1;
      rockSP[4].areashape := 0;
      rockSP[4].color := rockcolor;
      rockSP[4].tolerance := 1;

      rockDDTM.MainPoint := rockMP;
      rockDDTM.SubPoints := rockSP;
      result := AddDTM(rockDDTM);
    end;

    function RoadzDDTM: Integer;
    var
      RoadMP: TDTMPointDef;
      RoadSP: Array [0..4] of TDTMPointDef;
      RoadDDTM: TDTM;
      RoadColor : integer;
    begin
      RoadColor :=FindVarrockRoadColor;
      SetArrayLength(RoadSP, 5);
     
      RoadMP.x := 103;
      RoadMP.y := 20;
      RoadMP.AreaSize := 0;
      RoadMP.AreaShape := 0;
      RoadMP.Color := RoadColor;
      RoadMP.Tolerance := 0;

      RoadSP[0].x := 103;
      RoadSP[0].y := 20;
      RoadSP[0].AreaSize := 0;
      RoadSP[0].AreaShape := 0;
      RoadSP[0].Color := 7172983;
      RoadSP[0].Tolerance := 1;

      RoadSP[1].x := 81;
      RoadSP[1].y := 80;
      RoadSP[1].AreaSize := 0;
      RoadSP[1].AreaShape := 0;
      RoadSP[1].Color := 2114127;
      RoadSP[1].Tolerance := 1;

      RoadSP[2].x := 86;
      RoadSP[2].y := 78;
      RoadSP[2].AreaSize := 0;
      RoadSP[2].AreaShape := 0;
      RoadSP[2].Color := 2247250;
      RoadSP[2].Tolerance := 1;

      RoadSP[3].x := 90;
      RoadSP[3].y := 78;
      RoadSP[3].AreaSize := 0;
      RoadSP[3].AreaShape := 0;
      RoadSP[3].Color := 1385287;
      RoadSP[3].Tolerance := 1;

      RoadSP[4].x := 89;
      RoadSP[4].y := 84;
      RoadSP[4].AreaSize := 0;
      RoadSP[4].AreaShape := 0;
      RoadSP[4].Color := 2114127;
      RoadSP[4].Tolerance := 1;

      RoadDDTM.MainPoint := RoadMP;
      RoadDDTM.SubPoints := RoadSP;
      result := AddDTM(RoadDDTM);;
    end;

    procedure Playcheck;   // awsome FailSafe.. if connection lost during game..
    var CHx, CHy, ClickHereToPlay : integer;
    begin

       ClickHereToPlay := BitmapFromString(33, 1, 'z78DA758E510E80300843' +
        'AF54C0E2F6E94CB8FF9134123392693FFA41FA4A23A6F0888443D' +
        '26DC000A7DCE7F458F23EE444E721444B6A0F53D58FE44F4365B7' +
        '067D37AC3D95AADF2F50962C79');
      if Not(LoggedIn) then exit;
      if not(FindBitmapToleranceIn(ClickHereToPlay, CHx, CHy, 250, 270, 530, 390, 5)) then
      begin
        exit;
      end else
      begin
       Wait(1000 + Random(500));
       Mouse(CHx, CHy, 50, 20, True);
       exit;
      end;
    end;

    procedure GasFound;
    begin
      if Not (LoggedIn) then exit;

      Writeln (' ** Gas Detected ** ');
      Mouse(630, 90, 8, 8, true);
      FFlag(0);
      Flag;
      WaitForGasTime := 0;
      Wait(500 + random(500));
      repeat
        Wait(1000);
        WaitForGasTime := WaitForGasTime + 1;
      until(WaitForGasTime > 29)
      WriteLn('  yay its gone....');
      GasNum := GasNum + 1;
      ReportVars[3] := ReportVars[3] + 1;
    end;

    procedure FindGas; // BY MASTERKILL!
    begin
      If Not LoggedIn then exit;
      if (FindColorTolerance (x, y, 10596274, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 8950933, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 9017755, 0, 0, 500, 500, 1))
      or (FindColorTolerance (x, y, 7900302, 0, 0, 500, 500, 1)) then
      GasFound;
    end;

    procedure Bankgo;
    begin
      if FindDTM(Loadiron, x, y, mix1, miy1, mix2, miy2) then
      begin
        mouse (x,y,2,2,false);
        Wait(200+random(1000));
        ChooseOption('All');
        Wait (1000 +random(300));
        CloseBank;
        ReportVars[0] := ReportVars[0] + 1;
        LoadsNum := LoadsNum + 1;
        ClearDebug;
        Proggy;
        Inc(Players[CurrentPlayer].Banked);
        if Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0 then
        begin
          CheckLevel;
          Proggy;
          NextPlayer(True);
        end;
      end;
    end;

    procedure Walktobank;
    begin

       Bankz := DTMFromString('78DA637CCFCCC0A0C3C800026C0C10F0E6E32' +
           'B062E200D12FD0F048CF731D5BC7BF70EAE0604183F00D5A8A0AA' +
           '790DC4186A6409A801B94710B77BC06A2E03D5C8A3AAE11764465' +
           '1030054AF150B');

      if Not(LoggedIn) then exit;
      SetAngle(True);
      MakeCompass('N');
      SetRun(False);
      if not RadialRoadWalk(FindVarrockRoadColor,0,90,65,-2,0)then
      begin
      FindDTM(RoadzDDTM, x, y, MMX1, MMY1, MMX2, MMY2);
      Wait (1000+ random(200));
      end else
      Wait (1000+ random(200));
      repeat
        Tries:= Tries +1;
        Playcheck;
        Myrandom;
        RadialRoadWalk(FindVarrockRoadColor,270,390,65,-2,0);
        Wait (1000+ random(200));
        FFlag(0);
      until FindDTM(gorock, x, y, MMX1, MMY1, MMX2, MMY2) or (Tries >10)
      if Tries >10 then
      begin
        WriteLn(' Dang, couldnt find rock! ');
        Logout;
        NextPlayer(false);
      end;
      begin
        if FindDTM(gorock, x, y, MMX1, MMCY, MMX2, MMY2)then
        begin
          Mouse(x, y, 1, 1, true);
          WriteLn('  found rock  ');
          RadialRoadWalk(FindVarrockRoadColor,260,330,65,-2,0);
          Playcheck;
          FindBank('veb');
          bankgo;
          exit;
          begin
            if not FindDTM(Bankz, x, y, MMX1, MMY1, MMX2, MMY2)then
            writeln('couldnt find bank..');
            Logout;
            Nextplayer(false);
          end;
        end;
      end;
    end;


    procedure WalktoMine;
    begin
      if Not(LoggedIn) then exit;
      SetAngle(True);
      Myrandom;
      MakeCompass('N');
      SetRun(True);
      RadialRoadWalk(FindVarrockRoadColor,0,90,65,-2,0);
      FFlag(5);
      Myrandom;
      RadialRoadWalk(FindVarrockRoadColor,55,110,65,-2,0);
      Playcheck;
      Myrandom;
      repeat
        Myrandom;
        Playcheck;
        RadialRoadWalk(FindVarrockRoadColor,90,230,65,-2,0);
        Wait(700+ random(250));
        FFlag(5);
      until FindSymbol(x,y,'mining spot');
      If FindSymbol(x,y,'mining spot') then
      begin
        WriteLn('Found Mining Spot');
        Playcheck;
        Mouse(x,y,7,7,true);
        FFlag(0);
      end;
    end;

    procedure WithdrawPick;
    begin
      if Not(LoggedIn) then exit;
      OpenBankFast('veb');
      if FindDTM(Loadiron, x, y, mix1, miy1, mix2, miy2) then
      begin
        mouse (x,y,2,2,false);
        Wait(200+random(1000));
        ChooseOption('All');
        Wait (1000 +random(300));
      end;
      begin
        Fixbank;
        Withdraw(1, 1, 1);
        CloseBank;
        Writeln('woot! got another pickaxe!');
      end;
    end;

    procedure Makesurepick;
    begin
      if(not(LoggedIn)) then Exit;
      BrokenPick := DTMFromString('78DA6334676660A8656440058C4824907603A' +
           'A2926A0C61BA8A688801A3BA09A4C026A8C806A728950D34A408D' +
           '13504D3E7E3500C8FC050A');
      Stick := DTMFromString('78DA6314666060906140038C4824901601124' +
           '204D44801095E026A40F2CA04D408000929026A048184220135E2' +
           '404214BF1A00B23A014A');
      if FindDTM(Stick, x, y, 532, 183, 751, 485) then
      begin
        writeln('uhoh lost pickhead...guna look for it..');
        SearchHead;
      end;
      begin
        if FindDTM(BrokenPick, x, y, 532, 183, 751, 485) then
        begin
          writeln('  dang, gasfound did not work I guess...please report this bug if you got it. ');
          if MorePickAxe = 'True' then
          WalktoBank;
          WithdrawPick;
          Proggy;
          Logout;
          NextPlayer(true);
          if MorePickAxe = 'False' then
          WalktoBank;
          Proggy;
          Logout;
          NextPlayer(false);
        end;
      end;
    end;


    procedure MakeSureRock;
    begin
      if(not(LoggedIn))then
      Exit;
      MakeCompass('N');
      SetAngle(True);
      begin
        if not FindObjCustom(x, y, ['ock', 'Mine'], [2832993], 6)then
        SetAngle(false);
        if FindObjCustom(x, y, ['ock', 'Mine'], [2832993], 6)then
        Makesurepick;
        FindGas;
        Leveled;
        Myrandom;
        Mouse(x, y, 1, 1, True);
        Myrandom;
        exit;
      end;
    end;


    function FindOres:boolean;
    var
      tx,ty,i: integer;
      IronPoints: TPointArray;
      Iron2D : T2DPointArray;
      IronPoint : TPoint;
    begin
      if not LoggedIn then exit;
      x:= MSCX;
      y:= MSCY;
      begin
        FindColorsSpiralTolerance(x,y,IronPoints,2898527,MSX1,MSY1,MSX2,MSY2,1);
        Iron2D:= TPAtoATPAEx(IronPoints,3,3);
        for i:= 0 to length(Iron2D)-1 do
        begin
          if not LoggedIn then exit;
          Ironpoint:= MiddleTPA(Iron2D[i]);
          tx:= IronPoint.X;
          ty:= IronPoint.Y;
          MMouse(tx,ty,2,2);
          wait(90+random(50));
          if isuptext('ine')then
          begin
            GetMousePos(tx,ty);
            result:= true;
          end else Continue;
        end;
      end;
    end;


    procedure MinedaRock;
    var
      i, MiningTime : Integer;
      Blacktext : string;
    begin
      MakeCompass('N');
      SetAngle(True);
      for i := 0 to 2 do
      repeat
        if Not(LoggedIn) then exit;
        writeln('start');
        Myrandom;
        if FindOres then
        writeln('brap');
        Mouse(x,y,2,2,True);
        MarkTime(MiningTime);
        repeat
          BlackText := GetBlackChatMessage;
          if (getcolor(486, 384) = 0) then
          Wait(250+Random(300));
        until (Pos('anage', BlackText) <> 0) or (Pos('vailable', BlackText) <> 0) or (TimeFromMark(MiningTime) > (WaitperRock +random(250)));
      until (InvFull);
      if (InvFull) then
      begin
        writeln( 'Inventory Full walking to bank.' );
      end;
    end;

    procedure Tobank;
    begin
      if(not(LoggedIn)) then Exit;
      MakeCompass('N')
      SetAngle(True);
      WalktoMine;
      Antiban;
      Myrandom;
      MakeSureRock;
      MinedaRock;
      Antiban;
      Myrandom;
      Walktobank;
    end;

    procedure Drop;
    begin
      if Not(LoggedIn) then exit;
      Antiban;
      GameTab(4);
      for x := 2 to 28 do
        Begin
        if Random(101) < 3 then
          Begin
          MouseItem(x, true);
          MouseItem(x + 1, true);
        end;
        MouseItem(x, false);
        ChooseOption('rop');
        Myrandom;
        LoadsNum := LoadsNum + 1;
        ReportVars[2] := ReportVars[2] + 1;
        Proggy;
      end;
    end;

    procedure ToDrop;
    begin
      if(not(LoggedIn)) then Exit;
      MakeCompass('N');
      SetAngle(True);
      WalktoMine;
      Antiban;
      Myrandom;
      MakeSureRock;
      repeat
        Minedarock;
        Drop;
        Antiban;
        Myrandom;
        Inc(Players[CurrentPlayer].Banked);
      until Players[CurrentPlayer].Banked mod LoadsPerPlayer = 0;
      begin
        CheckLevel;
        Proggy;
        NextPlayer(True);
      end;
    end;

    begin
      SetUpSmart;
      Signature;
      SetupSRL;
      ScriptID :='766';
      SRLID := SRLStatsID;
      SRLPassword := SRLStatsPass;
      if (SRLID = '') or (SRLPassword = '') then
      begin
        ClearDebug;
        if (SRLStatsID = '') and not(SRLStatsPass = '') then writeln('Nice try, trying to trick it with just a ID :P');
        writeln('You dont have SRL stats, To set up a SRL stats ID go here: http://www.stats.srl-forums.com');
        TerminateScript;
      end;
      begin
        DeclarePlayers;
        if LoggedIn then Logout;
        LoginPlayer;
        CheckLevel;
        Writeln('Current Mining Level Is ' +IntToStr(Level));
        if Bank = 'False' then
        begin
          CheckPick;
          repeat
            ToDrop;
            if not Loggedin then NextPlayer(False);
          until False;
        end;
        if Bank = 'True' then
        begin
          CheckPick;
          repeat
            Tobank;
            if not Loggedin then NextPlayer(False);
          until False;
        end;
      end;
    end.

  12. #12
    Join Date
    Jun 2007
    Location
    La Mirada, CA
    Posts
    2,484
    Mentioned
    1 Post(s)
    Quoted
    3 Post(s)

    Default

    make findores have an x and y parameter for the color search and have it mouse to that x and y location...right now it is just randomly click a x and y location when it finds the ore...it doesnt actually click the ore

    SCAR Code:
    function FindOres(var tx, ty: Integer):boolean;
    var
      i: integer;
      IronPoints: TPointArray;
      Iron2D : T2DPointArray;
      IronPoint : TPoint;
    begin
      if not LoggedIn then exit;
      x:= MSCX;
      y:= MSCY;
      begin
        FindColorsSpiralTolerance(tx,ty,IronPoints,2898527,MSX1,MSY1,MSX2,MSY2,1);
        Iron2D:= TPAtoATPAEx(IronPoints,3,3);
        for i:= 0 to length(Iron2D)-1 do
        begin
          if not LoggedIn then exit;
          Ironpoint:= MiddleTPA(Iron2D[i]);
          tx:= IronPoint.X;
          ty:= IronPoint.Y;
          MMouse(tx,ty,2,2);
          wait(90+random(50));
          if isuptext('ine')then
          begin
            GetMousePos(tx,ty);
            result:= true;
          end else Continue;
        end;
      end;
    end;

    then also here

    SCAR Code:
    procedure MinedaRock;
    var
      i, MiningTime : Integer;
      Blacktext : string;
    begin
      MakeCompass('N');
      SetAngle(True);
      for i := 0 to 2 do
      repeat
        if Not(LoggedIn) then exit;
        writeln('start');
        Myrandom;
        if FindOres(x, y) then
        writeln('brap');
        Mouse(x,y,2,2,True);
        MarkTime(MiningTime);
        repeat
          BlackText := GetBlackChatMessage;
          if (getcolor(486, 384) = 0) then
          Wait(250+Random(300));
        until (Pos('anage', BlackText) <> 0) or (Pos('vailable', BlackText) <> 0) or (TimeFromMark(MiningTime) > (WaitperRock +random(250)));
      until (InvFull);
      if (InvFull) then
      begin
        writeln( 'Inventory Full walking to bank.' );
      end;
    end;

    that should fix your problem...now it finds the color at tx, ty, saves that location a moves to check up text and if correct uptext is found it moves and clicks location tx, ty

    "Failure is the opportunity to begin again more intelligently" (Henry Ford)


  13. #13
    Join Date
    Mar 2007
    Posts
    3,116
    Mentioned
    0 Post(s)
    Quoted
    2 Post(s)

    Default

    Look like super familer, Have you applied for members with that before?

  14. #14
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    @ HyperSecret THANKS!!! ILL TEST! REP

    @MylesMadness Lol yes, I've applied but then un-applied because I knew I was going to make it, but there were like 14 yes, and 5 no..so I thought I could do better so i un-applied so the next time I'll get ALL yess

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
  •