So, all I'm trying to do is just that - Have Object X give the person what it has. It's so easy on other games, but here's it's a huge process. From the wiki I've managed to somewhat understand:
default
{
on_rez(integer nevermind)
{
llSetText("Touch me to unpack\nyour new "+llGetObjectName()+".",<1,1,1>,1.0);
}
touch_start(integer total_number)
{
// give all items in a prim to the owner, as folder (with the name of the prim)
// Ezhar Fairlight <efairlight@gmail.com>
// user-friendly additions by Mechanique Thirty (egypt@urnash.com)
// Script adjusted to run faster by Strife Onizuka.
list inventory;
string name;
integer num = llGetInventoryNumber(INVENTORY_ALL);
string text = llGetObjectName() + " is unpacking...\n";
integer i;
key user = llGetOwner();//Set to llDetectedKey(0); to allow anyone to use
for (i = 0; i < num; ++i) {
name = llGetInventoryName(INVENTORY_ALL, i);
if(llGetInventoryPermMask(name, MASK_OWNER) & PERM_COPY)
inventory += name;
else
llOwnerSay("Cannot give asset \""+name+"\", owner lacks copy permission"
;llSetText(text + (string)((integer)(((i + 1.0) / num) * 100))+ "%", <1, 1, 1>, 1.0);
}
//chew off the end off the text message.
text = llGetObjectName();
//we don't want to give them this script
i = llListFindList(inventory, [llGetScriptName()]);
if(~i)//if this script isn't found then we shouldn't try and remove it
inventory = llDeleteSubList(inventory, i, i);
if (llGetListLength(inventory) < 1) llSay(0, "No items to offer."
; else{
llGiveInventoryList(user, text, inventory);
name = "Your new "+ text +" can be found in your inventory, in a folder called '"+ text +"'. Drag it onto your avatar to wear it!";
if(user == llGetOwner())
llOwnerSay(name);
else
llInstantMessage(user, name);
}
}
}
However, I don't need all these bells and whistles! Just give it to them! I don't want it to change text or say 'unpacking', I don't want it to say anything to them. Just give it. However, when I delete all that mumbo jumbo, it gives error after error.
Isn't there a way around this?
I've also tried:
default {
touch_start(integer total_number) {
// to give a different inventory item type,
// replace "INVENTORY_OBJECT" with "INVENTORY_NOTECARD", etc.
llGiveInventory(llDetectedKey(0),llGetInventoryName(INVENTORY_OBJECT, 0));
}
}
Which simply doesn't work unless it's a single object, notecard, etc.. I've tried making my own but there really isn't that many roads to travel down to try..