generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: How to Set up Your Own "Web APIs" (Groups, Purchasing, etc.)

Previous Thread :: Next Thread 
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
19 Nov 2016 11:51 PM
tl;dr github/sentanos/roblox-js-server

I'm the creator of the "roblox-bots" project written in PHP. It's extremely old and messy and whenever I see someone use it I feel sick inside. I created roblox-js a while ago to replace it but didn't push for it because it was not polished enough. It has been a while but I've created a server that's actually for newbies to use: people misunderstood the roblox-bots was more for people who knew what they were doing.

I made the module itself first, which is open-source as always and available at the following github repo (and on npm under the same name):
github/sentanos/roblox-js

And I've put the finishing touches on a server setup in express that uses the module, complete with a lua module for people to contact it with:
github/sentanos/roblox-js-server
There are detailed instructions on setting up the server on a free host.

The roblox-js module has everything the roblox-bots module had and a lot more, usable in a much more straightforward way. It's a lot more reliable, giving you actual error messages and being kept updated with ROBLOX's constant web changes. There are tons of settings available to people, a cache to speed up requests, and modular utility functions which are exposed so people can do more with the module. Here is a list of the main functions, which execute major site actions:

buy --- buy an item, whether it be a t-shirt or limited
exile --- exile a user from a group
forumPost --- make a new thread on the forums or reply to an existing thread
getPlayers --- get a list of players in a group, optionally based on rank or whether or not they are online
handleJoinRequest --- accept or deny the join request of a player in a group
message --- PM a user
post --- make a wall post in a group
setRank --- change the rank of a user in a group
shout --- shout in a group
upload --- upload an asset to ROBLOX, either updating an existing one or creating a new one

Also someone post this on v3rm for me I know they are hungry for this stuff (main referrer for roblox-bots) but I don't feel like going over there.

Thanks, and for god's sake stop using roblox-bots and PHP they're absolutely dis.gusting I'm seriously doing all this to stop the agony of having to deal with people using 000webhost trying to set up something they don't understand
Report Abuse
TimeTicks is not online. TimeTicks
Joined: 27 Apr 2011
Total Posts: 27115
20 Nov 2016 12:19 AM
nice job.


Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
20 Nov 2016 11:32 AM
Bump
Report Abuse
Sevarm is not online. Sevarm
Joined: 23 Jul 2013
Total Posts: 83
20 Nov 2016 07:40 PM
ooo


Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
22 Nov 2016 07:41 PM
bmp
Report Abuse
ExecutionMode is not online. ExecutionMode
Joined: 12 Jan 2015
Total Posts: 380
22 Nov 2016 08:10 PM
thank u for this
Report Abuse
AggressiveCatch is not online. AggressiveCatch
Joined: 17 Jul 2011
Total Posts: 5840
22 Nov 2016 08:11 PM
"I'm seriously doing all this to stop the agony of having to deal with people using 000webhost trying to set up something they don't understand"

lmfao i was one of those clowns
Report Abuse
caca50 is not online. caca50
Joined: 10 Jul 2011
Total Posts: 2037
22 Nov 2016 08:13 PM
b


Roblox.Forum.Scripters:1: bad argument #1 to 'intellect' (number expected, got nil)
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
24 Nov 2016 01:57 PM
bb
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
26 Nov 2016 03:43 AM
roblox-js@2.1.0

+ Add groupPayout
+ Add clearSession
* Fix session_only setting being ignored
* Major fixes to cache system, including XCSRF caches
* Switch parser from whacko back to cheerio
* Better support for multiple logins on one jar file
- Remove getToken
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
01 Dec 2016 07:19 PM
b
Report Abuse
PheonixActual is not online. PheonixActual
Joined: 29 May 2010
Total Posts: 251
01 Dec 2016 09:29 PM
Genius
Report Abuse
wackeyhd5cool is online. wackeyhd5cool
Joined: 24 Nov 2010
Total Posts: 906
01 Dec 2016 09:42 PM
If I wished to create bots, do you think a good alternative to php could be rails?
Report Abuse
colbert2677 is not online. colbert2677
Joined: 28 Feb 2010
Total Posts: 1380
01 Dec 2016 09:42 PM
inb4 oder groups start using it.

Well, I mean it's cool, but watch everyone start using it. Lool.
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
01 Dec 2016 11:51 PM
@wackey Never worked with rails but probably. Further on in web programming I've started to really dislike PHP as I think it promotes messy work and gives you less power in deciding how to serve requests. Regardless, the reality is PHP is very much specialized for actual web requests where someone is trying to view a page and you want to have certain parts of it dynamically filled in while other languages may be more general but are just given some interface for outputting content. For bots your main focus isn't outputting to the user but having the server do work, so PHP is often going to be one of the worst options.
Report Abuse
colbert2677 is not online. colbert2677
Joined: 28 Feb 2010
Total Posts: 1380
02 Dec 2016 12:44 AM
Bump.
Report Abuse
colbert2677 is not online. colbert2677
Joined: 28 Feb 2010
Total Posts: 1380
02 Dec 2016 12:44 AM
b
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
02 Dec 2016 06:46 PM
ROBLOX BROKE THE LOGIN, TO UPDATE TO A WORKING VERSION FOLLOW THE INSTRUCTIONS HERE:
github/sentanos/roblox-js-server/issues/2#issuecomment-264600153

roblox-js@2.2.0
ROBLOX removed the login API I was using without warning. The reason I was using it was because it returned login info but I suppose I should not have depended on such an obscure API. It has been switched to a different API which should be a lot more reliable; however, I have been forced to make a major API change to the login function because it can no longer return user info. I've decided not to push to 3.0.0 (as would be required by semver following an API change that is not backwards compatible) but I will not do so because this is such a major patch and realistically not many people will depend on the return value of login.

My apologies for the inconvenience but there was very little I could do when ROBLOX doesn't inform anyone of an API change on their website.
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
03 Dec 2016 02:21 PM
roblox-js@2.2.1
The getPlayers file tries to force http but ROBLOX forces https back by redirecting it. It has been changed to https to halve the amount of requests it makes and should be a decent performance boost.
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
06 Dec 2016 07:23 PM
roblox-js@2.2.4

* Fix handleJoinRequest being unreliable
Report Abuse
Jradi is online. Jradi
Joined: 15 Aug 2012
Total Posts: 10015
06 Dec 2016 07:51 PM
What's the safety of the bots like?

I've heard exploiters (which can somehow do this?) can go into your game and PostRequests the data required and stuff and then literally rank themselves up in groups and stuff?

Idk if thats true - probably not but whats the safety/reliability like?


--// Chairman Jradi
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
06 Dec 2016 08:13 PM
If exploiters get a hold of your game's scripts it's possible for them to access the server. It's recommended you use FE but other than that there is no server-sided protection. You can add small stuff like a maximum rank on your own or go for more and add rate limiters to try and prevent admin attacking but because this server is meant as a base to build off of these things are not built in. I may add it if I have time.
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
06 Dec 2016 09:40 PM
I've added a "maximumRank" option in 1.1.0 which will limit users from being promoted above that rank and stop users from being demoted if their original rank is higher.
Report Abuse
Jradi is online. Jradi
Joined: 15 Aug 2012
Total Posts: 10015
07 Dec 2016 04:19 PM
Alright cheers

You could add a Unique Key which is set by the owner of the server and then have to use it on the client through a "getrequest" kinda thing where they have to have permissions within the group to get the unique key from the server and then use the unique key to do admin stuff

sorry if that doesn't make any sense


--// Chairman Jradi
Report Abuse
script_ing is not online. script_ing
Joined: 27 Apr 2011
Total Posts: 150
07 Dec 2016 04:32 PM
So how would I use this in a ROBLOX script using HttpService?
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image