diff options
author | onefang | 2019-06-30 11:16:41 +1000 |
---|---|---|
committer | onefang | 2019-06-30 11:16:41 +1000 |
commit | 1e5b49a55b7ebd03c6e57be993668f38ac20f841 (patch) | |
tree | 5cabe2fdc2e51e46bcb6f5ca5ce5110b5be3bdb0 /onefang's leash holder.lsl | |
parent | Line wrapping is a thing, but not in notecards. (diff) | |
download | 1ring-1e5b49a55b7ebd03c6e57be993668f38ac20f841.zip 1ring-1e5b49a55b7ebd03c6e57be993668f38ac20f841.tar.gz 1ring-1e5b49a55b7ebd03c6e57be993668f38ac20f841.tar.bz2 1ring-1e5b49a55b7ebd03c6e57be993668f38ac20f841.tar.xz |
Include the actual source code this time.
Diffstat (limited to '')
-rw-r--r-- | onefang's leash holder.lsl | 44 |
1 files changed, 44 insertions, 0 deletions
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 @@ | |||
1 | integer mychannel = -8888; | ||
2 | integer particle_chan = -270510; | ||
3 | string listenfor; | ||
4 | string response; | ||
5 | string detach; | ||
6 | |||
7 | key masterid; | ||
8 | key handle; | ||
9 | |||
10 | default | ||
11 | { | ||
12 | state_entry() | ||
13 | { | ||
14 | masterid = llGetOwner(); | ||
15 | handle = llGetKey(); | ||
16 | listenfor = (string)masterid + "handle"; | ||
17 | response = (string)masterid + "handle ok"; | ||
18 | detach = (string)masterid + "handle detached"; | ||
19 | llListen(mychannel, "", NULL_KEY, listenfor); | ||
20 | llSay(mychannel, response); | ||
21 | } | ||
22 | |||
23 | attach(key id) | ||
24 | { | ||
25 | if (NULL_KEY == id) | ||
26 | llSay(mychannel, detach); | ||
27 | } | ||
28 | |||
29 | listen(integer channel, string name, key id, string message) | ||
30 | { | ||
31 | llSay(mychannel, response); | ||
32 | llSay(particle_chan, handle + "#" + masterid); | ||
33 | } | ||
34 | |||
35 | on_rez(integer param) | ||
36 | { | ||
37 | llResetScript(); | ||
38 | } | ||
39 | |||
40 | touch_start(integer total_number) | ||
41 | { | ||
42 | llSay(particle_chan, handle + "#" + masterid); | ||
43 | } | ||
44 | } | ||