SRL Archive - MSI Suggestions

Skills.SCAR!


Naum

2009-11-22 10:17:32

As per the convo I had with RM of Skills.Scar and the various skill files, I decided to make this thread:

Skills -
All F2P and/or P2P??
Certain ones - Mining, Fishing, Woodcutting and skills mutually exclusive to our project.

Functions needed -
Stuff to check whether a resource has disappeared (rock, tree, fishing spot?). I was thinking of checking the pixel shift of the colors to determine it, many potential problems with this.
Finding the resources. Use the current FindObj" in MSI or use SmartColors.
Or, even merge the two?


Anything else you need. Will add it up.

Discuss, add, critique etc :)

Coh3n

2009-11-22 12:48:01

Well to be honest, I don't think we should worry about fishing at this time considering there's no fishing spots in Varrock. I think we should start with Mining/Woodcutting.

As for checking if the resource has disappeared, the function I use in my woodcutters works really well, but is flawed. Basically, it using the point clicked as a tracking point, and gets the length of a color TPA in a box around that point. When the length is < 20, the tree is usually gone.

Like I said, it's flawed, but works. Anyway, it is just another suggestion.

Sir R. M8gic1an

2009-11-22 12:54:37

From: Coh3n
Well to be honest, I don't think we should worry about fishing at this time considering there's no fishing spots in Varrock. I think we should start with Mining/Woodcutting.

As for checking if the resource has disappeared, the function I use in my woodcutters works really well, but is flawed. Basically, it using the point clicked as a tracking point, and gets the length of a color TPA in a box around that point. When the length is < 20, the tree is usually gone.

Like I said, it's flawed, but works. Anyway, it is just another suggestion.


I use the same. And this would also be somewhat similar to pixelshift. Any other suggestions?

~RM

Naum

2009-11-22 13:11:01

From: Coh3n
Well to be honest, I don't think we should worry about fishing at this time considering there's no fishing spots in Varrock. I think we should start with Mining/Woodcutting.

As for checking if the resource has disappeared, the function I use in my woodcutters works really well, but is flawed. Basically, it using the point clicked as a tracking point, and gets the length of a color TPA in a box around that point. When the length is < 20, the tree is usually gone.

Like I said, it's flawed, but works. Anyway, it is just another suggestion.


Lucky, since Walking.Scar is included before the skill files; we can still use Marpis' function. It would look something like this:

Function GetTreeBox : TBox;
Var TB : TBox;
TPA : TPointArray;
Begin
FindColorsTolerance(TPA, {TreeColor}, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
Result := GetTPABounds(TPA);
End;

Function MSI_IsTreeGone : Boolean;
Var TB : TBox;
Begin
TB := GetTreeBox;
Result := PixelShift(TB.x1, TB.y1, TB.x2, TB.y2, WAIT_TIME) > SHIFT;
End;

Sir R. M8gic1an

2009-11-22 13:23:09

From: Naum
Lucky, since Walking.Scar is included before the skill files; we can still use Marpis' function. It would look something like this:



Not luck :p

~RM

marpis

2009-11-22 13:26:39

From: Naum
Lucky, since Walking.Scar is included before the skill files; we can still use Marpis' function. It would look something like this:

Function GetTreeBox : TBox;
Var TB : TBox;
TPA : TPointArray;
Begin
FindColorsTolerance(TPA, {TreeColor}, MSX1, MSY1, MSX2, MSY2, TOLERANCE);
Result := GetTPABounds(TPA);
End;

Function MSI_IsTreeGone : Boolean;
Var TB : TBox;
Begin
TB := GetTreeBox;
Result := PixelShift(TB.x1, TB.y1, TB.x2, TB.y2, WAIT_TIME) > SHIFT;
End;


I tried that once when writing a Yew cutter, but it didn't work due to the random shifting of the whole MS every now and then. Just try staying still and you'll see the MS slighty rotates etc.

Colour counting is better.

Coh3n

2009-11-22 13:42:14

Yeah it works well for me. Although, the way I have it, it will mess up a bit if the camera angles changes.

Naum

2009-11-22 15:36:47

From: marpis
I tried that once when writing a Yew cutter, but it didn't work due to the random shifting of the whole MS every now and then. Just try staying still and you'll see the MS slighty rotates etc.

Colour counting is better.


Then why not edit to function to make it Inc(Shift) when the pixel is in 'SimilarColor' to the tree color ;)

Blumblebee

2009-11-22 15:41:35

I like the idea, and I think we could impliment a lot of things with this but, with the creation of Skills.scar we leave the actual scripters in the MSI project nothing to do but collect colors and make failsafes, and I don't really enjoy making a script like that (remember thats my opinion only), so I think it may

1. not be used.
2. discourage some people from joining MSI.

just my two bits.

Coh3n

2009-11-22 16:13:36

@Bumblebee

I agree. I thought about this a long time ago. My original thought was that we would come up with function names and parameters, and the public would actually make the functions. We're starting to basically write the whole thing, which doesn't really leave anything exciting for other people to do.

Anyway, that's just my thought.

Coh3n

NCDS

2009-11-22 19:39:00

From: Coh3n

As for checking if the resource has disappeared, the function I use in my woodcutters works really well, but is flawed. Basically, it using the point clicked as a tracking point, and gets the length of a color TPA in a box around that point. When the length is < 20, the tree is usually gone.


My method as well.

Is the an estimated date we are aiming for to go public?