I started using Mudlet about 3 days ago, and I've gotten to play with it about 3 hours each day, moving scripts from cMUD to it, and while that's all going well, I just can't figure out how to keep my character connected to the MUD. My lappy's network adapter is a piece of crap and it randomly disconnects/reconnects since I upgraded to Windows 10. That's not the issue, though.
How do I properly implement usage of the sysDisconnectionEvent event? Right now, I have it registered to a function that reads:
Code: Select all
function autoconnect(event)
echo("Disconnected!")
expandAlias("try_connect")
end -- autoconnect
registerAnonymousEventHandler("sysDisConnectionEvent", "autoconnect")
The alias just tries to reconnect, then again every 10 seconds using reconnect() until a trigger sets "connected" to true. But that's largely immaterial.
Debug doesn't seem to show any lines that would indicate it's noticed that I've lost connection, so, with my current knowledge, I'm pretty stuck.