Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
NPC NPC Attach  

NPC Attach

Attach things to NPCs by script

Category: NPC
By : Thomas Ringate
Created: 2014-09-24 Edited: 2014-09-24
Worlds: OpenSim

the Zip file

Download all files for NPC Attach
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Script.lsl
1 //XEngine:lsl
2 string name = "NPC Mate test box ";
3 string version = "V2.2";
4 list avatars = [];
5 key victim = "aaefe00e-724a-4346-83df-92fa615b009f";
6 // NPC Genie - id - V2.2
7 //* Licensed under the GPLv2, with the additional requirement that these scripts remain "full perms".
8 //*
9 //
10
11 default
12 {
14 {
16 llSetObjectName(name + version);
17 else
19 }
21 {
22 llSay(0,"You touched me.");
23 avatars = osGetAvatarList(); // get list of avatars on region
24 llSay(0, "Avatars in this sim (without the owner): " +
25 llList2CSV(avatars));
26 victim = llList2Key(avatars,0);
27 if(osIsNpc(victim) == TRUE)
28 {
29 llSay(0, "Victim is Genie: " + victim);
30 osForceAttachToOtherAvatarFromInventory(victim, "testbox", ATTACH_PELVIS);
31 }
32 else
33 {
34 victim = llGetOwner();
35 llSay(0, "Victim is Avatar: " + victim);
36 osForceAttachToAvatarFromInventory("testbox", ATTACH_PELVIS);
37 }
38 //llSleep(5);
40 }
41 on_rez(integer iParam)
42 {
44 }
45 }

Back to the Best Free Tools in Second Life and OpenSim.