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/

[TUT]Adding Scripts to Pyspades

Problem getting your server up? Ask in here.

[TUT]Adding Scripts to Pyspades

Postby PXYC » Sat Jan 21, 2012 3:15 pm

I know, I know, it's on the Wiki, but people rarely ever go there, or they're just too lazy. So, I'll make a short and to the point tutorial/guide on adding custom scripts to pyspades servers.

Step 1) Download the script you wish to add into your server.
*OR*
Copy all of the code in the script, paste it into Notepad, and save it as MyScript.py file. (Change MyScript to whatever)
Step 2) Once you have your .py file, you should place it in the script folder in your pyspades folder.
Step 3) Once it is in the script folder, you should go into your config.txt. Scroll down until you see something like this:
Code: Select all
    "scripts" : [
        "welcome",
        "rollback",
        "trusted",
        "autohelp",
        "protect",
        "map_extensions",
        "airstrike",
        "squad",
        "disco"
],

Now, all you have to do is add your script into that list, in the same format. Make sure all of the scripts have commas at the end of that line except the last script on the list. For example, it should look like this:

Edit: SLoW says that you need to indent the script's name with 8 SPACES and not TABS
Code: Select all
   "scripts" : [
        "welcome",
        "rollback",
        "trusted",
        "autohelp",
        "protect",
        "map_extensions",
        "airstrike",
        "squad",
        "disco",
        "ScriptName"
],


Step 4) Save the config, and run your server!

Note: If you get some sort of error, you have made a mistake. Re-read the tutorial and then try fixing any errors. If you still can't fix it, go to http://webchat.quakenet.org/?channels=pyspades and ask someone there. Also, try posting on this thread.
Last edited by PXYC on Sat Apr 28, 2012 4:40 pm, edited 3 times in total.
Image

<+laserlamp> lil b is my fav
User avatar
PXYC
Local Mod
 
Posts: 1068
Joined: Wed Dec 14, 2011 2:52 am
Location: Near Philadelphia, PA

Re: [TUT]Adding Scripts to Pyspades

Postby SLoW » Sat Jan 28, 2012 4:28 pm

Good tutorial PXYC. I'd just like to add that you should make sure to add 8 spaces and NOT tabs when you're indenting scripts.
Image
User avatar
SLoW
Global Moderator
 
Posts: 560
Joined: Sat Dec 10, 2011 4:35 pm

Re: [TUT]Adding Scripts to Pyspades

Postby chiroc6 » Thu Mar 01, 2012 5:30 pm

Hello you could help me it do not get it do you have exactly the scrips Kann me make it through teamviewer nice Währe my Skype name is chiroc6

MFG
chiroc6
chiroc6
Member
 
Posts: 1
Joined: Thu Mar 01, 2012 5:26 pm

Re: [TUT]Adding Scripts to Pyspades

Postby PXYC » Fri Mar 02, 2012 10:33 pm

chiroc6 wrote:Hello you could help me it do not get it do you have exactly the scrips Kann me make it through teamviewer nice Währe my Skype name is chiroc6

MFG
chiroc6


Please be a little clearer so I can fully understand you and help.
Image

<+laserlamp> lil b is my fav
User avatar
PXYC
Local Mod
 
Posts: 1068
Joined: Wed Dec 14, 2011 2:52 am
Location: Near Philadelphia, PA

Re: [TUT]Adding Scripts to Pyspades

Postby EstonianSniper » Sat Mar 03, 2012 2:45 pm

chiroc6 wrote:Hello you could help me it do not get it do you have exactly the scrips Kann me make it through teamviewer nice Währe my Skype name is chiroc6

MFG
chiroc6

Possible translation:
Hello, Could you help me? I do not get it, Do you have the exact scripts? Can we do it through teamviewer? It would be nice. My skype name is chiroc6
User avatar
EstonianSniper
Member
 
Posts: 202
Joined: Wed Feb 22, 2012 4:06 pm
Location: Estonia

Re: [TUT]Adding Scripts to Pyspades

Postby LinktersHD » Sat Apr 07, 2012 4:22 pm

Thanks for the helpful guide i was stuck on the scripts bit before i read the tutorial. Very nice tut. Thanks for it
Nuketown map is out!:
viewtopic.php?f=67&t=11021]

Image
Image
User avatar
LinktersHD
Member
 
Posts: 1356
Joined: Fri Mar 30, 2012 2:41 pm
Location: Reigate, England

Re: [TUT]Adding Scripts to Pyspades

Postby killerkarate » Fri May 04, 2012 4:25 am

for some reason when i try to save the notepad file as a .py file it still saves as a text file, anyway to fix this?
Image
Image
Image
Image
~Manifest~
User avatar
killerkarate
[USAB] Member
 
Posts: 87
Joined: Thu Jan 12, 2012 10:31 pm
Location: United States

Re: [TUT]Adding Scripts to Pyspades

Postby MoJo » Fri May 04, 2012 6:20 am

put quotation marks around it first and make sure you dont forget the .py. so it will look like this ...
"filenamehere.py" and save to where you want it to go.
MoJo
Member
 
Posts: 11
Joined: Wed Mar 14, 2012 8:00 pm

Re: [TUT]Adding Scripts to Pyspades

Postby Space101 » Fri Jun 15, 2012 11:39 pm

killerkarate wrote:for some reason when i try to save the notepad file as a .py file it still saves as a text file, anyway to fix this?


Wut, are you trying to save the config.txt file as a .py file?
I'M GAY
User avatar
Space101
Member
 
Posts: 688
Joined: Sat Feb 11, 2012 8:15 pm
Location: On the darkside of the moon.

Re: [TUT]Adding Scripts to Pyspades

Postby Fyoface » Sat Jun 30, 2012 11:55 pm

i can create the Py file fine I just can not get it to work, is it do to i am running the most curent new Psyspades??
Fyoface
Member
 
Posts: 116
Joined: Sun May 06, 2012 9:57 am
Location: Saint Pual Minnesota


Return to Server Help



Who is online

Users browsing this forum: No registered users and 4 guests

cron