Note: This forum is merely an archive. It is no longer possible to register or post. - StackOverflow
New Ace of Spades Forums: http://buildandshoot.com/

pyspades script template

For all your hosting needs.

pyspades script template

Postby danhezee » Wed Aug 08, 2012 3:45 pm

I haven't play with python that much so when it comes to writing a script in pyspades, I am kinda left in the dark. I am not sure where to begin. What I would like to see is a basic bare bones example of a complete script. Nothing fancy. I have looked over a few of the existing scripts. But, I don't know what is absolutely needed to communicate with pyspades.

Below is the code for placing a block and sending a message to the player telling them they placed a block. Could someone build a complete script around that code.

Code: Select all
def on_block_build(self, x, y, z):
   self.send_chat('You have placed a block')
Image
User avatar
danhezee
Site Admin
 
Posts: 315
Joined: Sat Dec 10, 2011 5:53 pm

Re: pyspades script template

Postby Danke » Fri Aug 10, 2012 8:00 pm

User avatar
Danke
Member
 
Posts: 73
Joined: Thu Jan 12, 2012 3:27 am

Re: pyspades script template

Postby CraftDinur » Fri Aug 10, 2012 8:14 pm

Danke wrote:http://bpaste.net/show/cok2k7bmuVzKipPkInHS/

this is awesome! you are my new favourite person in the world :D
IGN: CraftDinur, Mr. Yoshimori, 49th Parallel
User avatar
CraftDinur
Member
 
Posts: 879
Joined: Sat Dec 10, 2011 11:18 pm
Location: The Enlightened Land


Return to Server



Who is online

Users browsing this forum: No registered users and 2 guests

cron