AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 29 Dec 2015 11:21 AM |
function getName(id) --Get the name of a place from the place id local httpService = game:GetService("HttpService") --Get the http service local recieved = httpService:GetAsync("http://rproxy.pw/games/"..id.."/Auto-Scripter",true) --Give it a known place name with a different ID, redirecting to the new place local numberFoundTitleFirst = string.find(recieved,"title") --Try find the word title in the large string we recieved recieved = string.sub(recieved,numberFoundTitleFirst) --String.sub it to make sure if have all text up to the word title removed local numberFoundROBLOXFirst = string.find(recieved,"ROBLOX") --Look for the word ROBLOX local placeName = string.sub(recieved,7,numberFoundROBLOXFirst-3) --String.sub again from 7(title>) until ROBLOX appears, -3 (Which accounts for ' - ' inbetween the name and the word) return(placeName) --Return the name end print(getName(318574526)) --Get the name of a place
There is probably a more efficient way to do this, and it won't work if the place has the word 'ROBLOX' in the title, but I couldn't find a way on the Wiki so I fiddled with HttpService until it worked!
-____________________________- |
|
|
| Report Abuse |
|
| |
AkaLua
|
  |
| Joined: 27 Jul 2012 |
| Total Posts: 526 |
|
|
| 29 Dec 2015 01:50 PM |
GetProductInfo?
-____________________________- |
|
|
| Report Abuse |
|