I found a script in here to which I added a tiny piece of code just to make the shoe rez 1m above the rezzing object. However, the new shoe rezzes in exactly the same place as the old one, without deleting it. I found llDie but that seems to work on the rezzing object, not the rezzed one. How do I tell the rezzer to delete the existing object before rezzing a new one please?
Deleting the previous object is my main concern at the moment, but I'd also like to refine the script in a few ways, if it's not too difficult (for me! lol):
a) I would like only one person at a time to be able to use any particular rezzer (there could be maybe 12 of them in the store) and for it to be locked to anyone else until the first person hasn't touched it for say 1 minute;
b) As there will be so many rezzers, I realise they will all have to be on different channels but I probably don't want them all listening all the time, do I? I see there's a thread today about using a timer event for this but I don't know how to incorporate that into the script I'm using;
c) The last thing, and this is really me being a perfectionist
I'd like to set a "default" colour for each rezzer and for the rezzer to replace the object rezzed by a customer with that default after a certain period of inactivity, say 5 mins.This is the script as it stands at the moment:
list MENU1 = [];
list MENU2 = [];
integer listener;
integer MENU_CHANNEL = 1000;
Dialog(key id, list menu)
{
llListenRemove(listener);
listener = llListen(MENU_CHANNEL, "", NULL_KEY, ""
;
llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
}
default
{
on_rez(integer num)
{
llResetScript();
}
touch_start(integer total_number)
{
integer i = 0;
MENU1 = [];
MENU2 = [];
integer c = llGetInventoryNumber(INVENTORY_OBJECT);
if (c <= 12)
{
for (; i < c; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
}
else
{
for (; i < 11; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
if(c > 22)
c = 22;
for (; i < c; ++i)
MENU2 += llGetInventoryName(INVENTORY_OBJECT, i);
MENU1 += ">>";
MENU2 += "<<";
}
Dialog(llDetectedKey(0), MENU1);
}
listen(integer channel, string name, key id, string message)
{
if (channel == MENU_CHANNEL)
{
llListenRemove(listener);
if (message == ">>"
{
Dialog(id, MENU2);
}
else if (message == "<<"
{
Dialog(id, MENU1);
}
else
{
vector vec = llGetPos() + < 0.0, 0.0, 1.0>; // 1 meter above this
llRezAtRoot(message, vec, ZERO_VECTOR, llGetRot(), 0);
}
}
}
}
list MENU2 = [];
integer listener;
integer MENU_CHANNEL = 1000;
Dialog(key id, list menu)
{
llListenRemove(listener);
listener = llListen(MENU_CHANNEL, "", NULL_KEY, ""
;llDialog(id, "Select one object below: ", menu, MENU_CHANNEL);
}
default
{
on_rez(integer num)
{
llResetScript();
}
touch_start(integer total_number)
{
integer i = 0;
MENU1 = [];
MENU2 = [];
integer c = llGetInventoryNumber(INVENTORY_OBJECT);
if (c <= 12)
{
for (; i < c; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
}
else
{
for (; i < 11; ++i)
MENU1 += llGetInventoryName(INVENTORY_OBJECT, i);
if(c > 22)
c = 22;
for (; i < c; ++i)
MENU2 += llGetInventoryName(INVENTORY_OBJECT, i);
MENU1 += ">>";
MENU2 += "<<";
}
Dialog(llDetectedKey(0), MENU1);
}
listen(integer channel, string name, key id, string message)
{
if (channel == MENU_CHANNEL)
{
llListenRemove(listener);
if (message == ">>"

{
Dialog(id, MENU2);
}
else if (message == "<<"

{
Dialog(id, MENU1);
}
else
{
vector vec = llGetPos() + < 0.0, 0.0, 1.0>; // 1 meter above this
llRezAtRoot(message, vec, ZERO_VECTOR, llGetRot(), 0);
}
}
}
}
If anyone has the patience to explain this to me, I'd appreciate it

Thanks!
Isobel
