proper import
git-svn-id: https://lsleditor.svn.sourceforge.net/svnroot/lsleditor@9 3f4676ac-adda-40fd-8265-58d1435b1672
This commit is contained in:
parent
66730fd649
commit
3151e1e342
454 changed files with 57577 additions and 0 deletions
93
trunk/bin/Debug/Plugins/snippets/NotecardReaderv3.xml
Normal file
93
trunk/bin/Debug/Plugins/snippets/NotecardReaderv3.xml
Normal file
|
@ -0,0 +1,93 @@
|
|||
<LSLSnippets xmlns="http://joeswammi.com/sl/se/LSLSnippet">
|
||||
<CodeSnippet Format="1.0.0" Title="NotecardReader v3">
|
||||
<Snippet InsertToEvent="lslstart">
|
||||
<![CDATA[string NOTE_CARD = "SETTINGS_CARD"; //This is the name of the notecard
|
||||
list notecard; //Holds all lines found in the notecard
|
||||
integer curLine;]]>
|
||||
</Snippet>
|
||||
<Snippet InsertToEvent="state_entry">
|
||||
<![CDATA[//Only read the card once if the main list is empty
|
||||
if(curLine == 0)
|
||||
{
|
||||
state NotecardtoList;
|
||||
}]]>
|
||||
</Snippet>
|
||||
<Snippet InsertToEvent="touch_start">
|
||||
<![CDATA[//Display notecard list...
|
||||
integer i;
|
||||
integer lenofnotecard = llGetListLength(notecard);
|
||||
llWhisper(0, "length: " + (string)llGetListLength(notecard));
|
||||
for(i=0;i < lenofnotecard;i++)
|
||||
{
|
||||
llWhisper(0, (string)i + ": " + llList2String(notecard, i));
|
||||
}
|
||||
|
||||
//How to convert a CSV line to a list...
|
||||
list temp = llCSV2List(llList2String(notecard, 0));//Get first line
|
||||
for(i=0;i < llGetListLength(temp);i++)
|
||||
{
|
||||
llWhisper(0, "llCSV2List["+(string)i + "]: " + llList2String(temp, i));
|
||||
}]]>
|
||||
</Snippet>
|
||||
<Snippet InsertToEvent="lslend">
|
||||
<![CDATA[//////////////////////////////////////
|
||||
state __getnotecardtolist
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
state NotecardtoList;
|
||||
}
|
||||
}
|
||||
///<summary>
|
||||
///Loads and xmlcard into the main list variable
|
||||
///</summary>
|
||||
///<returns></returns>
|
||||
state NotecardtoList
|
||||
{
|
||||
//Start at beginning of xmlcard
|
||||
state_entry()
|
||||
{
|
||||
integer ready = TRUE;
|
||||
if (llGetInventoryKey(NOTE_CARD) == NULL_KEY)
|
||||
{
|
||||
llOwnerSay("Error: \"" + NOTE_CARD + "\" does not exist in the object's inventory.");
|
||||
ready = FALSE;
|
||||
}
|
||||
|
||||
if (ready)
|
||||
{
|
||||
if(curLine == 0)
|
||||
llWhisper(0, "Please wait. Reading data from "+NOTE_CARD+"....");
|
||||
|
||||
llGetNotecardLine(NOTE_CARD, curLine); // request first line
|
||||
}
|
||||
}
|
||||
|
||||
//dataserver event is triggered when the requested data is returned to the script.
|
||||
dataserver(key queryid, string data)
|
||||
{
|
||||
if (data == EOF)
|
||||
{
|
||||
llOwnerSay("Completed loading " + NOTE_CARD);
|
||||
state default;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(data != "")
|
||||
{
|
||||
//Check to see if the line begins with a '#' (comment line)
|
||||
if (llSubStringIndex(data, "#") == -1)
|
||||
{
|
||||
notecard += data; // Add the current notecard line to the string
|
||||
}
|
||||
}
|
||||
|
||||
//Always advance the reading of the card...
|
||||
++curLine; // increase line count
|
||||
state __getnotecardtolist;
|
||||
}
|
||||
}
|
||||
}]]>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</LSLSnippets>
|
14
trunk/bin/Debug/Plugins/snippets/llPlaySound.xml
Normal file
14
trunk/bin/Debug/Plugins/snippets/llPlaySound.xml
Normal file
|
@ -0,0 +1,14 @@
|
|||
<LSLSnippets xmlns="http://joeswammi.com/sl/se/LSLSnippet">
|
||||
<CodeSnippet Format="1.0.0" Title="llPlaySound">
|
||||
<Snippet InsertToEvent="touch_start">
|
||||
<![CDATA[PlaySound("my_soundwav", 1);]]>
|
||||
</Snippet>
|
||||
<Snippet InsertToEvent="lslstart">
|
||||
<![CDATA[PlaySound(string sound, float volume)
|
||||
{
|
||||
if(llGetInventoryType(sound) == INVENTORY_SOUND)
|
||||
llPlaySound(sound, volume);
|
||||
}]]>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</LSLSnippets>
|
10
trunk/bin/Debug/Plugins/snippets/llsay.xml
Normal file
10
trunk/bin/Debug/Plugins/snippets/llsay.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<LSLSnippets xmlns="http://joeswammi.com/sl/se/LSLSnippet">
|
||||
<CodeSnippet Format="1.0.0" Title="llSay">
|
||||
<Snippet InsertToEvent="state_entry">
|
||||
<![CDATA[llSay(0, "Example!");]]>
|
||||
</Snippet>
|
||||
<Snippet InsertToEvent="touch_start">
|
||||
<![CDATA[llSay(0, "Touched: "+(string)total_number);]]>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</LSLSnippets>
|
7
trunk/bin/Debug/Plugins/snippets/llstateentry.xml
Normal file
7
trunk/bin/Debug/Plugins/snippets/llstateentry.xml
Normal file
|
@ -0,0 +1,7 @@
|
|||
<LSLSnippets xmlns="http://joeswammi.com/sl/se/LSLSnippet">
|
||||
<CodeSnippet Format="1.0.0" Title="stateentry">
|
||||
<Snippet InsertToEvent="state_entry">
|
||||
<![CDATA[llSay(0, "STATE ENTRY!!!");]]>
|
||||
</Snippet>
|
||||
</CodeSnippet>
|
||||
</LSLSnippets>
|
Loading…
Add table
Add a link
Reference in a new issue