Page 1 of 1

*Script*Randomspawn

Posted: Sat Jul 19, 2014 8:11 am
by Bori
HEy guys,

so after I have returned to AoS, I have decided to script again. Fist off all I want to say thank you to Morphman who helped me to get through this.

This script simply let the player spawn randomly. I recommend to turn off fall damage in the config because you would to a way too often.
Code: Select all
'''
Get Trolled by Bori by Bori but not by anone else
No just joking
Just random spawn
'''
from random import randint
from pyspades.constants import *
     
     
def apply_script(protocol, connection, config):
     
    class radomSpawnConnection(connection):
        def on_spawn(self, pos):
            x = randint(0,512)
            y = randint(0,512)
            z = randint(0,64)
            self.set_location((x, y, z))
            self.send_chat("You have Spawned radomly")
            return connection.on_spawn(self, pos)
     
    return protocol , radomSpawnConnection

Re: *Script*Randomspawn

Posted: Tue Jul 22, 2014 4:13 pm
by Jigsaw
nice bori :3

Re: *Script*Randomspawn

Posted: Tue Jul 22, 2014 4:50 pm
by LeCom
It's a pretty small script. You could at least try protocol.map.get_z() instead of having players spawn inside blocks ;)