BobboHobbo
2007-11-09 22:11:27
:D:D:D:D:D
2007-11-09 22:11:27
2007-11-09 23:09:56
2007-11-09 23:39:04
From: Metho D
Just find your player's dot and then look in an area around the dot for the yellow (NPC) one. Is it that hard?
2007-11-09 23:42:16
From: Zach1188
Yes, what happens if a non-ent NPC walks by? Or a random event?
You would need to find the yellow dot directly on the tree.
2007-11-09 23:56:08
From: Metho D
Then you simply confine the area space even more? Since you know where you should be in relation to the tree(s), you should be able to specify within a tight area where you want to look for that yellow dot. Calling FindNormalRandoms before an ent finding procedure probably would be best to nullify the chance of randoms popping up so you don't accidentally detect an ent.
2007-11-09 23:58:13
From: Zach1188
Cool. Now what happens, say, your cutting willows in Draynor and a dark mage walks directly next to your player?
I suppose it could work, however the area would have to be fairly vacant. And when an ent appears, doesn't the trees name in the top left turn yellow? I think that would be far easier to detect with less problems.
2007-11-10 00:15:23
Lol i took a screen shot to late for the seccond one.
2007-11-10 00:20:21
2007-11-10 00:39:04
From: BobboHobbo
Make me a ent finder for MM its more effiecent for Yews way better and looks waaaaay less botty.
I saved a view pics of ents.Lol i took a screen shot to late for the seccond one.
2007-11-10 00:55:51
2007-11-10 01:14:15
2007-11-10 01:19:08
2007-11-10 01:24:46
2007-11-10 01:31:58
2007-11-10 01:33:15
From: Boreas
Is the dot always on the symbol? (I don't WC)
2007-11-10 02:36:24
2007-11-10 09:18:16
2007-11-10 11:14:24
procedure test2;
var
tx,ty:Integer;
begin
SymbolAccuracy:=0.3;
if(FindSymbol(tx,ty,'Tree'))then
begin
writeln('X '+IntToStr(tx)+' Y '+IntToStr(ty));
//195836
if(FindColorSpiral(x,y,195836,tx-8,ty-5,tx+6,ty+8))then
begin
writeln('Found at X: '+IntToStr(X)+'Y: '+IntToStr(Y));
end;
end;
end;2007-11-10 11:41:54
From: rogeruk
Why would this be hard at all?. Your player dot is always in the same place (center of minimap). Therefor, when your standing next to a tree, the tree symbol is approx 15x15
For the north yew tree i used..procedure test2;
var
tx,ty:Integer;
begin
SymbolAccuracy:=0.3;
if(FindSymbol(tx,ty,'Tree'))then
begin
writeln('X '+IntToStr(tx)+' Y '+IntToStr(ty));
//195836
if(FindColorSpiral(x,y,195836,tx-8,ty-5,tx+6,ty+8))then
begin
writeln('Found at X: '+IntToStr(X)+'Y: '+IntToStr(Y));
end;
end;
end;
I'm not 100% positive where the randoms spawn, wether they are in my scan range or not. Havn't had an ent to try it with :(.
//Edit randoms dont spawn in the range.
2007-11-10 11:56:37
procedure test2;
var
tx,ty:Integer;
begin
SymbolAccuracy:=0.3;
if(FindSymbolIn(tx,ty,'Tree',628,64,651,100))then
begin
writeln('X '+IntToStr(tx)+' Y '+IntToStr(ty));
//195836
if(FindColorSpiral(x,y,195836,tx-8,ty-5,tx+6,ty+8))then
begin
writeln('Found at X: '+IntToStr(X)+'Y: '+IntToStr(Y));
end;
end;
end;2007-11-10 11:59:25
2007-11-10 12:03:15
SRL Compiled in 16 msec
X 643 Y 74
Found at X: 640Y: 76
Successfully executed
2007-11-10 12:04:55
From: rogeruk
Yea apart from you need to specific the distance..
Works perfectly for me at Yews.
2007-11-10 12:10:16
2007-11-10 18:07:43
2007-11-10 22:12:04
2007-11-10 22:43:17
2007-11-11 02:04:13
function FindEnt : Boolean;
begin
NPC := DTMFromString('78DA63CC626260106440017FFE3081694620F' +
'E0F048C3940BE10031A6044228134C81C61026A328930279BB039' +
'008F53087E');
if FindDTMRotated(NPC, X, Y, MMX1, MMY1, MMX2, MMY2, -Pi, Pi, 0.2, NPCAngle) then
if (Distance(MMCX, MMCY, X, Y) < 10) then
begin
Result := True;
Mouse(MMCX, MMCY, 2, 2, True);
end;
end;2007-11-11 02:34:30
2007-11-11 05:06:29
2007-11-11 05:30:45
2007-11-11 05:32:28
From: Pyro
Meh old news. I have this in my OLD OLD yew cutter. Ill post here if you like. It no longer works. I used the symbol as my base for searching. if there is two trees either 1. You do it the right way and know which tree you are at therefore coloring spiraling out. or 2. You find the yew tree symbol color, then spiral out from center to find yew color on MM, then search.
O and btw santa nothing wrong with SRL's Symbol finding. I think you just need to learn how to use symbolaccuracy :p
One sec brb when i find script
EDIT: Ok here it is. I think what your looking for is in procedures
- RandomMM
- Pyro Ent
But mostly Random MM. I had no problem with it because i made this for fally yews and therefore i can only see one yew symbol on the screen at one time.
2007-11-11 05:56:32
From: Santa_Clause
no-one ever walks only using symbols.
2007-11-11 06:00:21
2007-11-11 06:02:48
From: Santa_Clause
What says that trees and the tree symbol won't be mistaken?
2007-11-11 06:13:43
2007-11-11 06:21:41
function FindEntBySymbol: Boolean;
var
SPts, BlkArr: TPointArray;
Sx, Sy, Dx, Dy, Px, Py, c: Integer;
SymbAcc: Extended;
begin
if (not(LoggedIn)) then Exit;
SymbAcc := SymbolAccuracy;
repeat
FindSymbols(SPts, 'tree');
if (Length(SPts) = 0) then
SymbolAccuracy := SymbolAccuracy - 0.1
else Break;
Inc(c);
until(c > 3);
if (Length(SPts) = 0) then Exit;
SortTPAFrom(SPts, IntToPoint(MMCX, MMCY));
Px := SPts[0].x;
Py := SPts[0].y
FindColorsTolerance(BlkArr, 1183498, Px - 20, Py - 20, Px + 20, Py + 20, 20);
if (Length(BlkArr) = 0) then Exit;
MiddleTPAEx(BlkArr, Sx, Sy);
Result := FindColorCircle(Dx, Dy, 62965, Sx, Sy, 8);
SymbolAccuracy := SymbAcc;
end;
2007-11-11 06:24:38
From: ZephyrsFury
I'm assuming that the Symbol colour isn't the grey part as that is generic to all symbol thus finding a particular symbol using that colour won't work.
BTW I made this quick function… haven't tested it and will only work if the symbol is directly above the tree (which I don't think it is all the time).
2007-11-11 06:25:56
From: mastaraymond
Make sure you reset the SymbolAccuracy to the starting value, otherwise you might get in to trouble ^.^.
2007-11-11 08:12:54
2007-11-12 04:08:43
From: rogeruk
Symbol finding works great. Just check for yellow dot within the size of the symbol. pretty simple. Dunno what all the fuss is about.
2007-11-12 04:12:37
program New;
const
MMX1 = 570;
MMY1 = 5;
MMX2 = 715;
MMY2 = 160;
const
MMCX = 643;
MMCY = 84;
Function FindEntMM: Boolean;
Var
Tree: TPoint;
Trees, Dots: TPointArray;
aTrees: Array Of TPointArray;
I, C: Integer;
Begin
FindColorsTolerance(Trees, 2269727, MMX1, MMY1, MMX2, MMY2, 50);
FindColorsTolerance(Dots, 65536, MMX1, MMY1, MMX2, MMY2, 0);
aTrees := TPAToATPA(Trees, 20);
For I := 0 To High(aTrees) Do
Begin
If Length(aTrees[I]) < 10 Then
Continue;
If Sqrt(Sqr(MMCX - Tree.X) + Sqr(MMCY - Tree.Y)) > 30 Then // Distance between symbol and you is lower than 30.
Continue;
Tree := MiddleTPA(aTrees[I]);
For C := 0 To High(Dots) Do
If Sqrt(Sqr(Dots[I].X - Tree.X) + Sqr(Dots[I].Y - Tree.Y)) < 30 Then
Begin
Result := True;
WriteLn('Wizzy spotted an Ent');
Exit;
End;
End;
End;
Var
t: Integer;
begin
t := GetSystemTime;
FindEntMM;
WriteLn(IntToStr(GetSystemTime - t));
end.
2007-11-12 04:30:45
From: Wizzup?
Let me see.. Will get back to you.
EDIT:
This should work.program New;
const
MMX1 = 570;
MMY1 = 5;
MMX2 = 715;
MMY2 = 160;
Function FindEntMM: Boolean;
Var
Tree: TPoint;
Trees, Dots: TPointArray;
aTrees: Array Of TPointArray;
I, C: Integer;
Begin
FindColorsTolerance(Trees, 2269727, MMX1, MMY1, MMX2, MMY2, 50);
FindColorsTolerance(Dots, 65536, MMX1, MMY1, MMX2, MMY2, 0);
aTrees := TPAToATPA(Trees, 20);
For I := 0 To High(aTrees) Do
Begin
If Length(aTrees[I]) < 10 Then
Continue;
Tree := MiddleTPA(aTrees[I]);
//MoveMouse(Tree.X, Tree.Y);
For C := 0 To High(Dots) Do
If Sqrt(Sqr(Dots[I].X - Tree.X) + Sqr(Dots[I].Y - Tree.Y)) < 30 Then
Begin
Result := True;
WriteLn('Wizzy spotted an Ent');
Exit;
End;
End;
End;
begin
FindEntMM;
end.
2007-11-12 04:32:59
If Sqrt(Sqr(MMCX - Tree.X) + Sqr(MMCY - Tree.Y)) > 30 Then // Distance between symbol and you is lower than 30.
Continue;
2007-11-12 05:20:20
2007-11-12 05:32:48
From: BobboHobbo
Kk, ill test again.
2007-11-12 05:39:42
From: Wizzup?
I have been very stupid. It has to be > and not <.
EDIT: Fixed in the two above posts..
2007-11-15 01:26:21
From: Wizzup?
One note, this does the finding on all trees.
You might want to add:If Sqrt(Sqr(MMCX - Tree.X) + Sqr(MMCY - Tree.Y)) > 30 Then // Distance between symbol and you is lower than 30.
Continue;
EDIT: Edited post above.
if Dist((MMCX - Tree.X), (MMCY - Tree.Y)) > 30 then
Continue;