A simple script that monitors roblox asynchronously without modifying and reading the game's client. This only works in MacOS
Project description
rbxmonitormac
A simple object oriented script that monitors roblox asynchronously without modifying and reading the game's client. This only works in MacOS
Installation
python3 -m pip install rbxmonitormac
Getting Started
Here are some examples on what can you do with this module.
Get the Info:
# Get the Place ID, Job ID and the type of the server
import rbxmonitor
monitor = rbxmonitor.MonitorSession()
@monitor.joinedGame()
async def joined(info : rbxmonitor.Game):
print(f"Player joined. Place ID: {info.placeid} Job ID: {info.jobid} Server Type: {info.servertype}")
"do actions"
@monitor.disconnected()
async def disconnect():
print("Player left the game")
"do actions"
monitor.run()
Monitor the player if it joins a game or disconnect.
# A simple script that monitors the player once he joins and disconnects
import rbxmonitor
monitor = rbxmonitor.MonitorSession()
@monitor.joinedGame()
def joinedgame(info : rbxmonitor.Game):
print("Player joined a game.")
print("Place ID:",info.placeid)
print("Job ID:",info.jobid)
print("Server",info.servertype)
@monitor.joinedGame(142823291) # This will execute if the player (you) joined the place id you provided
def joinedmm2(info : rbxmonitor.Game):
print("Player joined MM2")
print("Job ID:",info.jobid)
print("Server:",info.servertype)
@monitor.disconnected()
def disconnected():
print("Player disconencted")
monitor.run()
Run on a different thread to not block anything else from executing.
# A simple script that monitors Roblox on a different thread to disable blocking.
import rbxmonitor
monitor = rbxmonitor.MonitorSession()
@monitor.joinedPrivateServer(142823291)
def joinedprivatemm2(info : rbxmonitor.Game):
print("Player joined a private server")
monitor.runOnDiffThread()
print("look!")
Do a http request to get the name of the place id you joined
# A script that gets the name of the place id you joined. This uses asyncio and requests
# This will get the name of the game.
import aiohttp
import rbxmonitor
import json
monitor = rbxmonitor.MonitorSession()
async def getReq(session : aiohttp.ClientSession, url : str):
async with session.get(url=url) as response:
return await response.text()
async def getNameOfPlaceId(placeid : int):
async with aiohttp.ClientSession() as session:
universeid = json.loads(await getReq(session,f"https://apis.roblox.com/universes/v1/places/{placeid}/universe"))
name = json.loads(await getReq(session,f"https://games.roblox.com/v1/games?universeIds={universeid['universeId']}"))["data"][0]["name"]
return name
@monitor.joinedGame()
async def joined(info : rbxmonitor.Game):
name = await getNameOfPlaceId(info.placeid)
print(name)
monitor.run()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file macrbxmonitor-0.0.1.dev1.tar.gz.
File metadata
- Download URL: macrbxmonitor-0.0.1.dev1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
17fdc59e6fec054e26b90a9d06483276dacee1e9a6434ac684dc03bfd020d4f1
|
|
| MD5 |
e66f6f7f6035d7be7032064b5e3e52f1
|
|
| BLAKE2b-256 |
7004b571b488db8d77a743f431fd5f676a348516b30f0b263ec942dafceb74a8
|