Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- list avatar = [];
- default
- {
- state_entry()
- {
- llSay(0, "Script running");
- llListen(20,"",NULL_KEY,"");
- llSetText("Elenco avatar vicini, \nsenza ripetizioni\n/20 LIST\n/20 RESET",<0,0,1>,1);
- llSensorRepeat("",NULL_KEY,AGENT,96,PI,5);
- }
- listen(integer channel,string name,key id,string str)
- {
- if(str=="RESET") llResetScript();
- if(str=="LIST") {
- llSay(0,"Avatar che hanno toccato: ");
- integer i;
- for(i=0;i<llGetListLength(avatar);i++)
- {
- llSay(0,llList2String(avatar,i)+"'");
- }
- llSay(0,"=======================");
- }
- }
- sensor(integer count)
- {
- integer i;
- for(i=0;i<count;i++)
- {
- string avatarname=llDetectedName(i);
- integer found=llListFindList(avatar,[avatarname]);
- if(found<0)
- {
- avatar+=[avatarname];
- llSay(0,"Registrato "+avatarname);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement