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.
check if player is online?
Re: check if player is online?
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
Re: check if player is online?
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?
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 ![Wink ;)](./images/smilies/icon_e_wink.gif)
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
![Wink ;)](./images/smilies/icon_e_wink.gif)
wiki here http://www.solarstrike.net/wiki/index.php?title=Manual
Re: check if player is online?
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>
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot] and 1 guest