SRL Archive - Discussions and Debates

Making a Bank DTM


[-jesus-]

2007-11-13 21:07:22

How do you make a dtm for bankers in your MM? I've tried making some before but they haven't worked so far :(

The Claw

2007-11-13 21:53:05

Take about 3 of the yellow dots, area size 3, and put a point just in front of the booth with tol of 255. :)

Dumpin

2007-11-14 04:26:36

and use DTMRotated for the minimap ;) so it can find it of diiferent directions

JuKKa

2007-11-14 09:05:22

every yellow dot u set should have a tolerance of 20

Rikje

2007-11-14 09:41:11

http://www.villavu.com/forum/showthread.php?t=19373

already tryed?:p

King of Knives

2007-11-14 09:49:51

I've never had problems with detecting bankers, or just any specific formation on the MM with area size 1 and tolerance 40.

-Knives

n3ss3s

2007-11-14 10:22:22

Hmm, I'll do it before Wizzy comes and does:


Function RecognizeNPCPixels(Var NPC: TPoint; AtX, AtY: Integer): TBox;
Var
TPA: TPointArray;
CTS: Integer;
Begin
If Not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If Not CTS = 2 Then ColorToleranceSpeed(2);
NPC.x := 0;
NPC.y := 0;
FindColorsSpiralTolerance(AtX, AtY, TPA, 195836, AtX - 2, AtY - 2, AtX + 2, AtY + 2, 5);
If InRange(GetArrayLength(TPA), 3, 8) Then
Begin
NPC := MiddleTPA(TPA);
Result.x1 := NPC.x - 2;
Result.y1 := NPC.y - 2;
Result.x2 := NPC.x + 2;
Result.y2 := NPC.y + 2;
End;
ColorToleranceSpeed(CTS);
End;

Function ToBankersVEB: Boolean;
Var
Spots: Array Of TPointArray;
TPA, NPCS: TPointArray;
CTS, T, I, C: Integer;
Bankers: TPoint;
TBA: TBoxArray;
BCMD: Boolean;
TP: TPoint;
TB: TBox;
Begin
If Not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If Not CTS = 2 Then ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 195836, MMX1, MMY1, MMX2, MMY2, 5);
Writeln(IntToStr(GetArrayLength(TPA)));
For I := 0 To High(TPA) Do
Begin
BCMD := False;
TB := RecognizeNPCPixels(TP, TPA[i].x, TPA[i].y);
For T := 0 To High(TBA) Do
Begin
If PointInBox(TP, TBA[t]) Then
Begin
BCMD := True;
Break;
End;
End;
If BCMD Then Continue;
If Not EqualTP(TP, 0, 0) Then
Begin
SetArrayLength(NPCs, GetArrayLength(NPCs) + 1);
NPCs[High(NPCs)] := TP;
SetArrayLength(TBA, GetArrayLength(TBA) + 1);
TBA[High(TBA)] := TB;
End;
End;
Spots := SplitTPAEx(NPCs, 6, 2);
For C := 0 To High(Spots) Do
Begin
If GetArrayLength(Spots[c]) >= 5 Then
Begin
Bankers := MiddleTPA(Spots[c]);
Break;
End;
End;
MouseFindFlag(Bankers.x + 4, Bankers.y - 5, 1, -2);
// If FindVEB(False) Then
Begin
Writeln('Successfully walked to bankers');
Result := True;
End;
ColorToleranceSpeed(CTS);
End;
;)

But as Claw said, DDTM with 3 dots, area size of about 3 and so on should work.

@Claw: When do you release the miner to members or public or do you?

the scar noob

2007-11-14 10:59:16

From: n3ss3s
Hmm, I'll do it before Wizzy comes and does:


Function RecognizeNPCPixels(Var NPC: TPoint; AtX, AtY: Integer): TBox;
Var
TPA: TPointArray;
CTS: Integer;
Begin
If Not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If Not CTS = 2 Then ColorToleranceSpeed(2);
NPC.x := 0;
NPC.y := 0;
FindColorsSpiralTolerance(AtX, AtY, TPA, 195836, AtX - 2, AtY - 2, AtX + 2, AtY + 2, 5);
If InRange(GetArrayLength(TPA), 3, 8) Then
Begin
NPC := MiddleTPA(TPA);
Result.x1 := NPC.x - 2;
Result.y1 := NPC.y - 2;
Result.x2 := NPC.x + 2;
Result.y2 := NPC.y + 2;
End;
ColorToleranceSpeed(CTS);
End;

Function ToBankersVEB: Boolean;
Var
Spots: Array Of TPointArray;
TPA, NPCS: TPointArray;
CTS, T, I, C: Integer;
Bankers: TPoint;
TBA: TBoxArray;
BCMD: Boolean;
TP: TPoint;
TB: TBox;
Begin
If Not LoggedIn Then Exit;
CTS := GetColorToleranceSpeed;
If Not CTS = 2 Then ColorToleranceSpeed(2);
FindColorsSpiralTolerance(MMCX, MMCY, TPA, 195836, MMX1, MMY1, MMX2, MMY2, 5);
Writeln(IntToStr(GetArrayLength(TPA)));
For I := 0 To High(TPA) Do
Begin
BCMD := False;
TB := RecognizeNPCPixels(TP, TPA[i].x, TPA[i].y);
For T := 0 To High(TBA) Do
Begin
If PointInBox(TP, TBA[t]) Then
Begin
BCMD := True;
Break;
End;
End;
If BCMD Then Continue;
If Not EqualTP(TP, 0, 0) Then
Begin
SetArrayLength(NPCs, GetArrayLength(NPCs) + 1);
NPCs[High(NPCs)] := TP;
SetArrayLength(TBA, GetArrayLength(TBA) + 1);
TBA[High(TBA)] := TB;
End;
End;
Spots := SplitTPAEx(NPCs, 6, 2);
For C := 0 To High(Spots) Do
Begin
If GetArrayLength(Spots[c]) >= 5 Then
Begin
Bankers := MiddleTPA(Spots[c]);
Break;
End;
End;
MouseFindFlag(Bankers.x + 4, Bankers.y - 5, 1, -2);
// If FindVEB(False) Then
Begin
Writeln('Successfully walked to bankers');
Result := True;
End;
ColorToleranceSpeed(CTS);
End;
;)

But as Claw said, DDTM with 3 dots, area size of about 3 and so on should work.

@Claw: When do you release the miner to members or public or do you?


or maybe a pay-script?

-Tsn.

n3ss3s

2007-11-14 11:09:47

*teensoapoperashitcry* Don't say that!

:p


And the hell has my activity dropped by 3?!

But hey claw, can you answer when you get on?

Boreas

2007-11-14 13:41:18

Function FindFourBankers(Direction:string):Tpoint;
var myy,myx,dist,DTMBankers:integer;
angle:extended;
begin
DTMBankers := DTMFromString('78DA636C66626058CB8002FEFFFFCFF01F483' +
'342D8FF195B116A98A16AFEFC6102D38C503E6323116ABA885053' +
'4D580D005F4D15F0'); //3 akbank4
if not FindDTMRotated(DTMBankers,myx,myy,mmx1,mmy1,mmx2,mmy2,0,180,2.0,angle) then
begin
freedtm(DTMBankers);
exit;
end;
freedtm(DTMBankers);
angle:=GetCompassAngle;
case lowercase(Direction[1]) of
'e': angle:=angle-270.0;
'w': angle:=angle-90.0;
's': angle:=angle-180.0;
end;
dist:=5+random(7);
result.x:=myx+round((dist)*sin(radians(angle)));
result.y:=myy-round((dist)*cos(radians(angle)));
end;

Source to DTM is attached. Tested a lot in Al Kharid, with 'e' in the params, and a couple times for FEB with 'n' in the params. Every yellow dot has 3 pixels of 195836 in a backwards L shape. I took the one in the corner of the L, from the 4 bankers in AK that are close to each other. As you can see in the source, my compass was set to west, because each point has the same Y value. The tol 255 point also has that same Y value, and is near the middle. The rest of the function goes from this point to make it click in front (direction specified in params) of the yellows, no matter the compass angle. You can do the same for 2 or 3 bankers and stick that in.

n3ss3s

2007-11-14 14:12:03

Nah, just use mine, Boreas' thing has low capped vars! O.o

Umm is 195836 static?

Boreas

2007-11-14 14:18:15

Yea, theres also another static one that Wizz prefers, with 1 pixel per dot.

The Claw

2007-11-14 15:59:01

From: n3ss3s
*teensoapoperashitcry* Don't say that!

:p


And the hell has my activity dropped by 3?!

But hey claw, can you answer when you get on?


Yup pay script, do you think we would go to the effort of making some of the best mining procedures around to give it out for free? ;)

RudeBoiAlex

2007-11-14 17:14:48

Somethink i know how to do :p

mainpoint infront of yellow banker dots
subpoints = yellow bank dots

[-jesus-]

2007-11-14 17:23:40

Yeh, I made 1 earlier. Thanks everyone :)

R0b0t1

2007-11-14 17:58:44

Damn! All that code is owning me again!



^Damn! That would make a good quote!

n3ss3s

2007-11-15 09:16:39

Yup pay script, do you think we would go to the effort of making some of the best mining procedures around to give it out for free?


Well I dont know is it that hard to copy my code… :p Jks

Yeah, Boreas I think one pixel per dot is maybe an accurater one?

r0b0t, when other people make something like these, you should give it a try yourself and try your wildest craziest coding plans.

Psychor

2007-11-24 04:41:49

Instead of using the yellow color i'd go for the 65536 color in the shadow of the yellow dot, at the bottem of the dot. Works every time for me.

Psychor

Santa_Clause

2007-11-24 04:54:48

They're all static colours anyway…so it doesn't make much of a difference.