SRL Archive - OSR Help

Trouble clicking on cow with reflection lape


elephant

2015-04-06 19:35:26

I am trying to make a simple cow killer script, however it will seem to miss almost every click to attack the cow and just click the ground near it. Another problem I am having is if the cow walks away, it will accidentally click something in my inventory attempting to click the cow. I am currently doing this to click the cow

How can I make it so it will click the cow every time, and not just miss and click the ground? Also, how can I rotate the compass to face the cow it will attack so that it will not miss click something in the inventory or a tab?

Myke

2015-04-06 19:58:09

hmm, you are clicking the tile the cow is on correct? You could try implementing color into your script. Move the mouse to the tile the cow is on and click on white if it's with a certain distance on the mainscreen

FindColorTolerance(x, y, yourcolor, cowx - 50, cowy - 50, cowx + 50, cowy + 50, 5);
HumanMMouse( Point(x,y), 0, 0);
//then click

The cowx and cowy would the the place your mouse moves to after finding the cow's tile and converting to MS. The x and y would be where it finds the color white and you would click there.

and before you try to click on the cow you could call

ReflectPLayer.BlindWalkMM( cow.GetTile ); 

That way you'll be more or less right next to it.