Top Free Scripts
Script ID : 43
Audience : Default
Version 1.00
Published Date: 2010/5/12 5:25:16
Reads : 9336
Texture

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_rezinteger sparam )
    {
        
llResetScript();
    }
    
    
state_entry() 
    {
        
llSetTimerEvent(time);
        
httpRequestId llHTTPRequest(URL "?" "sim" "=" llEscapeURL(llGetRegionName()),[], "");
    }
    
    
http_response(key request_idinteger status, list metadatastring body)
    {
        if (
request_id == httpRequestId
        {
            
mapTexture body;
            
llSetTexture(mapTextureALL_SIDES); //you can replace ALL_SIDES with a side number instead
        
}
    }
    
    
timer() 
    {
        
httpRequestId llHTTPRequest(URL "?" "sim" "=" llEscapeURL(llGetRegionName()),[], "");
    }
}

0
|  Links 
Printer Friendly Page Send this Script to a Friend
Search for Help
New Product
Free Item
Sponsor

Site Info
Total Hits