Projects » gaver box for a grid only

// Content giver script by Alex Zatsepin 2019/14 V4
// by the Arcadia Family

//Usage: Drop this script, the objects you want to give in the box and that's it.
// The script will give all except itself in a neato folder named after the prim's name
// so for extra tidyness... name your box, or the client will end with a zillion
// "Primitive" folders D=.

// Giving Particles
vector start_scale_2 = <0.5, 0.5, 0.00000>;
vector start_color_2 = <1,1,1>;
float start_alpha_2 = 1.0;
float speed_min_2 = 0.0;
float speed_max_2 = 0.04;
float source_max_age_2 = 1.2;
float particle_max_age_2 = 2;
vector omega_2 = <0,0,0>;
vector end_scale_2 = <0.3, 0.3, 0.3>;
vector end_color_2 = <1,1,1>;
float end_alpha_2 = 0.0;
float burst_rate_2 = 0.0;
float burst_radius_2 = 0.15;
integer burst_particle_count_2 = 5;
float angle_end_2 = 0;
float angle_begin_2 = 0;
vector acceleration_2 = <0,0,0>;

//Change this texture for whatever you want, this one is the UUID of the logo of my store.

key texture_2 = "4b1f7a31-2bdf-4c15-bc7c-cc2afcce7e7d";

Zap()
{
llParticleSystem
([
PSYS_PART_FLAGS,
PSYS_PART_EMISSIVE_MASK|
PSYS_PART_INTERP_COLOR_MASK|
PSYS_PART_INTERP_SCALE_MASK|
PSYS_PART_TARGET_POS_MASK|
PSYS_PART_TARGET_LINEAR_MASK,
PSYS_SRC_PATTERN,
PSYS_SRC_PATTERN_ANGLE,
PSYS_SRC_BURST_RADIUS,burst_radius_2,
PSYS_SRC_ANGLE_BEGIN,angle_begin_2,
PSYS_SRC_ANGLE_END,angle_end_2,
PSYS_PART_START_COLOR,start_color_2,
PSYS_PART_END_COLOR, end_color_2,
PSYS_PART_START_ALPHA, start_alpha_2,
PSYS_PART_END_ALPHA, end_alpha_2,
PSYS_PART_START_SCALE, start_scale_2,
PSYS_PART_END_SCALE, end_scale_2,
PSYS_SRC_MAX_AGE,source_max_age_2,
PSYS_PART_MAX_AGE,particle_max_age_2,
PSYS_SRC_BURST_RATE,burst_rate_2,
PSYS_SRC_BURST_PART_COUNT,burst_particle_count_2,
PSYS_SRC_ACCEL,acceleration_2,
PSYS_SRC_OMEGA,omega_2,
PSYS_SRC_TEXTURE, texture_2,
PSYS_SRC_BURST_SPEED_MIN,speed_min_2,
PSYS_SRC_BURST_SPEED_MAX,speed_max_2,
PSYS_SRC_TARGET_KEY, llDetectedKey(0)
]);
}

default
{
state_entry()
{
llParticleSystem([]);
}
touch_start(integer total_number)
{
list inventory;
string name;
integer num = llGetInventoryNumber(INVENTORY_ALL);
integer i;
for (i = 0; i < num; ++i)
{
name = llGetInventoryName(INVENTORY_ALL, i);
inventory += name;
}
i = llListFindList(inventory, [llGetScriptName()]);
inventory = llDeleteSubList(inventory, i, i);
if (llGetListLength(inventory) < 1)
{
llInstantMessage(llDetectedKey(0), "The box is empty.");
}
else
{
string nameclicker = llDetectedName(0);
list ishg = llParseString2List(nameclicker,[" "],"");
if (llGetSubString(llList2String(ishg,1),0,0) == "@")
{
llInstantMessage(llDetectedKey(0), "This item is exclusive for Virtual Dream GRID, local accounts are free!");
}
else
{
Zap();
llGiveInventoryList(llDetectedKey(0), llGetObjectName(), inventory);
llInstantMessage(llDetectedKey(0), "Delivering your items...");
llInstantMessage(llGetOwner(), llDetectedName(0) + " has bought: " + llGetObjectName());
}
}
}
}

Added by: AlexZatsepin
Last Update: 4 years ago
Project Category: Utilities
👍 1 like

Code

File name Added By Last Updated Actions


Comments

what does this script do?
like(0)
This script only gives to local avatars, it will not give to a HG avatar ..
like(0)