Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

llDialog problems

Shippou Oud
The Fox Within
Join date: 11 Jul 2005
Posts: 141
07-20-2009 18:53
I am trying to get a llDialog to pop on an attachment I made, that also animates. Any ideas why i'm getting a Permissions Not Set error instead of the llDialog?
Edit: thank you Jesse Barnett for posting the script for me
_____________________
DaVear Land Holdings, since 2005.
Shippou Oud
The Fox Within
Join date: 11 Jul 2005
Posts: 141
07-20-2009 18:55
the forum will NOT let me post the script =-(
_____________________
DaVear Land Holdings, since 2005.
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
07-20-2009 19:07
Posted for Shippou:

CODE

integer swi; // pub on - off
integer siw; // listen own - pub
list ownopt = ["Empty","Milk","Juice","Red Bull","Prune Juice","Public On","Public Off"];
list pubopt = ["Empty","Milk","Juice","Red Bull","Prune Juice"];
integer chan; // dialog channel
string own; // owner name
key own1; // owner key
string use; // user name
key use1; // user key
// ------ \\
vector red = < 1,0,0>;
vector white = < 1,1,1>;
vector green = < 0,1,0>;
vector brown = < 1,.5,0>;
// ------ \\

default
{
on_rez(integer x)
{
llResetScript();
}
state_entry()
{
swi = 0;
chan = (integer)llFrand(45000000);
llListen(chan,"",NULL_KEY,"");
own = llKey2Name(llGetOwner() );
own1 = llGetOwner();
llSetObjectName(own + "'s Bottle");
llSetObjectDesc("Scripted by Shippou Oud.");
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH);
}

touch_start(integer x)
{
if ( llDetectedKey(0) != own1 )
{
use1 = llDetectedKey(0);
use = llKey2Name(llDetectedKey(0) );
}
if ( swi == 0 )
{
if ( own1 != use1 )
{
llInstantMessage(use, own + " snatches the bottle away!");
}
else if ( use1 == own1 )
{
llDialog(own1,"What would you like to do?",ownopt,chan);
}
}

else if ( swi == 1 )
{
if (use1 != own1)
{
llDialog(use1,"What would you like to do?",pubopt,chan);
}
else if ( use1 == own1 )
{
llDialog(use1,"What would you like to do?",ownopt,chan);
}
}

}


run_time_permissions(integer perm)
{


llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION,0) );

}

}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
07-20-2009 19:08
Shippou on top of the SQL keywords that break the forum, a newer problem is that you have to add a space after any opening bracket or you can not post:(
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
07-20-2009 19:34
Here you go:

CODE

integer swi; // listen own - pub
list ownopt =["Empty", "Milk", "Juice", "Red Bull", "Prune Juice", "Public On", "Public Off"];
list pubopt =["Empty", "Milk", "Juice", "Red Bull", "Prune Juice"];
integer chan; // dialog channel
string own; // owner name
key own1; // owner key
string use; // user name
key use1; // user key

default {
on_rez(integer x) {
llResetScript();
}
state_entry() {
swi = 0;
chan = (integer) llFrand(45000000);
llListen(chan, "", NULL_KEY, "");
own = llKey2Name(llGetOwner());
own1 = llGetOwner();
llSetObjectName(own + "'s Bottle");
llSetObjectDesc("Scripted by Shippou Oud.");
llRequestPermissions(llGetOwner(), PERMISSION_TRIGGER_ANIMATION | PERMISSION_ATTACH);
}
touch_start(integer x) {
// if (llDetectedKey(0) != own1) {
use1 = llDetectedKey(0);
use = llKey2Name(llDetectedKey(0));
// }
if (swi == 0) {
if (own1 != use1) {
llInstantMessage(use1, own + " snatches the bottle away!");
llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
}
else if (use1 == own1) {
llDialog(own1, "What would you like to do?", ownopt, chan);
}
}
else if (swi == 1) {
if (use1 != own1) {
llDialog(use1, "What would you like to do?", pubopt, chan);
}
else if (use1 == own1) {
llDialog(use1, "What would you like to do?", ownopt, chan);
}
}
}
listen(integer channel, string name, key id, string msg) {
if(msg == "Red Bull"){
llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
}
}
run_time_permissions(integer perm) {
// llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0));
}
}
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Shippou Oud
The Fox Within
Join date: 11 Jul 2005
Posts: 141
07-20-2009 20:09
=== Issue Resolved ===
on_rez was canceling out the "attach" event
_____________________
DaVear Land Holdings, since 2005.