removed useless _ folders
This commit is contained in:
3
SL_Chat_Tax/SL_Chat_Tax.sol
Normal file
3
SL_Chat_Tax/SL_Chat_Tax.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="SL_Chat_Tax">
|
||||
<Project name="SL_Chat_Tax" path="SL_Chat_Tax\SL_Chat_Tax.prj" active="true"/>
|
||||
</Solution>
|
||||
199
SL_Chat_Tax/SL_Chat_Tax/Object/SL_Chat_Tax_1.lsl
Normal file
199
SL_Chat_Tax/SL_Chat_Tax/Object/SL_Chat_Tax_1.lsl
Normal file
@@ -0,0 +1,199 @@
|
||||
// :CATEGORY:Chat
|
||||
// :NAME:SL_Chat_Tax
|
||||
// :AUTHOR:Max Case
|
||||
// :CREATED:2010-01-10 05:20:56.000
|
||||
// :EDITED:2013-09-18 15:39:03
|
||||
// :ID:782
|
||||
// :NUM:1070
|
||||
// :REV:1.0
|
||||
// :WORLD:Second Life
|
||||
// :DESCRIPTION:
|
||||
// Originally deployed on New York Law School's Democracy Island, this tool may assist creating a more reflective classroom experience. Students pay money into the object and then are "taxed" a Linden for each character they type. This sounds counterintuitive, right? Of course you want students to speak up and contribute. But when used in combination with some other incentive to contribute in a meaningful' way, this script may keep the chatter down and the students focused on the subject. The term "signal to noise ratio" has some relevance here! On the other hand, this may be stultifying and Orwellian. Your call.
|
||||
// :CODE:
|
||||
//=============================================================
|
||||
|
||||
|
||||
|
||||
//SL CHAT TAX, 0.3
|
||||
|
||||
|
||||
|
||||
//Calculates chat participation by the character and
|
||||
|
||||
// TODO: debits funds on account for each participant
|
||||
|
||||
|
||||
|
||||
//Copyright (C) 2006 Max Case
|
||||
|
||||
|
||||
|
||||
//=============================================================
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//LICENSE ===============
|
||||
|
||||
|
||||
|
||||
//This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. See: http://www.gnu.org/licenses/licenses.html
|
||||
|
||||
|
||||
|
||||
//SETTING UP THE OBJECT ===============
|
||||
|
||||
//Currently people can pay off their debt.
|
||||
|
||||
// Host can insist they pay into the pot.
|
||||
|
||||
//
|
||||
|
||||
// Some variables to play with at the top. Most are self explanitory - wordcost, charcost
|
||||
|
||||
// Nice thing is, it deals with fractions of lindens.
|
||||
|
||||
//TODO - Have host do refund of left over money at end of event.
|
||||
|
||||
//Let me know what other factors you would find useful. Maybe Time of event as multiplier?
|
||||
|
||||
//
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
float wordcost = .02; //Cost per word
|
||||
|
||||
float charcost = .001; //Cost per character- someone use longer words?
|
||||
|
||||
|
||||
|
||||
float gf_running_total; //Tracks running total of all outstanding.
|
||||
|
||||
|
||||
|
||||
//This list holds money owned, name of debtor.
|
||||
|
||||
list lg_owed_name = []; //0 = total owed , +1 = Name
|
||||
|
||||
|
||||
|
||||
// fn_check_list
|
||||
|
||||
// Checks if name on list, if no, return -1, else returns index #
|
||||
|
||||
integer fn_check_list( list to_check, string name)
|
||||
|
||||
{
|
||||
|
||||
// dump the name into a temp list, since we will use list functions on this info
|
||||
|
||||
list new_name_temp = [name];
|
||||
|
||||
integer indexReturn = llListFindList(to_check, new_name_temp);
|
||||
|
||||
return indexReturn;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Adds a name to a list :), in this case, our master list.
|
||||
|
||||
//just a utility function
|
||||
|
||||
fn_add_to_list( string name )
|
||||
|
||||
{
|
||||
|
||||
// dump the name into a temp list, since we will use this to add to the list.
|
||||
|
||||
list new_name_temp = [0.0, name];
|
||||
|
||||
|
||||
|
||||
//add name to list.
|
||||
|
||||
lg_owed_name += new_name_temp ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//this calculates charge
|
||||
|
||||
//TODO - Ability to charge more for words on 'hit list'
|
||||
|
||||
fn_calc_charge(string name,key id, string msg)
|
||||
|
||||
{
|
||||
|
||||
list number = llParseString2List(msg, [" "], []);
|
||||
|
||||
|
||||
|
||||
float owed = ((float)llGetListLength(number) ) * wordcost + ( (float)llStringLength(msg) * charcost) ;
|
||||
|
||||
|
||||
|
||||
integer checkList = fn_check_list( lg_owed_name, name ) ;
|
||||
|
||||
|
||||
|
||||
//Check if they have already spoken
|
||||
|
||||
if( checkList == -1 )
|
||||
|
||||
{ //never voted before?
|
||||
|
||||
fn_add_to_list( name);
|
||||
|
||||
checkList = fn_check_list( lg_owed_name, name ) ;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
fn_process_speech(checkList,owed, id );
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Here's where update charges on list
|
||||
|
||||
fn_process_speech(integer speaker_id, float charge, key id)
|
||||
|
||||
{
|
||||
|
||||
integer speakerIndex = speaker_id; //where the name is.
|
||||
|
||||
integer owedIndex = speakerIndex - 1; //where the votes are in list
|
||||
|
||||
|
||||
|
||||
float current_owed = llList2Float(lg_owed_name, owedIndex ) ;
|
||||
|
||||
|
||||
|
||||
list tempadd = [ charge + current_owed ] ;
|
||||
|
||||
lg_owed_name = llListReplaceList(lg_owed_name, tempadd, owedIndex, owedIndex);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
//Says the current charges. Used in Touch event below
|
||||
|
||||
//mode sets it to SETTEXT mode(1) or SAY mode(0) or ownersay 2
|
||||
|
||||
fn_report(integer mode)
|
||||
6
SL_Chat_Tax/SL_Chat_Tax/SL_Chat_Tax.prj
Normal file
6
SL_Chat_Tax/SL_Chat_Tax/SL_Chat_Tax.prj
Normal file
@@ -0,0 +1,6 @@
|
||||
<Project name="SL_Chat_Tax" guid="D6BA81E8-6C00-1014-B904-200204C60A89">
|
||||
<Object name="Object" guid="D6BA82D7-6C00-1014-B904-200204C60A89">
|
||||
<Script name="SL_Chat_Tax_1.lsl" guid="D6BAB3D4-6C00-1014-B904-200204C60A89">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user