-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpyhack.py
More file actions
104 lines (102 loc) · 2.51 KB
/
Copy pathpyhack.py
File metadata and controls
104 lines (102 loc) · 2.51 KB
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
import discord
import aiohttp
import asyncio
import keyboard as k
from discord.ext.commands import Bot
bot = Bot(';', pm_help=False)
@bot.command(pass_context=True)
async def nethack(ctx):
m = ctx.message
mc = m.content[9:]
try:
arg = mc.split(' ')[0]
except:
return
try:
secondarg = mc.split(' ')[1]
except:
secondarg = ''
try:
thirdarg = mc.split(' ')[2]
except:
thirdarg = ''
if arg == '': await bot.send_message(m.channel, 'Invalid command. Not passing.')
elif arg == 'up':
k.send('k')
elif arg == 'left':
k.send('h')
elif arg == 'right':
k.send('l')
elif arg == 'down':
k.send('j')
elif arg == 'upleft':
k.send('y')
elif arg == 'upright':
k.send('u')
elif arg == 'downleft':
k.send('b')
elif arg == 'downright':
k.send('n')
elif arg == 'inventory':
k.send('i')
elif arg == 'opendoor':
k.send('o')
elif arg == 'closedoor':
k.send('c')
elif arg == 'pickup':
k.send('comma')
elif arg == 'drop':
k.send('d')
elif arg == 'eat':
k.send('e')
elif arg == 'yes':
k.send('y')
elif arg == 'no':
k.send('n')
elif arg == 'wear':
k.send('shift+w')
elif arg == 'takeoff':
k.send('shift+t')
elif arg == 'equipamulet':
k.send('shift+p')
elif arg == 'removeamulet':
k.send('shift+r')
elif arg == 'weapon':
if secondarg != '':
k.send('w')
k.send(secondarg)
elif arg == 'throwweapon':
if secondarg != '' and thirdarg != '':
k.send('t')
k.send(secondarg)
k.send(thirdarg)
elif arg == 'quiverselect':
if secondarg != '':
k.send('shift+q')
k.send(secondarg)
elif arg == 'fire':
k.send('f')
elif arg == 'usewand':
if secondarg != '':
k.send('z')
k.send(secondarg)
elif arg == 'scroll':
if secondarg != '':
k.send('r')
k.send(secondarg)
elif arg == 'memoryspell':
if secondarg != '':
k.send('shift+z')
k.send(secondarg)
elif arg == 'potion':
if secondarg != '':
if ', ' in mc:
aaa = mc[16:]
k.send('q')
k.send(aaa)
else:
k.send('q')
k.send(secondarg)
elif arg == 'tool':
k.send('a')
bot.run('TOKEN')