Results 1 to 11 of 11

Thread: Doesn't recognise DTM ??

  1. #1
    Join Date
    Feb 2012
    Location
    Lithuania
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default Doesn't recognise DTM ??

    Well, I'm trying to make a LRC Gold miner + banking.

    Banking is where I get the problem.

    I have tried doing banking with TPAs, but then I thought I should try out doing the banking procedure with als lrc fisher, I changed parts of the script and DTMs of the gold ore so it would compile without errors.

    But what it does, is that it doesn't recognise/find a DTM in inventory (C Gold ore). I tried with different dtms - nothing.

    Then I thought I might use the dtm that harry's miner has. Still it doesn't recognise it in inventory.

    It doesn't give any errors or something, it just logs in and says successfully executed.

    Oh and each time I log in, the shape of gold ore changes a bit, not sure if that has something to do with dmts being not recognised, but it's a possibility. Otherwise I just don't know how to take a correct dtm/constant dtm.

    Any help?
    - The bad news is time flies, but the good news is you're the pilot.

  2. #2
    Join Date
    Feb 2012
    Posts
    52
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    sorry nothing u can do so just give up.. :L

  3. #3
    Join Date
    Feb 2012
    Location
    Lithuania
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Alvi View Post
    sorry nothing u can do so just give up.. :L
    How come then there is LRC fisher with banking??? How come that one works, recognises dmts etc.?
    - The bad news is time flies, but the good news is you're the pilot.

  4. #4
    Join Date
    Mar 2012
    Posts
    690
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Remember to add tol to your dtms. Also remember that msx1, msy1, msx2, msy2 is the main screen and the inv/minimap isnt included in those
    Example: FindDTM(dtm, x, y, mix1, miy1, mix2, miy2) then Will look for dtms only in your inv, msx1 etc would only check for dtm's inside the mainscreen

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

    Default

    Posting your code can be useful in these situations As Sirenia suggested, it might have nothing to do with your code, but rather the way you are searching for your DTM.

    e.g. Did you load the DTM? Not loading it is a typical rookie mistake.

    ~RM

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

  6. #6
    Join Date
    Feb 2012
    Location
    Lithuania
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Simba Code:
    program LRCGoldBanker;
    {$DEFINE SMART}
    {$i srl/srl.simba}
    {$i srl/srl/misc/paintsmart.simba}


    Var
    x,y,CGold,CGoal,bankbox,GC,Fish_Caught,Fish_XP,XP,FPH,TimeGone,P: Integer;
    fshield,fdamage,fvalue: Integer;
    FishCaught,FishXP,Info1,Info2,Info3,Info4,XPPH2,FPH2,MGC,FVN: String;
    ToFish,ToBankBox,FSpot1,FSpot2,FSpot3,Restart,RunAwayN: TPointArray;

    Function FindPulley(x, y: Integer): Boolean;
    Var
      CTS, I: Integer;
      TPA: TPointArray;
      ATPA: Array of TPointArray;
    Begin
      CTS := GetColorToleranceSpeed;
      ColorToleranceSpeed(2);
      SetColorSpeed2Modifiers(0.05, 0.18);
      FindColorsSpiralTolerance(MSCX, MSCY, TPA, 6521492, MSX1, MSY1, MSX2, MSY2, 3);
      ColorToleranceSpeed(CTS);
      ATPA := TPAToATPAEx(TPA, 60, 60);

      For I := 0 To High(ATPA) Do
      Begin
        MiddleTPAEx(ATPA[i], x, y);
        MMouse(x, y, 0, 0);
        If(WaitUpTextMulti(['dep','osit','pul','ull','ley','lif','ift'],500)) Then
        Begin
          Result := True;
          GetMousePos(x, y);
          Break;
        End;
      End;
    End;

    Procedure Banking;
    Begin
      If (FindDTM(CGold,x,y,MIX1,MIY1,MIX2,MIY2)) then// Or FindDTM(CFish,x,y,MIX1,MIY1,MIX2,MIY2)) Then
        Begin
          If (FindPulley(X,Y)) Then
            Begin
              If FindDTM(CGold,x,y,MIX1,MIY1,MIX2,MIY2) Then
              GC  := CountItems('dtm', CGold, []);// Else FC  := CountItems('dtm', CFish, []);
              XP  := (GC*380);
              MGC := IntToStr(GC);
              Writeln('Trying to bank ' + MGC + ' ore!');
              //OnScreenUpdate;
              ClickMouse2(True);
              Wait(RandomRange(2250,2750));
              //If PinScreen Then InPin(PP);
              //Wait(RandomRange(1000,1250));
              If (FindDTM(CGold, x, y, MSX1, MSY1, MSX2, MSY2)) Then
                Begin
                  Mouse(x,y,3,3,False);
                  Wait(RandomRange(700,850));
                  ChooseOption('ll');
                  //ToMining;
                End Else //ToMining;
            End Else
            Begin
              SymbolAccuracy := 0.35
              FindSymbol(x,y,'bank');
              Mouse(x,y,0,0,true);
              Wait(RandomRange(1000,1300));
              SymbolAccuracy := 0.80
              Banking;
            End;
        End Else //ToMining;
    End;

    Procedure SetDTMs;
    Begin
      CGold    := DTMFromString('mAAEAAHic42FgYFjOAAFajAwMn4F0DxCLA/EGID4ExOuAeDZUfB4QK0DV2wFxHBCnALEjEIsCsTwQ6wCxGhDLQM2J8LZgwAZi/K0ZKpLsGEoTbRn8XYwY4nwNGaJ8LRn4gXKkYGYSMTIAAJYaD7k=');
      BankBox  := DTMFromString('mggAAAHicY2NgYDgJxKeheA8QbwPie0C8AIhboGJNQLwTiGcAcU91HENyuDNDWbITQ060LUNRggNDYqgjAz9QDhtmxIEhAABB1g9T');
      FShield  := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IGaBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8=');
      FDamage  := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBSBWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA==');
    End;

    Procedure FreeDTMSet;
    Begin
      FreeDTM(CGold);
      FreeDTM(BankBox);
      FreeDTM(FShield);
      FreeDTM(FDamage);
    End;

    procedure MainLoop;
    begin
    SetDTMs;
    Banking;
    FreeDTMSet;
    end;

    begin
        Smart_Server := 84;
        Smart_Members := True;
        Smart_Signed := True;
        Smart_SuperDetail := False;
      SetupSRL();
      ClearDebug();
      DeclarePlayers();
      LoginPlayer();
      ClickNorth(SRL_ANGLE_HIGH);
      MainLoop();
    end.

    This is what I have, 90% of the code is copied from al's fisher and edited so it could work with ores instead of fish.

    Help appreciated. This thing only has to successfully bank full invy of gold ores to the pulley lift.
    - The bad news is time flies, but the good news is you're the pilot.

  7. #7
    Join Date
    May 2008
    Location
    the world 0_o
    Posts
    150
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    when you made the DTM did you add tol? I had a similar problem and it was because I did not add tol to them if you add it to the first point of the dtm it will add them to the rest automatically but if you get the points first, you must add them all individually

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

    Default

    Does it ever output this line:

    Writeln('Trying to bank ' + MGC + ' ore!');

    If it doesn't, then it isn't finding the pulley, if it does, then it's DTM related.

    if its dtm I suggest you re-read some tuts, make 5 points per dtm, on the black outline, and tol on centre point.
    If that doesn't work, you can also try bitmaps. And there are also more advanced ways of dealing with this...

    ~RM

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

  9. #9
    Join Date
    Feb 2012
    Location
    Lithuania
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Paradoxium View Post
    when you made the DTM did you add tol? I had a similar problem and it was because I did not add tol to them if you add it to the first point of the dtm it will add them to the rest automatically but if you get the points first, you must add them all individually
    Ok I tried to add tolerance, cause I really forgot to do that, but problem still remains with added tolerance (I added tol 1).

    I'm not sure, should I make DTM of a full gold ore, or just the center part of the ore which is gold (surrounded by 6rocks - 2gold/yellow collor and 4 brown ones) ??
    - The bad news is time flies, but the good news is you're the pilot.

  10. #10
    Join Date
    Feb 2012
    Location
    Lithuania
    Posts
    64
    Mentioned
    0 Post(s)
    Quoted
    3 Post(s)

    Default

    Quote Originally Posted by Sir R. M8gic1an View Post
    Does it ever output this line:

    Writeln('Trying to bank ' + MGC + ' ore!');

    If it doesn't, then it isn't finding the pulley, if it does, then it's DTM related.

    if its dtm I suggest you re-read some tuts, make 5 points per dtm, on the black outline, and tol on centre point.
    If that doesn't work, you can also try bitmaps. And there are also more advanced ways of dealing with this...

    ~RM
    The part where it stops when it enters banking procedure is:

    Simba Code:
    If (FindDTM(CGold,x,y,MIX1,MIY1,MIX2,MIY2)) then// Or FindDTM(CFish,x,y,MIX1,MIY1,MIX2,MIY2)) Then
        Begin

    which means that FindDTM gives the result as FALSE.

    Also,

    Maybe you can link me to the "more advanced ways" ?
    - The bad news is time flies, but the good news is you're the pilot.

  11. #11
    Join Date
    Mar 2012
    Posts
    690
    Mentioned
    2 Post(s)
    Quoted
    40 Post(s)

    Default

    Quote Originally Posted by Cinkupis View Post
    Ok I tried to add tolerance, cause I really forgot to do that, but problem still remains with added tolerance (I added tol 1).

    I'm not sure, should I make DTM of a full gold ore, or just the center part of the ore which is gold (surrounded by 6rocks - 2gold/yellow collor and 4 brown ones) ??
    1tol is very low, test around 8 and increase the number if you need

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
  •