Server Help

Misc User Apps - chasm -- python parts of subspace

divine.216 - Thu Feb 11, 2010 4:15 am
Post subject: chasm -- python parts of subspace
chasm:
Quote:
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.


Code: Show/Hide
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()

D1st0rt - Fri Feb 12, 2010 8:47 pm
Post subject:
Nice. I assume you looked at cycad's, how does this compare?
cycad - Tue Feb 16, 2010 5:52 pm
Post subject:
Great work, that code is very clean and I've picked up a couple things from looking at it already.

Regarding comparisons, I'd say div's is superior.
divine.216 - Sun Feb 21, 2010 2:38 am
Post subject:
thanks, glad to hear it has helped.
All times are -5 GMT
View topic
Powered by phpBB 2.0 .0.11 © 2001 phpBB Group