-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathterraria.py
More file actions
42 lines (35 loc) · 833 Bytes
/
terraria.py
File metadata and controls
42 lines (35 loc) · 833 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
'''
Terraria bot. Automated fishing.
Vision: bait catching, and defending invasions.
Result: Failed! This macro does not work on Terraria!
'''
print('Loading...')
import mouse
import keyboard
from macro import Failsafe
import time
from console import console
DO = 'fish()'
failsafe = None
def interact():
console(globals())
def sleep(x):
assert failsafe is None or failsafe.green
time.sleep(x)
assert failsafe is None or failsafe.green
def fish():
global failsafe
failsafe = Failsafe()
failsafe.start()
while True:
for i in range(16):
mouse.click()
sleep(3)
mouse.click()
sleep(.3)
keyboard.press_and_release('2')
sleep(.3)
keyboard.press_and_release('4')
sleep(.3)
print('Done. Now:', DO)
exec(DO)