Advertisement
Guest User

Untitled

a guest
Apr 27th, 2015
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.87 KB | None | 0 0
  1. local url="http://roapi-slowki.rhcloud.com/"
  2. local http=game:GetService("HttpService")
  3.  
  4. local List=http:JSONDecode(http:GetAsync(url.."/Limiteds",true))
  5.  
  6. local Temp={}
  7.  
  8. local GetRAP = function(v)
  9.     local RAP=http:GetAsync(url.."/ItemRap?id="..v.id,true)
  10.     return {v.id,v.name,RAP}
  11. end
  12. local q=0
  13. if List then
  14.     for i,v in pairs(List) do
  15.         q=q+1
  16.         if q>=3 then
  17.             q=0
  18.             makeRoutine=true
  19.         end
  20.         if makeRoutine then
  21.             makeRoutine=false
  22.             coroutine.wrap(function()
  23.                 local RAP=GetRAP(v)
  24.                 table.insert(Temp,{v.id,v.name,RAP})
  25.             end)()
  26.         elseif not makeRoutine then
  27.             local RAP=GetRAP(v)
  28.             table.insert(Temp,{v.id,v.name,RAP})
  29.         end
  30.     end
  31. end
  32. print("local Limiteds={")
  33. for i,v in pairs(Limiteds) do
  34.     wait()
  35.     print(string.format([[  {
  36.         ['Id'] = ]]..v.Id..[[,
  37.         ['Name'] = %s]]..v.Name..[[%s,
  38.         ['RAP'] = ]]..v.RAP..[[,
  39.     },]],"[[","]]"))
  40. end
  41. print("}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement