Last active
August 29, 2021 13:14
-
-
Save at15four2020/c6c66e1c2da7e274dc53fc5f007550dd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getGameDataUrl(host) { | |
switch(host) { | |
case "game-nl.habbo.com": | |
return "https://www.habbo.nl/gamedata/"; | |
case "game-br.habbo.com": | |
return "https://www.habbo.com.br/gamedata/"; | |
case "game-tr.habbo.com": | |
return "https://www.habbo.com.tr/gamedata/"; | |
case "game-de.habbo.com": | |
return "https://www.habbo.de/gamedata/"; | |
case "game-fr.habbo.com": | |
return "https://www.habbo.fr/gamedata/"; | |
case "game-fi.habbo.com": | |
return "https://www.habbo.fi/gamedata/"; | |
case "game-es.habbo.com": | |
return "https://www.habbo.es/gamedata/"; | |
case "game-it.habbo.com": | |
return "https://www.habbo.it/gamedata/"; | |
case "game-s2.habbo.com": | |
return "https://sandbox.habbo.com/gamedata/"; | |
default: | |
return "https://www.habbo.com/gamedata/"; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof getGameDataUrl == 'undefined') load("https://gist.github.com/at15four2020/c6c66e1c2da7e274dc53fc5f007550dd/raw/getGameDataUrl.gprog.js") | |
function loadExternalFlashTexts() { | |
const url = getGameDataUrl(HOST) + "external_flash_texts/1" | |
const data = loadText(url) | |
return data | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof getGameDataUrl == 'undefined') load("https://gist.github.com/at15four2020/c6c66e1c2da7e274dc53fc5f007550dd/raw/getGameDataUrl.gprog.js") | |
function loadFurniData() { | |
const url = getGameDataUrl(HOST) + "furnidata_json/1" | |
const data = loadJson(url) | |
return data | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof loadFurniData == 'undefined') load("https://gist.github.com/at15four2020/c6c66e1c2da7e274dc53fc5f007550dd/raw/loadFurniData.gprog.js") | |
function loadFurniDataSimplified() { | |
const fullData = loadFurniData() | |
const roomitemtypes = { idToClassName: {}, classNameToId: {} } | |
const wallitemtypes = { idToClassName: {}, classNameToId: {} } | |
for (var key in fullData.roomitemtypes.furnitype) { | |
const item = fullData.roomitemtypes.furnitype[key] | |
roomitemtypes.idToClassName[item.id] = item.classname | |
roomitemtypes.classNameToId[item.classname] = item.id | |
} | |
for (var key in fullData.wallitemtypes.furnitype) { | |
const item = fullData.wallitemtypes.furnitype[key] | |
wallitemtypes.idToClassName[item.id] = item.classname | |
wallitemtypes.classNameToId[item.classname] = item.id | |
} | |
return { | |
roomitemtypes: roomitemtypes, | |
wallitemtypes: wallitemtypes, | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof getGameDataUrl == 'undefined') load("https://gist.github.com/at15four2020/c6c66e1c2da7e274dc53fc5f007550dd/raw/getGameDataUrl.gprog.js") | |
function loadProductData() { | |
const url = getGameDataUrl(HOST) + "productdata_json/1" | |
const data = loadJson(url) | |
return data | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment