name = 'favFootball' version = '1.0' author = 'Dany0' description = 'Favela football for everyone!' extensions = { 'water_damage' : 200} # script from pyspades.constants import * import random def get_entity_location(team, entity_id): if entity_id == BLUE_FLAG: x, y, z = 255, 256, 61 return (x, y, z) if entity_id == GREEN_FLAG: x, y, z = 255, 254, 61 return (x, y, z) if entity_id == BLUE_BASE: x, y, z = 255, 283, 61 return (x, y, z) if entity_id == GREEN_BASE: x, y, z = 255, 226, 61 return (x, y, z) def get_spawn_location(connection): if connection.team is connection.protocol.blue_team: x1 = random.randrange(242,247) y1 = random.randrange(189,197) z1 = 61 x2 = random.randrange(266,271) y2 = random.randrange(189,197) z2 = 56 x, y, z = random.choice([(x1,y1,z1),(x2,y2,z1),(x1,y1,z2),(x2,y2,z2)]) return (x, y, z-1) if connection.team is connection.protocol.green_team: x1 = random.randrange(266,271) y1 = random.randrange(309,317) z1 = 61 x2 = random.randrange(242,247) y2 = random.randrange(309,317) z2 = 56 x, y, z = random.choice([(x1,y1,z1),(x2,y2,z1),(x1,y1,z2),(x2,y2,z2)]) return (x, y, z-1)