Advertisement
logancberrypie

Untitled

Jul 19th, 2020
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  1. import math
  2.  
  3.  
  4. ###############################################################################################################
  5. ## GO to a position in the game and look in the direction you want the line to spawn
  6. ## Type "get" in console and paste the position in AllPositions
  7. ## You can put as many positions as you want in the "array" and it will go through each one spawning 10 bots
  8. ###############################################################################################################
  9.  
  10.  
  11.  
  12. AllPositions = """
  13. 147.73 5.75 330.71 0.00 18.95 0.00
  14. 149.57 5.00 277.08 0.00 11.67 0.00
  15. 135.91 5.88 249.93 0.00 259.99 0.00
  16. 149.97 4.58 156.30 0.00 285.01 0.00
  17. 158.20 6.70 157.23 0.00 131.89 0.00
  18. 220.66 4.91 121.02 0.00 351.55 0.00
  19. 237.90 4.36 145.20 0.00 71.30 0.00
  20. 277.71 4.36 151.10 0.00 342.64 0.00
  21. 269.31 4.94 183.94 0.00 354.96 0.00
  22. 386.11 5.60 190.36 0.00 75.42 0.00
  23. 373.24 3.50 169.97 0.00 257.50 0.00
  24. 353.66 4.81 220.83 0.00 26.26 0.00
  25. 353.86 4.96 241.05 0.00 240.71 0.00
  26. 355.63 4.63 269.08 0.00 96.65 0.00
  27. 397.89 4.95 283.17 0.00 261.50 0.00
  28. 364.34 4.23 319.53 0.00 263.32 0.00
  29. 332.30 6.51 331.14 0.00 349.45 0.00
  30. 389.21 4.67 386.46 0.00 287.08 0.00
  31. 358.61 4.78 403.67 0.00 151.34 0.00
  32. 298.25 4.28 391.12 0.00 182.89 0.00
  33. 277.73 4.17 378.55 0.00 157.34 0.00
  34. 234.54 3.00 397.32 0.00 213.34 0.00
  35. """.strip("\n").split("\n")
  36.  
  37.  
  38.  
  39. def produceBots(pos,distance,minID,yVariant=0,botSize = 0.5):
  40. initialX = float(pos[0])
  41. initialY = float(pos[1])
  42. initialZ = float(pos[2])
  43. direction = float(pos[4])
  44.  
  45. cos = math.cos(math.radians(direction))
  46. sin = math.sin(math.radians(direction))
  47. directionZ = botSize * cos
  48. directionX = botSize * sin
  49.  
  50. amountToSpawn = math.ceil(distance / botSize)
  51. for botID in range(minID,minID+amountToSpawn+1):
  52. i = botID - minID
  53. newX = round(initialX + i * directionX,2)
  54. newZ = round(initialZ + i * directionZ,2)
  55. newY = round(initialY + i * yVariant,2)
  56. string = "rc delayed 1180 teleport "+str(botID)+" "+str(newX) + ","+str(newY)+","+str(newZ)
  57. print(string)
  58.  
  59. #produceBots(positionForSpawn,5,112)
  60.  
  61.  
  62.  
  63. def produceMany(positions):
  64. currentBotID = 2
  65. for pos in positions:
  66. temp = pos.strip("\n").split(" ")
  67. produceBots(temp,5,currentBotID)
  68. currentBotID += 10
  69. print("done")
  70.  
  71. ## Should make number of bots per location a bit better
  72.  
  73.  
  74. produceMany(AllPositions)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement