PDA

View Full Version : RSWalker CPU usage



guerr
03-31-2016, 09:16 AM
I have this situation where i run two bots on one PC. I wanted to use RSWalker for handling some very easy path, however it drains my CPU to the point where its 100% and bots freeze for a few seconds, resulting in much lower profit/hr or script crash.

With my other script i use symbol walking, since its just one click.

I tried symbol walking here, but symbols are changing their places each login. I tried radialwalking and dtm with no success.

Do you have a way to minimize CPU usage with RSWalker, or how you handle such situations with accurate minimap walking?

slacky
03-31-2016, 09:31 AM
Like sure RSWalker will utilize whatever it can of resources (limited to 1 core tho). But it's really just a short burst of (extra) high CPU usage every time it looks up your position.. So for a few steps of walking it should not matter much as each burst last for around 60ms on a normal PC.

I have a feeling you are setting up RSWalker over and over again, forcing it to initialize A WHOLE lot of stuff.. and not just once on script-initialization. Or.. something similar.

Share your script, so we can take a look at wtf is going on.

PS: If you just need to do a single step then you can use the following, it will only call GetMyPos ONCE.
>> procedure TRSWalker.WalkToPos(worldPos:TPoint; waitFlag:Boolean=True);

Joopi
03-31-2016, 09:45 AM
You need to do this:

Procedure WhileWalking(Sender: TObject; myPos: TPoint);
Begin
Wait(200 + random(200));
//Add some stuff here.
End;

and then

RSW.onMoveEvent := @ WhileWalking;