Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function Chest(chest)
- chestID = chest
- end
- function Target(chest)
- if (not chestID) then
- error("A Cloud Chest has not been specified yet. First call Chest(id) where the id is your cx4 Chest key.")
- end
- return chestID
- end
- function Set(location, data)
- if (not chestID) then
- error("A Cloud Chest has not been specified yet. First call Chest(id) where the id is your cx4 Chest key.")
- end
- url = "http://boomtree.com/guid/" .. chestID .. ".cc?location=" .. location
- local ret = http.post(url, data)
- end
- function Get(location)
- url = "http://boomtree.com/guid/" .. chestID .. ".cc?location="..location
- loop = true
- http.request(url)
- event, returnurl, response = os.pullEvent()
- while loop == true do
- if event == "http_success" then
- return response.readAll()
- else
- return
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement