35 lines
827 B
Plaintext
35 lines
827 B
Plaintext
integer Key2AppChan(key ID, integer App)
|
|
{
|
|
return 0x80000000 | ((integer)("0x"+(string)ID) ^ App);
|
|
}
|
|
|
|
key m_lastTarget = 0;
|
|
key m_inventory = NULL_KEY;
|
|
|
|
default
|
|
{
|
|
state_entry()
|
|
{
|
|
m_inventory = (key)llGetObjectDesc();
|
|
}
|
|
|
|
on_rez(integer para)
|
|
{
|
|
m_inventory = llGenerateKey();
|
|
llSetObjectDesc(m_inventory);
|
|
}
|
|
|
|
object_rez(key id)
|
|
{
|
|
llSay(-58347, "setstorageid;" + m_inventory);
|
|
llSay(-58347, "setname;" + llGetObjectName());
|
|
llSay(-58347, "attachto;" + m_lastTarget);
|
|
llSay(-58347, "gamecommand;reload");
|
|
}
|
|
|
|
touch_start(integer i)
|
|
{
|
|
m_lastTarget = llDetectedKey(0);
|
|
llRezAtRoot(llGetInventoryName(INVENTORY_OBJECT, 0), llGetPos(), <1.0, 0.0, 0.0>, <0, 0, 0, 0>, 33);
|
|
}
|
|
} |