Jym_Nova icon

PingPong Chat

Jym_Nova | PRO | 07/22/15 05:29:11 PM UTC | 0 ⭐ | 876 👁️ | Never ⏰ | []
Linden Scripting |

0 B

|

None

|

0 👍

/

0 👎

// 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
    }
    }
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎