OpenSim.Region.ScriptEngine.Shared.Api.OSSL_Api.osMakeNotecard C# (CSharp) Method

osMakeNotecard() public method

Write a notecard directly to the prim's inventory.
This needs ThreatLevel high. It is an excellent griefer tool, In a loop, it can cause asset bloat and DOS levels of asset writes.
public osMakeNotecard ( string notecardName, OpenSim.Region.ScriptEngine.Shared.LSL_Types contents ) : void
notecardName string The name of the notecard to write.
contents OpenSim.Region.ScriptEngine.Shared.LSL_Types The contents of the notecard.
return void
        public void osMakeNotecard(string notecardName, LSL_Types.list contents)
        {
            CheckThreatLevel(ThreatLevel.High, "osMakeNotecard");
            m_host.AddScriptLPS(1);

            StringBuilder notecardData = new StringBuilder();

            for (int i = 0; i < contents.Length; i++)
                notecardData.Append((string)(contents.GetLSLStringItem(i) + "\n"));

            SaveNotecard(notecardName, "Script generated notecard", notecardData.ToString(), false);
        }
OSSL_Api