?

Log in

Second Life Creator's Guild's Journal
 
[Most Recent Entries] [Calendar View] [Friends]

Below are the 12 most recent journal entries recorded in Second Life Creator's Guild's LiveJournal:

Wednesday, February 16th, 2011
9:31 am
[hwc]
Chat Anonymizer

// Chat Anonymizer
// Simple script to anonymize anything said to it on a
// private channel.
// Copyright 2011 Hal Canary

// To use, drop this script into a prim.  Rez that prim
// on the ground or as an attachment.

// Licence Information:
//  Permission is hereby granted, free of charge, to any
//  person obtaining a copy of this software and
//  associated documentation files (the "Software"), to
//  deal in the Software without restriction, including
//  without limitation the rights to use, copy, modify,
//  merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom
//  the Software is furnished to do so, subject to the
//  following conditions:
//
//  The above copyright notice and this permission notice
//  shall be included in all copies or substantial
//  portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
//  ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
//  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
//  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
//  EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
//  FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
//  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
//  USE OR OTHER DEALINGS IN THE SOFTWARE.

integer chan = 5; // CHANGE THIS
string intro = "I will anonymize anything said on channel ";
string salt = "CsLY5jQ"; //CHANGE THIS

integer listen_handle;
default {
    state_entry() {
        llSay(0, intro + (string)chan+".");
        listen_handle = llListen(chan, "", "", "");
    }
    listen(integer channel, string name, key id,
            string message) {
        string origName = llGetObjectName(); 
        llSetObjectName(llGetSubString(
            llSHA1String(salt+name),0,8));
        llSay( 0, message);
        llSetObjectName( origName );
    }
}
Thursday, June 24th, 2010
6:05 pm
[thebigbadbutch]
I really need help
I have some super n00b questions about building in Second Life. Please help


keeping the dumb off your friends pageCollapse )
Tuesday, November 17th, 2009
9:06 am
[laura_seabrook]
What am I doing wrong

Here's a texture I created in PNG format using Fireworks for second life:

...and here's what I get when I upload it:

I don't know why it's semi-transparent. What am I doing wrong?

Thursday, June 25th, 2009
8:40 am
[copper_curls]
Sculpty n00b...
Well, pooh.

I want to make a claddagh ring to give as a opening/welcome gift at my store (http://slurl.com/secondlife/Creative%20Hearts/197/215/36; never pass an opportunity to plug...), and I was thinking to do it with prims, originally. However, I'm hitting the lower size limit when I try to make the heart; I haven't even thought about trying to make the hands or the crown yet.

So I thought, well I'll try doing it with scultpies; how hard can that be?

Oy.

I've got Wings 3D and the plugin to produce SL-compatible scuplty maps, but what I can't find is a good intro tutorial to Wings 3D. I *have* found quite a few people posting about Blender, and saying its much better than Wings 3D. I couldn't say one way or the other, myself.

Can anyone suggest software, tutorials, etc. to help me figure out this out, preferably as painlessly as possible? Thanks very much in advance.
Friday, February 13th, 2009
10:04 am
[laura_seabrook]
Murku HUD

There's a new HUD in beta called Murku, which can be used to directly created web comics while in Second life. Details are at the Murku Wiki, and the developer is looking for individuals to test the HUD for early feedback (contact details on the wiki).



Current Mood: creative
Sunday, September 21st, 2008
12:37 pm
[laura_seabrook]
Realistic Faces
Does anyone know of any tutorials for creating realistic faces? My first efforts of this (as shown in my own journal) are less than perfect!

Current Mood: curious
Sunday, September 7th, 2008
12:23 pm
[hwc]
Basic Vote Script

  1. Create a box with the following dimensions: <0.672, 0.672, 0.5>.

  2. Drop this script into it.

  3. Make several copies.




// Basic Vote Script
// Copyright 2008 Hal Canary
//
// Version 1.2, 2008-09-07
//
// License Information:
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of version 2 of the GNU General
//    Public License as published by the Free Software Foundation.
//
//    A copy of the license can be found at:
//        http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
//
//    This program is distributed in the hope that it will be
//    useful, but WITHOUT ANY WARRANTY; without even the implied
//    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//    PURPOSE.  See the GNU General Public License for more details.

// How to use this bad boy:
//    Rez any number of boxes next to each other.  If someone 
//    is unqualified to enter the race but clicks on a box
//    anyway, or has accidentally clicked on two boxes, just
//    delete the offending box and re-rez.
//
//    When the contest is over, just delete the boxes and re-rez.
//
//    Voters can vote for more than one candidate, but that just
//    dilutes their vote.

string contestant;
integer votes;
list voters;
integer VOTEMODE;

integer click(key dkey) {
    if (!VOTEMODE) {
        contestant = llKey2Name(dkey);
        llSay(0, contestant + " has entered the contest!");
        llHTTPRequest( "http://world.secondlife.com/resident/"
            + (string)dkey,[HTTP_METHOD,"GET"],"");
        llSetText("Touch me vote for\n"+contestant,<1,1,1>,1.0);
        VOTEMODE = TRUE;
        return 0;
    }
    string voter = llKey2Name(dkey);
    integer i;
    integer end = llGetListLength(voters);
    string test;
    for (i=0; i<end; i++) {
        test = llList2String(voters, i);
        if (test == voter) {
            llInstantMessage(dkey, "/me IMs: " + voter
                + ", you can't vote for the same contestant twice!"
                + "  Don't waste my time.");
            return 0;
        }
    }
    llSay(0, "Someone has just voted for " + contestant + "!");
    llInstantMessage(dkey, "/me IMs: " + voter 
        + ", you just voted for " + contestant + ".");
    votes = votes + 1;
    llSetText("Touch me vote for\n"+contestant+"\n("
        +(string)votes+")",<1,1,1>,1.0);
    voters = voters + [voter];
    return 0;        
}

default {
    state_entry() { // reset everything
        llSetText("Touch me to enter contest",<1,1,1>,1.0);
        VOTEMODE = FALSE;
        votes = 0;
        voters = [];
        llSetTexture("45c2b1e4-669c-5d64-7e09-1661cf68410a",ALL_SIDES);
    }
    touch_start(integer total_number) {
        integer n;
        for(n=0; n<total_number; n++) {
            click(llDetectedKey(n));
        }
    }
    http_response(key req,integer stat, list met, string body) {
        // based on code contributed by Jana Kamachi
        // http://wiki.secondlife.com/wiki/User:Jana_Kamachi/Profile
        integer stringindex = llSubStringIndex(body,
            "<img alt=\"profile image\" src=\"http://secondlife.com/app/image/");
        if (stringindex == -1) {
            return; // no profile iamge
        }
        llSetTexture((key)llGetSubString(
            body,
            stringindex+llStringLength(
            "<img alt=\"profile image\" src=\"http://secondlife.com/app/image/"),
            llSubStringIndex(body,"\" class=\"parcelimg\" />")-3)
            ,ALL_SIDES);
    }
}
Friday, September 5th, 2008
12:28 pm
[hwc]
Make a nice picture frame.
This one does the math so you don't have to.

// Change size of frame
// Simple script to make a frame around a rectangle using
// a single prim.
// Copyright 2008 Hal Canary

// Licence Information:
//  Permission is hereby granted, free of charge, to any
//  person obtaining a copy of this software and
//  associated documentation files (the "Software"), to
//  deal in the Software without restriction, including
//  without limitation the rights to use, copy, modify,
//  merge, publish, distribute, sublicense, and/or sell
//  copies of the Software, and to permit persons to whom
//  the Software is furnished to do so, subject to the
//  following conditions:
//
//  The above copyright notice and this permission notice
//  shall be included in all copies or substantial
//  portions of the Software.
//
//  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
//  ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
//  LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
//  FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO
//  EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
//  FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
//  AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
//  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
//  USE OR OTHER DEALINGS IN THE SOFTWARE.


// Set the x,y,w parameters based on the proper scale of
// the texture you have.  Then drag the script onto the
// prim.

default {
    state_entry() {
        float y = 2.000;        // width
        float x = y * 2 / 1;    // height
        float w = 0.200;        // frame width
        float z = 0.1;          // thickness

        llSetPrimitiveParams([PRIM_SIZE,
            <x + w + w, y + w + w, z>]);
        llSetPrimitiveParams([PRIM_TYPE,
            PRIM_TYPE_BOX,
            0, <0.0, 1.0, 0.0>, 
            0.0, <0.0, 0.0, 0.0>,
            <x/(x+w+w), y/(y+w+w), 0.0>,
            <0.0, 0.0, 0.0>]);
        llSay(0, "Frame resized!");
        llRemoveInventory(llGetScriptName());
    }
}
Thursday, September 4th, 2008
8:50 am
[hwc]
Group URL Generator
See Viewer URL Namespace for more info on this weird secondlife: URL scheme.
// Group SLURL Generator.
//
// To use, create a new prim and set the group to
// the desired group. Then drop this script into
// the object.

// Gen_grp_URL function written 2008 by Hal Canary.
// Dedicated to the Public Domain.
string gen_grp_url() {
    key group = llList2Key(llGetObjectDetails(
        llGetKey(),[OBJECT_GROUP]),0);
    return "secondlife:///app/group/"
        + (string)group + "/about/";
}

// the rest written 2008 by Hal Canary.
// Dedicated to the Public Domain.
default {
    state_entry() {
        llOwnerSay(gen_grp_url());
    }
    touch_start(integer total_number) {
        llOwnerSay(gen_grp_url());
    }
}
8:23 am
[hwc]
transparentify object/prim invisible
This one does the whole object:
// a simple script to make an object
// 100% transparent, then deletes itself.
// Dedicated to the public domain.
default {
    state_entry() {
        llSetLinkAlpha(LINK_SET, 0.0, ALL_SIDES);
        llRemoveInventory(llGetScriptName());
    }
}

And this one does a single prim:
// a simple script to make a prim 100%
// transparent, then deletes itself.
// Dedicated to the public domain.
default {
    state_entry() {
        llSetAlpha(0.0, ALL_SIDES);
        llRemoveInventory(llGetScriptName());
    }
}

<rant>
I'm sure that everyone these days knows how transparency and color work with images/textures in SL. Images have four channels---red, blue, green, and alpha, where alpha is the level of transparency. Each side of a prim has a texture and a color, which gets multiplies together to make the resulting color.

Consequently, there are two ways to make a 100% transparent object: One can create a 100% transparent texture using an image editor, upload it to the Asset Server, then use that texture anywhere you want transparency. Or one can use a script to set the transparency of the prim to 100% and leave the texture blank.

The second method has several advantages:

1) It reduces load on the Asset Server.
2) It saves Linden Labs hard drive space. Think of how many separate 100% transparent textures have been uploaded by how many users!
3) The object will appear transparent much faster---no waiting for the texture to download.
4) Saves work on the client side. Once the client sees that one variable is set to fully transparent, there is no need to do any rendering. If it has to look at an entire image looking for non-transparent pixels, that will take more time.

Number 3 is the important one for me. How many times have you seen a great big gray orb hanging in front of an avatar's face---a face lamp---because you were waiting to download a texture that is just going to tell the client not to render the orb in the first place!
</rant>
8:20 am
[hwc]
SLURL Generator
Info on the secondlife: URI scheme
// SLURL Generator.
// SLURL Generator.
// To use, put this script inside an invisible
// prim, then attach and detach it.

// str_replace Function licensed under CC-by v3.0 license
//   http://creativecommons.org/licenses/by/3.0/
// From http://wiki.secondlife.com/wiki/Combined_Library
string str_replace(string src, string from, string to)
{//replaces all occurrences of 'from' with 'to' in 'src'.
  integer len = (~-(llStringLength(from)));
  if(~len)
  {
    string  buffer = src;
    integer b_pos = -1;
    integer to_len = (~-(llStringLength(to)));
    @loop;//instead of a while loop, saves 5 bytes (and run faster).
    integer to_pos = ~llSubStringIndex(buffer, from);
    if(to_pos)
    {
      // b_pos -= to_pos;
      // src = llInsertString(llDeleteSubString(src, b_pos, b_pos + len),
      //  b_pos, to);
      // b_pos += to_len;
      // buffer = llGetSubString(src, (-~(b_pos)), 0x8000);
      buffer = llGetSubString(src = llInsertString(
        llDeleteSubString(src, b_pos -= to_pos, b_pos + len), b_pos, to), 
        (-~(b_pos += to_len)), 0x8000);
      jump loop;
    }
  }
  return src;
}

// Gen_SLURL function written 2008 by Hal Canary.
// Dedicated to the Public Domain.
string gen_slurl() {
  vector position = llGetPos();
  string slurlbit = str_replace(llGetRegionName( )," ","%20")
    + "/" + (string)((integer)position.x)
    + "/" + (string)((integer)position.y)
    + "/" + (string)((integer)position.z) + "/" ;
  //return "http://slurl.com/secondlife/" + slurlbit ;
  return "secondlife://" + slurlbit ;
}

// the rest written 2008 by Hal Canary.
// Dedicated to the Public Domain.
default {
  state_entry() {
    llOwnerSay(gen_slurl());
  }
  attach(key id) {
    llOwnerSay(gen_slurl());
  }
  touch_start(integer total_number) {
    llOwnerSay(gen_slurl());
  }
}


Alternativly,

How to turn a Landmark into a Slurl:
1) Right-click the LM in your inventory.
2) Choose "About Landmark" from the context menu.
3) In the landmark description window, click "Show on Map."
4) When the World Map window shows up, click "Copy SLURL to clipboard."
5) Use Ctrl-v to paste it anywhere.

How to create a Slurl for your current avatar position:
1) Open the World Map (Ctrl-m).
2) Click "Copy SLURL to clipboard."
3) Use Ctrl-v to paste it anywhere.
8:12 am
[hwc]
Treasure Chest Script
I wrote this one for a friend of mine.

// Open Sesame Treasurechest script for SL.
// Copyright 2008 Hal Canary
// 2008-08-31 04:13:32 lsl2 script
//
// Licence Information:
//    This program is free software; you can redistribute it and/or
//    modify it under the terms of version 2 of the GNU General
//    Public License as published by the Free Software Foundation.
//
//    A copy of the licence can be found at:
//        http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
//
//    This program is distributed in the hope that it will be
//    useful, but WITHOUT ANY WARRANTY; without even the implied
//    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
//    PURPOSE.  See the GNU General Public License for more details.


string open = "open";       // secret password
string give = "Block";      // name of thing to give
integer chan = 0;           // channel to listen of (0 == open chat)

// Make sure that the inventory of the object containing this script
// has the thing that is supposed to be given.

default {
    state_entry() {
        integer listen_handle;
        listen_handle = llListen(chan, "", "", open);
    }

    touch_start(integer total_number) {
        llSay(0, "What's the password?");
    }
    
    listen( integer channel, string name, key id, string message ) {
        llGiveInventory(id, give);
    }
}
About LiveJournal.com