Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- ###############################################################################################################
- ## GO to a position in the game and look in the direction you want the line to spawn
- ## Type "get" in console and paste the position in AllPositions
- ## You can put as many positions as you want in the "array" and it will go through each one spawning 10 bots
- ###############################################################################################################
- AllPositions = """
- 213.19 13.81 332.07 0.00 237.44 0.00
- 210.15 13.77 393.92 0.00 261.39 0.00
- 153.92 13.99 436.65 0.00 303.68 0.00
- 174.26 14.32 525.35 0.00 100.36 0.00
- 325.86 11.73 553.79 0.00 316.70 0.00
- 346.85 13.69 542.87 0.00 1.15 0.00
- 183.73 13.09 244.38 0.00 240.41 0.00
- 172.29 14.00 312.60 0.00 1.37 0.00
- 275.69 8.94 522.51 0.00 358.81 0.00
- 476.27 14.72 342.10 0.00 258.97 0.00
- 454.01 14.14 223.55 0.00 165.21 0.00
- """.strip("\n").split("\n")
- def produceBots(pos,distance,minID,yVariant=0,botSize = 0.5):
- initialX = float(pos[0])
- initialY = float(pos[1])
- initialZ = float(pos[2])
- direction = float(pos[4])
- cos = math.cos(math.radians(direction))
- sin = math.sin(math.radians(direction))
- directionZ = botSize * cos
- directionX = botSize * sin
- amountToSpawn = math.ceil(distance / botSize)
- for botID in range(minID,minID+amountToSpawn+1):
- i = botID - minID
- newX = round(initialX + i * directionX,2)
- newZ = round(initialZ + i * directionZ,2)
- newY = round(initialY + i * yVariant,2)
- string = "rc delayed 1140 teleport "+str(botID)+" "+str(newX) + ","+str(newY)+","+str(newZ)
- print(string)
- #produceBots(positionForSpawn,5,112)
- def produceMany(positions):
- currentBotID = 2
- for pos in positions:
- temp = pos.strip("\n").split(" ")
- produceBots(temp,5,currentBotID)
- currentBotID += 10
- print("done")
- ## Should make number of bots per location a bit better
- produceMany(AllPositions)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement