Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Go to http://www.pushingbox.com/scenarios.php and find the DeviceID you want to trigger, then insert it here
- string devID = "xxxxxxxxxxxxxxxx";
- //Key used to identify HTTP request
- key requestID;
- default
- {
- state_entry()
- {
- //Call the url and store the HTTP request id
- requestID = llHTTPRequest("http://api.pushingbox.com/pushingbox?devid=" + devID, [], "");
- }
- http_response(key id, integer status, list metadata, string body)
- {
- //Check if it is the ID we are expecting
- if (id == requestID)
- {
- //If returned status is 200, the script successfully contacted the server
- if (status == 200)
- {
- llOwnerSay("Success!");
- }
- else
- {
- llOwnerSay("An error occured: " + body);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment