Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list noobkeys;
- dispAvFeed(){
- string targetlist="";
- key thisnub;
- string tgtname;
- vector tgtpos;
- integer dist=0;
- integer i;
- for(i=0;i<llGetListLength(noobkeys);i++){
- thisnub=llList2Key(noobkeys,i);
- list tgtintel=llGetObjectDetails(thisnub,[OBJECT_NAME,OBJECT_POS]);
- tgtname=llList2String(tgtintel,0);
- tgtpos=llList2Vector(tgtintel,1);
- dist=(integer)llVecDist(llGetPos(),tgtpos);
- targetlist+=tgtname+" ["+(string)dist+"]\n";
- }
- llSetText(targetlist,<1,1,1>,1);
- }
- updateList(integer flag, list nubs){
- integer i;
- string currnub; integer nubFound;
- for(i=0;i<llGetListLength(nubs);i++){
- currnub=llList2String(nubs,i);
- nubFound=llListFindList(noobkeys,[currnub]);
- if(flag>0 && nubFound==-1 && currnub!=llGetOwner()){
- noobkeys+=currnub;
- }
- else if(flag==0 && nubFound>-1)
- noobkeys=llDeleteSubList(noobkeys,nubFound,nubFound);
- }
- dispAvFeed();
- }
- default{
- on_rez(integer p){
- llResetScript();
- }
- state_entry(){
- noobkeys=[];
- llSetText("",<0,0,0>,1);
- llListen(-777777777,"","","");
- llTriggerSound("76c78607-93f9-f55a-5238-e19b1a181389",1);
- llSetTimerEvent(5);
- }
- listen(integer chan,string who,key id,string msg){
- //llOwnerSay(msg);
- list nubs=llParseString2List(msg,[","],[]);
- integer feedflag=(integer)llList2String(nubs,1);
- nubs=llDeleteSubList(nubs,0,1);
- updateList(feedflag,nubs);
- }
- changed(integer chg){
- if(chg & CHANGED_REGION){
- noobkeys=[];
- llSetText("",<0,0,0>,1);
- llTriggerSound("76c78607-93f9-f55a-5238-e19b1a181389",1);
- }
- }
- timer(){
- dispAvFeed();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment