Advertisement
Guest User

Untitled

a guest
May 25th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.66 KB | None | 0 0
  1. #!/usr/bin/env python
  2. from reverence import blue
  3. import json
  4.  
  5. eve = blue.EVE('c:\program files (x86)\ccp\eve')
  6. cfg = eve.getconfigmgr()
  7. f = blue.ResFile()
  8. f.Open('res:/UI/Shared/Maps/mapcache.dat')
  9. mapcache = blue.marshal.Load(f.Read())
  10.  
  11. visits = []
  12. for row in eve.RemoteSvc('map').GetSolarSystemVisits(500149661):
  13.     # skip anything but wormholes
  14.     x = str(row.solarSystemID)[1]
  15.     if x != '1':
  16.         continue
  17.  
  18.     visit = {
  19.         'solarSystemID': row.solarSystemID,
  20.         'visits': row.visits,
  21.         'systemName': cfg.evelocations.Get(row.solarSystemID).locationName
  22.     }
  23.     visits.append(visit)
  24.  
  25. visits.sort(key=lambda x: x['visits'])
  26.  
  27. print json.dumps(visits, indent=4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement