ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: luv2luvlong on May 12, 2010, 09:07:45 PM

Title: An easy way to pause a script while waiting for connection
Post by: luv2luvlong on May 12, 2010, 09:07:45 PM
So I think I finally came up with an easy way to pause a script while waiting for my connection to be restored.

I use to add a relogger to my scripts, but always found them a little combersome, and I always worried that I would accidently send someone my account info when sending a script to someone. And I finally came up with a way to pause a script while using a second script to relog into the game.

Code: [Select]
sub check_online
  if #CHARNAME = N/A
  {
    repeat
      wait 20
    until #CHARNAME <> N/A
    wait 120
  }
return
this little sub placed all over a script where I would normally have put my log in sub, pauses the running script while the logging script gets my sometimes crappy connection back up.
I hope this little bit of info helps people, and would appreciate any comments or other ways you might have thought of to accomplish this stupid, but needed task.