Advertisement
LPGhatguy

Untitled

Feb 6th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.71 KB | None | 0 0
  1. function full_request()
  2.     local response = do_request()
  3.     local bux_rate, tix_rate = response:match('<div class="Rate">([%d%.]+)/([%d%.]+)</div>')
  4.     local spread = response:match('<div class="Spread">([%d-]+)</div>')
  5.     local ticket_offers, robux_offers = {}, {}
  6.    
  7.     for amount, rate_from, rate_to in response:gmatch('<div class="CurrencyBid">.-([%d,]+).-@.-([%d%.]+):([%d%.]+).-</div>') do
  8.         table.insert(ticket_offers, {amount, rate_from, rate_to})
  9.     end
  10.  
  11.     for amount, rate_from, rate_to in response:gmatch('<div class="CurrencyOffer">.-([%d,]+).-@.-([%d%.]+):([%d%.]+).-</div>') do
  12.         table.insert(robux_offers, {amount, rate_from, rate_to})
  13.     end
  14.  
  15.     return bux_rate, tix_rate, spread, ticket_offers, robux_offers
  16. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement