Page 1 of 1
Question on PlayerRest
Posted: Sun Jan 06, 2013 1:04 am
by vo2male
Good day everyone! well i wanted to try on something. i have this function on onload section:
Code: Select all
function beingfollowed()
player:rest(60);
end;
i also set my profile on onload like this
Code: Select all
changeProfileOption("playerDETECT", true);
And i tried my alt to get near to my botting account and it detected my alt following him.
Code: Select all
Clearing target.
Followed by ********
Resting for 60 seconds.
Player Teleported to X: -27915 Z: 23955 Y: 1
Clearing target.
Moving to waypoint #23, (-27915, 23955)
Forced waypoint type 'RUN' set by user.
Player Teleported to X: -27902 Z: 24038 Y: 2
Clearing target.
Moving to waypoint #24, (-27902, 24038)
Moving to waypoint #25, (-27800, 24090)
Moving to waypoint #26, (-27684, 24126)
Moving to waypoint #27, (-27555, 24296)
Player Teleported to X: -27522 Z: 24360 Y: -83
Moving to waypoint #28, (-27522, 24360)
But the problem is my bot does not rest or stop on current waypoint. It showed in my MM that it's resting for 60 secs but my bot proceeds to my next waypoint as if nothing happened
before i was using
Code: Select all
function beingfollowed()
player:sleep;
end;
and this works nicely. no problem with it. However, i wanted it to resume botting after several minutes of sleeping/resting.
can anyone help me with this?
Thanks!
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 1:30 am
by rock5
Does it continue doing waypoints or does it just run in a straight line? It's possible you just need to release the forward key.
Have you tried other pause functions eg. yrest(60000) or rest(60000)?
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 1:39 am
by vo2male
rock5 wrote:Does it continue doing waypoints or does it just run in a straight line? It's possible you just need to release the forward key.
It does continue doing waypoints..just like normal botting except it didn't rest.. How can i release forward key? i dont even have forward key on my script?
rock5 wrote:Have you tried other pause functions eg. yrest(60000) or rest(60000)?
this ill give it a try
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 1:44 am
by vo2male
on player:yrest(60000)
Code: Select all
Moving to waypoint #23, (-27915, 23955)
Followed by *****
Did not find any crashed game clients.
9:43am - [string "..."]:39: attempt to call method 'yrest' (a nil value)
this crashed my MM not the game client
on player:rest(60000)
Code: Select all
Moving to waypoint #6, (-27746, 24102)
Moving to waypoint #7, (-27857, 24070)
Moving to waypoint #8, (-28026, 24006)
Followed by ******
Resting for 60000 seconds.
Clearing target.
Stop resting because of aggro.
Waypoint type TRAVEL, we won't stop and won't fight back
Moving to waypoint #9, (-28123, 24018)
Forced waypoint type 'NORMAL' set by user.
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 1:49 am
by rock5
No, the functions are actually called yrest and rest, not player:yrest or player:rest.
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 1:55 am
by vo2male
on yrest
Code: Select all
Moving to waypoint #27, (-27555, 24296)
Player Teleported to X: -27522 Z: 24360
Moving to waypoint #28, (-27522, 24360)
Followed by *****
Moving to waypoint #1, (-27521, 24357)
still proceed to waypoint and didn't pause
rest seems to work.. is 60000 = seconds?
EDIT***
on the rest part
Code: Select all
Player Teleported to X: -27640 Z: 24142
Moving to waypoint #20, (-27640, 24142)
Moving to waypoint #21, (-27776, 24084)
Followed by *****
and it continues to run on the same direction without stopping
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 2:24 am
by vo2male
i wanted something like this..
http://www.solarstrike.net/phpBB3/viewt ... eep#p13467
how bout if ill just place the function on the waypoint and call it on onload?
so here is my solution. i called it on onload and put it in a safe waypoint spot so i wont be worrying about agros or anything
Code: Select all
function pd()
while player:isHumanInRange(400) do
player:rest(30);
end
end
will do some more testing though
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 3:07 am
by rock5
I think what happens is player:rest (and yrest) yields back to the main code while it's waiting so it actually continues the code while it's waiting. rest does not yield, that's why it works. The function at the waypoint works because you are waiting in the main thread, not in another thread. BTW yrest and rest are in ms that's why I used 60000.
Re: Question on PlayerRest
Posted: Sun Jan 06, 2013 4:23 am
by vo2male
rock5 wrote:I think what happens is player:rest (and yrest) yields back to the main code while it's waiting so it actually continues the code while it's waiting. rest does not yield, that's why it works. The function at the waypoint works because you are waiting in the main thread, not in another thread. BTW yrest and rest are in ms that's why I used 60000.
thanks for the info rock! so far the solution i found is working well...