name = 'Submarine' version = '1.0' author = 'Ki11aWi11' description = ('Take control of this ballistic missile submarine before its too late!') fog = (232, 128, 5) extensions = { 'water_damage' : 100, 'boundary_damage' : {'left' : 238, 'right' : 276, 'top' : 84, 'bottom' : 345, 'damage': 20 } } from pyspades.constants import * from pyspades.server import ServerConnection def get_entity_location(team, entity_id): if entity_id == BLUE_FLAG: x, y, z = 260, 103, 51 return (x, y, z) if entity_id == GREEN_FLAG: x, y, z = 256, 299, 51 return (x, y, z) if entity_id == BLUE_BASE: x, y, z = 258, 110, 43 return (x, y, z) if entity_id == GREEN_BASE: x, y, z = 258, 326, 43 return (x, y, z) # script from pyspades.constants import * import random def get_spawn_location(connection): if connection.name == 'mat^2': # put players with the name "mat^2" # into the sky x, y, z = ServerConnection.get_spawn_location(connection) return (x, y, 30) # to set spawn for a specific team, do the following: if connection.team is connection.protocol.blue_team: # sets a static spawn for just the blue team, but you could use "green_team" too. x=258 y=110 z=43 x2=260 y2=103 z2=51 x3=250 y3=124 z3=51 x4=258 y4=127 z4=43 x5, y5, z5 = random.choice([(x,y,z),(x2,y2,z2),(x3,y3,z3),(x4,y4,z4)]) return (x5, y5, z5) if connection.team is connection.protocol.green_team: # sets a static spawn for just the blue team, but you could use "green_team" too. x1=258 y1=326 z1=43 x2=251 y2=317 z2=43 x3=257 y3=319 z3=51 x4=256 y4=299 z4=51 x5, y5, z5 = random.choice([(x1,y1,z1),(x2,y2,z2),(x3,y3,z3),(x4,y4,z4)]) return (x5, y5, z5)