From 1e5b49a55b7ebd03c6e57be993668f38ac20f841 Mon Sep 17 00:00:00 2001 From: onefang Date: Sun, 30 Jun 2019 11:16:41 +1000 Subject: Include the actual source code this time. --- onefang's leash holder.lsl | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 onefang's leash holder.lsl (limited to 'onefang's leash holder.lsl') diff --git a/onefang's leash holder.lsl b/onefang's leash holder.lsl new file mode 100644 index 0000000..6d7b360 --- /dev/null +++ b/onefang's leash holder.lsl @@ -0,0 +1,44 @@ +integer mychannel = -8888; +integer particle_chan = -270510; +string listenfor; +string response; +string detach; + +key masterid; +key handle; + +default +{ + state_entry() + { + masterid = llGetOwner(); + handle = llGetKey(); + listenfor = (string)masterid + "handle"; + response = (string)masterid + "handle ok"; + detach = (string)masterid + "handle detached"; + llListen(mychannel, "", NULL_KEY, listenfor); + llSay(mychannel, response); + } + + attach(key id) + { + if (NULL_KEY == id) + llSay(mychannel, detach); + } + + listen(integer channel, string name, key id, string message) + { + llSay(mychannel, response); + llSay(particle_chan, handle + "#" + masterid); + } + + on_rez(integer param) + { + llResetScript(); + } + + touch_start(integer total_number) + { + llSay(particle_chan, handle + "#" + masterid); + } +} -- cgit v1.1