Who Is Online

2
Online

Wednesday, 22 November 2017 21:53

Get Region Map

Displays map image of current sim on prim & updates every 24 hours.

 

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()),[], "");
    }
}

 

Flash Scratch to SL - Your Scripting Tool

Script ImageNeed to write a LSL script and don't know how to script?  I know I hate trying to get my head around LSLS when I an in a time crunch. So why not give Flash Scratch a try! Its a great tool for learning and scoding your own scripts for Second Life without having to pay someone to do it and without a crash course in LSL

A Huge thanks to John Bennet of ATLAS Institute at University of Colorado and Eric Rosenbaum at MIT for writing Scratch for SL to begin with.

Read more: Flash Scratch to SL - Your Scripting Tool