integer sort; integer category; integer gate; string URL; string SimAddress; //the hypergrid address string SimName; //the destination region name string SimSnapshotURL; //URL of the photo string GridName; //name of the destination's grid string SimLocation; //Upper, middle or lower key httpkey; string body_retrieved; default { state_entry() { URL=llGetObjectDesc(); httpkey=llHTTPRequest(URL, [] ,""); } http_response(key id, integer status, list meta, string body) { body_retrieved = body; integer startindexI = llSubStringIndex(body,"")+16; integer endindexI = llSubStringIndex(body, "")-1; SimLocation = llGetSubString(body_retrieved, llSubStringIndex(body_retrieved,"")+15, llSubStringIndex(body_retrieved, "")-2); if (!(SimLocation == "Upper" || SimLocation == "Middle" || SimLocation == "Lower")) { httpkey=llHTTPRequest(URL, [] ,""); return; } string graphic_url = "http://www.hyperica.com/wp-content/themes/article-directory%20theme/scripts/timthumb.php?src=" + llGetSubString(body,startindexI, endindexI) + "&w=256"; string URLTexture = osSetDynamicTextureURL("", "image", graphic_url, "", 600); llSetTexture(URLTexture,ALL_SIDES); llSetTexture(TEXTURE_BLANK,1); llSetTexture(TEXTURE_BLANK,3); SimName = llGetSubString(body_retrieved, llSubStringIndex(body,"")+18, llSubStringIndex(body, "")-1); GridName = llGetSubString(body_retrieved, llSubStringIndex(body,"")+16, llSubStringIndex(body, "")-1); string CommandList = ""; CommandList = osMovePen( CommandList, 10, 155 ); CommandList += "FontSize 12;"; CommandList = osDrawText( CommandList, SimName+" on "+GridName ); osSetDynamicTextureDataBlendFace("", "vector", CommandList, "width:256,height:256", FALSE, 2, 0, 255, 1); osSetDynamicTextureDataBlendFace("", "vector", CommandList, "width:256,height:256", FALSE, 2, 0, 255, 3); llSetText(SimName+" on "+GridName, <1.0, 1.0, 1.0>, 1.0); } touch_start(integer number) { URL = llGetObjectDesc(); llOwnerSay("Looking up "+URL); httpkey=llHTTPRequest(URL, [] ,""); } }