Results 1 to 11 of 11

Thread: DTM's aren't working

  1. #1
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default DTM's aren't working

    Okay, this is really annoying me... my script just isn't finding my dtms?

    I can find nothing wrong with this:

    Simba Code:
    program MehScript;

    {$DEFINE Smart}
    {$i srl/srl.simba}

    procedure DeclarePlayers;
    begin
      HowManyPlayers:= 1;
      NumberOfPlayers(HowManyPlayers);
      CurrentPlayer := 0;

      Players[0].Name      := '';
      Players[0].Pass      := '';
      Players[0].Nick      := '';
      Players[0].Pin       := '';
      Players[0].Active    := true;
      LoginPlayer
    end;

    var
      x, y: integer;

    function WithdrawPieShell: boolean;
     var
      x, y, PieShell: Integer;
    begin
      Result := (false);
      PieShell := DTMFromString('78DA639CCAC0C050C98002E696BB816946289' +
           'FF10390686640034C286A00BFF403E2');
      Result := (FindDTM(PieShell, x, y, MSX1, MSX2, MSY1, MSY2));
    begin
    if (invcount > 0) then
    depositall;
    if (invcount = 0) then
    begin
    if FindDTM(PieShell, x, y, MSX1, MSY1, MSX2, MSY2) then
    begin
    Writeln ('found pie shell dtm :)');
    if result = (false) then
    begin
    Writeln ('not found pie shell');
    repeat
    if isuptext ('ie') then
    begin
    Mouse (x, y, 0, 0, False);
    ChooseOption ('ithdraw-7');
    if (invcount = 7) then
    end;
    end;
    freeDTM(PieShell);
    end;
    end;
    end;
    end;


    function WithdrawStrawberry: boolean;
     var
      x, y, Strawberry: Integer;
    begin
     Result := (false);
     Result := (invcount = 7);
      Strawberry := DTMFromString('78DA638C616060C86240018BAD8CC1342394C' +
           'F5800240E30A0012654351540E2100135F540620701350D406223' +
           '01355D40620101351D40622501351381C444026A26038999F8D50' +
           '0003DBF0B74');
    begin
    if FindDTM(Strawberry, x, y, MIX1, MIY1, MIX2, MIY2) then
    begin
    if isuptext ('strawberry') then
    begin
    repeat
    Mouse (x, y, 0, 0, False);
    ChooseOption ('ithdraw-7');
    until (result);
    end;
    if (false) then
    begin
    if FindDTM(Strawberry, x, y, MIX1, MIY1, MIX2, MIY2) then
    begin
    Mouse (x, y, 0, 0, False);
    ChooseOption ('ithdraw-7');
    end;
    end;
    end;
    end;
    end;



    procedure WithdrawCookingApple;
    var
      x, y, CookingApple: Integer;
    begin
    CookingApple := DTMFromString('78DA630C626060B0624001DCBEBC609A11CA6' +
           '79C05249218D00013AA9AD940229A809A45402200BF1A004C6C03' +
           'E4');
    begin
    if FindDTM(CookingApple, x, y, MIX1, MIY1, MIX2, MIY2) then
    begin
    repeat
    Mouse (x, y, 0, 0, False);
    ChooseOption ('ithdraw-7');
    until (invcount = 21);
    end;
    freeDTM(CookingApple);
    if (invcount = 28) then
    begin
    closebank;
    end;
    end;
    end;

    procedure WithdrawWatermelon;
    var
      x, y, Watermelon: Integer;
    begin
    Watermelon := DTMFromString('78DA638C6660603066400109F542609A11CA6' +
           '7BC09248C18D00013A61A2B026A2E020975FC6A00A24404A4');
    begin
    if FindDTM(Watermelon, x, y, MIX1, MIY1, MIX2, MIY2) then
    begin
    repeat
    Mouse (x, y, 0, 0, False);
    ChooseOption ('ithdraw-7');
    until (invcount = 28);
    end;
    freeDTM(Watermelon);
    end;
    end;

    function BankColour: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.19, 0.49);

      if not (FindColorsTolerance(arP, 4664116, MSX1, MSY1, MSX2, MSY2, 11)) then
      begin
        Writeln('Failed to find the color, no result(bankcolour).');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

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

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    function PieShell: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.20, 0.35);

      if not (FindColorsTolerance(arP, 4552348, MSX1, MSY1, MSX2, MSY2, 1)) then
      begin
        Writeln('Failed to find the color, no result(pieshell).');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

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

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    function Strawberry: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.20, 0.35);

      if not (FindColorsTolerance(arP, 4552348, MSX1, MSY1, MSX2, MSY2, 1)) then
      begin
        Writeln('Failed to find the color, no result(Strawberry).');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

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

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    function Watermelon: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.06, 0.08);

      if not (FindColorsTolerance(arP, 2710312, MSX1, MSY1, MSX2, MSY2, 6)) then
      begin
        Writeln('Failed to find the color, no result(Watermelon).');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

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

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

      if (i = arL + 1) then
        Writeln('AutoColor failed in finding the color.');
    end;
    function Apple: Integer;
    var
      arP: TPointArray;
      arC: TIntegerArray;
      tmpCTS, i, arL: Integer;
    begin
      tmpCTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.40, 0.07);

      if not (FindColorsTolerance(arP, 1076776, MSX1, MSY1, MSX2, MSY2, 12)) then
      begin
        Writeln('Failed to find the color, no result(Apple).');
        ColorToleranceSpeed(tmpCTS);
        SetColorSpeed2Modifiers(0.2, 0.2);
        Exit;
      end;

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

      for i := 0 to arL do
      begin
        Result := arC[i];
        Writeln('AutoColor = ' + IntToStr(arC[i]));
        Break;
      end;

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

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

    procedure camera;
    begin
    makecompass(180);
    end;

    procedure bankbanker;
    begin
    if findobjcustom(x, y, ['ank'], [BankColour], 2) then
    begin
    Mouse(x, y, 0, 0, false);
    chooseoption ('Bank Banker');
    if (bankscreen) then
    end;
    end;

    procedure Depositstuff;
    begin
    if (bankscreen) then
    begin
    if (InvCount > 0) then
    begin
    depositall;
    end;
    end;
    end;

    procedure UsePieShell;
    begin
    if (invcount = 28) then
    begin
    if (bankscreen) then
    closebank;
    begin
    if findobjcustom(x, y, ['Pie Shell'], [PieShell], 2) then
    begin
    Mouse(x, y, 0, 0, true);
    chooseoption ('Use');
    end;
    end;
    end;
    end;

    begin
       SetupSRL;
       DeclarePlayers;
       LoginPlayer;
       camera;
    repeat
       bankbanker;
    until (bankscreen);
       Depositstuff;
    begin
    repeat
       WithdrawPieShell;
    until (invcount = 7);
    if (invcount = 7) then
    begin
    repeat
       WithdrawStrawberry;
    until (invcount = 14)
       WithdrawWatermelon;
    if (invcount = 14) then
    begin
    repeat
       WithdrawCookingApple;
    until (invcount = 21)
    if (invcount = 21) then
    begin
    repeat
       UsePieShell;
    until (invcount = 28)
    end;
    end;
    end;
    end;
    end.

    Sorry about standards.. i will put in later

    but when i run this, all I get is 'Warning! You passed wrong values to a finder function: ys > ye (515,337). Swapping the values for now.
    Warning! You passed a wrong ye to a finder function: 515. The client has a height of 503, thus the ye is out of bounds. Setting the value to 502 (h-1) for now.' i mean, wth

    I was also wondering, instead of saying 'if dtm is found' if i could say 'find dtm', because it is there- the script just can't find it

    thanks for any help :-)

  2. #2
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    nobody?

  3. #3
    Join Date
    Dec 2011
    Posts
    20
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Did you set the toleranse 10-15?

  4. #4
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    would that affect dtms?

    how can i change the tolerance on dtms?

  5. #5
    Join Date
    Feb 2011
    Location
    The Future.
    Posts
    5,600
    Mentioned
    396 Post(s)
    Quoted
    1598 Post(s)

    Default

    GO to DTM editor.. DTM Menu -> DTM from string.. Enter:78DA639CCAC0C050C98002E696BB816946289FF10390686640034C286A00BFF403E2

    Now edit your dtm to your liking.. that means u can change the tolerance.. atm your tolerances are at 0 and you only have two points.. When done print it.

    I am Ggzz..
    Hackintosher

  6. #6
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    what dtm editor? im using scar

    /give up

  7. #7
    Join Date
    Dec 2011
    Location
    P2P :)
    Posts
    561
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by i need to bot! View Post
    what dtm editor? im using scar

    /give up
    LOL'D Use Simba.....

  8. #8
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    where is dtm editor in simba?

  9. #9
    Join Date
    Dec 2011
    Posts
    57
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    i see it...

  10. #10
    Join Date
    Feb 2011
    Location
    Earth
    Posts
    1,784
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    don't double post btw, there is an edit button

    Currently: Working on Defending&Attacking in my Castle-Wars Script
    Project Rebuild: 90M/170M

  11. #11
    Join Date
    Dec 2011
    Location
    Texas
    Posts
    348
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by i need to bot! View Post
    what dtm editor? Im using scar

    /give up
    wtf?

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
  •