geoGuessr Resolver Hack (New Update!!!!!)

Features: Automatically score 5000 Points | Score randomly between 4500 and 5000 points | Open in Google Maps | See guess Distances

当前为 2023-05-29 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name geoGuessr Resolver Hack (New Update!!!!!)
  3. // @namespace http://tampermonkey.net/
  4. // @version 8.3.1
  5. // @description Features: Automatically score 5000 Points | Score randomly between 4500 and 5000 points | Open in Google Maps | See guess Distances
  6. // @author 0x978
  7. // @match https://www.geoguessr.com/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=geoguessr.com
  9. // @grant none
  10. // ==/UserScript==
  11. alert(` Thanks for using geoGuessr Resolver by 0x978.
  12. ============================================
  13. Please use the safer guess Option to avoid bans in competitive
  14. ============================================
  15. Controls (NEW!!!!!!!!):
  16. '1': Place marker on a "safe" guess (4500 - 5000)
  17. '2': Place marker on a "perfect" guess (5000)
  18. '3': Get a description of the correct location.
  19. '4': Open location in Google Maps (In a new tab)
  20. '5': See opponent's guess distance from correct answer.
  21. '6': See your distance from correct answer (replaces submit button text)
  22. ----------------------------------------------------------`)
  23. async function v(e, r){
  24. let q = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${r}&format=json`)
  25. return await q.json();
  26. }
  27. function qq() {
  28. let [p,m] = oi()
  29. v(p,m).then(x => {
  30. console.log(x)
  31. alert(`
  32. Country: ${x.address.country}
  33. County: ${x.address.county}
  34. City: ${x.address.city}
  35. Road: ${x.address.road}
  36. State: ${x.address.state}
  37. Postcode: ${x.address.postcode}
  38. Village/Suburb: ${(x.address.village||x.address.suburb)}
  39. Postal Address: ${x.display_name}
  40. `) } );
  41. }
  42. function km(h){
  43. let [qqw,th] = oi()
  44. if(document.getElementsByClassName("guess-map__canvas-container")[0] === undefined){mn([qqw,th]);return;}
  45. if(h){qqw += (Math.random() / 2);th += (Math.random() / 2);}
  46. let wc = document.getElementsByClassName("guess-map__canvas-container")[0]
  47. let vvr = Object.keys(wc)
  48. let er = vvr.find(b => b.startsWith("__reactFiber$"))
  49. let fp = wc[er].return.memoizedProps.onMarkerLocationChanged
  50. fp({lat:qqw,lng:th})}
  51. function mn([e,g]){
  52. let f = document.getElementsByClassName("region-map_map__7jxcD")[0]
  53. let lllk = Object.keys(f)
  54. let u = lllk.find(key => key.startsWith("__reactFiber$"))
  55. let fg = f[u].return.memoizedProps.onRegionSelected
  56. v(e,g).then(cx => {let countryCode = cx.address.country_code
  57. fg(countryCode)})
  58. }
  59. function oi(){
  60. let ww = document.getElementsByClassName("styles_root__3xbKq")[0]
  61. let e = Object.keys(ww)
  62. let u = e.find(key => key.startsWith("__reactFiber$"))
  63. let w = ww[u]
  64. let qwqa = w.return.memoizedProps.panorama.position
  65. return([qwqa.lat(),qwqa.lng()])
  66. }
  67. function vn(){
  68. let [xz,bt] = oi()
  69. if(!xz||!bt){return;}
  70. window.open(`https://www.google.com/maps/place/${xz},${bt}`);
  71. }
  72. function hr(){
  73. const ecc = wer().distance
  74. if(ecc === null){return;}
  75. const lll = Math.round(ecc / 1000)
  76. const th = Math.round(lll * 0.621371)
  77. alert(`Enemy guess is ${lll} km (${th} miles) away.`)
  78. }
  79. function wer(){
  80. const jjh = document.getElementsByClassName("game_layout__TO_jf")[0]
  81. const hhj = Object.keys(jjh)
  82. const hjh = hhj.find(key => key.startsWith("__reactFiber$"))
  83. const jhjh = jjh[hjh]
  84. const jhj = jhjh.return.memoizedProps.gameState.teams
  85. const jjjh = mnbv(jhj,veec())
  86. const hhjh = jjjh.players[0].guesses
  87. const jhgj = hhjh[hhjh.length-1]
  88. if(!ILILILLI(jhjh.return.memoizedProps.gameState,hhjh)){
  89. alert("Error!: The user has not guessed this round.")
  90. return null;
  91. }
  92. return jhgj
  93. }
  94. function veec(){
  95. const vece = document.getElementsByClassName("user-nick_root__DUfvc")[0]
  96. const vcee = Object.keys(vece)
  97. const ecve = vcee.find(key => key.startsWith("__reactFiber$"))
  98. const ceev = vece[ecve]
  99. const eevc = ceev.return.memoizedProps.userId
  100. return eevc
  101. }
  102. function mnbv(mnmm, mnnb){
  103. const mn = mnmm[0].players[0].playerId
  104. if(mn !== mnnb){
  105. return mnmm[0]
  106. }
  107. else{
  108. return mnmm[1]
  109. }
  110. }
  111. function ILILILLI(ilil, lilil){
  112. const li = ilil.currentRoundNumber
  113. const il = lilil ? lilil.length : 0;
  114. return li === il
  115. }
  116. function ufsfj(h){
  117. const w = oi()
  118. const gf = w[0] * (Math.PI / 180)
  119. const fg = w[1] * (Math.PI / 180)
  120. const y = document.getElementsByClassName("guess-map__canvas-container")[0]
  121. const c = Object.keys(y)
  122. const x = c.find(key => key.startsWith("__reactFiber$"))
  123. const t = y[x]
  124. const b = h ?? t.return.memoizedProps.markers[0]
  125. if(!w || !b){
  126. return null
  127. }
  128. const ik = b.lat * (Math.PI / 180)
  129. const ki = b.lng * (Math.PI / 180)
  130. return Math.acos(Math.sin(gf)*Math.sin(ik) + Math.cos(gf) * Math.cos(ik) * Math.cos(ki - fg)) * 6371
  131. }
  132. function ed(r){
  133. let ii = Math.round(ufsfj(r))
  134. if(ii === null){
  135. alert("Unable to fetch coordinates. Perhaps you have placed a marker this round?")
  136. return
  137. }
  138. let g = `${ii} km (${Math.round(ii * 0.621371)} miles)`
  139. frf(g)
  140. //alert(`Your marker is ${distance} km (${Math.round(distance * 0.621371)} miles) away from the correct guess`)
  141. }
  142. function frf(e){
  143. let x = document.getElementsByClassName("button_wrapper__NkcHZ")[1]
  144. x.innerText = e
  145. }
  146. let h = (e) => {
  147. if(e.keyCode === 49){km(true)}
  148. if(e.keyCode === 50){km(false)}
  149. if(e.keyCode === 51){qq()}
  150. if(e.keyCode === 52){vn()}
  151. if(e.keyCode === 53){hr()}
  152. if(e.keyCode === 54){ed()}
  153. }
  154. document.addEventListener("keydown", h);