Philip P. Ide

Author, programmer, science enthusiast, half-wit.
Life is sweet. Have you tasted it lately?

User Tools

Site Tools


blog:opensim:scripts:prim_inv_trans

This is an old revision of the document!


Prim Inventory Transfer

Receiver

receiver.ossl
//YEngine:
yoptions;
 
constant __DEBUG__ = TRUE;
 
constant SCRIPT_PIN = 72743825;
constant updateChan = -4744320;
 
integer lhandle;
 
debug( string text ){
    if( __DEBUG__ ){
        llOwnerSay( text );
    }
}
 
endListen(){
    if( lhandle != 0 ){
        llListenRemove( lhandle );
        lhandle = 0;
    }
    llSetTimerEvent(0.0);
}
 
default {
    state_entry() {
        llSetText("Receiver",<1,0.685,0>,1.0);
        llSetRemoteScriptAccessPin(SCRIPT_PIN);
        debug("Access pin set");
    }
    touch_start(integer num){
        if( llDetectedKey(0) == llGetOwner() ){
            lhandle = llListen( updateChan, "", "", "" );
            llSetTimerEvent(60.0);
            debug("Waiting for updater");
        }
    }
    timer(){
        endListen();
    }
    listen(integer channel, string name, key id, string msg){
        if( llGetOwnerKey( id ) == llGetOwner() ){
            if( msg == "UPDATE-PING" ){
                debug("Updater identified, sending READY");
                endListen();
                llRegionSayTo( id, updateChan, "UPDATE-PONG" );
            }
        }
    }
}
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
blog/opensim/scripts/prim_inv_trans.1748950714.txt.gz · Last modified: by Phil Ide

Except where otherwise noted, content on this wiki is licensed under the following license: Copyright © Phil Ide
Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki