SRL Archive - RS3 Outdated / Broken Scripts

Hardest Request yet ;P


BobboHobbo

2007-11-09 22:11:27

A ent finder that finds the dot on the MM ( of the Tree symbol), BUT only searches about only half of the minimap that your in :)

:D:D:D:D:D

Method

2007-11-09 23:09:56

Just find your player's dot and then look in an area around the dot for the yellow (NPC) one. Is it that hard?

Zach1188

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?

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.

Method

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.


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.

Zach1188

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.

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.

Method

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.


Cut Willow Trees in Rimmington and your problem's solved? (h) Bobbohobbo already has an ent finder that does that (I use it myself), but I guess he's looking for something new to use. Like you mention though, it's probably too hard to maintain a decent search area while making sure you don't detect Dark Wizards as Ents.

BobboHobbo

2007-11-10 00:15:23

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.

Santa_Clause

2007-11-10 00:20:21

Get on MSN?

Method

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.


Can you still locate the symbol with something like FindSymbolIn if the ent is on the minimap? If you can, just search in a box around that color for the yellow npc dot and that should probably be able to find it.

BobboHobbo

2007-11-10 00:55:51

Idk, can you try making one :) Im busy, with my script. And this is one thing needed for it.

Ill add you to the credit list :) if you make.

Method

2007-11-10 01:14:15

Yeah, I'll try. I'm having a hard time finding an ent to test it on, though. :P

BobboHobbo

2007-11-10 01:19:08

Goodluck.

Method

2007-11-10 01:24:46

Well, I found one ent, but I couldn't locate the symbol while the NPC dot was over it. I'll try again tomorrow, but I'm not sure if it'll work or not.

Boreas

2007-11-10 01:31:58

Is the dot always on the symbol? (I don't WC)

Method

2007-11-10 01:33:15

From: Boreas
Is the dot always on the symbol? (I don't WC)


It is at the Edgeville Yews, but I'm not sure about anywhere else.

EDIT: It probably should be everywhere, but like I said, I'm not positive.

BobboHobbo

2007-11-10 02:36:24

Yes it is everywhere like that. Im a wcer :D

mark9510

2007-11-10 09:18:16

well you could just have it look inside the symbol by croping the symbol with an ent but maybe that wouldnt work because its a regular bitmap or something

rogeruk

2007-11-10 11:14:24

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.

Method

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.


Will that always find the closest tree symbol (there are two there)?

rogeruk

2007-11-10 11:56:37

No i only tested it on the top tree.

I guess this would work..


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;

Trying to find an ent to check it with :)

mastaraymond

2007-11-10 11:59:25

FindColorCircle?

rogeruk

2007-11-10 12:03:15

Yea apart from you need to specific the distance..Plus that would kinda find randoms..

SRL Compiled in 16 msec
X 643 Y 74
Found at X: 640Y: 76
Successfully executed


Works perfectly for me at Yews.

mastaraymond

2007-11-10 12:04:55

From: rogeruk
Yea apart from you need to specific the distance..



Works perfectly for me at Yews.


When cutting a yew your 9\10 next to it, so FindColorsSpiral from the MMCX and MMCY with a radius of 15 would do the trick..

rogeruk

2007-11-10 12:10:16

Yea and find randoms too lol.

BobboHobbo

2007-11-10 18:07:43

Ill give it a go today :)

mark9510

2007-11-10 22:12:04

well i think tails has one in his script cause it uses alot of symbol finding try to see if he has it

osmm

2007-11-10 22:43:17

im still saying check for yellow dot inside of rare tree symbol

Santa_Clause

2007-11-11 02:04:13

In case you haven't noticed, Symbol Finding in SRL isn't that great, and should only be used as a last resort.

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;

If it finds the Ent on the minimap in a distance of 10 pixels, it'll click in the centre of the minimap, basically where your player is standing.

Pyro

2007-11-11 02:34:30

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.

BobboHobbo

2007-11-11 05:06:29

Hmm, ill test em.

ZephyrsFury

2007-11-11 05:30:45

Is the symbol always on top of the tree. Sometimes symbols like to drift off to the side.

Santa_Clause

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.


I must be confused then…I already know how to use SymbolAccuracy, but symbol finding has never been something popular with me…pretty much the same reason no-one ever walks only using symbols.

ZephyrsFury

2007-11-11 05:56:32

From: Santa_Clause
no-one ever walks only using symbols.


Ahem.. Ahem… :rolleyes: SymbolAccuracy is more useful IMO if you are trying to find if any symbol exist not a specify symbol. For example, by setting SymbolAccuracy to 0.6, the water fountain symbol and the quest symbol are mistakened for each other.

Santa_Clause

2007-11-11 06:00:21

What says that trees and the tree symbol won't be mistaken?

ZephyrsFury

2007-11-11 06:02:48

From: Santa_Clause
What says that trees and the tree symbol won't be mistaken?


Huh? Trees and tree symbols are completely different colours (except they're green).

Santa_Clause

2007-11-11 06:13:43

Symbol colours change and so do the tree colours, unless the symbols also have the grey part, then it's quite likely that trees are mistaken for symbols…FindBitmapTolerance…

Actually, the grey part could be confused for RoadColor?

ZephyrsFury

2007-11-11 06:21:41

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).


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;

mastaraymond

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).



Make sure you reset the SymbolAccuracy to the starting value, otherwise you might get in to trouble ^.^.

ZephyrsFury

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 ^.^.


Woops.. I've done that before.. ;)

rogeruk

2007-11-11 08:12:54

Symbol finding works great. Just check for yellow dot within the size of the symbol. pretty simple. Dunno what all the fuss is about.

BobboHobbo

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.


It has to be a fuss :)

One of these should be added to SRL. Instead of keep hovering over the tree, makes it way less botty.

Wizzup?

2007-11-12 04:12:37

Let me see.. Will get back to you.

EDIT:

This should work.

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.

BobboHobbo

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.


Looks good, gonna try it now.

Ill get back to ya.

Wizzup?

2007-11-12 04:32:59

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.

BobboHobbo

2007-11-12 05:20:20

Kk, ill test again.

Wizzup?

2007-11-12 05:32:48

From: BobboHobbo
Kk, ill test again.


I have been very stupid. It has to be > and not <.
EDIT: Fixed in the two above posts..

BobboHobbo

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..


Lol.. Mmm maybe that why it found like 100 ents :)

Santa_Clause

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.


Use Dist?

if Dist((MMCX - Tree.X), (MMCY - Tree.Y)) > 30 then
Continue;