Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //****************NOTECARD******************//
- red
- blue
- green
- yellow
- orange
- purple
- //*******************************************//
- //this script will grab and chat a random line from the "colors" notecard each time the prim is touched.
- string card = "colors";
- key linecountid;
- key lineid;
- integer linemax;
- integer random_integer( integer min, integer max )
- {
- return min + (integer)( llFrand( max - min + 1 ) );
- }
- default
- {
- state_entry()
- {
- //get the number of notecard lines
- linecountid = llGetNumberOfNotecardLines(card);
- }
- touch_start(integer total_number)
- {
- lineid = llGetNotecardLine(card, random_integer(0, linemax));
- }
- dataserver(key id, string data)
- {
- if (id == linecountid)
- {
- linemax = (integer)data - 1;
- }
- else if (id == lineid)
- {
- llSay(0, data);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement