|
Server Help Community forums for Subgame, ASSS, and bots
|
Author |
Message |
divine.216 Newbie
Joined: Jun 12 2005 Posts: 18 Offline
|
Posted: 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. |
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()
|
|
|
Back to top |
|
|
D1st0rt Miss Directed Wannabe
Age:37 Gender: Joined: Aug 31 2003 Posts: 2247 Location: Blacksburg, VA Offline
|
Posted: Fri Feb 12, 2010 8:47 pm Post subject: |
|
|
|
|
Nice. I assume you looked at cycad's, how does this compare? _________________
|
|
Back to top |
|
|
cycad Novice
Gender: Joined: Feb 12 2004 Posts: 29 Offline
|
Posted: 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. |
|
Back to top |
|
|
divine.216 Newbie
Joined: Jun 12 2005 Posts: 18 Offline
|
Posted: Sun Feb 21, 2010 2:38 am Post subject: |
|
|
|
|
thanks, glad to hear it has helped. |
|
Back to top |
|
|
|
|
You can post new topics in this forum You can reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
Software by php BB © php BB Group Server Load: 31 page(s) served in previous 5 minutes.
|