Desu Flow Posted July 1, 2013 Share Posted July 1, 2013 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 exampleDiana 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 More sharing options...
Thinkerer Melville Posted July 1, 2013 Share Posted July 1, 2013 Here are some script resources forLSL: To get what you want, you will have to mod a script. Script Object contents: what you put there and why Scripting. LSL, object oriented, event driven. LSL scripts and scripting. Beginner's Summary Script Modding 101: Use scripts without knowing how. LSL Wiki LSL Editor Community Edition LSL Portal LSL Tutorial FOXSAN'S 3D TOOLS AND LSL SCRIPT REPOSITORY THE LSL SCRIPT DATABASE & LIBRARY TKR Link to comment Share on other sites More sharing options...
Desu Flow Posted July 1, 2013 Author Share Posted July 1, 2013 Thanks but i really dont wish to learn just to create a script that probly will take 1 min to make, i just need the lines. Link to comment Share on other sites More sharing options...
Xiija Posted July 1, 2013 Share Posted July 1, 2013 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 More sharing options...
Desu Flow Posted July 1, 2013 Author Share Posted July 1, 2013 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 More sharing options...
Frawmusl Posted July 1, 2013 Share Posted July 1, 2013 You should be happy she went through that much trouble for ya', Google the rest 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 More sharing options...
Xiija Posted July 1, 2013 Share Posted July 1, 2013 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 More sharing options...
Desu Flow Posted July 1, 2013 Author Share Posted July 1, 2013 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 More sharing options...
Desu Flow Posted July 2, 2013 Author Share Posted July 2, 2013 Link to comment Share on other sites More sharing options...
Xiija Posted July 3, 2013 Share Posted July 3, 2013 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 More sharing options...
Nimux Vale Posted July 3, 2013 Share Posted July 3, 2013 I have a SYSTEM OF SCRIPTS to convert notes in MENUS for change object: 5primscontrol IS FREE - NO NEED TO KNOW PROGRAMMINGYou only need to write the menu in a note Link to comment Share on other sites More sharing options...
Recommended Posts
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