Guide List
Second Life Linden Dollars Guide
Second Life Player Guide
Script : tip-jar-script

list g_DONATORS;
list g_AMOUNTS;
list g_TIMES;

key g_OWNER;

default
{
    state_entry()
    {
        g_OWNER = llGetOwner();
        llSetObjectName((string)llKey2Name(g_OWNER) + "'s Tip Jar");
        llOwnerSay("Your tip jar is ready to go...");
    }
    on_rez(integer int)
    {
        llResetScript();
    }
    touch_start(integer int)
    {
        if(llDetectedKey(0) == g_OWNER)
        {
            integer total = 0;
            integer x;
            integer Length = llGetListLength(g_DONATORS);
            if (Length == 0) llOwnerSay("You have had no donations yet. 
Work a little harder!");
            else
            {
                llOwnerSay("Here Are The Stats From Your Tip Jar");
                for (x = 0;x < Length;x++)
                {
                    string name = llList2String(g_DONATORS,x);
                    string amount = llList2String(g_AMOUNTS,x);
                    string times = llList2String(g_TIMES,x);
                    total += (integer)amount;
                    llOwnerSay((string)(x+1) + ". " + name + " - $L " +
amount + " (" + times + " times)");
                }
                llOwnerSay("Your Total So Far is $L " + (string)total);
            }               
        }
    }
           
    money(key giver, integer amount)
    {
        string name = llKey2Name(giver);
        integer Position = llListFindList(g_DONATORS,(list)name);
        if (Position == -1)
        {
            integer times = 1;
            g_DONATORS += name;
            g_AMOUNTS += amount;
            g_TIMES += times;
            llInstantMessage(giver,"Thank you for your donation " +
name + ".  It is appreciated!");
        }
        else
        {
            integer amount = llList2Integer(g_AMOUNTS,Position) +
amount;
            integer times = llList2Integer(g_TIMES,Position) + 1;
            g_AMOUNTS =
llListReplaceList(g_AMOUNTS,(list)amount,Position,Position);
            g_TIMES =
llListReplaceList(g_TIMES,(list)times,Position,Position);
            llInstantMessage(giver,"Wow! You have donated " +
(string)times + " times for a total of $L " + (string)amount + "! Thank you!!!");
        }      
    }       
}


   
2Moons Dil | 9Dragons Gold | Age of Conan Money | Aion Money | Anarchy Online Credits | Archlord Gold | Cabal Online Alz | Cabal Online Euro Alz | City of Villains Infamy | City of Heroes Influence | Dark Age of Camelot Platinum | Diablo2 Items | Dofus Kamas | Dungeons Dragons Online Platinum | Eve Online Isk | EverQuest 1 Platinum | EverQuest 2 Platinum | Fiesta Online Silver | Final Fantasy XI Gil | Fly for Fun Penya | Gaia Online Gold | Gods and Heroes Money | GoonZu Online Gold | Granado Espada Money | Guild Wars Gold | Hellgate London Palladium | Hero Online Gold | IMVU Credits | KAL Online Geon | Knight Online Noah | Last Chaos Gold | Lineage 1 Adena | Lineage 2 Adena | Lord of The Rings Online Gold | Lord of The Rings Online Euro Gold | Maple Story Mesos | Maple Story Euro Mesos | Martial Heroes Gold | Martial Heroes Euro Gold | Mu Online Bless | Myth War Online Money | Perfect World Gold | Perfect World Euro Gold | Phantasy Star Universe Meseta | Pirates of the Burning Sea Doubloon | Pirates of the Caribbean Gold | Ragnarok Online Zeny | Rappelz Online Gold | Reign Of Revolution Money | RF Online Currency | Rohan Money | Rose Online Zuly | Runescape Gold | Scions of Fate Gold | Seal Online Cegel | Second Life Linden | Shadow of Legend Gold | Shaiya Gold | SilkRoad Online Gold | Star Wars Galaxies Credits | Sun Online Money | Sword of the New World Vis | Tabula Rasa Credits | Tales Of Pirates Gold | The Matrix Online Information | There Buck | Tibia Gold | Shaiya Gold | Twelve Sky Silver coins | Ultima Online Gold | Vanguard - Saga of Heroes Gold | Voyage Century Silver Coins | Warhammer Online Money | Warhammer Online Euro Money | With Your Destiny Gold | World of Warcraft Gold | World of Warcraft Euro Gold |
Copyright © 2005-2008 www.IG2T.Com All Rights Reserved.