Advertisement
steve-shambles-2109

295-Tribal Wars Farm Helper

Jun 27th, 2020
555
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.61 KB | None | 0 0
  1. """Code snippets vol-59
  2.   295-Tribal Wars Farm Helper
  3.   tribalwars.co.uk
  4.   tribalwars.net
  5.  
  6. requirements:
  7. Windows Only.
  8.  
  9. pip3 install pyperclip
  10.  
  11. A text file saved in the current dir named farm.txt
  12. containing the co-ords of each village to be farmed
  13. on a seperate line each.
  14.  
  15. Origin:
  16. Steve Shambles
  17.  
  18. Instructions:
  19. After preparing your farm.txt file
  20. Open your rally point in the game
  21. run this script
  22. and after each beep, enter troops to send,
  23. paste in co-rds, then click attack.
  24. repeat after each beep.
  25. When you hear a double beep the farms have all been
  26. sent out.
  27.  
  28. This will speed up non-premium farming a little,
  29. but more importantly it saves you a lot of screen swapping
  30. and copying co-ords to clipboard, it probably saved
  31. me getting repetitive strain injury in my wrist.
  32.  
  33. I've never asked if this is legal in the game, but
  34. I can't see why it wouldn't be. If they banned this
  35. health saving script I'd quit the game for good.
  36. """
  37. import time
  38. import winsound
  39.  
  40. import pyperclip
  41.  
  42.  
  43. co_ords = []
  44. # Give a chance to set up rally pint trops for first go.
  45. time.sleep(10)
  46.  
  47. # Open farm.txt and read all co-ords into a list.
  48. with open('farm.txt', 'r') as filehandle:
  49.     for line in filehandle:
  50.         currentPlace = line[:-1]
  51.         co_ords.append(currentPlace)
  52.  
  53. farms = len(co_ords)
  54. print(farms, "farms")
  55.  
  56. for a in range(farms):
  57.     get_cords = co_ords[a]
  58.     pyperclip.copy(get_cords)
  59.     print(a, get_cords)
  60.     winsound.Beep(840, 100)
  61.     time.sleep(10)  # Change this to suit your speed needs.
  62.  
  63. pyperclip.copy("finished")
  64. winsound.Beep(840, 100)
  65. winsound.Beep(840, 100)
  66. print("finished")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement