We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My apologies for listing this under issues, but is there any way to export the coords of any specific monster for an offline project?
The text was updated successfully, but these errors were encountered:
All the data is here:
https://github.com/mejrs/data_rs3 (note that the npc data is rather out of date).
The files/folders of interest are the npcids folder, npc_morph_collection and npc_name_collection.
You can use a script like
import concurrent.futures, urllib.request, json, itertools GAME = "rs3" # or "osrs" def load_url(url, timeout = 10000): with urllib.request.urlopen(url, timeout=timeout) as conn: return json.loads(conn.read()) def load_location(id, timeout = 10000): try: with urllib.request.urlopen(f"https://mejrs.github.io/data_{GAME}/npcids/npcid={id}.json", timeout=timeout) as conn: return json.loads(conn.read()) except urllib.error.HTTPError as e: return [] def get_positions_names(names): name_mapping = load_url(f"https://mejrs.github.io/data_{GAME}/npc_name_collection.json") ids = itertools.chain(*(name_mapping[name] for name in names if name in name_mapping)) return get_positions_ids(ids) def get_positions_ids(ids): morph_mapping = load_url(f"https://mejrs.github.io/data_{GAME}/npc_morph_collection.json") all_ids = itertools.chain(*(morph_mapping.get(id, []) + [id] for id in ids)) with concurrent.futures.ThreadPoolExecutor(max_workers=100) as executor: results = executor.map(load_location, all_ids) return itertools.chain(*results) if __name__ == "__main__": data = get_positions_names(["Man"]) print(list(data))
to print/process the data
Sorry, something went wrong.
No branches or pull requests
My apologies for listing this under issues, but is there any way to export the coords of any specific monster for an offline project?
The text was updated successfully, but these errors were encountered: