„Object-Inventory v0.7.0“ hinzufügen

master
Kxirya 2020-06-07 22:23:10 +00:00
parent ab85340170
commit 9b6e765bd7
1 changed files with 35 additions and 0 deletions

35
Object-Inventory v0.7.0 Normal file
View File

@ -0,0 +1,35 @@
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);
}
}