Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
chasm -- python parts of subspace

 
Post new topic   Reply to topic Printable version
 View previous topic  Python Bot? Post :: Post Protocol Shorthand Conventions  View next topic  
Author Message
divine.216
Newbie


Joined: Jun 12 2005
Posts: 18
Offline

PostPosted: Thu Feb 11, 2010 4:15 am    Post subject: chasm -- python parts of subspace Reply to topic Reply with quote

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()
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
D1st0rt
Miss Directed Wannabe


Age:37
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Fri Feb 12, 2010 8:47 pm    Post subject: Reply to topic Reply with quote

Nice. I assume you looked at cycad's, how does this compare?
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
cycad
Novice


Gender:Gender:Male
Joined: Feb 12 2004
Posts: 29
Offline

PostPosted: Tue Feb 16, 2010 5:52 pm    Post subject: Reply to topic Reply with quote

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
View users profile Send private message Add User to Ignore List
divine.216
Newbie


Joined: Jun 12 2005
Posts: 18
Offline

PostPosted: Sun Feb 21, 2010 2:38 am    Post subject: Reply to topic Reply with quote

thanks, glad to hear it has helped.
Back to top
View users profile Send private message Add User to Ignore List Send email Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Misc User Apps All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
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
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 31 page(s) served in previous 5 minutes.

phpBB Created this page in 0.469870 seconds : 28 queries executed (88.7%): GZIP compression disabled