11-28-2014, 07:53 AM
Unpacker+ Delivery Confirmation+join Group Script
.This script "unpacker" has many options
* Text floating fully adaptable
* The product name, version
* Name of creator
* Product description
* Change the touch text , message of self-destruction
*Unpacks on rez, or touch
*Unpack for owner only or everyone
* After unpacking is destroyed (if you activate it)
*Change unpack message
* Send information about who has rez
* As soon as your items will be unpacked you will receive a message in the local chat "the name of your article and the name of the person the rez"
* The person who rez the article will receive a message in the local chat to join your group
* There is nothing you can not change in this script. You can enable and disable features that you want
* All is explained in the script
Unpacker+ Delivery Confirmation+join group Script
hope you like and Enjoy :)
hit the thank you and the rep button if you Copy or download
.This script "unpacker" has many options
* Text floating fully adaptable
* The product name, version
* Name of creator
* Product description
* Change the touch text , message of self-destruction
*Unpacks on rez, or touch
*Unpack for owner only or everyone
* After unpacking is destroyed (if you activate it)
*Change unpack message
* Send information about who has rez
* As soon as your items will be unpacked you will receive a message in the local chat "the name of your article and the name of the person the rez"
* The person who rez the article will receive a message in the local chat to join your group
* There is nothing you can not change in this script. You can enable and disable features that you want
* All is explained in the script
Unpacker+ Delivery Confirmation+join group Script
PHP Code:
///////////////////////////////////////////////////////////////////
//
// Unpacker+ Delivery Confirmation+join group Script
//
///////////////////////////////////////////////////////////////////
//
// USE THIS SCRIPT IN YOUR PRODUCTS THAT YOU WANT TO SELL,
// BUT IN THAT CASE YOU NEED TO SET PERMISSIONS ON THIS SCRIPT TO:
// [NO MODIFY & NO COPY] OR [NO MODIFY & NO TRANSFER]
// DO NOT SELL THIS SCRIPT AS INDIVIDUAL SCRIPT,
// ONLY AS PART OF YOUR PRODUCTS
//
///////////////////////////////////////////////////////////////////
integer delivery = 0;
///////////////////// CONFIGURATION //////////////////
key your_uuid = "00000000-0000-0000-0000-000000000000"; // type your key UUID here
string PRODUCT_NAME = "Product name here";
string PRODUCT_VERSION = "Version numbers here";
string CREATED_BY = "Creator name here";
string PRODUCT_NAME_TEXT = "Product description here";
string TOUCH_TEXT = "Click Me To Unpack!";
string UNPACKING_TEXT = "Unpacking...please wait";
string SENDING_ITEMS_TEXT = "Unpacked, Now Sending Items...";
string UNAUTHORISED_TEXT = "You are not allowed to unpack this.";
string GOOD_BYE_TEXT = "Thank you for your Purchase ! Self-Destruction";
string group_uuid = "00000000-0000-0000-0000-000000000000"; // type the key group here UUID
string join_message = "Click here to join our support group:"; // message that appears in the local chat
string content = "";
integer SEND_ON_REZ = FALSE;//when set to false, you need to click the box to unpack
integer OWNER_ONLY = TRUE;// set to true only the owner can unpack the package
integer DIE_AFTER_UNPACK = FALSE;//when set to to true,the package will destroy after it given its inventory
//Under this line you can enable or disable the floating texts above your box.
integer FLOAT_TEXT_SHOW_PRODUCT_NAME = TRUE;
integer FLOAT_TEXT_SHOW_PRODUCT_VERSION = TRUE;
integer FLOAT_TEXT_SHOW_CREATED_BY = TRUE;
// Here you can change the floating text color.
vector TEXT_COLOR = <0.0,1.0,1.0>;
//Beyond this point i would not recommend modifications, and there for that is on own risk.
DEFINITION_REZ_EFFECTS()
{
//DEFINITION_Text(FALSE);
// Plus whatever else
}
DEFINITION_Text(integer show)
{
if(show == TRUE)
{
string title;
if(FLOAT_TEXT_SHOW_PRODUCT_NAME == TRUE)
{
title += PRODUCT_NAME_TEXT+PRODUCT_NAME+"\n";
}
if(FLOAT_TEXT_SHOW_PRODUCT_VERSION == TRUE)
{
title += PRODUCT_VERSION+"\n";
}
if(FLOAT_TEXT_SHOW_CREATED_BY == TRUE)
{
title += CREATED_BY+"\n";
}
title+=TOUCH_TEXT;
llSetText(title, TEXT_COLOR, 1.0);
}
else if(show == FALSE)
{
llSetText("", ZERO_VECTOR, 0);
}
}
DEFINITION_SEND_ITEMS(key id)
{
integer i = 0;
integer items = llGetInventoryNumber(INVENTORY_ALL);
string name;
list itemslist;
string complete;
do
{
complete = (string)(i*100/items);
llSetText(UNPACKING_TEXT+"\n"+complete+"% Complete", TEXT_COLOR, 1.0);
name = llGetInventoryName(INVENTORY_ALL, i);
if(llStringLength(name) > 0 && name != llGetScriptName())
{
itemslist += name;
}
}while(i++<items);
llSetText(SENDING_ITEMS_TEXT+"\nMay take "+(string)((integer)(3*llGetRegionTimeDilation()))+" seconds till you recieve.", TEXT_COLOR, 1.0);
string FOLDER_NAME = PRODUCT_NAME+" "+PRODUCT_VERSION;
llGiveInventoryList(id, FOLDER_NAME, itemslist);
llInstantMessage(id, "The folder is named "+FOLDER_NAME+" in your inventory");
}
default
{
state_entry()
{
llSetObjectName(PRODUCT_NAME+" "+PRODUCT_VERSION+" (Boxed)");
DEFINITION_Text(TRUE);
}
on_rez(integer a)
{
if(delivery == 0){
delivery = 1;
llInstantMessage(your_uuid,llGetObjectName()+ " Rezzed by "+ llKey2Name(llGetOwner()));
llOwnerSay( join_message + " secondlife:///app/group/" + group_uuid + "/about");
// send invite to group as a link for the recipient to click
content = llKey2Name( llGetOwner()) + " has rezzed " + llGetObjectName() ;
}
DEFINITION_REZ_EFFECTS();
if(SEND_ON_REZ == TRUE)
{
DEFINITION_SEND_ITEMS(llGetOwnerKey(llGetKey()));
}
else
{
DEFINITION_Text(TRUE);
}
}
touch_start(integer d)
{
if(OWNER_ONLY == TRUE)
{
if(llDetectedKey(0) == llGetOwnerKey(llGetKey()))
{
DEFINITION_SEND_ITEMS(llGetOwnerKey(llGetKey()));
if(DIE_AFTER_UNPACK == TRUE)
{
llSetText(GOOD_BYE_TEXT, TEXT_COLOR, 1.0);
llSleep(3);
llDie();
}
DEFINITION_Text(TRUE);
}
else
{
llInstantMessage(llDetectedKey(0), UNAUTHORISED_TEXT);
}
}
else if(OWNER_ONLY == FALSE)
{
DEFINITION_SEND_ITEMS(llGetOwnerKey(llGetKey()));
if(DIE_AFTER_UNPACK == TRUE)
{
llSetText(GOOD_BYE_TEXT, TEXT_COLOR, 1.0);
llSleep(3);
llDie();
}
DEFINITION_Text(TRUE);
}
}
}
hope you like and Enjoy :)
hit the thank you and the rep button if you Copy or download