User:Cow Taurog/Alteran stargate sound box
Jump to navigation
Jump to search
<lsl> integer giChan=-905000; key gkActiveSound="fd7ebb5c-2338-f5db-32b0-9f560a82ef94"; key gkAlertSound="c0791ccb-fb55-b286-b426-ffcec5de180c"; //key gkAlertSound="e7b9c94b-cd89-f948-e53c-80db946a2afe"; float gfVolume=0.7; float gfTimeout=30;
alert(){llSetTimerEvent(gfTimeout); llLoopSound(gkActiveSound,gfVolume);} alarm(){llSetTimerEvent(gfTimeout); llLoopSound(gkAlertSound,gfVolume);} stop(){llSetTimerEvent(0); llStopSound();}
default{
state_entry(){stop(); llListen(giChan,"","","");}
listen(integer chan,string name,key id,string mess){
if(mess=="dialalarm"){alert();}
//else if(mess=="status|outgoing"){alert();}
else if(mess=="status|incoming"){alert();}
else if(mess=="status|dialing"){alert();}
else if(mess=="status|idle"){stop();}
else if(mess=="status|offline"){stop();}}
timer(){stop();}
} </lsl>