Greasy Fork 支持简体中文。

hack dino

Dino game Hack

  1. // ==UserScript==
  2. // @name hack dino
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-07-26
  5. // @description Dino game Hack
  6. // @author Hackdinoss
  7. // @match https://chromedino.com/
  8. // @icon https://seeklogo.com/images/D/dinosaur-game-logo-2723F385F0-seeklogo.com.png
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14. Runner. prototype. gameOver=function( ) {}
  15. Runner.instance_.setSpeed(100);
  16. /**
  17. * Dino AI
  18. */
  19. function dinoAI() {
  20. if (Runner.instance_.horizon.obstacles.length > 0) {
  21. let dist = Runner.instance_.horizon.obstacles[0].xPos;
  22. let obj = Runner.instance_.horizon.obstacles[0];
  23. let type = obj.typeConfig.type;
  24. let speed = Runner.instance_.currentSpeed;
  25. if (dist < speed * 22) {
  26. if (type === 'PTERODACTYL' && obj.yPos < 60) {
  27. if (!Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(true);
  28. } else {
  29. if (Runner.instance_.tRex.ducking) Runner.instance_.tRex.setDuck(false);
  30. Runner.instance_.tRex.startJump(Runner.instance_.currentSpeed);
  31. }
  32. }
  33. }
  34. requestAnimationFrame(dinoAI);
  35. }
  36.  
  37. dinoAI();
  38. })();