Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- integer lsn;
- integer chn;
- integer l_set = FALSE;
- string title;
- vector color;
- set_listen()
- {
- chn = llFloor(llFrand(100.0));
- color.x = llFrand(1.0);
- color.y = llFrand(1.0);
- color.z = llFrand(1.0);
- lsn = llListen(chn,"",NULL_KEY,"");
- llSay(0,llKey2Name(llGetOwner())+" needs a new title. Set one for them on /"+(string)chn+". They can't change it themself.");
- llSetTimerEvent(30.0);
- l_set = TRUE;
- return;
- }
- time()
- {
- llSay(0,"No one gave "+llKey2Name(llGetOwner())+" a new title. They will have to live with the current one for now.");
- llSetTimerEvent(900.0);
- llResetTime();
- llListenRemove(lsn);
- l_set = FALSE;
- return;
- }
- set_title(string ttl,string setter)
- {
- llSetText(ttl,color,1.0);
- llSay(0,setter+" has set "+llKey2Name(llGetOwner())+"'s title to ''"+ttl+".'' They will have to live with that title for a while.");
- }
- default
- {
- state_entry()
- {
- title = llGetDisplayName(llGetOwner());
- llSetText(title,<1,1,1>,1.0);
- llListen(101,"",llGetOwner(),"");
- set_listen();
- }
- changed(integer change)
- {
- if(change & CHANGED_OWNER)
- {
- llResetScript();
- }
- }
- attach(key id)
- {
- if(id != NULL_KEY)
- {
- llOwnerSay("Type '/101 clear' without the quotes to reset your title.");
- }
- }
- timer()
- {
- if(l_set)
- {
- time();
- }
- if(!l_set)
- {
- set_listen();
- }
- }
- listen(integer chan,string name,key id,string msg)
- {
- if(id != llGetOwner() && chn == chan)
- {
- set_title(msg,name);
- }
- if(id == llGetOwner() && llToLower(msg) == "clear")
- {
- llSetText(title,color,1.0);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement