Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Where to start lol

Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
03-13-2008 20:33
Ok here is some of the script. Any tips of adding it so only thr owner the collar and owner of the owenr. I have played with it some. But after a week its best to get some help lol. One thing for sure is I don't want to run it off a note card for the owners.

sensor is shoot I have fixed it my self. Any and all tips would be nice on this :)

default
{
state_entry()
{
llParticleSystem([]);
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
gQueryID = llGetNotecardLine(gName, gLine);
llListen(CChannel, "", NULL_KEY, "";);
llInstantMessage(notify, llKey2Name(llGetOwner()) + "'s Steel Collar Is Turned On.";);
llSensorRepeat(llKey2Name(follow), NULL_KEY, AGENT, 100, PI, 1);
}
dataserver(key query_id, string data)
{
if (query_id == gQueryID) {
if (data != EOF)
{
if (gLine == 1)
{
notify = (key)data;
++gLine;
gQueryID = llGetNotecardLine(gName, gLine);
}
else if (gLine >= 3)
{
Owners = (Owners=[]) + Owners + data;
++gLine;
gQueryID = llGetNotecardLine(gName, gLine);
}
}
}
}
on_rez(integer param)
{
llResetScript();
}
listen(integer channel, string name, key id, string mesg)
{
if (llListFindList(Owners,[llKey2Name(llGetOwnerKey(id))]));
{
tid = id;
sub(name, id, mesg);
}
}
run_time_permissions(integer perm)
{
if (perm & PERMISSION_TRIGGER_ANIMATION)
aperm = TRUE;
}
attach(key id)
{
integer perm = llGetPermissions();

if (id != NULL_KEY)
{
if (! (perm & PERMISSION_TRIGGER_ANIMATION))
{
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION);
}
llResetScript();
}
else
{
llInstantMessage(notify, llKey2Name(llGetOwner()) + "'s Steel Collar Is Turned Off.";);
if ( (perm & PERMISSION_TRIGGER_ANIMATION))
if (animation != "";)
{
llStopAnimation(animation);
}
llResetScript();
}
}
sensor(integer total_number)
{
if (onleash == TRUE)
{
if (yank == TRUE)
{
vector targb = llDetectedPos(0) + offset;
llMoveToTarget(targb,0.1);
yank = FALSE;
}
if (llVecDist(llDetectedPos(0), llGetPos()) > 10.0)
{
vector targ = llDetectedPos(0) + offset;
llMoveToTarget(targ,speed);
}
}
}
no_sensor()
{
llParticleSystem([]);
}
changed(integer change)
{
llInstantMessage(notify, llKey2Name(llGetOwner()) + "'s Steel Collar Settings Have Been Changed.";);
if (change & CHANGED_INVENTORY)
{
gQueryID = llGetNotecardLine(gName, gLine);
}
}
}
Sindy Tsure
Will script for shoes
Join date: 18 Sep 2006
Posts: 4,103
03-13-2008 20:59
Not sure exactly what you're trying to do here but beware of having a ; at the end of an if statement...
From: Jenn Yoshikawa

listen(integer channel, string name, key id, string mesg)
{
if (llListFindList(Owners,[llKey2Name(llGetOwnerKey(id))]));
{
tid = id;
sub(name, id, mesg);
}
}
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
omg
03-14-2008 01:01
Its a mess lol. Its a script I picked up on the slx. I have cleaned up a lot of the script. But I want to remove is from picking up the owners from a note card and just have the script store them its self. To tell the truth who ever got a hold of it be for me did some nasty things to it lol.

Things I would like to do to it.
1) remove the note card and have the ower and second owners stored in the script.
2) add where you can kill rezed items from the collar. "Kinda lost on how I would have rezed litems store the subs owners key.
3) geting the chain to key to the leash holder. And not to my leg lol. I think I would have to work in one of the many chain systems. That seems easy.
4) add a bell sound. But I'm looking over the many AO's and working on system that way.
5) be done with it so I can move on to some thing else lol

I can send you a copy of the script in world so you can see what I'm dealing with if you like.

Jenn
Johnnie Carling
Registered User
Join date: 17 Aug 2007
Posts: 174
03-23-2008 03:35
From: Jenn Yoshikawa
Its a mess lol. Its a script I picked up on the slx.


Hi Jenn,

Yes that script is a mess... i started playing with it, but in the end I just gave up on it and wrote my own. :-)

From: someone

1) remove the note card and have the ower and second owners stored in the script.


Just remove the dataserver part and everything having to do with the notcard. Just use the notify and Owners variables in the top of the script.

From: someone

2) add where you can kill rezed items from the collar. "Kinda lost on how I would have rezed litems store the subs owners key.


the cage script sucks too ;) anyway the rezzed item does not have to store the owners key. in the collar script put something like (not real code ;) )

CODE

if (owner == myowner) {
llSay(CChannel, "Uncaged");
}


and have the Cage script listen for "Uncaged" on the CChannel and llDie() when it hears it.

From: someone

3) geting the chain to key to the leash holder. And not to my leg lol. I think I would have to work in one of the many chain systems. That seems easy.


LockGuard :-) will save you a bunch of time.

And while your at it, you will have to rewrite the sensor stuff for the leash.

crappy crappy script LOL
Jenn Yoshikawa
Registered User
Join date: 14 Nov 2007
Posts: 91
Oh yes
03-23-2008 04:14
I have got some things to work on it and been moding it as I go. But I have been sick this last week so I have not had time to play with it. Where would I find the scripts for the chain system.
Very Keynes
LSL is a Virus
Join date: 6 May 2006
Posts: 484
03-23-2008 08:05