Basically what I am doing is having a giver script check a config card for settings then do them or not do them if the card says false. I have hit another brick wall though. I got it set to read if I want sound using true or false. Get the sound UUID code, etc... But for some reason it is ignoring my true or false on whether I want particles and is just doing them no matter what I say. Like a 2 year old without nap. lol I have read ever webpage and wiki I can find on it and I am still not understand why it is ignoring me.


Also can anyone give me a direction on how to make this so they can only click once? I tried a few things I found along the way through reading in the wiki, etc... but I can't seem to wrap my brain around what I am doing wrong there. I was just making a mess of it. lol
Thanks for your time to read and help!

Holly
My script is as follow:
CODE
string cardName;
string GREET;
string SORRYGROUP;
string SOUND;
integer SOUNDON;
integer PARTICLE;
integer groupOnly; // or = FALSE to make default not group-only
integer NotecardLine;
key QueryID;
integer setnote = 00;
key notecardId;
// Gives inventory object only to agents with the same active group
default
{
on_rez(integer param)
{
llResetScript();
}
state_entry()
{
llOwnerSay("Initializing...");
cardName = llGetInventoryName(INVENTORY_NOTECARD, setnote);
notecardId = llGetInventoryKey (llGetInventoryName(INVENTORY_NOTECARD, setnote));
if (llGetInventoryType(cardName) == INVENTORY_NOTECARD)
{
NotecardLine = 0;
QueryID = llGetNotecardLine(cardName, NotecardLine );
}
else
{
llOwnerSay("Configuration notecard missing, using defaults.");
}
}
dataserver( key queryid, string data )
{
list temp;
string name;
string value;
if ( queryid == QueryID )
{
if ( data != EOF )
{
if ( llGetSubString(data, 0, 0) != "#" && llStringTrim(data, STRING_TRIM) != "" )
{
temp = llParseString2List(data, ["="], []);
name = llStringTrim(llToLower(llList2String(temp, 0)), STRING_TRIM);
value = llStringTrim(llList2String(temp, 1), STRING_TRIM);
if ( name == "greet" )
{
GREET = (string)value;
}
else if ( name == "sorrygroup" )
{
SORRYGROUP = (string)value;
}
else if ( name == "sound" )
{
SOUND = (string)value;
}
else if (name == "grouponly")
{
if (value == "0" || value == "false" || value == "no")
{
groupOnly = FALSE;
}
else
{
groupOnly = TRUE;
}
}
else if (name == "soundon")
{
if (value == "0" || value == "false" || value == "no")
{
SOUNDON = FALSE;
}
else
{
SOUNDON = TRUE;}
}
else if (name == "particle")
{
if (value == "0" || value == "false" || value == "no")
{
PARTICLE= FALSE;
}
else
{
PARTICLE= TRUE;
}
}
}
NotecardLine++;
QueryID = llGetNotecardLine(cardName, NotecardLine );
}
else
{
state Running;
}
}
}
state_exit()
{
llOwnerSay("Initialization Complete!");
}
}
state Running
{
touch_start(integer total_number)
{
integer i;
for (i = 0; i < total_number; i++)
{
if (!groupOnly || llSameGroup(llDetectedKey(i))== TRUE)
{
llSay(0,(string)GREET);
llGiveInventory(llDetectedKey(i), llGetInventoryName(INVENTORY_OBJECT, 0));
}else
{
llSay(0,(string)SORRYGROUP);
}
if (SOUNDON == TRUE)
{
llTriggerSound((string)SOUND, 2.0);
if (PARTICLE == TRUE);
llParticleSystem([ // Texture Parameters:
PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0),
PSYS_PART_START_SCALE, <0.0, 1, FALSE>, PSYS_PART_END_SCALE, <1, 1, FALSE>,
PSYS_PART_START_COLOR, <1.00,1.00,1.00>, PSYS_PART_END_COLOR, <1.00,1.00,1.00>,
PSYS_PART_START_ALPHA, (float) 0.1, PSYS_PART_END_ALPHA, (float) 3.0,
// Production Parameters:
PSYS_SRC_BURST_PART_COUNT, (integer) 2,
PSYS_SRC_BURST_RATE, (float) 0.5,
PSYS_PART_MAX_AGE, (float) 5.0,
// PSYS_SRC_MAX_AGE, (float) 5.00,
// Placement Parameters:
PSYS_SRC_PATTERN, (integer) 2, // 1=DROP, 2=EXPLODE, 4=ANGLE, 8=CONE,
// Placement Parameters (for any non-DROP pattern):
PSYS_SRC_BURST_SPEED_MIN, (float) 00.5, PSYS_SRC_BURST_SPEED_MAX, (float) 00.5,
PSYS_SRC_BURST_RADIUS, (float) 00.1,
// Placement Parameters (only for ANGLE & CONE patterns):
PSYS_SRC_ANGLE_BEGIN, (float) 0.40 * PI, PSYS_SRC_ANGLE_END, (float) 0.00 * PI,
// PSYS_SRC_OMEGA, <00.00, 00.00, 00.00>,
// After-Effect & Influence Parameters:
PSYS_SRC_ACCEL, < 00.00, 00.00, - 00.1>,
// PSYS_SRC_TARGET_KEY, (key) llGetLinkKey(llGetLinkNum() + 1),
PSYS_PART_FLAGS, (integer) ( 0 // Texture Options:
| PSYS_PART_INTERP_COLOR_MASK
| PSYS_PART_INTERP_SCALE_MASK
| PSYS_PART_EMISSIVE_MASK
| PSYS_PART_FOLLOW_VELOCITY_MASK
// After-effect & Influence Options:
// | PSYS_PART_WIND_MASK
| PSYS_PART_BOUNCE_MASK
// | PSYS_PART_FOLLOW_SRC_MASK
// | PSYS_PART_TARGET_POS_MASK
// | PSYS_PART_TARGET_LINEAR_MASK
)
//end of particle settings
]);
llSleep(0.25);//sleep for a quarter of a second
llParticleSystem([]);//empty particle system turns the particles off
}
}
}
changed (integer mask)
{
if (mask & CHANGED_INVENTORY)
{
if (notecardId != llGetInventoryKey(llGetInventoryName(INVENTORY_NOTECARD, setnote)))
{
llSay (0, "config changed! resetting!!");
llResetScript();
}
}
}
}
Notecard states:
month=11
day=14
greet=hellothere 1
grouponly= true
sorry= wrong day
sorrygroup= not in my group
particle= false
soundon= True
sound= e7ff1054-003d-d134-66be-207573f2b535