Advertisement
Guest User

BogusRoads Bot

a guest
Aug 18th, 2019
232
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. sinV = 0.6263368527348079
  2.  
  3. // config
  4. antiJumpChance = .8
  5. actionInterval = 500
  6. closeAIOnReset = 0
  7. smoother = .5
  8.  
  9. // on Init
  10. /* teaching = {} */
  11.  
  12. function jump(n) {
  13.     mouseIsDown = true;
  14.     setTimeout(f=>{mouseIsDown=false; mouseWasDown=true}, n*100)
  15. }
  16.  
  17. function detSinV() {
  18.     toSum = 0;
  19.     for (item of mainCanvasContext.getImageData(0,0,64,64).data) {
  20.         if (item!=255) toSum += item/255;
  21.     }
  22.         mouseX = .5 + Math.sin(toSum/smoother+sinV*smoother)/2
  23.         mouseY = .3 + Math.sin(toSum*sinV*2/smoother)/5
  24.         if (Math.sin(sinV*toSum/smoother+sinV*playerSpeed/smoother)/2+.5>antiJumpChance) jump(2.5+Math.sin(sinV*sinV*sinV*toSum)*5/2)
  25.         if (gameState == 3 && closeAIOnReset) clearInterval(botHandle)
  26.         // if (gameState != 1) teaching[time] = sinV, sinV = Math.random(), time = 1;
  27. }
  28.  
  29. function startBot(oneTime) {
  30.     if (oneTime) closeAIOnReset = 1
  31.     botHandle = setInterval(detSinV, actionInterval)
  32. }
  33.  
  34. function stopBot() {
  35.     clearInterval(botHandle)
  36. }
  37.  
  38. startBot(0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement