-
Notifications
You must be signed in to change notification settings - Fork 1
/
spawn_point.py
31 lines (29 loc) · 949 Bytes
/
spawn_point.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
from random import *
def spawn_point():
x=choice(range(1,101))
lineas=open('Mapa.txt','r')
if x<=10:
for linea in lineas:
if linea[0:5]=='tier3':
spawn=linea.strip().split(',')
z=choice(range(1,len(spawn)+1))
point=spawn[z]
lineas.close()
return point
if x>10 and x<=25:
for linea in lineas:
if linea[0:5]=='tier2':
spawn=linea.strip().split(',')
z=choice(range(1,len(spawn)+1))
point=spawn[z]
lineas.close()
return point
if x>25:
for linea in lineas:
if linea[0:5]=='tier1':
spawn=linea.strip().split(',')
z=choice(range(1,len(spawn)+1))
point=spawn[z]
lineas.close()
return point
spawn_point()