Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Written By: Ĵyм Ѡҩℓƒ (Jym Resident)
- /*
- LICENCE:
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- any later version.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
- or you may visit - http://license.idjhost.com/
- */
- // DESCRIPTION
- // bouncing chat between scripts
- integer chan = -15482659;
- integer ping = FALSE;
- default
- {
- state_entry()
- {
- llListen(chan,"","',"");
- }
- touch_start(integer detect)
- {
- ping = TRUE;
- llSetTimerEvent(1);
- }
- listen(integer channel, string name, key id, string message)
- {
- if(message == "Ping") //Change to Pong in script number 2
- {
- ping = FALSE
- llSetTimerEvent(1);
- }
- }
- timer()
- {
- if(ping == TRUE)
- {
- ping = FALSE;
- llSetTimerEvent(0); //Cancels Timer to prevent duplicate messages
- llRegionSay(chan,"Ping"); //Change to Pong in script number 2
- }
- else
- {
- llSetTimerEvent(0);
- llRegionSay(chan,"Pong"); //Change to Ping in Script number 2
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement