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 = """
- 147.73 5.75 330.71 0.00 18.95 0.00
- 149.57 5.00 277.08 0.00 11.67 0.00
- 135.91 5.88 249.93 0.00 259.99 0.00
- 149.97 4.58 156.30 0.00 285.01 0.00
- 158.20 6.70 157.23 0.00 131.89 0.00
- 220.66 4.91 121.02 0.00 351.55 0.00
- 237.90 4.36 145.20 0.00 71.30 0.00
- 277.71 4.36 151.10 0.00 342.64 0.00
- 269.31 4.94 183.94 0.00 354.96 0.00
- 386.11 5.60 190.36 0.00 75.42 0.00
- 373.24 3.50 169.97 0.00 257.50 0.00
- 353.66 4.81 220.83 0.00 26.26 0.00
- 353.86 4.96 241.05 0.00 240.71 0.00
- 355.63 4.63 269.08 0.00 96.65 0.00
- 397.89 4.95 283.17 0.00 261.50 0.00
- 364.34 4.23 319.53 0.00 263.32 0.00
- 332.30 6.51 331.14 0.00 349.45 0.00
- 389.21 4.67 386.46 0.00 287.08 0.00
- 358.61 4.78 403.67 0.00 151.34 0.00
- 298.25 4.28 391.12 0.00 182.89 0.00
- 277.73 4.17 378.55 0.00 157.34 0.00
- 234.54 3.00 397.32 0.00 213.34 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 1180 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