diff --git a/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.sol b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.sol new file mode 100644 index 00000000..8a54afd4 --- /dev/null +++ b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.sol @@ -0,0 +1,3 @@ + + + diff --git a/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.prj b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.prj new file mode 100644 index 00000000..5cae9c10 --- /dev/null +++ b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign.prj @@ -0,0 +1,6 @@ + + + + + diff --git a/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Object/Script.lsl b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Object/Script.lsl new file mode 100644 index 00000000..aef06d88 --- /dev/null +++ b/Dreamgrid Auto teleport sign/Dreamgrid Auto teleport sign/Object/Script.lsl @@ -0,0 +1,450 @@ +// (c) The owner of Avatar Jeff Kelley, 2010 +// +// This script is licensed under Creative Commons BY-NC-SA +// See +// +// You may not use this work for commercial purposes. +// You must attribute the work to the author, Jeff Kelley. +// You may distribute, alter, transform, or build upon this work +// as long as you do not delete the name of the original author. +// +// *** UPDATED *** +// Mods to Fit Dreamgrid methods Fred Beckhusen 9/7/2018 +// Mods to allow more than one sign Fred Beckhusen 6/9/2019 - just add the sign number in the Description - 0,1,2,3,4 etc. + +//INSTRUCTIONS +// Change the Description from 0, to 1,2,3 for each sign +// +key httpQueryId; + +string localGrid; +float TIMER = 7200; // refresh in seconds + +integer DEBUG_ON = FALSE; +DEBUG(string message) {if (DEBUG_ON) llOwnerSay(message);} + +string datasource ; + + +string strReplace(string str, string search, string replace) { + return llDumpList2String(llParseStringKeepNulls((str = "") + str, [search], []), replace); +} + + +integer isUUID (string s) { + list parse = llParseString2List (s, ["-"],[]); + return ((llStringLength (llList2String (parse, 0)) == 8) + && (llStringLength (llList2String (parse, 1)) == 4) + && (llStringLength (llList2String (parse, 2)) == 4) + && (llStringLength (llList2String (parse, 3)) == 4) + && (llStringLength (llList2String (parse, 4)) == 12)); +} + + +/////////////////// +// Http stuff +/////////////////// + + +sendHTTPRequest (string url) { + httpQueryId = llHTTPRequest(url,[HTTP_BODY_MAXLENGTH,16384],""); + //[ HTTP_METHOD, "GET", HTTP_MIMETYPE,"text/plain;charset=utf-8" ], ""); + // [ HTTP_METHOD, "GET", HTTP_MIMETYPE,"text/plain" ], ""); +} + +string URI2hostport (string uri) { + list parse = llParseString2List (uri, [":"], []); + return llList2String (parse, 0) + +":" + llList2String (parse, 1); +} + + +/////////////////////////////////////////////////////////////////// +// Part 2 : Parsing & accessors +/////////////////////////////////////////////////////////////////// + +list destinations; // Strided list for destinations + +integer NAME_IDX = 0; // Index of region name in list +integer COOR_IDX = 1; // Index of grid coordinates in list +integer HURL_IDX = 2; // Index of hypergrid url in list +integer HGOK_IDX = 3; // Index of validity flag in list +integer LAND_IDX = 4; // Index of landing point in list +integer N_FIELDS = 5; // Total number of fields + +parseFile (string data) { + + integer signNumber = (integer) llGetObjectDesc(); + // Should be 0,1,2, etc + + destinations = []; + list lines = llParseString2List (data,["\n"],[]); + + integer nl = llGetListLength (lines); + DEBUG("length = " + (string) nl); + + integer last = nl + ( signNumber * 32 ); + DEBUG("last = "+ (string) last); + + integer i; for (i=0;i; + // vector ourLoc = llGetRegionCorner()/256; + // integer ok =( llAbs(llFloor(hisLoc.x - ourLoc.x)) < 4096 ) + // && ( llAbs(llFloor(hisLoc.y - ourLoc.y)) < 4096 ) + // && ( hisLoc != ourLoc); + integer ok=TRUE; + // *** END CHANGE + + // Parse and check landing point + + parse = llParseString2List (coor, [","],[]); + integer xland = llList2Integer (parse, 0); // X landing point + integer yland = llList2Integer (parse, 1); // Y landing point + integer zland = llList2Integer (parse, 2); // Z landing point + + vector land = ; + if (land == ZERO_VECTOR) land = <128,128,20>; + + // Note: grid and region names merged into one field + destinations += [grid+" "+name, gloc, hurl, ok, land]; +} + +/////////////////// +// List accessors +/////////////////// + +string dst_name (integer n) { // Get name for destination n + return llList2String (destinations, N_FIELDS*n +NAME_IDX); +} + +string dst_coord (integer n) { // Get coords for destination n + return llList2String (destinations, N_FIELDS*n +COOR_IDX); +} + +vector dst_landp (integer n) { // Get landing point for destination n + return llList2Vector (destinations, N_FIELDS*n +LAND_IDX); +} + +string dst_hgurl (integer n) { // Get hypergrid url for destination n + return llList2String (destinations, N_FIELDS*n +HURL_IDX); +} + +integer dst_valid (integer n) { // Get validity flag for destination n + return llList2Integer (destinations, N_FIELDS*n +HGOK_IDX); +} + + +//////////////////////////////////////////////////////////// +// Part 3 : Drawing +//////////////////////////////////////////////////////////// + +integer TEXTURE_SIZE = 512; +integer DISPLAY_SIDE = 4; +integer FONT_SIZE = 10; // Depends on TEXTURE_SIZE +integer COLUMNS = 2; +integer ROWS = 16; + +string validCellColor = "CadetBlue"; +// string invalCellColor = "IndianRed"; +string invalCellColor = "CadetBlue"; +string emptyCellColor = "DarkGray"; +string cellBorderColor = "White"; +string backgroundColor = "Gray"; + +string drawList; + +displayBegin() { + drawList = ""; +} + +displayEnd() { + osSetDynamicTextureData ( "", "vector", drawList, + "width:"+(string)TEXTURE_SIZE+",height:"+(string)TEXTURE_SIZE, 0); +} + +drawCell (integer x, integer y) { + integer CELL_HEIGHT = TEXTURE_SIZE / ROWS; + integer CELL_WIDHT = TEXTURE_SIZE / COLUMNS; + integer xTopLeft = x*CELL_WIDHT; + integer yTopLeft = y*CELL_HEIGHT; + + // Draw grid + + drawList = osSetPenColor (drawList, cellBorderColor); + drawList = osMovePen (drawList, xTopLeft, yTopLeft); + drawList = osDrawRectangle (drawList, CELL_WIDHT, CELL_HEIGHT); + + integer index = (y+x*ROWS); + string cellName = dst_name(index); + integer cellValid = dst_valid(index); + + string cellBbackground; + if (cellName == "") cellBbackground = emptyCellColor; else + if (cellValid) cellBbackground = validCellColor; else + cellBbackground = invalCellColor; + + // Fill background + + drawList = osSetPenColor (drawList, cellBbackground); + drawList = osMovePen (drawList, xTopLeft+2, yTopLeft+2); + drawList = osDrawFilledRectangle (drawList, CELL_WIDHT-3, CELL_HEIGHT-3); + + xTopLeft += 2; // Center text in cell + yTopLeft += 6; // Center text in cell + drawList = osSetPenColor (drawList, "Black"); + drawList = osMovePen (drawList, xTopLeft, yTopLeft); + drawList = osDrawText (drawList, cellName); +} + +drawTable() { + displayBegin(); + + drawList = osSetPenSize (drawList, 1); + drawList = osSetFontSize (drawList, FONT_SIZE); + + drawList = osMovePen (drawList, 0, 0); + drawList = osSetPenColor (drawList, backgroundColor); + drawList = osDrawFilledRectangle (drawList, TEXTURE_SIZE, TEXTURE_SIZE); + + integer x; integer y; + for (x=0; x, PSYS_PART_END_SCALE, <0,2.0, 0>, + PSYS_PART_START_COLOR, <.2,0,.2>, PSYS_PART_END_COLOR, <.5,1,1>, + PSYS_PART_START_ALPHA, 1.0, PSYS_PART_END_ALPHA, 0.0, + + PSYS_SRC_BURST_PART_COUNT, 1, + PSYS_SRC_BURST_RATE, 0.01, + PSYS_PART_MAX_AGE, 3.4, + PSYS_SRC_MAX_AGE, 0.0, + + PSYS_SRC_PATTERN, 8, // 1=DROP, 2=EXPLODE, 4=ANGLE, 8=ANGLE_CONE, + PSYS_SRC_ACCEL, <0.0,0.0,0.0>, + + // PSYS_SRC_BURST_RADIUS, 0.0, + PSYS_SRC_BURST_SPEED_MIN, .01, PSYS_SRC_BURST_SPEED_MAX, 3.01, + + PSYS_SRC_ANGLE_BEGIN, 1*DEG_TO_RAD, PSYS_SRC_ANGLE_END, 0*DEG_TO_RAD, + PSYS_SRC_OMEGA, <0,0,0>, + + // PSYS_SRC_TARGET_KEY, llGetLinkKey(llGetLinkNum() + 1), + + PSYS_PART_FLAGS, ( 0 + | PSYS_PART_INTERP_COLOR_MASK + | PSYS_PART_INTERP_SCALE_MASK + | PSYS_PART_EMISSIVE_MASK + | PSYS_PART_FOLLOW_VELOCITY_MASK + // | PSYS_PART_WIND_MASK + // | PSYS_PART_BOUNCE_MASK + // | PSYS_PART_FOLLOW_SRC_MASK + // | PSYS_PART_TARGET_POS_MASK + // | PSYS_PART_TARGET_LINEAR_MASK + ) ] ); + } +} + + +// (particle appearance settings) + +// TEXTURE, can be an "Asset UUID" key copied from a modable texture, or the name of a texture in the prim's inventory. +// SCALE, vector's x and y can be 0.0 to 4.0. z is ignored. Values smaller than 0.04 might not get rendered. +// END_SCALE requires the INTERP_SCALE_MASK +// COLOR, red,green,blue values from 0,0,0(black) to 1,1,1 (white) +// ALPHA, 0.0 = invisible, less than 0.1 may not get seen, 1.0 = solid/opaque +// END_COLOR and END_ALPHA both require INTERP_COLOR_MASK + +// (emitter controls) + +// BURST_PART_COUNT 1 to 4096 +// BURST_RATE 0.0 to 60.0? # of seconds between bursts, smaller = faster +// PART_MAX_AGE, 0.0 to 30.0, particle lifespan in seconds +// SRC_MAX_AGE - emitter auto-off interval 0.0 never times out. 1.0 to 60.0. + +// (placement and movement settings) + +// PATTERN, + // DROP, no initial velocity, direction or distance from emitter + // EXPLODE, spray in all directions + // ANGLE, "fan" shape defined by ANGLE BEGIN and END values + // ANGLE_CONE, "ring" or "cone" shapes defined by ANGLE BEGIN and END values + +// ACCEL, x,y,z 0.0 to 50.0? sets a constant force, (affects all patterns) + +// RADIUS 0.0 to 50.0? distance from emitter to create new particles + // (Useless with DROP pattern and FOLLOW_SRC option) + +// SPEED, 0.01 to 50.0? Sets range of starting velocities. (Useless with DROP pattern.) + +// ANGLE_BEGIN & END, 0.0 (up) to PI (down), (Only useful with ANGLE patterns) + +// OMEGA, x,y,z 0.0 to PI? Sets distance to rotate emitter nozzle between bursts + // (Only useful with ANGLE patterns) + +// TARGET_KEY, "key", (requires a TARGET option below) can be many things : + // llGetOwner() + // llGetKey() target self + // llGetLinkKey(1) target parent prim + // llGetLinkKey(llGetLinkNum() + 1) target next prim in link set + +// (on/off options that affect how particles look) + +// EMISSIVE identical to "full bright" setting on prims +// FOLLOW_VELOCITY particle texture 'tilts' towards the direction it's moving +// INTERP_COLOR causes color and alpha to change over time +// INTERP_SCALE causes particle size to change over time + +// (on/off options that affect how particles move) + +// BOUNCE particles can't go below altitude of emitter +// WIND sim's wind will push particles around +// FOLLOW_SRC makes particles move (but not rotate) if their emitter moves, (disables RADIUS) +// TARGET_POS causes particles to home in on a target object +// TARGET_LINEAR forces a DROP pattern like behavior and disables wind. diff --git a/JetFlameParticleScript.txt b/JetFlameParticleScript.txt new file mode 100644 index 00000000..ff7c6247 --- /dev/null +++ b/JetFlameParticleScript.txt @@ -0,0 +1,95 @@ +default { + state_entry() { + llParticleSystem( [ + PSYS_SRC_TEXTURE, llGetInventoryName(INVENTORY_TEXTURE, 0), + PSYS_PART_START_SCALE, <15.5,15.5, 0>, PSYS_PART_END_SCALE, <0,2.0, 0>, + PSYS_PART_START_COLOR, <255,140,0>, PSYS_PART_END_COLOR, <.5,.2,0>, + PSYS_PART_START_ALPHA, 1.0, PSYS_PART_END_ALPHA, 0.0, + + PSYS_SRC_BURST_PART_COUNT, 1, + PSYS_SRC_BURST_RATE, 0.01, + PSYS_PART_MAX_AGE, 3.4, + PSYS_SRC_MAX_AGE, 0.0, + + PSYS_SRC_PATTERN, 8, // 1=DROP, 2=EXPLODE, 4=ANGLE, 8=ANGLE_CONE, + PSYS_SRC_ACCEL, <0.0,0.0,0.0>, + + // PSYS_SRC_BURST_RADIUS, 0.0, + PSYS_SRC_BURST_SPEED_MIN, .01, PSYS_SRC_BURST_SPEED_MAX, 3.01, + + PSYS_SRC_ANGLE_BEGIN, 1*DEG_TO_RAD, PSYS_SRC_ANGLE_END, 0*DEG_TO_RAD, + PSYS_SRC_OMEGA, <0,0,0>, + + // PSYS_SRC_TARGET_KEY, llGetLinkKey(llGetLinkNum() + 1), + + PSYS_PART_FLAGS, ( 0 + | PSYS_PART_INTERP_COLOR_MASK + | PSYS_PART_INTERP_SCALE_MASK + | PSYS_PART_EMISSIVE_MASK + | PSYS_PART_FOLLOW_VELOCITY_MASK + // | PSYS_PART_WIND_MASK + // | PSYS_PART_BOUNCE_MASK + // | PSYS_PART_FOLLOW_SRC_MASK + // | PSYS_PART_TARGET_POS_MASK + // | PSYS_PART_TARGET_LINEAR_MASK + ) ] ); + } +} + + +// (particle appearance settings) + +// TEXTURE, can be an "Asset UUID" key copied from a modable texture, or the name of a texture in the prim's inventory. +// SCALE, vector's x and y can be 0.0 to 4.0. z is ignored. Values smaller than 0.04 might not get rendered. +// END_SCALE requires the INTERP_SCALE_MASK +// COLOR, red,green,blue values from 0,0,0(black) to 1,1,1 (white) +// ALPHA, 0.0 = invisible, less than 0.1 may not get seen, 1.0 = solid/opaque +// END_COLOR and END_ALPHA both require INTERP_COLOR_MASK + +// (emitter controls) + +// BURST_PART_COUNT 1 to 4096 +// BURST_RATE 0.0 to 60.0? # of seconds between bursts, smaller = faster +// PART_MAX_AGE, 0.0 to 30.0, particle lifespan in seconds +// SRC_MAX_AGE - emitter auto-off interval 0.0 never times out. 1.0 to 60.0. + +// (placement and movement settings) + +// PATTERN, + // DROP, no initial velocity, direction or distance from emitter + // EXPLODE, spray in all directions + // ANGLE, "fan" shape defined by ANGLE BEGIN and END values + // ANGLE_CONE, "ring" or "cone" shapes defined by ANGLE BEGIN and END values + +// ACCEL, x,y,z 0.0 to 50.0? sets a constant force, (affects all patterns) + +// RADIUS 0.0 to 50.0? distance from emitter to create new particles + // (Useless with DROP pattern and FOLLOW_SRC option) + +// SPEED, 0.01 to 50.0? Sets range of starting velocities. (Useless with DROP pattern.) + +// ANGLE_BEGIN & END, 0.0 (up) to PI (down), (Only useful with ANGLE patterns) + +// OMEGA, x,y,z 0.0 to PI? Sets distance to rotate emitter nozzle between bursts + // (Only useful with ANGLE patterns) + +// TARGET_KEY, "key", (requires a TARGET option below) can be many things : + // llGetOwner() + // llGetKey() target self + // llGetLinkKey(1) target parent prim + // llGetLinkKey(llGetLinkNum() + 1) target next prim in link set + +// (on/off options that affect how particles look) + +// EMISSIVE identical to "full bright" setting on prims +// FOLLOW_VELOCITY particle texture 'tilts' towards the direction it's moving +// INTERP_COLOR causes color and alpha to change over time +// INTERP_SCALE causes particle size to change over time + +// (on/off options that affect how particles move) + +// BOUNCE particles can't go below altitude of emitter +// WIND sim's wind will push particles around +// FOLLOW_SRC makes particles move (but not rotate) if their emitter moves, (disables RADIUS) +// TARGET_POS causes particles to home in on a target object +// TARGET_LINEAR forces a DROP pattern like behavior and disables wind. diff --git a/MOAP Top 2000 Radio Stations Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl b/MOAP Top 2000 Radio Stations Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl index d0880df9..d2a6e607 100644 --- a/MOAP Top 2000 Radio Stations Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl +++ b/MOAP Top 2000 Radio Stations Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl @@ -18,7 +18,7 @@ // License: // Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License // http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US -// That means this must always be free. +// That means this must always be free. // V1.1 allow longer names @@ -306,6 +306,7 @@ default { http_response(key request_id, integer status, list metadata, string body) { + llSay(0,body); if (request_id == http_request_id) { busy = FALSE; diff --git a/Play_Animation_On_Attach/new.lsl b/Play_Animation_On_Attach/new.lsl new file mode 100644 index 00000000..ea122970 --- /dev/null +++ b/Play_Animation_On_Attach/new.lsl @@ -0,0 +1,16 @@ + +default { + attach(key attached) { + if (attached != NULL_KEY) { + llRequestPermissions(attached, PERMISSION_TRIGGER_ANIMATION); + } else { + llStopAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0)); + } + } + run_time_permissions(integer perms) { + if(perms & (PERMISSION_TRIGGER_ANIMATION)) + { + llStartAnimation(llGetInventoryName(INVENTORY_ANIMATION, 0)); + } + } +} diff --git a/Simple Train/Simple Train script.lsl.txt b/Simple Train/Simple Train script.lsl.txt new file mode 100644 index 00000000..730668b2 --- /dev/null +++ b/Simple Train/Simple Train script.lsl.txt @@ -0,0 +1,41 @@ +float delay = 0.1; +integer m_STEPS = 16; + +motionTo(vector dest,rotation rot) { + integer i; + vector currentpos = llGetPos(); + vector step = (dest - currentpos) / m_STEPS; + + for (i = 1;i <= m_STEPS; i++) + { + if (i == (m_STEPS / 2)) + { + llSetRot(rot); + } + llSetPos(currentpos + (step * i)); + + } + llSensor("Track",NULL_KEY,ACTIVE | PASSIVE,10,PI/2); +} + +default { + state_entry() { + llSensor("Track",NULL_KEY,ACTIVE | PASSIVE,10,PI/2); + } + changed(integer what) { + if (what & CHANGED_REGION_START){ + llResetScript(); + } + } + sensor(integer n) { + motionTo(llDetectedPos(0) +(llRot2Fwd(llDetectedRot(0)) / 10),llDetectedRot(0)); + } + no_sensor() + { + llSetTimerEvent(10); + } + timer() { + llSensor("Track",NULL_KEY,ACTIVE | PASSIVE,10,PI/2); + llSetTimerEvent(0); + } +} \ No newline at end of file diff --git a/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl b/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl index b5778cb5..a2b85e79 100644 --- a/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl +++ b/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/Top_Radio_Stations_Player_1.lsl @@ -22,7 +22,7 @@ // License: // Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License // http://creativecommons.org/licenses/by-nc-sa/3.0/deed.en_US -// That means this must always be free. +// That means this must always be free. // Revisions: // V1.1 allow longer names // V1.2 code added to transmit url to other parcels, additional script @@ -63,7 +63,7 @@ authorize() // Conditional for Owner & Group Recognition { authorized = TRUE; } else { - authorized = FALSE; + authorized = FALSE; } } @@ -232,10 +232,10 @@ state locking else { llOwnerSay("Still loading stations, please wait a moment"); - } -} + } + } -listen(integer channel, string name, key id, string message) + listen(integer channel, string name, key id, string message) { integer where ; if (message == "-") @@ -280,7 +280,7 @@ listen(integer channel, string name, key id, string message) } else if (message == "Lock-Out") { - // state security; + // state security; pubpriv = "Public"; DIALOG_CHOICES = lCategories; pageNum = 1; @@ -328,11 +328,15 @@ listen(integer channel, string name, key id, string message) } http_response(key request_id, integer status, list metadata, string body) - { + { if (request_id == http_request_id) { busy = FALSE; - + llSay(0,"Body is:" +body); + if (TRUE) { + return; + } + if (type == 1) { lCategories = llParseString2List(body,["|"],[]); @@ -394,7 +398,7 @@ state security } } - } +} diff --git a/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/new.lsl b/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/new.lsl new file mode 100644 index 00000000..0171d02e --- /dev/null +++ b/Top2000_Radio_Stations_Player/Top_Radio_Stations_Player/Object/new.lsl @@ -0,0 +1,60 @@ +// +// Give with notice +// + +// Fill in your server and port, if necessary, port 80 is a default. +string SERVER = "http://outworldz.com"; + + + +// * This function cases the script to sleep for 3.0 seconds. +// * If inventory is missing from the prim's inventory then an error is shouted on DEBUG_CHANNEL. +// * Avatar must be, or have recently been, within the same Region as sending object. +// * Does not create a folder when avatar is a prim UUID. +// o The prim must be in the same region. + +//Examples + +// When a user clicks this object, this script will give a folder containing everything in the objects inventory +// This can serve as a unpacker script for boxed objects + +default { + + http_request(key id, string method, string body) + { + llOwnerSay("Someone just got " + llGetObjectName()); + } + + touch_start(integer total_number) { + + llHTTPRequest(SERVER + "?Name=" + llGetObjectName(),[], ""); + + list inventory; + string name; + integer num = llGetInventoryNumber(INVENTORY_ALL); + integer i; + + for (i = 0; i < num; ++i) { + name = llGetInventoryName(INVENTORY_ALL, i); + if(llGetInventoryPermMask(name, MASK_NEXT) & PERM_COPY) + inventory += name; + else + llSay(0, "Don't have permissions to give you \""+name+"\"."); + } + + + //we don't want to give them this script + i = llListFindList(inventory, [llGetScriptName()]); + inventory = llDeleteSubList(inventory, i, i); + + if (llGetListLength(inventory) < 1) { + llSay(0, "No items to offer."); + } else { + // give folder to agent, use name of object as name of folder we are giving + llGiveInventoryList(llDetectedKey(0), llGetObjectName(), inventory); + llHTTPRequest(SERVER,[],llGetObjectName()); + } + + } +} + diff --git a/Vote/Vote Script/Vote script.txt b/Vote/Vote Script/Vote script.txt new file mode 100644 index 00000000..64566729 --- /dev/null +++ b/Vote/Vote Script/Vote script.txt @@ -0,0 +1,71 @@ +// Voting script, only allows one vote per avi +// @author JB Kraft +// script from http://wiki.secondlife.com/wiki/Vote_Simple +// creative commons license +// ------------------------------------------------------------------------ +// Feb 16, 2008 v1.1 - one avi, one vote +// Feb 14, 2008 v1.0 - simple voting, orig code +// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +// this message will be IM'd to the voter after they vote +string g_THANKS_MSG = "Thanks for voting"; +// this will be in the hover text over the prim +string g_HOVER_TEXT = "Vote for Me iF YOU LIKE my SIM, Thanks"; + +// -- dont need to edit anything below here probably unless you want to change +// how the message is delivered when someone votes. see: touch_start -- +integer g_VOTES = 0; +// list of avis that voted +list g_VOTERS; + +// ------------------------------------------------------------------------ +update() +{ + llSetText( g_HOVER_TEXT + "\n" + (string)g_VOTES + " votes", <0,1,0>, 1.0 ); +} + +// ------------------------------------------------------------------------ +integer addVote( key id ) +{ + // check memory and purge the list if we are getting full + if( llGetFreeMemory() < 1000 ) { + g_VOTERS = []; + } + + // make sure they have not voted already + if( llListFindList( g_VOTERS, [id] ) == -1 ) { + g_VOTES++; + g_VOTERS = (g_VOTERS=[]) + g_VOTERS + [id]; + update(); + return TRUE; + } + + return FALSE; +} + +// ------------------------------------------------------------------------ +// D E F A U L T +// ------------------------------------------------------------------------ +default +{ + // -------------------------------------------------------------------- + state_entry() + { + update(); + } + + // -------------------------------------------------------------------- + touch_start(integer total_number) + { + integer i; + for( i = 0; i < total_number; i++ ) { + if( addVote( llDetectedKey(i))) { + if( g_THANKS_MSG != "" ) { + // uncomment one and only one of these next 3 lines + //llWhisper( 0, g_THANKS_MESSAGE ); + //llSay( 0, g_THANKS_MSG ); + llInstantMessage( llDetectedKey(i), g_THANKS_MSG ); + } + } + } + } +} \ No newline at end of file diff --git a/image.png b/image.png new file mode 100644 index 00000000..66f42f3f Binary files /dev/null and b/image.png differ