Jump to content

Requesting a script!


Desu Flow
 Share

You are about to reply to a thread that has been inactive for 4103 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Im sure its simple for most, im looking for a script that you put into an object and once people click on it, a dialog will appear for them with list of menu choices, each button will show a message in chat. For example

Diana clicks on the dog, and the following options shows up " pet " feed " play " and if click "pet " then somthing like " diana scratches the dog behind the ears " should show up in the chat, (regular channel) etc.



So the name of the person that clicks has to be in the sentence.

And also the dialog shouldnt close after clicking on an option, it should stay there even tho its clicked so you (could spam) if you will.



IF its possible, i really would like a message for myself that nobody else can see, everytime someone just clicks on the object, before actually clicking on the buttons on the dialog.



Thats it, a dialog/chat script.

I been looking for hours on youtube/google, but i still cant seem to get it even tho i read lots of guides by now >.<



use whatever name on the buttons, and sentences as you wish, i can edit that later. all i need is the lines and the set up for everything :]





Really appreciate it from the heart! ~

Link to comment
Share on other sites

something like....?

integer chan = -5;list buttons;integer listen_handle;string firstname;default{    state_entry()    {       buttons = ["Pet","Feed","Play","Close"];    }    touch_start(integer total_number)    {       key id = llDetectedKey(0);       string name = llKey2Name(id);       firstname = llGetSubString(name,0,llSubStringIndex(name," "));       llDialog(id,"choose an action",buttons,chan);       listen_handle = llListen(-5, "","", "");        llInstantMessage( llGetOwner(), "Someone touched me" );    }    listen( integer chan, string name, key id, string mess )    {        if(mess == "Pet")        {            llSay(0,firstname + " scratches the dog behind the ears ");             llDialog(id,"choose an action",buttons,chan);             llSetTimerEvent(20);        }         if(mess == "Feed")        {            llSay(0,firstname + " throws the dog a bone ");             llDialog(id,"choose an action",buttons,chan);              llSetTimerEvent(20);        }         if(mess == "Play")        {            llSay(0,firstname + " plays with the dog! ");             llDialog(id,"choose an action",buttons,chan);              llSetTimerEvent(20);        }         if(mess == "Close")        {            llListenRemove(listen_handle);        }    }    timer()    {         llListenRemove(listen_handle);          llSetTimerEvent(0);    }}

 yell if ya need help with it :)

Link to comment
Share on other sites

Its excellent! =) thanks alot!

There is a few things tho, when someone clicks it, it just says " someone touched it " 

Is it possible to change that to " Touched by (name) " ? and also in yellow text if its even possible =)

And also, would it be easy change if i would like to have the " clickers name " in the middle of a sentence instead of the name starts in the sentence?

And the last thing, could you add the aftername of the person aswell if thats possible, and not just first name.

 

Other then that, i love it ! =)

Link to comment
Share on other sites

You should be happy she went through that much trouble for ya', Google the rest :P Its easy to edit scripts from a base like that.

For the yellow text its llOwnerSay where no others are able to read it so there would be no need for the names, Because no one else can read it.. And if you're confused on who you are you might want to look into philosophy and not scripting

 

Link to comment
Share on other sites

just change a few parts in the script...

 change.... llInstantMessage( llGetOwner(), "Someone touched me" );

to

 llInstantMessage( llGetOwner(), "Touched by :" + name );

 

and change ..: llSay(0,firstname + " scratches the dog behind the ears ");

to

 llSay(0,"The Dog smiles as " + name + " scratches it behind the ears ");

 

yellow text is viewer side and cannot be changed unless your viewr lets you...

i.e. in firestorm its under Avatar>preferences>colors

Link to comment
Share on other sites

Thank you so much :]

But in all honesty, the person did say yell if theres anything else.

Hmmm is it possible to remove the name of the object once the message show in chat?

For example.

Object: Desu Flow throws the dog a bone.

 

So changed to just. 

Desu Flow throws the dog a bone.

 

 

And about the color part, isnt the color changing depending what channel its written in?

Right now the message thats written to myself when someone clicks on it, is darkish red.

 

If thats possible?

Link to comment
Share on other sites

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Link to comment
Share on other sites

integer chan = -5;list buttons;integer listen_handle;string firstname;default{    state_entry()    {       buttons = ["Pet","Feed","Play","Close"];        llSetObjectName("");    }    touch_start(integer total_number)    {       key id = llDetectedKey(0);       string name = llKey2Name(id);       firstname = llGetSubString(name,0,llSubStringIndex(name," "));       llDialog(id,"choose an action",buttons,chan);       listen_handle = llListen(-5, "","", "");        llSetObjectName("The Animal");        llInstantMessage( llGetOwner(), "Touched by :" + name );         llSetObjectName("");    }    listen( integer chan, string name, key id, string mess )    {        if(mess == "Pet")        {            llSay(0,"The Dog smiles as " + name + " scratches it behind the ears ");             llDialog(id,"choose an action",buttons,chan);             llSetTimerEvent(20);        }         if(mess == "Feed")        {            llSay(0,name + " throws the dog a bone ");             llDialog(id,"choose an action",buttons,chan);              llSetTimerEvent(20);        }         if(mess == "Play")        {            llSay(0,name + " plays with the dog! ");             llDialog(id,"choose an action",buttons,chan);              llSetTimerEvent(20);        }         if(mess == "Close")        {            llListenRemove(listen_handle);        }    }    timer()    {         llListenRemove(listen_handle);          llSetTimerEvent(0);    }}

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 4103 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...