check if player is online?

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
acrata
Posts: 9
Joined: Fri Apr 26, 2013 2:46 am

check if player is online?

#1 Post by acrata » Fri May 17, 2013 1:50 am

hello, I want to know if there is a function or any way to check if bot is online, because when I am using bot and my connection fails player is disconnected to the main screen and bot doesn't give any error.
Please excuse my poor English.

kenzu38
Posts: 279
Joined: Sun Dec 02, 2012 8:52 am

Re: check if player is online?

#2 Post by kenzu38 » Fri May 17, 2013 10:44 am

Don't know if there's a built-in function for this or if there are other simpler codes to do this but the code below is what I use for my script and it works.

Code: Select all

				
EventMonitorStart("CharDetect", "CHAT_MSG_SYSTEM");
RoMScript("AskPlayerInfo('put the name of the char you want to check here');")
yrest(1500)
local time, moreToCome, msg = EventMonitorCheck("CharDetect", "1")
EventMonitorStop("CharDetect")
if string.find(msg,"offline") then
-- char is offline put what you want to do here
end

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: check if player is online?

#3 Post by lisa » Fri May 17, 2013 6:14 pm

When the bot gets disconnected it would usually cause an error, for it not to error that means it is probably in a loop at the time.

What waypoint file are you using at the time?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

acrata
Posts: 9
Joined: Fri Apr 26, 2013 2:46 am

Re: check if player is online?

#4 Post by acrata » Fri May 17, 2013 6:59 pm

Code: Select all

<?xml version="1.0" encoding="utf-8"?><waypoints>
	<!-- #  1 --><waypoint x="-10064" z="-7273" y="888">	</waypoint>
	<!-- #  2 --><waypoint x="-9908" z="-7132" y="842">	</waypoint>
	<!-- #  3 --><waypoint x="-9710" z="-7318" y="836">	</waypoint>
	<!-- #  4 --><waypoint x="-9570" z="-7488" y="867">	</waypoint>
	<!-- #  5 --><waypoint x="-9465" z="-7741" y="858">	</waypoint>
	<!-- #  6 --><waypoint x="-9669" z="-7364" y="848">	</waypoint>
	<!-- #  7 --><waypoint x="-9844" z="-7145" y="824">	</waypoint>
</waypoints>
that is the waypoint, im just use it for farm activation runes

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest