Scripts Request
-
- Posts: 85
- Joined: Thu May 30, 2013 1:11 pm
- Has thanked: 10 times
- Been thanked: 23 times
Scripts Request
I've been searching awhile and can't seem to find what I need...so I'm asking here.
Do you have or know where I can get scripts (with instructions!) for:
-- NOTE - And for the record, I'm looking for scripts that actually work in opensim and in kitely. I've attempted 50 damn scripts from OS grid forums and not a single one of them work "out of the box"...and I'm not a scripter so I can't figure out why it won't work. So please make suggestions based on scripts that will actually work and don't require me to go back to college for 4 years to take advanced math to figure out how to set them up, thanks.
1. operable flashlight - with on/off switch
2. run into something, get killed, immediately automatically sent somewhere on or off sim specific
3. in case it's different from 2, script in creature, creature runs into you, you die, take damage til 0/death, and/or sent somewhere in particular
4. password to open - for boxes, doors, windows, etc.
5. gun that shoots bullets, bullets automatically disappear, bullets hitting objects takes damage, object vanishes; avi takes hit, takes damage, dies, sent elsewhere
6. vehicle on track (or path?) pre "programmed" to go so all you do is ride and can start/stop/shift speeds
7. public rezzer for vehicles that do 6 - basically visitor rezzes vehicle, can take it along the route, the vehicle vanishes when they get out - both on pre programmed path and where they'd take it
8. NPC chatbots (and if it's possible to make them different from each other that would be helpful. I don't want a bunch of clones of my avi wearing the same thing...I am looking for unique npc characters or instructions on how to make them myself so they're different
EXTRA CREDIT -
I created a game in SL years ago I want to resurrect. I found one of the scripts but can't get it to work in Kitely and I don't know why.
Object is physical and can be moved. Object is moved from one bin and placed in another bin, which gives the player points. The object being placed in the bin changes the score hovering over the bin showing the points earned from putting object in bin. Multiple objects per starting/winning bin to be moved and placed, and per two teams so the scripts can't be global or else they'll conflict with each's score.
I don't know what the name of the supporting scripts would be called but that's what I had and I've been trying to get it working. It's not happening. I'm requesting assistance from nice scripters who wouldn't mind helping a girl out.
Thanks in advance if anyone answers and can point me in the right direction on where I can get these.
Also - where would I go to learn how to make a hud and make it interact with objects?
Do you have or know where I can get scripts (with instructions!) for:
-- NOTE - And for the record, I'm looking for scripts that actually work in opensim and in kitely. I've attempted 50 damn scripts from OS grid forums and not a single one of them work "out of the box"...and I'm not a scripter so I can't figure out why it won't work. So please make suggestions based on scripts that will actually work and don't require me to go back to college for 4 years to take advanced math to figure out how to set them up, thanks.
1. operable flashlight - with on/off switch
2. run into something, get killed, immediately automatically sent somewhere on or off sim specific
3. in case it's different from 2, script in creature, creature runs into you, you die, take damage til 0/death, and/or sent somewhere in particular
4. password to open - for boxes, doors, windows, etc.
5. gun that shoots bullets, bullets automatically disappear, bullets hitting objects takes damage, object vanishes; avi takes hit, takes damage, dies, sent elsewhere
6. vehicle on track (or path?) pre "programmed" to go so all you do is ride and can start/stop/shift speeds
7. public rezzer for vehicles that do 6 - basically visitor rezzes vehicle, can take it along the route, the vehicle vanishes when they get out - both on pre programmed path and where they'd take it
8. NPC chatbots (and if it's possible to make them different from each other that would be helpful. I don't want a bunch of clones of my avi wearing the same thing...I am looking for unique npc characters or instructions on how to make them myself so they're different
EXTRA CREDIT -
I created a game in SL years ago I want to resurrect. I found one of the scripts but can't get it to work in Kitely and I don't know why.
Object is physical and can be moved. Object is moved from one bin and placed in another bin, which gives the player points. The object being placed in the bin changes the score hovering over the bin showing the points earned from putting object in bin. Multiple objects per starting/winning bin to be moved and placed, and per two teams so the scripts can't be global or else they'll conflict with each's score.
I don't know what the name of the supporting scripts would be called but that's what I had and I've been trying to get it working. It's not happening. I'm requesting assistance from nice scripters who wouldn't mind helping a girl out.
Thanks in advance if anyone answers and can point me in the right direction on where I can get these.
Also - where would I go to learn how to make a hud and make it interact with objects?
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
I assume you've tried the scripts here? http://www.outworldz.com/cgi/freescripts.plx
6. I have a touring "flying chariot" that moves between locations but can't be paused at present (though that would be nice). You get the general idea here: https://vimeo.com/113786968
7. A rezzing station is on the cards. However, I have no intention of turning it into a vehicle and it will take a little work to make it a product.
8. Ohn Lang's NPC kit is available from the world called Stuff (to the left of the entrance to the mall). NPCs can move, be animated and chat (no AI) by means of a notecard added to their rezzing prim. Their appearance is based on a notecard created from your own avatar's appearance when the NPC is created.
6. I have a touring "flying chariot" that moves between locations but can't be paused at present (though that would be nice). You get the general idea here: https://vimeo.com/113786968
7. A rezzing station is on the cards. However, I have no intention of turning it into a vehicle and it will take a little work to make it a product.
8. Ohn Lang's NPC kit is available from the world called Stuff (to the left of the entrance to the mall). NPCs can move, be animated and chat (no AI) by means of a notecard added to their rezzing prim. Their appearance is based on a notecard created from your own avatar's appearance when the NPC is created.
- Keith Selmes
- Posts: 175
- Joined: Fri Jan 04, 2013 1:13 pm
- Location: Devon, UK
- Has thanked: 174 times
- Been thanked: 153 times
- Contact:
Re: Scripts Request
On 5 and 6, I can't provide any scripts that work as required, there may not be any, although there probably will be in the near future.
As general comments on what to look for:
5. gun that shoots bullets
Best not shoot actual physical bullets, doesn't work well in OpenSim, and probably not at all with Bulletsim (ironically!)
It's also heavy on system resources.
See what Kayaker Magic is doing with raytracing, that's probably the way to go.
http://www.kitely.com/forums/viewtopic.php?f=26&t=2263
6. vehicle on track (or path?) pre "programmed"
Use keyframing. Simple examples here http://wiki.secondlife.com/wiki/LlSetKeyframedMotion
Vehicles will be phantom, but as they are on a preplanned course, they shouldn't collide with anything, so it's OK.
The Wiki says you can't use them as attachments, but in practice I find avatars can sit on them as driver or passenger, so it should be just the right thing. Thus far I have only done this successfully in straight lines, I have yet to do bends or hills.
I think Kayaker Magic has also done a lot more with this. I don't know if anyone else has.
As general comments on what to look for:
5. gun that shoots bullets
Best not shoot actual physical bullets, doesn't work well in OpenSim, and probably not at all with Bulletsim (ironically!)
It's also heavy on system resources.
See what Kayaker Magic is doing with raytracing, that's probably the way to go.
http://www.kitely.com/forums/viewtopic.php?f=26&t=2263
6. vehicle on track (or path?) pre "programmed"
Use keyframing. Simple examples here http://wiki.secondlife.com/wiki/LlSetKeyframedMotion
Vehicles will be phantom, but as they are on a preplanned course, they shouldn't collide with anything, so it's OK.
The Wiki says you can't use them as attachments, but in practice I find avatars can sit on them as driver or passenger, so it should be just the right thing. Thus far I have only done this successfully in straight lines, I have yet to do bends or hills.
I think Kayaker Magic has also done a lot more with this. I don't know if anyone else has.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
Yes, I use keyframing for the chariot but only simple stuff like yourself.
Keith Selmes wrote: 6. vehicle on track (or path?) pre "programmed"
Use keyframing. Simple examples here http://wiki.secondlife.com/wiki/LlSetKeyframedMotion
Vehicles will be phantom, but as they are on a preplanned course, they shouldn't collide with anything, so it's OK.
The Wiki says you can't use them as attachments, but in practice I find avatars can sit on them as driver or passenger, so it should be just the right thing. Thus far I have only done this successfully in straight lines, I have yet to do bends or hills.
I think Kayaker Magic has also done a lot more with this. I don't know if anyone else has.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
I've never done anything with damage before but it might be useful in the future so here is a first attempt at a script to go in a prim with which the avatar collides. I found some odd effects with llSetDamage, most notably that the prim containing it disappeared when my avatar collided with it! (PS OK, further research shows this is normal) However, this wasn't entirely reproducible. My attempts with the OSSL equivalents work "sort-of". The main issue seems to be that the avatar heals automatically -- you can see the health increment. If anyone knows why, do enlighten. Anyway, this code will eventually tp your avatar to KWC (KWC being always on) instead of the default, the avatar's home world. I stuck in some backing-off time in case multiple collisions were an issue (PS that could be gamed).
Note that this code assumes multiple sequential collisions required to reduce health below 10%. Not quite what Serenity asked for.
PS I have tested with both ODE and Bullet -- Bullet restores health more slowly but the effect is much the same. Maybe this behaviour is normal
Note that this code assumes multiple sequential collisions required to reduce health below 10%. Not quite what Serenity asked for.
PS I have tested with both ODE and Bullet -- Bullet restores health more slowly but the effect is much the same. Maybe this behaviour is normal

Code: Select all
float gDamage = 10.0;
integer gDamageEnabled = TRUE;
default
{
state_entry()
{
gDamageEnabled = TRUE;
}
changed(integer change)
{
if (change & CHANGED_REGION_START)
{
gDamageEnabled = TRUE;
}
}
collision_start(integer num)
{
//works in 10% decrements
key id = llDetectedKey(0);
float health = osGetHealth(id);
if ((health <= gDamage) && (gDamageEnabled == TRUE))
{
osCauseHealing(id, 100.0);
osTeleportAgent(id, "Kitely Welcome Center", <130, 130, 24>, <0, 0, 0>);
}
else
{
osCauseDamage(id, gDamage);
gDamageEnabled = FALSE;
llSetTimerEvent(2.0);//backing-off time
}
}
timer()
{
gDamageEnabled = TRUE;
llSetTimerEvent(0.0);
}
}
Last edited by Graham Mills on Fri Jan 09, 2015 8:57 am, edited 2 times in total.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
I've forwarded to Serenity a very basic flashlight that can be switched on and off.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
The door script is something I might find useful as well so I modified an existing one (source shown in the first line of the code).
You need to change the password and channel (CHAN) values. At the moment typing /5init will open the door and it will close after 5 sec.
It's unlikely the script is in a perfect state for your needs but it should get you started on what needs fixing. I tend to use Handy Low's scripts from the Market for opening and closing stuff.
PS you will need to delete or comment out (preface line with//) the code block starting with touch_end to prevent touch being used to open the door.
You need to change the password and channel (CHAN) values. At the moment typing /5init will open the door and it will close after 5 sec.
It's unlikely the script is in a perfect state for your needs but it should get you started on what needs fixing. I tend to use Handy Low's scripts from the Market for opening and closing stuff.
PS you will need to delete or comment out (preface line with//) the code block starting with touch_end to prevent touch being used to open the door.
Code: Select all
//modified from http://wiki.secondlife.com/wiki/LlSetKeyframedMotion
string password = "init";
integer CHAN = 5;
float angleEnd=PI_BY_TWO;
float speed=2; // m/S
float steps=8.0; // number of Key Frames
float step=0.0;
list KFMlist=[];
vector V;
integer open=TRUE;
vector basePos;
rotation baseRot;
float gDelay = 5.0;
float motion_time( float mt)
{
mt = llRound(45.0*mt)/45.0;
if ( mt > 0.11111111 ) return mt;
else return 0.11111111;
}
opendoor()
{
llSetKeyframedMotion( [], []);
if ( open )
{
llSetPrimitiveParams([PRIM_POSITION, basePos, PRIM_ROTATION, baseRot]);
llSetKeyframedMotion( KFMlist, []);
}
else
{
llSetKeyframedMotion( KFMlist, [KFM_MODE, KFM_REVERSE]);
}
open = !open;
}
default
{
state_entry()
{
llListen(CHAN, "", NULL_KEY, password);
llSetMemoryLimit(0x2000);
llSetPrimitiveParams([PRIM_PHYSICS_SHAPE_TYPE, PRIM_PHYSICS_SHAPE_CONVEX]);
basePos = llGetPos();
baseRot = llGetRot();
vector v1 = 0.5*llGetScale()*llGetRot();
rotation deltaRot = llEuler2Rot(< 0.0, angleEnd/steps, 0.0>);
while ( step < steps )
{
V = v1*llAxisAngle2Rot(llRot2Left(llGetRot()), angleEnd*step/steps);
V = v1*llAxisAngle2Rot(llRot2Left(llGetRot()), angleEnd*(step+1.0)/steps) - V;
KFMlist += [V, deltaRot, motion_time(llVecMag(V)/speed)];
step += 1.0;
}
}
listen(integer c, string name, key id, string msg)
{
if ((c == CHAN) && (msg == password))
{
opendoor();
llSetTimerEvent(gDelay);
}
}
timer()
{
opendoor();
llSetTimerEvent(0.0);
}
touch_end( integer n) //delete
{
opendoor(); //delete
} //delete
on_rez( integer n) { llResetScript(); }
}
Last edited by Graham Mills on Thu Jan 08, 2015 4:50 pm, edited 1 time in total.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
Aaron Griffiths (developer for Hinatore world) made a nice HUD tutorial for the Educator group meetup. I don't think it's available anywhere but he may be persuaded to rez it for you if you ask him.
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
Excuse my ignorance of damage/gaming. Automatic health regain is the norm apparently and llSetDamage is working entirely as expected.
I have to say that having the OSSL equivalents makes the system more flexible. However, it would be good to be able to switch off or otherwise vary the health regain on the world's dashboard given that there is an OSSL command for healing. I am thinking of incorporating damage into some kind of scoring system. Maybe Kitely could add switch-off as an option?
I have to say that having the OSSL equivalents makes the system more flexible. However, it would be good to be able to switch off or otherwise vary the health regain on the world's dashboard given that there is an OSSL command for healing. I am thinking of incorporating damage into some kind of scoring system. Maybe Kitely could add switch-off as an option?
Graham Mills wrote:I've never done anything with damage before but it might be useful in the future so here is a first attempt at a script to go in a prim with which the avatar collides. I found some odd effects with llSetDamage, most notably that the prim containing it disappeared when my avatar collided with it! (PS OK, further research shows this is normal) However, this wasn't entirely reproducible. My attempts with the OSSL equivalents work "sort-of". The main issue seems to be that the avatar heals automatically -- you can see the health increment. If anyone knows why, do enlighten. Anyway, this code will eventually tp your avatar to KWC (KWC being always on) instead of the default, the avatar's home world. I stuck in some backing-off time in case multiple collisions were an issue (PS that could be gamed).
Note that this code assumes multiple sequential collisions required to reduce health below 10%. Not quite what Serenity asked for.
PS I have tested with both ODE and Bullet -- Bullet restores health more slowly but the effect is much the same. Maybe this behaviour is normal![]()
-
- Posts: 1314
- Joined: Sun Dec 23, 2012 2:26 pm
- Has thanked: 1134 times
- Been thanked: 1142 times
Re: Scripts Request
I may be wrong (total novice) but I think bullets do work with BulletSim although you are probably right about the system load. There's a miniature cannon on a toy ship at the start of Micrographia that fires balls that generate damage using the OSSL commands as previously. Get in the way of sufficient of them and they will presently tp you back to the Kitely Welcome Center (I'll change that to the world's landing point in due course). Using damage to signify positive and negative developments during a journey through a world is an interesting idea.
Keith Selmes wrote:On 5 and 6, I can't provide any scripts that work as required, there may not be any, although there probably will be in the near future.
As general comments on what to look for:
5. gun that shoots bullets
Best not shoot actual physical bullets, doesn't work well in OpenSim, and probably not at all with Bulletsim (ironically!)
It's also heavy on system resources.
See what Kayaker Magic is doing with raytracing, that's probably the way to go.
http://www.kitely.com/forums/viewtopic.php?f=26&t=2263