Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rbxmonitormac-0.0.1.dev1.tar.gz (5.0 kB view details)

Uploaded Source

File details

Details for the file rbxmonitormac-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: rbxmonitormac-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for rbxmonitormac-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 911ebd680dedb44ac1d461d8a1adb7de7922c5033b901e08e983bea7f9bf2baf
MD5 1455bd2bc324707ff85a99bc4bc08962
BLAKE2b-256 8133dd7d69f9b11594612b91bb8bbeb2984f9c7f92c5cfac3a8bf63038edd888

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page