Jump to content
SSForum.net is back!

Recommended Posts

Posted

(cross-posted at mgb's forum)

 

chasm

 

I'm sharing some of the stuff I've made while implementing parts of subspace in python.

 

I have no interest in making a new client; Continuum works great. Making a better client is more work than I'm willing or able to do. I'm focusing on the game and billing servers. But I've learned that others are working on similar python projects, specifically, implementing bot clients in python.

 

Since I implemented the basics of a bot in python -- even though it is a bit afield from my actual project -- I am sharing these parts in the hope it will help. It is neither complete nor well tested, but it does work. It only does VIE encryption and I included no new checksums or other dazzling revelations. But some may find it helpful.

 

Since I didn't begin this as a bot core, or as an attempt to implement a client, it may need some massaging to be useful for any particular end. And I have done only minimal testing of the game features.

 

 

from subspace.game.net import Player

p = Player("playername", "password", ("zone.aswz.org", 5000))
p.login()

p.messenger.send_public_message("hello!")

p.set_ship(4)
p.messenger.send_remote_message("divine.216", "I'm in a terrier!")

# move the ship around and set basic data
p.set_ship_data(x=8192,y=8192,energy=1000,bounty=100)

# private message everyone in the arena
for person in p.arena_player_list.all():
   p.messenger.send_private_message(person.id, "I'm about to start turning in circles!")

# rotate all the way around
for rot in range(40):
   p.set_ship_data(rotation=rot)
   sleep(0.5) # sleep for half a second to slow down the turn

p.messenger.send_public_message("okay, I'm dizzy now, g'bye!")
p.logout() 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...