Difference between revisions of "Wizardry and Steamworks"

From Second Life Wiki
Jump to navigation Jump to search
Line 9: Line 9:
* [http://eva.comaroski.me/wiki/Wizardry_and_Steamworks WaS-K] - Kira Komarov
* [http://eva.comaroski.me/wiki/Wizardry_and_Steamworks WaS-K] - Kira Komarov


=Resources=
=FUS (Frequently Used Snippets)=


All this work should be attributed to the '''Wizardry and Steamworks''' group under the [http://www.gnu.org/copyleft/gpl.html GPLv3 license]. You are free to use these resources and even commercialize the products using them as long as you attribute the components you got from here to the '''Wizardry and Steamworks [WaS]''' group.
Frequently Used Snippets (FUS) are short snippets that are generic enough to be included in any script. In some ways, they represent an abstraction over Second Life script programming methodologies particular to Wizardry and Steamworks [WaS] and although they aren't delivered in the form of scripts, they can be used in any script by inserting them at the right places.


These resources are originals, in the sense that they have been made, ground-up by Wizardry and Steamworks members.
==Endless Menu with Back and Next==
 
==FUS (Frequently Used Snippets)==
 
Frequently Used Snippets (FUS) are short snippets that are generic enough to be included in any script. In some ways, they represent an abstraction over Second Life script programming methodologies particular to Wizardry and Steamworks [WaS] and although they aren't delivered in the form of scripts, they can be used in any script by inserting them at the right places.


===Endless Menu with Back and Next===
This generates an endless menu with Back and Next buttons by arranging a list dynamically whenever the Back and Next buttons are pressed. It has been used in several scripts with some variations.


====Global Primitives====
'''Global Primitives'''
<lsl>
<lsl>
list menu_items = [];
list menu_items = [];
Line 28: Line 24:
list cList = []
list cList = []
</lsl>
</lsl>
====Global Functions====
'''Global Functions'''
<lsl>
<lsl>
list mFwd() {
list mFwd() {
Line 42: Line 38:
}
}
</lsl>
</lsl>
====In-Line Usage====
'''In-Line Usage'''
<lsl>
<lsl>
             integer itra;
             integer itra;
Line 52: Line 48:
</lsl>
</lsl>


===Access List Notecard Loader ===
==Generic Access Notecard Reader==
 
This is a generic access-list notecard loader. In this variation, it does not set a timer to check whether the notecard has been loaded.


====Global Primitives====
'''Global Primitives'''
<lsl>
<lsl>
integer aLine = 0;
integer aLine = 0;
Line 61: Line 59:
string accessListName = "[K] Access List";
string accessListName = "[K] Access List";
</lsl>
</lsl>
====Reading====
'''Reading'''
<lsl>
<lsl>
         integer itra;
         integer itra;
Line 73: Line 71:
         aQuery = llGetNotecardLine(accessListName, aLine);
         aQuery = llGetNotecardLine(accessListName, aLine);
</lsl>
</lsl>
====Dataserver====
'''Dataserver'''
<lsl>
<lsl>
     dataserver(key id, string data) {
     dataserver(key id, string data) {
Line 84: Line 82:
     }
     }
</lsl>
</lsl>
=Resources=
All this work should be attributed to the '''Wizardry and Steamworks''' group under the [http://www.gnu.org/copyleft/gpl.html GPLv3 license]. You are free to use these resources and even commercialize the products using them as long as you attribute the components you got from here to the '''Wizardry and Steamworks [WaS]''' group.
These resources are originals, in the sense that they have been made, ground-up by Wizardry and Steamworks members.


==Animations==
==Animations==

Revision as of 14:34, 23 November 2011

File:WaS-logo-landscape.png
Wizardry and Steamworks Logo Landscape

Wizardry and Steamworks

Wizardry and Steamworks are a development group to be found in Second Life. The leaders of the group are Kira Komarov and Flax Quirina. We specialize on scripting in Second Life, however anything that pushes the boundaries of what is currently possible in Second Life is of interest to us.

Member Wiki Mirrors

FUS (Frequently Used Snippets)

Frequently Used Snippets (FUS) are short snippets that are generic enough to be included in any script. In some ways, they represent an abstraction over Second Life script programming methodologies particular to Wizardry and Steamworks [WaS] and although they aren't delivered in the form of scripts, they can be used in any script by inserting them at the right places.

Endless Menu with Back and Next

This generates an endless menu with Back and Next buttons by arranging a list dynamically whenever the Back and Next buttons are pressed. It has been used in several scripts with some variations.

Global Primitives <lsl> list menu_items = []; list key_items = []; integer mitra = 0; list cList = [] </lsl> Global Functions <lsl> list mFwd() {

   if(mitra+1>llGetListLength(menu_items)) return cList;
   cList = llListInsertList(llListInsertList(llList2List(menu_items, ++mitra, (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2);
   return cList;

}

list mBwd() {

   if(mitra-19<0) return cList;
   cList = llListInsertList(llListInsertList(llList2List(menu_items, (mitra-=19), (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2);
   return cList;

} </lsl> In-Line Usage <lsl>

           integer itra;
           for(itra=0, mitra=0, menu_items=[]; itra< llGetListLength(/* list */); ++itra) {
               menu_items += llList2String(/* list */, itra);
           }
           cList = llListInsertList(llListInsertList(llList2List(menu_items, mitra, (mitra+=9)), ["<= Back"], 0), ["Next =>"], 2);
           llDialog(/* Key to prompt */, /* Dialog Text */, cList, /* channel */);

</lsl>

Generic Access Notecard Reader

This is a generic access-list notecard loader. In this variation, it does not set a timer to check whether the notecard has been loaded.

Global Primitives <lsl> integer aLine = 0; list accessList = []; //pragma inline string accessListName = "[K] Access List"; </lsl> Reading <lsl>

       integer itra;
       for(itra=0. accessList=[]; itra<llGetInventoryNumber(INVENTORY_NOTECARD); ++itra) {
           if(llGetInventoryName(INVENTORY_NOTECARD, itra) == accessListName)
               jump found_access;
       }
       llInstantMessage(llGetOwner(), "Failed to find access notecard.");
       return;

@found_access;

       aQuery = llGetNotecardLine(accessListName, aLine);

</lsl> Dataserver <lsl>

   dataserver(key id, string data) {
       if(id != aQuery) return;
       if(data == EOF) return;
       if(data == "") jump next_line;
       list accessList += data;

@next_line;

       aQuery = llGetNotecardLine(accessListName, ++aLine);
   }

</lsl>

Resources

All this work should be attributed to the Wizardry and Steamworks group under the GPLv3 license. You are free to use these resources and even commercialize the products using them as long as you attribute the components you got from here to the Wizardry and Steamworks [WaS] group.

These resources are originals, in the sense that they have been made, ground-up by Wizardry and Steamworks members.

Animations

File Description
WaS Lighter Two_Hands.bvh‎ The avatar leans forward and places the left mouth (holding a cigarette) and the right hand over and in front of the left mouth (holding a lighter).
Bread Pie
Butter Ice cream

Sounds

File Length Description Key
WaS Zippo Short Flick Spin Click.wav 00:01s Zippo cap flicks open, the wheel is spun once, the zippo cap clicks shut. bc1b20c7-fc34-6df2-2296-64be51390be2
Bread Pie Bread Pie
Butter Ice cream Bread Pie

Projects