Question on PlayerRest

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Question on PlayerRest

#1 Post by vo2male » Sun Jan 06, 2013 1:04 am

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!

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Question on PlayerRest

#2 Post by rock5 » Sun Jan 06, 2013 1:30 am

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)?
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Question on PlayerRest

#3 Post by vo2male » Sun Jan 06, 2013 1:39 am

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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Question on PlayerRest

#4 Post by vo2male » Sun Jan 06, 2013 1:44 am

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.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Question on PlayerRest

#5 Post by rock5 » Sun Jan 06, 2013 1:49 am

No, the functions are actually called yrest and rest, not player:yrest or player:rest.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Question on PlayerRest

#6 Post by vo2male » Sun Jan 06, 2013 1:55 am

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

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Question on PlayerRest

#7 Post by vo2male » Sun Jan 06, 2013 2:24 am

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

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Question on PlayerRest

#8 Post by rock5 » Sun Jan 06, 2013 3:07 am

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.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

vo2male
Posts: 122
Joined: Mon Aug 27, 2012 6:41 am

Re: Question on PlayerRest

#9 Post by vo2male » Sun Jan 06, 2013 4:23 am

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...

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest