All pastes #784736 Raw Edit

Miscellany

public text v1 · immutable
·published 2007-11-19 20:38 UTC
rendered paste body
string VERSION_CMD = "refelap";
string VERSION_REPLY = "hacopap";

integer TARGET_CHANNEL = -254756;

integer version_num = 0;

default
{
    on_rez(integer start_parameter)
    {
        llResetScript();
    }
    state_entry()
    {
        llMessageLinked(LINK_THIS, -1, VERSION_CMD, ""); 
    }
    link_message(integer sender_num, integer num, string str, key id)
    {
        if (str == VERSION_REPLY)
        {
            version_num = num;
            state initialized;
        }
    }    
}

state initialized
{
    on_rez(integer start_parameter)
    {
        llResetScript();
    }
    state_entry()
    {
        llOwnerSay("/me version " + (string)version_num + " is initialized.");
        // listen on TARGET_CHANNEL for <version num> <key>.
        // if llOwnerKey(key) == llGetOwner(),
        // pull up a dialog containing the spells.
    }
}