I found this example online so I have been playing about with it, firstly swapping the URL for the OSGrid one:-
integer time = 86400; //update every 24 hours key httpRequestId; string mapTexture; string URL = "http://www.subnova.com/secondlife/api/map.php"; default { on_rez( integer sparam ) { llResetScript(); } state_entry() { llSetTimerEvent(time); httpRequestId = llHTTPRequest(URL + "?" + "sim" + "=" + llEscapeURL(llGetRegionName()),[], ""); } http_response(key request_id, integer status, list metadata, string body) { if (request_id == httpRequestId) { mapTexture = body; llSetTexture(mapTexture, ALL_SIDES); //you can replace ALL_SIDES with a side number instead } } timer() { httpRequestId = llHTTPRequest(URL + "?" + "sim" + "=" + llEscapeURL(llGetRegionName()),[], ""); } }
But the process seems to grind to a halt at "if (request_id == httpRequestId) "
Scoobs X
|