View Full Version : Doesn't recognise DTM ??
Cinkupis
05-31-2012, 12:51 PM
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?
sorry nothing u can do so just give up.. :L
Cinkupis
05-31-2012, 01:09 PM
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.?
Sirenia
05-31-2012, 01:10 PM
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
Sir R. M8gic1an
05-31-2012, 02:21 PM
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
Cinkupis
05-31-2012, 02:30 PM
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,FP H2,MGC,FVN: String;
ToFish,ToBankBox,FSpot1,FSpot2,FSpot3,Restart,RunA wayN: 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/EGID4ExOuAeDZUfB4QK0DV2wFxHBCnALEjEIsCsTwQ6wCxGhDL QM2J8LZgwAZi/K0ZKpLsGEoTbRn8XYwY4nwNGaJ8LRn4gXKkYGYSMTIAAJYaD7k =');
BankBox := DTMFromString('mggAAAHicY2NgYDgJxKeheA8QbwPie0C8AI hboGJNQLwTiGcAcU91HENyuDNDWbITQ060LUNRggNDYqgjAz9Q DhtmxIEhAABB1g9T');
FShield := DTMFromString('mrAAAAHic42BgYOAFYgEg5gdiHiBmB2I+IG aBijECMRMQs0LlQOJcUBqkl9XUCS8mBBgJYBgAAK0nBH8=');
FDamage := DTMFromString('mbQAAAHicY2VgYNBmhGAdINYDYn0glgZiBS BWBmI5IJYA4nQ2NoYEPj4wns3DA6a5gPrRMSMWDAYAIPEEVA== ');
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.
Paradoxium
05-31-2012, 02:33 PM
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
Sir R. M8gic1an
05-31-2012, 02:35 PM
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
Cinkupis
05-31-2012, 02:58 PM
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) ??
Cinkupis
05-31-2012, 03:02 PM
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:
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" ?
Sirenia
05-31-2012, 03:20 PM
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
Powered by vBulletin® Version 4.2.1 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.