Skip to content

Commit e623fb5

Browse files
committed
add oc_update_seed
1 parent 8a25662 commit e623fb5

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

src/spares/oc_update_seed.lsl

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// This file is part of OpenCollar.
2+
// Copyright (c) 2017 nirea Resident.
3+
// Licensed under the GPLv2. See LICENSE for full details.
4+
5+
// This script can be used to upgrade a 6.6/6.7 collar to the official release from the OpenCollar group.
6+
// To use, do the following:
7+
// 1. Rez the OpenCollar Updater nearby.
8+
// 2. Wear your 6.6/6.7 collar.
9+
// 3. Edit your 6.6/6.7 collar and drop this script inside it.
10+
// The update will begin immediately.
11+
12+
integer g_iUpdateChan = -7483213;
13+
14+
default
15+
{
16+
state_entry() {
17+
llOwnerSay("Initializing update.");
18+
llListen(g_iUpdateChan, "", "", "");
19+
llWhisper(g_iUpdateChan, "UPDATE|6.0");
20+
llSetTimerEvent(30);
21+
}
22+
23+
listen(integer channel, string name, key id, string msg) {
24+
if (llGetOwnerKey(id) != llGetOwner()) return;
25+
if (llSubStringIndex(msg, "-.. ---|") == 0) { // why morse code? sigh. Let's keep things readable, people.
26+
llOwnerSay("Updater found. Beginning update!");
27+
integer pin = (integer)llFrand(99999998.0) + 1; //set a random pin
28+
llSetRemoteScriptAccessPin(pin);
29+
llRegionSayTo(id, g_iUpdateChan, "ready|" + (string)pin );
30+
llRemoveInventory(llGetScriptName());
31+
}
32+
}
33+
34+
timer() {
35+
// if we haven't gotten started by now, clean ourself up
36+
llRemoveInventory(llGetScriptName());
37+
}
38+
}

0 commit comments

Comments
 (0)