Rolocate Server Region Data (Data Saving)

Server regions for RoLocate to use.

Bu script direkt olarak kurulamaz. Başka scriptler için bir kütüphanedir ve meta yönergeleri içerir // @require https://update.greasyfork.org/scripts/547134/1915649/Rolocate%20Server%20Region%20Data%20%28Data%20Saving%29.js

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği indirebilmeniz için ayrıca Tampermonkey gibi bir eklenti kurmanız gerekmektedir.

Bu betiği yüklemek için bir betik yöneticisi eklentisi yüklemeniz gerekecektir.

(Zaten bir betik yöneticim var, hadi yükleyelim!)

Bu stili yüklemek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için Stylus gibi bir uzantı kurmanız gerekir.

Bu stili yükleyebilmek için Stylus gibi bir uzantı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

Bu stili yüklemek için bir kullanıcı stili yöneticisi uzantısı kurmanız gerekir.

Bu stili yükleyebilmek için bir kullanıcı stili yöneticisi uzantısı yüklemeniz gerekir.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name Rolocate Server Region Data
// @namespace https://oqarshi.github.io/
// @version 1.8
// @description Server regions for RoLocate to use (by datacenter ID).
// @author Oqarshi
// @grant none
// ==/UserScript==

window.serverRegionsByIp = null;
window.loadServerRegions = function () {
if (window.serverRegionsByIp) return;
window.serverRegionsByIp={
_locations:{
"0":{city:"Buenos Aires",country:{name:"Argentina",code:"AR"},region:{name:"Buenos Aires",code:"Buenos Aires"},latitude:-34.6037,longitude:-58.3816}, 
"1":{city:"Sydney",country:{name:"Australia",code:"AU"},region:{name:"New South Wales",code:"New South Wales"},latitude:-33.8678,longitude:151.2073},
"2":{city:"São Paulo",country:{name:"Brazil",code:"BR"},region:{name:"São Paulo",code:"São Paulo"},latitude:-23.5505,longitude:-46.6333},
"3":{city:"Zürich",country:{name:"Switzerland",code:"CH"},region:{name:"Zurich",code:"Zurich"},latitude:47.3744,longitude:8.5410}, 
"4":{city:"Santiago",country:{name:"Chile",code:"CL"},region:{name:"Region Metropolitana de Santiago",code:"Region Metropolitana de Santiago"},latitude:-33.4377,longitude:-70.6511}, 
"5":{city:"Frankfurt am Main",country:{name:"Germany",code:"DE"},region:{name:"Hesse",code:"Hesse"},latitude:50.1109,longitude:8.6821},
"6":{city:"Paris",country:{name:"France",code:"FR"},region:{name:"Île-de-France",code:"Île-de-France"},latitude:48.8534,longitude:2.3488},
"7":{city:"London",country:{name:"United Kingdom",code:"GB"},region:{name:"England",code:"England"},latitude:51.5130,longitude:-0.0800},
"8":{city:"Athens",country:{name:"Greece",code:"GR"},region:{name:"Attica",code:"Attica"},latitude:37.9756,longitude:23.7348}, 
"9":{city:"Jakarta",country:{name:"Indonesia",code:"ID"},region:{name:"Jakarta",code:"Jakarta"},latitude:-6.1754,longitude:106.8272}, 
"10":{city:"Dublin",country:{name:"Ireland",code:"IE"},region:{name:"Leinster",code:"Leinster"},latitude:53.3498,longitude:-6.2603},
"11":{city:"Tel Aviv",country:{name:"Israel",code:"IL"},region:{name:"Tel Aviv",code:"Tel Aviv"},latitude:32.0853,longitude:34.7818}, 
"12":{city:"Mumbai",country:{name:"India",code:"IN"},region:{name:"Maharashtra",code:"Maharashtra"},latitude:19.0760,longitude:72.8777},
"13":{city:"Milan",country:{name:"Italy",code:"IT"},region:{name:"Lombardy",code:"Lombardy"},latitude:45.4642,longitude:9.1896}, 
"14":{city:"Osaka",country:{name:"Japan",code:"JP"},region:{name:"Osaka",code:"Osaka"},latitude:34.6937,longitude:135.5023},
"15":{city:"Tokyo",country:{name:"Japan",code:"JP"},region:{name:"Tokyo",code:"Tokyo"},latitude:35.6895,longitude:139.6917},
"16":{city:"Santiago de Querétaro",country:{name:"Mexico",code:"MX"},region:{name:"Querétaro",code:"Querétaro"},latitude:20.5923,longitude:-100.3917}, 
"17":{city:"Kuala Lumpur",country:{name:"Malaysia",code:"MY"},region:{name:"Kuala Lumpur",code:"Kuala Lumpur"},latitude:3.1517,longitude:101.6942}, 
"18":{city:"Amsterdam",country:{name:"Netherlands",code:"NL"},region:{name:"North Holland",code:"North Holland"},latitude:52.3740,longitude:4.8897},
"19":{city:"Lima",country:{name:"Peru",code:"PE"},region:{name:"Lima Province",code:"Lima Province"},latitude:-12.0460,longitude:-77.0306}, 
"20":{city:"Warsaw",country:{name:"Poland",code:"PL"},region:{name:"14",code:"14"},latitude:52.2334,longitude:21.0711}, 
"21":{city:"Singapore",country:{name:"Singapore",code:"SG"},region:{name:"Singapore",code:"Singapore"},latitude:1.3521,longitude:103.8198},
"22":{city:"Istanbul",country:{name:"Türkiye",code:"TR"},region:{name:"Istanbul",code:"Istanbul"},latitude:41.0064,longitude:28.9759}, 
"23":{city:"Ashburn",country:{name:"United States",code:"US"},region:{name:"Virginia",code:"VA"},latitude:39.0438,longitude:-77.4874},
"24":{city:"Atlanta",country:{name:"United States",code:"US"},region:{name:"Georgia",code:"GA"},latitude:33.7490,longitude:-84.3880},
"25":{city:"Portland",country:{name:"United States",code:"US"},region:{name:"Oregon",code:"OR"},latitude:45.5231,longitude:-122.6765},
"26":{city:"Chicago",country:{name:"United States",code:"US"},region:{name:"Illinois",code:"IL"},latitude:41.8500,longitude:-87.6500},
"27":{city:"Columbus",country:{name:"United States",code:"US"},region:{name:"Ohio",code:"OH"},latitude:39.9625,longitude:-83.0032},
"28":{city:"Dallas",country:{name:"United States",code:"US"},region:{name:"Texas",code:"TX"},latitude:32.7831,longitude:-96.8067},
"29":{city:"Los Angeles",country:{name:"United States",code:"US"},region:{name:"California",code:"CA"},latitude:34.0522,longitude:-118.2437},
"30":{city:"Miami",country:{name:"United States",code:"US"},region:{name:"Florida",code:"FL"},latitude:25.7743,longitude:-80.1937},
"31":{city:"New York City",country:{name:"United States",code:"US"},region:{name:"New York",code:"NY"},latitude:40.7143,longitude:-74.0060},
"32":{city:"San Jose",country:{name:"United States",code:"US"},region:{name:"California",code:"CA"},latitude:37.3382,longitude:-121.8863},
"33":{city:"Seattle",country:{name:"United States",code:"US"},region:{name:"Washington",code:"WA"},latitude:47.6062,longitude:-122.3321},
"34":{city:"Cape Town",country:{name:"South Africa",code:"ZA"},region:{name:"Western Cape",code:"Western Cape"},latitude:-33.9288,longitude:18.4172}, 
},
// Datacenter ID to location mapping
"295":"21",
"299":"23",
"302":"7",
"306":"26",
"332":"30",
"335":"26",
"337":"15",
"352":"5",
"359":"12",
"363":"23",
"365":"29",
"366":"23",
"369":"1",
"370":"29",
"372":"21",
"374":"30",
"375":"28",
"377":"15",
"378":"5",
"380":"29",
"383":"29",
"386":"23",
"387":"31",
"388":"18",
"390":"23",
"397":"29",
"401":"23",
"403":"29",
"404":"29",
"405":"29",
"412":"29",
"413":"29",
"414":"29",
"415":"29",
"416":"21",
"417":"21",
"418":"23",
"425":"15",
"426":"23",
"427":"23",
"428":"23",
"429":"29",
"430":"21",
"431":"33",
"432":"30",
"433":"30",
"434":"30",
"435":"29",
"436":"29",
"437":"6",
"438":"23",
"439":"23",
"440":"21",
"441":"21",
"442":"23",
"447":"29",
"448":"6",
"449":"7",
"450":"1",
"455":"21",
"456":"21",
"457":"5",
"458":"5",
"460":"33",
"462":"21",
"463":"26",
"464":"26",
"465":"21",
"468":"26",
"471":"1",
"472":"29",
"473":"23",
"474":"23",
"475":"23",
"476":"23",
"477":"23",
"478":"23",
"479":"23",
"480":"23",
"481":"23",
"482":"23",
"485":"23",
"486":"23",
"487":"26",
"488":"23",
"489":"23",
"490":"29",
"491":"23",
"493":"25",
"494":"25",
"495":"25",
"496":"25",
"497":"25",
"498":"27",
"499":"27",
"500":"27",
"501":"27",
"502":"27",
"503":"23",
"504":"23",
"505":"23",
"506":"23",
"507":"23",
"508":"23",
"509":"23",
"510":"23",
"511":"23",
"512":"5",
"513":"21",
"514":"21",
"515":"21",
"516":"21",
"517":"21",
"518":"12",
"519":"12",
"520":"12",
"521":"12",
"522":"12",
"523":"26",
"524":"18",
"525":"23",
"526":"23",
"527":"23",
"528":"23",
"529":"33",
"530":"23",
"531":"23",
"532":"23",
"533":"12",
"534":"12",
"535":"23",
"536":"23",
"537":"23",
"25492":"5",
"25494":"5",
"25495":"5",
"25496":"5",
"25497":"5",
"25502":"5",
"25506":"15",
"25507":"15",
"25508":"15",
"25509":"15",
"25510":"15",
"25512":"23",
"25513":"23",
"25514":"23",
"25515":"23",
"25516":"23",
"25517":"27",
"25518":"27",
"25519":"27",
"25520":"27",
"25521":"27",
"25522":"25",
"25523":"25",
"25524":"25",
"25525":"25",
"25526":"25",
"25527":"21",
"25528":"21",
"25529":"21",
"25531":"21",
"25532":"21",
"25535":"12",
"25536":"12",
"25537":"12",
"25538":"5",
"25543":"15",
"25544":"15",
"25545":"15",
"25546":"15",
"25547":"15",
"25548":"31",
"25774":"2",
"25775":"10",
"25776":"10",
"25777":"10",
"25778":"10",
"25779":"10",
"25781":"10",
"25782":"10",
"25783":"10",
"25784":"10",
"25785":"32",
"25787":"32",
"25788":"32",
"25789":"32",
"25790":"32",
"25791":"32",
"25792":"32",
"25793":"32",
"25794":"32",
"25795":"32",
"25796":"2",
"25798":"1",
"25804":"1",
"25805":"25",
"25806":"25",
"25808":"33",
"25809":"2",
"25810":"2",
"25811":"32",
"25813":"12",
"25814":"32",
"25817":"21",
"25818":"32",
"25819":"32",
"25820":"32",
"25821":"32",
"25822":"32",
"25823":"32",
"25825":"14",
"25826":"14",
"25827":"14",
"25828":"14",
"25829":"14",
"25830":"14",
"25832":"14",
"25833":"14",
"25834":"14",
"25835":"14",
"25836":"14",
"25837":"14",
"25838":"14",
"25839":"14",
"25840":"14",
"25841":"14",
"25842":"14",
"25843":"14",
"25844":"14",
"25845":"14",
"25846":"14",
"25847":"14",
"25848":"14",
"25849":"14",
"25850":"14",
"25851":"28",
"25853":"5",
"25854":"23",
"25861":"32",
"25862":"23",
"25865":"15",
"25866":"15",
"25868":"15",
"25869":"15",
"25870":"15",
"25871":"15",
"25872":"15",
"25873":"15",
"25874":"15",
"25875":"15",
"25876":"15",
"25877":"15",
"25878":"15",
"25879":"15",
"25880":"15",
"25881":"15",
"25882":"15",
"25883":"15",
"25884":"15",
"25885":"15",
"25886":"15",
"25887":"15",
"25888":"15",
"25889":"15",
"25890":"15",
"25891":"15",
"25892":"15",
"25893":"15",
"25894":"15",
"25895":"15",
"25896":"15",
"25897":"15",
"25898":"15",
"25899":"15",
"25900":"15",
"25905":"12",
"25906":"12",
"25908":"12",
"25909":"12",
"25910":"12",
"25912":"12",
"25913":"12",
"25914":"12",
"25915":"12",
"25916":"12",
"25917":"12",
"25918":"12",
"25919":"12",
"25920":"12",
"25921":"12",
"25924":"12",
"25925":"12",
"25926":"12",
"25928":"12",
"25929":"12",
"25930":"21",
"25931":"21",
"25932":"21",
"25933":"21",
"25934":"21",
"25935":"21",
"25936":"21",
"25937":"21",
"25938":"21",
"25939":"21",
"25940":"21",
"25941":"21",
"25942":"21",
"25943":"21",
"25944":"21",
"25945":"21",
"25946":"21",
"25947":"21",
"25948":"21",
"25949":"21",
"25950":"21",
"25951":"21",
"25952":"21",
"25953":"21",
"25954":"21",
"25955":"21",
"25956":"21",
"25957":"21",
"25958":"21",
"25960":"7",
"26016":"23",
"26020":"23",
"26021":"24",
"26030":"21",
"26032":"21",
"26033":"21",
"26034":"21",
"26035":"21",
"26036":"21",
"26037":"21",
"26040":"23",
"26041":"23",
"26048":"26",
"26049":"26",
"26050":"26",
"26051":"26",
"26052":"26",
"26053":"26",
"26054":"23",
"26056":"23",
"26057":"23",
"26059":"6",
"26060":"6",
"26061":"6",
"26062":"6",
"26063":"6",
"26064":"6",
"26067":"23",
"26068":"23",
"26069":"23",
"26074":"32",
"26075":"32",
"26077":"27",
"26078":"27",
"26079":"27",
"26080":"25",
"26081":"25",
"26083":"32",
"26084":"27",
"26085":"27",
"26086":"32",
"26087":"32",
"26088":"25",
"26090":"10",
"26092":"5",
"26093":"5",
"26094":"5",
"26095":"10",
"26096":"10",
"26097":"5",
"26098":"5",
"26099":"25",
"26120":"12",
"26123":"12",
"26125":"21",
"26127":"15",
"26129":"14",
"26132":"21",
"26138":"21",
"26142":"23",
"26143":"29",
"26144":"29",
"26147":"25",
"26148":"25",
"26149":"29",
"26152":"29",
"26153":"32",
"26157":"23",
"26164":"26",
"26165":"26",
"26179":"15",
"26184":"24",
"26194":"28",
"26210":"34",
"26211":"34",
"26228":"31",
"26257":"9",
"26259":"17",
"26261":"16",
"26263":"0",
"26265":"4",
"26267":"19",
"26322":"3",
"26324":"11",
"26326":"13",
"26328":"8",
"26330":"20",
"26332":"22",
"26334":"30"
};

window.getLocationForIp = function(ip) {
    const locationId = window.serverRegionsByIp[ip];
    if (locationId && window.serverRegionsByIp._locations[locationId]) {
        return window.serverRegionsByIp._locations[locationId];
    }
    return null;
};

window.getServerRegionsByIp = function() {
    const result = {};
    for (const [ip, locationId] of Object.entries(window.serverRegionsByIp)) {
        if (ip !== '_locations' && window.serverRegionsByIp._locations[locationId]) {
            result[ip] = window.serverRegionsByIp._locations[locationId];
        }
    }
    return result;
};
};