Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // canale su cui ascolta (ownerkey()-1)
- integer cancella;
- // funzione che torna un intero univoco per ogni avatar
- integer OwnerKey()
- {
- return -(integer)("0x"+llGetOwner());
- }
- default
- {
- // al reset calcola il canale e ascolta
- state_entry(){
- cancella=OwnerKey();
- //llSay(0,"Ascolto sul canale "+(string)cancella);
- llListen(cancella,"",NULL_KEY,"CANCELLA");
- }
- // al rez calcola il canale e ascolta
- on_rez(integer start_param){
- cancella=OwnerKey();
- //llSay(0,"Ascolto sul canale "+(string)cancella);
- llListen(cancella,"",NULL_KEY,"CANCELLA");
- }
- // ascolta e muore
- listen(integer channel,string name,key id,string message){
- if(channel==cancella)
- {
- //llSay(0,"ricevuto comando di sparire");
- llDie();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement