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

Versión del día 29/05/2023. Echa un vistazo a la versión más reciente.

Tendrás que instalar una extensión para tu navegador como Tampermonkey, Greasemonkey o Violentmonkey si quieres utilizar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Violentmonkey para instalar este script.

Necesitarás instalar una extensión como Tampermonkey o Userscripts para instalar este script.

Necesitará instalar una extensión como Tampermonkey para instalar este script.

Necesitarás instalar una extensión para administrar scripts de usuario si quieres instalar este script.

(Ya tengo un administrador de scripts de usuario, déjame instalarlo)

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión como Stylus para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

Necesitará instalar una extensión del gestor de estilos de usuario para instalar este estilo.

(Ya tengo un administrador de estilos de usuario, déjame instalarlo)

// ==UserScript==
// @name         geoGuessr Resolver Hack (NEW UPDATE!)
// @namespace    http://tampermonkey.net/
// @version      8.3
// @description  Features: Automatically score 5000 Points | Score randomly between 4500 and 5000 points | Open in Google Maps | See enemy guess Distance
// @author       0x978
// @match        https://www.geoguessr.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=geoguessr.com
// @grant        none
// ==/UserScript==


alert(`           Thanks for using geoGuessr Resolver by 0x978.
           ============================================
           Please use the safer guess Option to avoid bans in competitive
           ============================================
            Controls (NEW!!!!!!!!):
            '1': Place marker on a "safe" guess (4500 - 5000)
            '2': Place marker on a "perfect" guess (5000)
            '3': Get a description of the correct location.
            '4': Open location in Google Maps (In a new tab)
            '5': See opponent's guess distance from correct answer.
            '6': See your distance from correct answer (replaces submit button text)
            ----------------------------------------------------------`)
async function v(e, r){
    let q = await fetch(`https://nominatim.openstreetmap.org/reverse?lat=${e}&lon=${r}&format=json`)
    return await q.json();
}
function qq() {
    let [p,m] = oi()
    v(p,m).then(x => {
        console.log(x)
        alert(`
    Country: ${x.address.country}
    County: ${x.address.county}
    City: ${x.address.city}
    Road: ${x.address.road}
    State: ${x.address.state}
    Postcode: ${x.address.postcode}
    Village/Suburb: ${(x.address.village||x.address.suburb)}

   Postal Address: ${x.display_name}
    `) } );
}
function km(h){
    let [qqw,th] = oi()
    if(document.getElementsByClassName("guess-map__canvas-container")[0] === undefined){mn([qqw,th]);return;}
    if(h){qqw += (Math.random() / 2);th += (Math.random() / 2);}
    let wc = document.getElementsByClassName("guess-map__canvas-container")[0]
    let vvr = Object.keys(wc)
    let er = vvr.find(b => b.startsWith("__reactFiber$"))
    let fp = wc[er].return.memoizedProps.onMarkerLocationChanged
    ed({lat:qqw,lng:th})
    vevd({lat:qqw,lng:th})
    fp({lat:qqw,lng:th})}
function mn([e,g]){
    let f = document.getElementsByClassName("region-map_map__7jxcD")[0]
    let lllk = Object.keys(f)
    let u = lllk.find(key => key.startsWith("__reactFiber$"))
    let fg = f[u].return.memoizedProps.onRegionSelected
    v(e,g).then(cx => {let countryCode = cx.address.country_code
        fg(countryCode)})
}
function oi(){
    let ww = document.getElementsByClassName("styles_root__3xbKq")[0]
    let e = Object.keys(ww)
    let u = e.find(key => key.startsWith("__reactFiber$"))
    let w = ww[u]
    let qwqa = w.return.memoizedProps.panorama.position
    return([qwqa.lat(),qwqa.lng()])
}
function vn(){
    let [xz,bt] = oi()
    if(!xz||!bt){return;}
    window.open(`https://www.google.com/maps/place/${xz},${bt}`);
}
function hr(){
    const ecc = wer().distance
    if(ecc === null){return;}
    const lll = Math.round(ecc / 1000)
    const th = Math.round(lll * 0.621371)
    alert(`Enemy guess is ${lll} km (${th} miles) away.`)
}
function wer(){
    const jjh = document.getElementsByClassName("game_layout__TO_jf")[0]
    const hhj = Object.keys(jjh)
    const hjh = hhj.find(key => key.startsWith("__reactFiber$"))
    const jhjh = jjh[hjh]
    const jhj = jhjh.return.memoizedProps.gameState.teams
    const jjjh = mnbv(jhj,veec())
    const hhjh = jjjh.players[0].guesses
    const jhgj = hhjh[hhjh.length-1]
    if(!ILILILLI(jhjh.return.memoizedProps.gameState,hhjh)){
        alert("Error!: The user has not guessed this round.")
        return null;
    }
    return jhgj
}
function veec(){
    const vece = document.getElementsByClassName("user-nick_root__DUfvc")[0]
    const vcee = Object.keys(vece)
    const ecve = vcee.find(key => key.startsWith("__reactFiber$"))
    const ceev = vece[ecve]
    const eevc = ceev.return.memoizedProps.userId
    return eevc
}
function mnbv(mnmm, mnnb){
    const mn = mnmm[0].players[0].playerId
    if(mn !== mnnb){
        return mnmm[0]
    }
    else{
        return mnmm[1]
    }
}
function ILILILLI(ilil, lilil){
    const li = ilil.currentRoundNumber
    const il = lilil ? lilil.length : 0;
    return li === il
}
function ufsfj(h){
    const w = oi()
    const gf = w[0] * (Math.PI / 180)
    const fg = w[1] * (Math.PI / 180)
    const y = document.getElementsByClassName("guess-map__canvas-container")[0]
    const c = Object.keys(y)
    const x = c.find(key => key.startsWith("__reactFiber$"))
    const t = y[x]
    const b = h ?? t.return.memoizedProps.markers[0]
    if(!w || !b){
        return null
    }
    const ik = b.lat * (Math.PI / 180)
    const ki = b.lng * (Math.PI / 180)
    return Math.acos(Math.sin(gf)*Math.sin(ik) + Math.cos(gf) * Math.cos(ik) * Math.cos(ki - fg)) * 6371
}
function ed(r){
    let ii = Math.round(ufsfj(r))
    if(ii === null){
        alert("Unable to fetch coordinates. Perhaps you have not placed a marker this round?")
        return
    }
    let g = `${ii} km (${Math.round(ii * 0.621371)} miles)`
    frf(g)
    //alert(`Your marker is ${distance} km (${Math.round(distance * 0.621371)} miles) away from the correct guess`)
}
function frf(e){
    let x = document.getElementsByClassName("button_wrapper__NkcHZ")[1]
    x.innerText = e
}
function vevd(coords){
    const eed = ufsfj(coords)
    if(eed < 1 || isNaN(eed)){
        const xz = (e) => {
            if (e.keyCode === 32) {
                e.stopImmediatePropagation();
                zw()
                document.removeEventListener("keyup", xz);
            }
        };
        document.addEventListener("keyup", xz);
        setTimeout(() => {
            let z = document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0][Object.keys(document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0])[1]].onClick
            document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0][Object.keys(document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0])[1]].onClick = ( () => {
                zw()
                document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0][Object.keys(document.getElementsByClassName("button_button__CnARx button_variantPrimary__xc8Hp")[0])[1]].onClick = (() => z())
            })
        },500)
    }
}
function zw(){
    alert(`Geoguessr Resolver has prevented you from making a perfect guess.
            
Making perfect guesses will very likely result in a ban from competitive.
            
Press "guess" again to proceed anyway.`)
}

let h = (e) => {
    if(e.keyCode === 49){km(true)}
    if(e.keyCode === 50){km(false)}
    if(e.keyCode === 51){qq()}
    if(e.keyCode === 52){vn()}
    if(e.keyCode === 53){hr()}
    if(e.keyCode === 54){ed()}
}
document.addEventListener("keydown", h);