Results 1 to 7 of 7

Thread: DTM detection help with my GE claysoftener script

  1. #1
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default DTM detection help with my GE claysoftener script

    My script is not finding any DTM's the tolerance is set to 15 can someone please look at my finddtmrotated procedures and check the setup i dont understand it
    if(findDTMRotatedSE(fountainicon,x,y,1712,78,1793, 98,-Pi, Pi, Pi/30, aFound))then loc:=4;
    Cheers

    SCAR Code:
    //--------------GRAND EXCHANGE CLAY SOFTENER MASTER v0.01------------------\\
    program GrandExchangeClaySoftener;
    {$DEFINE SMART}
    {$i srl/srl.simba}

    var
      loc,x, y, fountainicon,bankicon,herbicon,clay, softclay, Claysoftened, BreaksTaken, BreakTimer: Integer;
      aFound: Extended;

    const
     // Smart_Server := 10;
      //Smart_Members := false;
      SMART_HIGHDETAIL = false;
      LaggyComputer     = False; // true = you're using a laggy computer. (This WILL lower profit/hr)
                                 // false = you are using a fast computer.
      UseBreaks         = True; //Do you want to take breaks?
      SwitchWorld       = True; //Do you want to switch worlds after the break?
      BreakIn           = 90; //How many minutes until you take a break?
      BreakInRandom     = 10; //How many minutes should the "BreakIn" time be varied by?
      BreakFor          = 7; //How many minutes will you break for?
      BreakForRandom    = 7;  //How many minutes should the "BreakFor" time be varied by?
      Members           = True; // True = Members World. False = Free World.
      Mouse_Speed       = 17; // Mouse speed. Higher = Faster. (17 is default)
      Version           = '1.2.1';
      NumbOfPlayers     = 1; //How many players you are using.
      StartPlayer       = 0; //Player to start with. (0 = first character)
    //The rest of your script goes here.

    procedure DeclarePlayers;
    var i:integer;
    begin
      NumberOfPlayers(NumbOfPlayers);
      CurrentPlayer := StartPlayer;
      for i := 0 to NumbOfPlayers-1 do
        Players[i].BoxRewards  := ['xp', 'oins', 'ostume', 'mote'];

    // Make sure you set 'Booleans[0]' and 'Booleans[1]' accordingly!

      with Players[0] do
      begin
        Name        := ''; //Player username.
        Pass        := ''; //Player password.
        Pin         := ''; //Bank Pin. (Leave blank if you do not have a bank pin.)
      //  Loc         := 'vwb'; //Banking Location (See below) (Soul Wars banking is above)

        Booleans[0] := True; // True = Pestle and Mortar. False = Knife
        Booleans[1] := False; // Bank at Soul Wars? True = Soul Wars. False = Use 'Loc' bank
        Active      := True;
      end;

      //To use multiple accounts, remove the {}'s from the below coding.
      //Make sure you adjust "NumbOfPlayers", which is found in the constants! (aka - "Const")
      { with Players[1] do
      begin
        Name        := ''; //Player username.
        Pass        := ''; //Player password.
        Pin         := ''; //Bank Pin. (Leave blank if you do not have a bank pin.)
        Loc         := 'vwb'; //Banking Location (See below) (Soul Wars banking is above)

        Booleans[0] := True; // True = Pestle and Mortar. False = Knife
        Booleans[1] := False; // Bank at Soul Wars? True = Soul Wars. False = Use 'Loc' bank
        Active      := true;
      end; }

        { with Players[2] do
      begin
        Name        := ''; //Player username.
        Pass        := ''; //Player password.
        Pin         := ''; //Bank Pin. (Leave blank if you do not have a bank pin.)
        Loc         := 'vwb'; //Banking Location (See below) (Soul Wars banking is above)

        Booleans[0] := True; // True = Pestle and Mortar. False = Knife
        Booleans[1] := False; // Bank at Soul Wars? True = Soul Wars. False = Use 'Loc' bank
        Active      := true;
      end; }

    end;

    procedure AntiRandoms;
    begin
      FindNormalRandoms;
      LampSkill := 'prayer' //This can be changed to any skill!
    end;

    ////////////////////////////////////////////////////////////////////////////////
    //                   No Editing is required below this point!                 //
    ////////////////////////////////////////////////////////////////////////////////

    Procedure Antiban;
    Begin
      Case Random (175) of
        0..18: Begin SleepAndMoveMouse(5000 + Random(750)); End;
        19..24: Begin GameTab(tab_Inv) ExamineInv; GameTab(tab_Inv); SleepAndMoveMouse(2500 + Random(553)); End;
        25..42: Begin RandomAngle(1); End;
        43..48: Begin GameTab(Tab_Stats); Wait(3000 + Random(400)); GameTab(tab_Inv); SleepAndMoveMouse(2550 + Random(658)); End;
        49..54: Begin GameTab(tab_Stats) HoverSkill('random', False); GameTab(tab_Inv); SleepAndMoveMouse(2200 + Random(545)); End;
        55..75: Begin MakeCompass(Random(361)); End;
        End;
    End;

    procedure InitDTMs;
    begin

    fountainicon := DTMFromString('mwQAAAHic42RgYHjIBsE3ofRzIH4GxHeg9F0gjgOqCwPiWCBOYYDwI4E4GYgTgTgciPlsrwNJRryYn4EwwG8CBMMBANAtDLE=');
     bankicon := DTMFromString('mwQAAAHic42RgYDjGxsBwFoj3s0HYIHwIiE8B8WkgPgDEngwI7ATEAUDsDMT+QOwCxL5A/O6SCpBkxIv5GQgD/CZAMBwAACO6C8k=');
     clay := DTMFromString('mbQAAAHicY2VgYChhg+BSIM4F4mogFmZmYOADYnFmCFsAiCdUBgJVM6FhTMCIBYMBAGJ5BDo=');
     softclay := DTMFromString('mbQAAAHicY2VgYChjQ+AsIG4BYgFmBgZWIJYCYmEg5gPiSEdeoGomNIwJGLFgMAAANlIDhw==');
    end;

    procedure FreeDTMs;
    begin
      FreeDTM(clay);
      FreeDTM(softclay);
    end;

    procedure Proggy;
    begin
      Writeln('//////////////////Grand Exchange Clay Softener\\\\\\\\\\\\\\\\\\');
      Writeln('///////////////////////By Leetsxc\\\\\\\\\\\\\\\\\\\\\\\\');
      Writeln('Run Time: ' + TimeRunning);
      Writeln('Total Loads: ' + IntToStr(Claysoftened));
      Writeln('Soft Clays made: ' + IntToStr(Claysoftened*28));
      WriteLn('Total Profit made: ' + IntToStr(Claysoftened*28*50));
      WriteLn('Breaks Taken: ' + IntToStr(BreaksTaken));
      Writeln('//////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\');
    end;

    procedure fountainfinder;
    begin

    end;

    procedure intelligence;
    {var
    region1x,region1y,region2x,region2y,region3x,region3y,region4x,region4y,region1x2,region1y2,region2x2,region2y2,region3x2,region3y2,region4x2,region4y2:integer;    }

    begin
    //Their are 4 regions so far that are layers of distance around minimap player icon, these will be used to find dtms in to find out locations
      if not LoggedIn then
        Exit;
        AntiRandoms;
        writeln('Finding banker and opening bank');
        writeln('Determining location with Minimap DTM distance to player map icon recognition');
     {  //Regions to compare distance to 1753, 88 that is the white square dot that represents player
       region1x:=679;   //10CORDS around player
       region1y:=78;
       region1x2:=699;
       region1y2:=98;
       region2x:=669; //20 Cords could this work better if it was split into 5 smaller sections around the 10 cord area 2.5C ea
       region2y:=68;
       region2x2:=709;
       region2y2:=108;
       region3x:=659; //30 cords
       region3y:=58;
       region3x2:=719;
       region3y2:=118;
       region4x:=649; //40 cord radius
       region4y:=48;
       region4x2:=729;
       region4y2:=128;    }

       loc:=0;
       if(findDTMRotatedSE(bankicon,x,y,1743,78,1763,98,-Pi, Pi, Pi/30, aFound))then loc:=1;
       if(not(loc=1))then
       begin
       if(findDTMRotatedSE(bankicon,x,y,1733,78,1773,98,-Pi, Pi, Pi/30, aFound))then loc:=2;
       end;
       if(not(loc=2))then
       begin
       if(findDTMRotatedSE(bankicon,x,y,1723,78,1783,98,-Pi, Pi, Pi/30, aFound))then loc:=3;
       end;
       if(not(loc=3))then
       begin
       if(findDTMRotatedSE(bankicon,x,y,1712,78,1793,98,-Pi, Pi, Pi/30, aFound))then loc:=4;
       end;
       if(not(loc=0))then
       begin
       writeln('Found the bank icon in mini map player icon radius zone ' + IntToStr(loc));
       writeln('Radius zone 1 is 10 coords around your white square, 2 is 20, 3 is 30 and 4 is 40');
       end;
        if(loc=0)then
        begin
        writeln('was not found in any of the radius zones so we will now search for the foutain icon as you are most likely at the fountain due to an error after making soft clay');
        if(findDTMRotatedSE(fountainicon,x,y,1743,78,1763,98,-Pi, Pi, Pi/30, aFound))then loc:=1;
        if(not(loc=1))then
        begin
        if(findDTMRotatedSE(fountainicon,x,y,1733,78,1773,98,-Pi, Pi, Pi/30, aFound))then loc:=2;
        end;
        if(not(loc=2))then
        begin
        if(findDTMRotatedSE(fountainicon,x,y,1723,78,1783,98,-Pi, Pi, Pi/30, aFound))then loc:=3;
        end;
        if(not(loc=3))then
        begin
        if(findDTMRotatedSE(fountainicon,x,y,1712,78,1793,98,-Pi, Pi, Pi/30, aFound))then loc:=4;
        end;
        if(not(loc=0))then
        begin
        writeln('You were closest to the fountain artifical intelligence was correct');
        writeln('Lets just do a check to see if you have any remainding clay left..');
        if(finddtm(clay,x,y,1644,442,1823,696))then
        begin
        writeln('O shit we havnt finished making soft clay yet and most likely had an error, lets call the fountain fider method..');
        fountainfinder;
        end;
        end;

        end;
    end;

    procedure WithdrawClay;
    begin
      if not LoggedIn then
        Exit;
      AntiRandoms;
      if (PinScreen) then
        InPin(Players[CurrentPlayer].Pin);
      if (BankScreen) then
          DepositAll;
          WriteLn('Banking');
      Wait(300 + Random(200));
      FixBank;
      MMouse(487,121,9,9);
      Case (LaggyComputer) of
        true: Wait(650 + 400);
        false: Wait(250 + 200);
      end;
        if IsUpText('clay') then
        begin
          ClickMouse2(false);
        end else
          begin
            WriteLn('Could not find Clay (wrong uptext). Trying again...');
            MakeCompass(Random(361));
            Wait(1000);
            if IsUpText('bar') then
            begin
              ClickMouse2(false);
            end else
              begin
                WriteLn('Could not find Clay (wrong uptext). Trying again...');
                MakeCompass(Random(361));
                Wait(1000);
                if IsUpText('clay') then
                begin
                  ClickMouse2(false);
                end else
                  begin
                    WriteLn('Could not find Clay (wrong uptext). Trying again...');
                    MakeCompass(Random(361));
                    Wait(1000);
                      if IsUpText('clay') then
                      begin
                        ClickMouse2(false);
                      end else
                      begin
                        if (BankScreen) then
                          CloseBank;
                      end;
                      begin
                        WriteLn('Could not find Clay (wrong uptext). Switching Player/Logging out.');
                        Players[CurrentPlayer].Active := False;
                        Logout;
                        Exit;
                      end;
                  end;
              end;
          end;
      Case (LaggyComputer) of
        true: Wait(650 + 250);
        false: Wait(100 + 200);
      end;
      WaitOptionMulti(['Withdraw-All', 'All'], 200);
      Case (LaggyComputer) of
        true: Wait(650 + 300);
        false: Wait(200 + 200);
      end;
      CloseBank;
    end;

    procedure TakeBreaks;
    begin
      if not LoggedIn then
        Exit;
      begin
      if (GetSystemTime > BreakTimer) then
        begin
          WriteLn('Taking a break.');
          Logout;
          Wait(BreakFor * 60000 + Random(BreakForRandom * 60000));
          WriteLn('Logging back in.');
          Case (SwitchWorld) of
            True: if LoginPlayerToLob then
                  ChangeWorld(RandomWorld(True, False));
            False: LoginPlayer;
          end;
          Wait(2000);
          BreaksTaken:=BreaksTaken+1;
          BreakTimer := GetSystemTime + (BreakIn * 60000 + Random(BreakInRandom * 60000));
        end;
      end;
    end;


    begin
      Smart_Server := 10;
      Smart_Members := Members;
      SetupSRL;
      DeclarePlayers;
      MouseSpeed := Mouse_Speed;
      repeat
      sleep(1000);
      writeln('Smart is loading..');
      until(findcolor(x,y,290985,423,257,466,273));
      LoginPlayer;
      Wait(2000);
      GameTab(tab_Inv);
      BreakTimer := GetSystemTime + (BreakIn * 60000 + Random(BreakInRandom * 60000));

      repeat
        repeat
          InitDTMs
          WithdrawClay;
          FreeDTMs;
          Proggy;
          if (UseBreaks) then
            TakeBreaks;
        until (not Loggedin);
        NextPlayer(Players[CurrentPlayer].Active);
        Wait(2000);
      until (false);
    end.

  2. #2
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    If you're trying to walk to the fountain symbol, just use symbol walking.

  3. #3
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Are you sure these coords? My SMART has no more than 800 pixels width ,and I think it has same dimension for everyone. I suggest you to replace:

    if(findDTMRotatedSE(fountainicon,x,y,1712,78,1793, 98,-Pi, Pi, Pi/30, aFound))then loc:=4;

    with


    if(findDTMRotatedSE(fountainicon,x,y,MMX1,MMY1,MMX2, MMY2,-Pi, Pi, Pi/30, aFound))then loc:=4;

  4. #4
    Join Date
    Dec 2011
    Location
    New York, USA
    Posts
    1,242
    Mentioned
    12 Post(s)
    Quoted
    193 Post(s)

    Default

    Quote Originally Posted by beginner5 View Post
    Are you sure these coords? My SMART has no more than 800 pixels width ,and I think it has same dimension for everyone.
    He probably forgot to drag his cross-hairs to the smart window before getting the coordinates. Try that leetsxc.

  5. #5
    Join Date
    Jul 2009
    Location
    Australia
    Posts
    667
    Mentioned
    0 Post(s)
    Quoted
    7 Post(s)

    Default

    Try to avoid using co-ords if you can, using something like MMX1, MMY1, MMX2, MMY2 just gives the script a little more room for error.

    One other thing, I'd recommend that you don't have your InitDTMs inside the loop as you don't need to be repeatedly declaring your dtms (same thing with the FreeDTMs, have it at the end as well as each terminate point).

    For your WithdrawClay procedure you could simply use a counting integer instead of having the actual procedure put in 3 times.
    eg
    Simba Code:
    var
    Tries: Integer;

    begin
      Tries := 0;
      repeat
      begin
        MakeCompass(Random(361));
        Wait(1000);
        if IsUpText('bar') then
        begin
          ClickMouse2(false);
          Exit;
        end else
          Tries := Tries + 1;
          WriteLn('Could not find Clay (wrong uptext). Trying again...');
       until Tries >= 3;
       Writeln('Failed To Find Clay 3 Times);
    end;

    Final point, are you sure that you are using your FountainFinder procedure properly in your script?

    Hope This Helped
    ~Caotom

  6. #6
    Join Date
    Jul 2008
    Location
    NSW, Australia
    Posts
    881
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Thx for the advice guys.
    I need more info on the Pi, Pi, Pi/30, aFound part tho I dont quite understand the angle stuff could someone go into detail about this and how to set it right

  7. #7
    Join Date
    Feb 2012
    Posts
    19
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Smart is loading?

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
  •