Advertisement
Guest User

Untitled

a guest
May 4th, 2017
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'nj
  2. '2.0
  3. '&NAME JOGGER:Spasm (AKA spasm_attack)
  4. '&startnj:stopnj
  5. '&38277
  6. '&Jogs through accounts to keep them active.:If an account has less than 2 hours logged, it will wait for the remainder of the two hours so the account doesn't get automatically deleted.:Usernames and passwords should go in names.txt, located in the plugins folder.:One username and password per line, seperated by a space.:Can also write profile data.:Settings can be found at the top of the script.
  7.  
  8.  
  9.  
  10. '****************************************************************************************
  11. '****************************************************************************************
  12. '***********************************   SETTINGS   ***************************************
  13. '****************************************************************************************
  14. '****************************************************************************************
  15.  
  16.  
  17. 'CHANGE NEXT LINE TO MINIMUM TIME TO STAY LOGGED IN IN SECONDS
  18. Const minWaitTime = 180
  19.  
  20.  
  21. 'WRITE PROFILE UPON CONNECT?
  22. Const writeProfile = False
  23.  
  24. 'PROFILE LOCATION
  25. Const profileLocation = "Outer Space"
  26.  
  27. 'PROFILE SEX
  28. Const profileSex = "Sexy"
  29.  
  30. 'PROFILE DESCRIPTION
  31. Const profileDescription = "I am me."
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40. '****************************************************************************************
  41. '****************************************************************************************
  42. '***********************************   VARIABLES  ***************************************
  43. '****************************************************************************************
  44. '****************************************************************************************
  45.  
  46.  
  47. Dim usernames()
  48. Dim passwords()
  49. Dim active
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56. '****************************************************************************************
  57. '****************************************************************************************
  58. '***********************************   FUNCTIONS  ***************************************
  59. '****************************************************************************************
  60. '****************************************************************************************
  61.  
  62. Sub startJogger()
  63.  
  64.  
  65.     'load usernames and passes from usernames.txt
  66.  
  67.     Set FSO = CreateObject("Scripting.FileSystemObject")
  68.     Set File = FSO.OpenTextFile(BotPath & "plugins\names.txt", 1, True)
  69.  
  70.  
  71.     i = 0
  72.  
  73.     Do Until File.AtEndOfStream
  74.  
  75.        
  76.         line = Split(File.ReadLine, " ")
  77.  
  78.         If UBound(Line) = 1 Then
  79.  
  80.             ReDim Preserve usernames(i + 1)
  81.             ReDim Preserve passwords(i + 1)
  82.  
  83.             usernames(i) = line(0)
  84.             passwords(i) = line(1)
  85.  
  86.             i = i + 1
  87.  
  88.         End If
  89.  
  90.     Loop
  91.  
  92.  
  93.     File.Close
  94.  
  95.  
  96.     If i > 0 Then
  97.         active = true
  98.         jogNext
  99.     Else
  100.         AddChat VBRed, "NAME JOGGER: names.txt was empty!"
  101.     End If
  102.  
  103. End Sub
  104.  
  105. Sub jogNext()
  106.  
  107.     i = CInt(GetSetting("nj", "i"))
  108.  
  109.    
  110.  
  111.     If (Not IsNumeric(i)) Or (i > UBound(usernames)) Then i = 0
  112.  
  113.  
  114.     BotVars.Username = usernames(i)
  115.     BotVars.Password = passwords(i)
  116.  
  117.     AddChat VBYellow, "NAME JOGGER: New username and password set: " & usernames(i)
  118.    
  119.  
  120.     i = i + 1
  121.     SetSetting "nj", "i", i, "Last position in the name array.", True
  122.  
  123.    
  124.     Connect
  125.  
  126.  
  127.     'set the interval to 30 seconds, it will depend on the nj_Event_ServerInfo
  128.     '   to be set for longer, if that event doesn't happen, the login failed
  129.     '   and we don't want to be waiting around for a long time
  130.     TimerInterval "nj", "jogger", 30
  131.     TimerEnabled "nj", "jogger", true
  132.  
  133. End Sub
  134.  
  135.  
  136.  
  137.  
  138.  
  139.  
  140. '****************************************************************************************
  141. '****************************************************************************************
  142. '************************************   EVENTS  *****************************************
  143. '****************************************************************************************
  144. '****************************************************************************************
  145.  
  146.  
  147.  
  148. Sub nj_Event_PressedEnter(Text)
  149.  
  150.     If Text = "/startnj" Then
  151.  
  152.         startJogger
  153.         VetoThisMessage
  154.  
  155.     ElseIf Text = "/stopnj" Then
  156.  
  157.         Addchat VBYellow, "NAME JOGGER: Name jogging stopped"
  158.         TimerEnabled "nj", "jogger", False
  159.  
  160.         active = false
  161.  
  162.         VetoThisMessage
  163.  
  164.     End If
  165.  
  166.  
  167. End Sub
  168.  
  169.  
  170. Sub nj_jogger_timer()
  171.  
  172.     jogNext
  173.  
  174. End Sub
  175.  
  176. Sub nj_Event_ServerInfo(Message)
  177.  
  178.     If Not active Then Exit Sub
  179.  
  180.     If Left(Message, 13) = "Time Logged: " Then
  181.    
  182.         temp = Split(Message, " ")
  183.  
  184.  
  185.         days = CInt(temp(2))
  186.         hours = CInt(temp(4))
  187.         mins = CInt(temp(6))
  188.         secs = CInt(temp(9))
  189.  
  190.  
  191.  
  192.         Dim waitTime
  193.  
  194.         If (days = 0) And (hours < 2) Then
  195.  
  196.             waitTime = (2 * 60 * 60) + 30 '2 hours 30 seconds
  197.  
  198.             waitTime = waitTime - (hours * 60 * 60)
  199.             waitTime = waitTime - (mins * 60)
  200.             waitTime = waitTime - (secs)
  201.  
  202.             If waitTime < minWaitTime Then waitTime = minWaitTime
  203.            
  204.         Else
  205.  
  206.             waitTime = minWaitTime
  207.  
  208.         End If
  209.  
  210.  
  211.         AddChat VBYellow, "NAME JOGGER: Waiting " & waitTime & " seconds..."
  212.  
  213.        
  214.         TimerInterval "nj", "jogger", waitTime
  215.         TimerEnabled "nj", "jogger", True
  216.  
  217.  
  218.         If writeProfile Then
  219.             AddChat VBYellow, "NAME JOGGER: Writing profile data..."
  220.             SetBotProfile profileLocation, profileSex, profileDescription
  221.         End If
  222.  
  223.     End If
  224.  
  225. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement