SRL Archive - Help and Support

Need a bit of help picking up objects.


thanatos920

2006-12-24 15:50:28

Many of you have probably seen me posting on Pwnd, as it would seem I decided to try and make an account here since I would must likely be sticking around, and found my old one is still active. Anyways not the point.

I need help chosing a command to pick up an item, I need to repeatedly pick up the item until(inventoryfull)=true, the repeat isnt my problem, basicaly right now I'm using

if findbitmaptolerance then
mouse(x,y….etc etc

But that keeps messing up, or misclicking because my character keeps moving around, there are three of this object in a row, I cannot use bitmaps as there are things constantly moving on the screen covering random parts of the item, but never the whole thing, I can use colors, and I can use strings. I found one command that seemed to find them very well but I can't figure out how to get it to click on them , anyways if someone could let me know the best way to get my guy to pick up items in succession until my inventory were full without using DTMS and BMPS, It would be greatly appreaciated. Thanks.

Yours Truly
Thanatos.

dontpanic

2006-12-24 15:53:46

Hey, The best way to do this in my opinion is to use FindObj(x,y,objtext,objcol,tol) which will find something with color objcol and uptext objtext and will put the co'ords into x,y. Then just do mouse(x,y,0,0,true);
After that put Flag so that it waits until you char stops moving.

Boreas

2006-12-24 15:59:54

Also use the red dots on the minimap to get close first.

thanatos920

2006-12-24 16:14:38

Well I already start close to them so I'm not worried there I will try dontpanics approach :)


EDIT: how do I use the flag command, never done it before, Where to I put it etc.
EDIT2: Find obj, won't see my snape grass. =/

WT-Fakawi

2006-12-24 19:31:17

It depends on the sort of object you are trying to catch, I suppose. If it is a large static object you are looking for (min 8 pixels wide), I'd suggest deformed bitmaps. They can lag somewhat, but as long as you make large slices of an object:=BitmapFromString(1, 8), the lags not too bad. Use SRL's functions FindDeformed or FindObjectDeformed.
If you are chasing fast moving object, I'd suggest making a custom findobj: rotating through a color-array with common objectcolors. See goblinscheduler.

Boreas

2006-12-24 20:24:17

I don't know if this will work for snape grass but it worked for seaweed. As it turns out, when seaweed is in the inventory, there are 2 main colors in it, what the colors exactly varies, but which pixel has which color is the same. Also, a color on the seaweed when laying on the ground on the main screen happens to be the same. So I wrote a seaweed collector that starts off in the bank with 1 seaweed in inventory pos 1, uses getcolor on a pixel on it, then goes to the seaweed place, clicks the red dot on minimap, then looks for that color. Then mmouse and check uptext etc. Dunno if this works for snape grass, but there's a good chance.