geoGuessr Resolver Hack (NEW UPDATE!)

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

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

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