forked from dsandler/davesgalaxy
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsectors.py
executable file
·38 lines (31 loc) · 1.06 KB
/
sectors.py
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
#!/usr/bin/python
import game
import re
from optparse import OptionParser
import sys
parser = OptionParser()
parser.add_option("-U", "--username", dest="username",
help="username of login")
parser.add_option("-P", "--password", dest="password",
help="password for login")
parser.add_option("-x", "--xcoord", dest="x",
type="float", default = 1645.0,
help="center X coordinate")
parser.add_option("-y", "--ycoord", dest="y",
type="float", default = 1470.4,
help="center Y coordinate")
parser.add_option("-b", "--bound", dest="bound",
type="string", default = 'Core Worlds',
help="route to use as a bound")
(options, args) = parser.parse_args()
g = game.Galaxy()
if options.username and options.password:
# explicit loginpython
g.login(options.username, options.password, force=True)
else:
# try to pick up stored credentials
g.login()
x = options.x
y = options.y
r = g.load_sector([options.x, options.y])
print r.points