Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
|
04-23-2005 17:43
I'm trying to get this script to work. It's supposed to give notecard when touched to the person who touched it, and give the notecard that is dropped into it to the owner when dropped into. However, it just gives the notecard that is given to the people, and then deletes it. How can I get it to give the (integer) change notecard to it? default { state_entry() { llAllowInventoryDrop(TRUE); }
touch_start(integer total_number) { llGiveInventory(llDetectedKey(0), "Suggestion Scroll"); if ( llGetInventoryNumber(INVENTORY_SOUND) > 0 ) { llTriggerSound("Button_click_down", 1.0); } } changed(integer change) { if ( change && CHANGED_ALLOWED_DROP ) { integer num = llGetInventoryNumber(INVENTORY_NOTECARD); string name = llGetInventoryName(INVENTORY_NOTECARD,num - 1); llGiveInventory(llGetOwner(), name); llInstantMessage(llGetOwner(), "Scroll Delivery"); llRemoveInventory(name); } } }
_____________________
Other than that, Mrs. Lincoln, how was the play?
|
Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
|
04-23-2005 18:34
anyone alive?
_____________________
Other than that, Mrs. Lincoln, how was the play?
|
Douglas Callahan
Fresh Prince Of SL
Join date: 2 Jul 2004
Posts: 349
|
04-23-2005 18:43
help! anyone, please respond! Mr. Gomez?! Mr. Omega?!!
ANYONE?!?!
_____________________
Other than that, Mrs. Lincoln, how was the play?
|
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
|
notecard giver
04-23-2005 20:31
Try this.. I had to put in the && != "" or it was tryign to give me nothing.. string name; integer num; default { state_entry() { llAllowInventoryDrop(TRUE); } touch_start(integer total_number) { llGiveInventory(llDetectedKey(0), "Suggestion Scroll"  ; if ( llGetInventoryNumber(INVENTORY_SOUND) > 0 ) { llTriggerSound("Button_click_down", 1.0); } } changed(integer change) { if ( change && CHANGED_ALLOWED_DROP ) { num = llGetInventoryNumber(INVENTORY_NOTECARD); integer i = 0; for(i; i != num; i++) { name = llGetInventoryName(INVENTORY_NOTECARD,i); if(name != "Suggestion Scroll" && name != ""  { llGiveInventory(llGetOwner(), name); llInstantMessage(llGetOwner(), "Scroll Delivery"  ; llRemoveInventory(name); } } } } }
|