string myText = " ***Touch to Unpack*** "; //Change to your own text
string sound = "ea2f955a-8114-903b-b0a7-b64ab89d7277"; // chaange to your own sound UUID
string sound2 = "4605a6af-2f4b-dfec-1c34-2fd15c807849"; // chaange to your own sound UUID
list gInventoryList;
list getInventoryList()
{
integer i;
integer j;
integer n = llGetInventoryNumber(INVENTORY_ALL);
list result = [];
string msg = "";
for( i = 0; i < n; i++ ) {
if (llGetInventoryName(INVENTORY_ALL, i) != llGetScriptName()) {
for (j = 0; j < n; j++) {
msg += "|";
}
llSetText("Unpacking...\n" + msg, <0.5, 0.5, 1.0>, 1.0);
result += [ llGetInventoryName(INVENTORY_ALL, i) ];
llSleep(0.1);
}
}
return result;
}
transporter()
{
// Particles Script by Alex Zatsepin 2019/14 V2
llParticleSystem([ PSYS_PART_MAX_AGE, 1.600000,
PSYS_PART_FLAGS, 259,
PSYS_PART_START_COLOR, <1.00000, 1.00000, 1.00000>,
PSYS_PART_END_COLOR, <1.00000, 1.00000, 1.00000>,
PSYS_PART_START_SCALE, <0.40000, 4.00000, 0.00000>,
PSYS_PART_END_SCALE, <0.10000, 0.10000, 0.00000>,
PSYS_SRC_PATTERN, 2,
PSYS_SRC_BURST_RATE,0.001000,
PSYS_SRC_ACCEL,<0.00000, 0.00000, 0.00000>,
PSYS_SRC_BURST_PART_COUNT,1,
PSYS_SRC_BURST_RADIUS,0.000000,
PSYS_SRC_BURST_SPEED_MIN,1.100000,
PSYS_SRC_BURST_SPEED_MAX,0.700000,
PSYS_SRC_INNERANGLE,3.141593,
PSYS_SRC_OUTERANGLE,6.283185,
PSYS_SRC_OMEGA,<0.00000, 0.00000, 0.00000>,
PSYS_SRC_MAX_AGE,0.000000,
PSYS_PART_START_ALPHA,0.000000,
PSYS_PART_END_ALPHA,1.000000,
PSYS_SRC_TEXTURE, "",
PSYS_SRC_TARGET_KEY,(key)"" ]);
}
default
{
on_rez(integer p)
{
llResetScript();
}
state_entry()
{
llSetAlpha(0.0, ALL_SIDES);
llSetText("", <1,1,1>, 1.0);
llTriggerSound(sound, 1.0);
transporter();
llSleep(1.5);
llParticleSystem([]);
llSetAlpha(1.0, ALL_SIDES);
llSetText(myText + "\n\n ", <1,1,1>, 1.0);
}
touch_start( integer n )
{
if (llGetOwner() == llDetectedKey(0)) {
integer i;
llSetText("Unpacking...", <1.0, 1.0, 1.0>, 1.0);
gInventoryList = getInventoryList();
for (i = 0; i < n; i++) {
llGiveInventoryList(llDetectedKey(i), llGetObjectName(), gInventoryList );
}
llSetAlpha(0.0, ALL_SIDES);
llTriggerSound(sound2, 1.0);
transporter();
llSleep(1.5);
llParticleSystem([]);
llDie();
}
}
changed( integer change )
{
if ( change & CHANGED_INVENTORY )
{ gInventoryList = getInventoryList();
}
if ( change & CHANGED_OWNER )
{ llResetScript();
}
}
}
Added by: AlexZatsepin
Last Update: 5 years ago
Project Category: Utilities