GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - TimoKruth/RobloxSharp: C# API for performing automated tasks on ROBLOX.com

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
RobloxSharp
RobloxSharp
 
 
RobloxSharpTest
RobloxSharpTest
 
 
src/RobloxSharp
src/RobloxSharp
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
RobloxSharp.sln
RobloxSharp.sln
 
 
global.json
global.json
 
 

Repository files navigation

RobloxSharp

! Update !

I highly doubt this still works, as ROBLOX has surely changed their APIs since 20(14?). I'll leave this up as a testament to how you SHOULDN'T develop a wrapper for a Web API.

C# API for performing automated tasks on ROBLOX.com

Features

  • Login to get authentication cookies / tokens
  • Check messages and automate responses
  • Monitor trades and build trade responses / requests
  • Automatically purchase assets

Examples

Logging in

CookieContainer collection;
RobloxLogin login = new RobloxLogin("HomeguardDev", "hunter2", out collection);
String authCookies = login.authCookies;

The rest of the examples here will assume that you have already logged in and have authCookies stored

Getting all inbound trades

RobloxTradeHandler tradeHandler = new RobloxTradeHandler();
String XRSFToken = RobloxUtils.getXSRFToken(login.authCookies);
TradeList list = tradeHandler.fetchTrades(login.authCookies, XRSFToken, TradeType.Inbound, 0);
foreach (TradeSession tradeSession in list.Data)
{
  TradeDetailsData info = tradeHandler.getTradeInfo(tradeSession.TradeSessionID, XRSFToken, login.authCookies).data;
  Debug.WriteLine(RobloxUtils.getUsername(tradeSession.TradePartnerID).Username + " has an inbound trade with you!");
  TradeObject trade = RobloxUtils.makeTradeObject(info);
  Debug.WriteLine("They are offering:");
  foreach (InventoryItem item in trade.receiving.OfferList)
  {
    Debug.WriteLine("\t" + item.Name);
  }
  Debug.WriteLine("For your: ");
  foreach (InventoryItem item in trade.sending.OfferList)
  {
    Debug.WriteLine("\t" + item.Name);
  }
}

Accepting all trades above a certain RAP

int myId = RobloxUtils.getUserId("HomeguardDev").Id;
foreach (TradeSession tradeSession in list.Data)
{
  TradeDetailsData info = tradeHandler.getTradeInfo(tradeSession.TradeSessionID, XRSFToken, login.authCookies).data;
  Debug.WriteLine(RobloxUtils.getUsername(tradeSession.TradePartnerID).Username + " has an inbound trade with you!");
  TradeObject trade = RobloxUtils.makeTradeObject(info);
  if (trade.receiving.OfferValue > trade.sending.OfferValue) //accepts all trades where the receiving RAP is higher then your RAP
  {
    String json = tradeHandler.createTradeRequest(myId + "", tradeSession.TradePartnerID, trade);
    tradeHandler.sendTrade(TradeResponseType.Accept, json, XRSFToken, tradeSession.TradeSessionID, login.authCookies);
  }
}

Reading all inbound messages

RobloxMessageHandler messageHandler = new RobloxMessageHandler();
String XRSFToken = RobloxUtils.getXSRFToken(login.authCookies);
MessageCollection messages = messageHandler.getNewMessages("0", login.authCookies);
foreach (Message message in messages.Collection)
{
  Debug.WriteLine(message.Sender.UserName + "->" + message.Recipient.UserName + "\n" + message.Body);
}

Sending a message

RobloxMessageHandler messageHandler = new RobloxMessageHandler();
messageHandler.sendMessage(7904, "Hey Me!", "What's up?", login.authCookies);

Purchasing a limited item

RobloxPurchaseHandler purchase = new RobloxPurchaseHandler();
bool response = purchase.requestLimitedPurchase(1337, 123, 1000, login.authCookies); //1337 is assetID, 123 is userAssetOptionId, and 1000 is the price
Debug.WriteLine(response);

Purchasing an asset

RobloxPurchaseHandler purchase = new RobloxPurchaseHandler();
bool response = purchase.requestAssetPurchase(20642008, 40, CurrencyType.ROBUX, login.authCookies);
Debug.WriteLine(response);

About

C# API for performing automated tasks on ROBLOX.com

Resources

Readme
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.