Author Topic: An easy way to pause a script while waiting for connection  (Read 1596 times)

0 Members and 1 Guest are viewing this topic.

Offline luv2luvlongTopic starter

  • Sr. Member
  • *
  • Posts: 272
  • Activity:
    0%
  • Reputation Power: 4
  • luv2luvlong has no influence.
  • Gender: Male
  • Respect: +14
  • Referrals: 0
    • View Profile
0
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.
"If you know the enemy and know yourself, you need not fear the result of a hundred battles. If you know yourself but not the enemy, for every victory gained you will also suffer a defeat. If you know neither the enemy nor yourself, you will succumb in every battle" - Sun Tzu in reference to his five points of victory.

Tags: