Brown nosing object
Posted by Monkey JigsawApr 14
Ever want an object that will kiss your butt and anyones butt who touches it, well you’re in luck. This script can be put into any object of your choosing that you have permissions to in second life. All you have to do is build or acquire an object of your choosing. This might boost your confidence on days that you’re feeling down.
Warning: putting this in an object that has a script already in it might cause conflicts. Too check if there is a script in an object already you need permissions to drop the object on some land. Once you drop the object right click on it and in the menu select edit. A dialog box will appear click on the content tab this is where you will see a script if there is one.
Once that is resolved you’ll need to copy the code to a new script. While the object is still on the ground and the edit dialog box is still opened up to the content tab click on the “new script†button. A new script file will show up in the content window. Double click on the file and it will open with some code in it delete this code. The code your copying already has these functions in it. Once deleted copy the code in this article to the new script. Click the “save†button this will compile the code and will tell you if there’s any errors if no errors it will say “save completeâ€. When this is done the object will be ready to be used, and you can close the editing dialog box. If you want to move the object just take it. Then when you want to use the object drop it on a piece of land that you have permissions to and the object will have the option to be touched.
enjoy
//8/19/2008
//Talking object
integer count=1;//used to select different phrases from selection statments
integer flag =0;//flag to keep other users from starting the timer ontill the previous users session is complete.
string name;//used with llDetectedName to detect users name
default
{
//Makes a comment when placed.
state_entry()
{
llSay(0, “Thank you for putting us down!”);
}
// Makes a statement on touch, starts timer, detects name, sets flag
touch_start(integer total_number)
{
if(flag==0)
{
name=(string)llDetectedName(0);
llSay(0, “We love you ” + name+”.”);
llSetTimerEvent(6.0);
flag=1;
}
}
//started in touch_star event
timer()
{
if (count==1)
{
llSay(0, “We think “+name+” is the greatest.”);
}
if(count==2)
{
llSay(0, name+ ” you’re so smart.”);
}
if(count==3)
{
llSay(0, “We’re happy you picked us “+name+”, goodbye.”);
count=0;
llSetTimerEvent(0);
flag=0;
}
count +=1;
}
}
No comments