Difference between revisions of "User:Horrible Calamity"

From Second Life Wiki
Jump to navigation Jump to search
Line 2: Line 2:
I have been incarnated in several forms, mostly as Jana Kamachi and Coder Kas, with Horrible Calamity being the latest reincarnation both as my avatar and as a brand.
I have been incarnated in several forms, mostly as Jana Kamachi and Coder Kas, with Horrible Calamity being the latest reincarnation both as my avatar and as a brand.
Many of the things I've done in the past are now outdated, and if you were redirected to this page after following an old link, its because its no longer usable. Some of it may still be here as a historical reference.
Many of the things I've done in the past are now outdated, and if you were redirected to this page after following an old link, its because its no longer usable. Some of it may still be here as a historical reference.
__TOC__


=== Snippets ===
=== Snippets ===
Line 25: Line 28:
}
}
</lsl>
</lsl>
==== Avatar Profile Picture ====
This was a snippet I released almost 3 years ago and since then - with the great work of [[User:Moriash Moreau|Moriash Moreau]] and [[User:Debbie Trilling|Debbie Trilling]] - has been used in literally hundreds of items. Its a very simple snippet for getting the UUID of an avatars profile picture given an avatars key. The key use for it is personalization, allowing you to make more flexible products, like [https://www.xstreetsl.com/modules.php?name=Marketplace&file=item&ItemID=803480 fireworks], [https://xstreetsl.com/modules.php?name=Marketplace&file=item&ItemID=792405 projectors], [https://xstreetsl.com/modules.php?name=Marketplace&file=item&ItemID=594633 visitor boards], employee status boards, HUD's, and many more things. The original snippet posted in 2007 is as below:
<lsl>
string URL_RESIDENT =  "http://world.secondlife.com/resident/";
default
{
   
    touch_start(integer p){
        llHTTPRequest( URL_RESIDENT + (string)llDetectedKey(0),[HTTP_METHOD,"GET"],"");
    }
   
    http_response(key req,integer stat, list met, string body){
        llSetTexture((key)llGetSubString(body,llSubStringIndex(body,"<img alt=\"profile image\" src=\"http://secondlife.com/app/image/")+
            llStringLength("<img alt=\"profile image\" src=\"http://secondlife.com/app/image/"),llSubStringIndex(body,"\" class=\"parcelimg\" />")-3),ALL_SIDES);
    }
}
</lsl>
There have been several changes to the database since I wrote this, so I highly recommend you pick up Debbie's version [[Random_AV_Profile_Projector|here]].

Revision as of 10:11, 6 April 2010

About

I have been incarnated in several forms, mostly as Jana Kamachi and Coder Kas, with Horrible Calamity being the latest reincarnation both as my avatar and as a brand. Many of the things I've done in the past are now outdated, and if you were redirected to this page after following an old link, its because its no longer usable. Some of it may still be here as a historical reference.


Snippets

Various snippets for little things.

Ladders

This is a fun shape that, without requiring scripts or anything other than a single prim, allows you to walk 90˚ straight up. It can be used for making ladders and/or walkable walls. The 'best' size is 5m high and 1m wide, too high and you lose 'traction'. However, you can chain as many as you want to make a ladder straight into the sky.

Note: This is a bug, but it's been around for years and likely isn't going away anytime soon.

  1. Make a new prim
  2. Insert the following script, save, and run

<lsl> default {

   state_entry()
   {
       llSetPrimitiveParams([PRIM_TYPE, 1, 0, <0.0, 1.0, 0.0>, 0.0, <1.0, -1.0, 0.0>, <1.0, 1.0, 0.0>,
            <0.0, 0.0, 0.0>, PRIM_SIZE, <0.01, 1.0, 5.0>]);
       llRemoveInventory(llGetScriptName());
   }

} </lsl>

Avatar Profile Picture

This was a snippet I released almost 3 years ago and since then - with the great work of Moriash Moreau and Debbie Trilling - has been used in literally hundreds of items. Its a very simple snippet for getting the UUID of an avatars profile picture given an avatars key. The key use for it is personalization, allowing you to make more flexible products, like fireworks, projectors, visitor boards, employee status boards, HUD's, and many more things. The original snippet posted in 2007 is as below:

<lsl> string URL_RESIDENT = "http://world.secondlife.com/resident/"; default {

   touch_start(integer p){
       llHTTPRequest( URL_RESIDENT + (string)llDetectedKey(0),[HTTP_METHOD,"GET"],"");
   }
   
   http_response(key req,integer stat, list met, string body){
       llSetTexture((key)llGetSubString(body,llSubStringIndex(body,"<img alt=\"profile image\" src=\"http://secondlife.com/app/image/")+
           llStringLength("<img alt=\"profile image\" src=\"http://secondlife.com/app/image/"),llSubStringIndex(body,"\" class=\"parcelimg\" />")-3),ALL_SIDES);
   }

} </lsl>

There have been several changes to the database since I wrote this, so I highly recommend you pick up Debbie's version here.