SRL Archive - OSR Help

Picking up dropped items


g2n

2011-12-19 23:29:07

How do I go about putting this in my script?

I was thinking something along the lines of getting the color of an item on the mini-map (red dot) and moving to that location. Then somehow looking around for the items and clicking them.

Please let me know!

mika

2011-12-19 23:56:51

u can try findcolortol on the minimap and make it look for red dots

g2n

2011-12-20 12:24:57

Can you explain this in detail? I've been here for about 3 days.

:O

nickrules

2011-12-20 12:43:53

From: g2n
How do I go about putting this in my script?

I was thinking something along the lines of getting the color of an item on the mini-map (red dot) and moving to that location. Then somehow looking around for the items and clicking them.

Please let me know!


If you know what the item looks like, then you can just treat it like any other object. If that's the case, then look up a tutorial on object finding.

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

This one looks good - though I only glossed over it. And yes, it does apply to a tree, but the concept is the same.

g2n

2011-12-20 13:03:26

From: nickrules
If you know what the item looks like, then you can just treat it like any other object. If that's the case, then look up a tutorial on object finding.

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

This one looks good - though I only glossed over it. And yes, it does apply to a tree, but the concept is the same.


I don't know what the objects are going to be. (my intentions are secret but will be public soon. ;) )

I wanted to somehow find objects on the minimap.

nickrules

2011-12-20 13:34:46

From: g2n
I don't know what the objects are going to be. (my intentions are secret but will be public soon. ;) )

I wanted to somehow find objects on the minimap.


Sounds like you'll be needing something like this:

FindObjThroughMM(var x, y: Integer; Kind: string; Colors, Tol: TIntegerArray; UpText: TStringArray; Width, Height: Integer): boolean;


It's in the SRL include (object.scar).

If you don't know the colors or uptext, then you'll have to modify it.

g2n

2011-12-20 14:17:12

From: nickrules
Sounds like you'll be needing something like this:

FindObjThroughMM(var x, y: Integer; Kind: string; Colors, Tol: TIntegerArray; UpText: TStringArray; Width, Height: Integer): boolean;


It's in the SRL include (object.scar).

If you don't know the colors or uptext, then you'll have to modify it.


Thanks. It's going to take a little bit for me to understand that.

I started by converting the red dot on the minimap from bmp -> string in scar.

That's the correct approach?

EDIT: nvm..