Advertisement
Guest User

asd

a guest
Jan 22nd, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.36 KB | None | 0 0
  1. require_relative 'Mercury/Core'
  2.  
  3. # Make sure there is an accounts.txt & phrases.txt in the same folder as this file
  4.  
  5. # ACCOUNTS.TXT EXAMPLE: http://pastebin.com/raw/m8FUAeJC
  6. # PHRASES.TXT PHRASES: http://pastebin.com/raw/1a7VdZEZ
  7.  
  8. account_file = "#{File.dirname(__FILE__)}/accounts.txt"
  9. phrase_file = "#{File.dirname(__FILE__)}/phrases.txt"
  10.  
  11. penguins = []
  12. if(File.exists?(account_file))
  13. accounts = File.open(account_file,"r").read
  14. else
  15. puts "Please put accounts.txt in the same folder this script is in!"
  16. exit
  17. end
  18. if(File.exists?(phrase_file))
  19. phrases = File.open(phrase_file,"r").read
  20. else
  21. puts "Please put phrases.txt in the same folder this script is in!"
  22. exut
  23. end
  24.  
  25. if(accounts === "")
  26. puts "Accounts file empty, please fill accounts\nwith penguins in this format USERNAME:PASSWORD:SERVER"
  27. exit
  28. else
  29. accounts = accounts.split("\r\n")
  30. end
  31.  
  32. phrases = phrases.split("\n")
  33. def do_shit(name,phrases)
  34. name = name.split(":")
  35. penguin = Mercury.new()
  36. penguin.login(name[0],name[1],name[2])
  37. 2.times do
  38. penguin.room(name[3])
  39. end
  40. while true
  41. phrases.count.times do |x|
  42. penguin.rest(1.5)
  43. penguin.chat(phrases[x])
  44. end
  45. end
  46. end
  47.  
  48. threads = []
  49. accounts.count.times do |x|
  50. threads.push(Thread.new{do_shit(accounts[x],phrases)})
  51. end
  52. accounts.count.times do |x|
  53. threads[x].join
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement