Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Banking Script Idea

TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
09-13-2005 12:09
Ok I am not shure where to start on this but is it possable to make an ATM like device usen an Alt Account to work with a private group?

Basicly what I want is an ATM I can place on my land with my Alt groups user and have the other members be able to deposit, withdraw, and check ballance...
Possably have a prim they wear on there person if possable to access there account...
I know some of them prefer to not have the money on them at all times for the temptation of spending...

also something like transfer to a group account...

Just an Idea I was playin with while the fourms was down
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Kenny Jackson
Registered User
Join date: 26 Sep 2004
Posts: 31
09-13-2005 16:37
I just wrote this yesterday for myself!
I hope its usefull.

CODE
///////////////////////////////////////////////////////////////////////////////////
//
//miniATM script by Kenny Jackson
//Add your AV UUID key in the user area and save the script.
//give the ATM to yor alt or who ever is going to be your side storage for money.
//it uses channel 4 to listen on and only listens to the usr AV.
// Just pay it to deposit.
// /4withdraw ### towith draw money.
// /4balance to see your current balance.
//
//////////////////////////////////////////////////////////////////////////



integer balance;
key user = "";

default
{
state_entry()
{
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}

run_time_permissions(integer permissions)
{
//Only wait for payment if the owner agreed to pay out money
if (permissions)
{
llSay(0, "Initailized Successfully...");
state ready;
}
}
}
state ready
{
on_rez(integer start_param)
{
llResetScript();
}

state_entry()
{
llListen(4, "", user, "");
}

listen(integer channel, string name, key id, string message)
{

if(id == user && message == "balance")
{
llInstantMessage(id, "Your balance is $L" + (string)balance);
}
if(id == user && llGetSubString(message, 0, 7) == "withdraw")
{
integer len = llStringLength(message);
string WDamt = llGetSubString(message, 9, len);

balance = balance - (integer)WDamt;
llGiveMoney(user, (integer)WDamt);
llInstantMessage(user, "Your withdraw of $L" + WDamt + " was successful..");
llInstantMessage(user, "Your new balance is $L" + (string)balance);
}
}

money(key id, integer amount)
{
if(id == user)
{
balance = balance + amount;
llInstantMessage(user, "Your deposit of $L" + (string)amount + " was successful..");
llInstantMessage(user, "Your new balance is $L" + (string)balance);
}
else
{
llGiveMoney(id, amount);
llInstantMessage(id, "You can not use this machine.. Your deposit of $L" + (string)amount + " was refunded..");
}
}
}
TXGorilla Falcone
KWKAT Planetfurry DJ
Join date: 4 May 2004
Posts: 176
09-13-2005 17:57
Yes this should work althou not exactly as I had wanted... was lookin for a a way to work from 1 script and many users to save prims but I will use this... first to test solo then add a second for beta
_____________________
Drunken Monkeys danceing on the tables.
Falling from the sky just like in a fable.
Kenny Jackson
Registered User
Join date: 26 Sep 2004
Posts: 31
09-14-2005 09:06
yea this was made for personal use but a couple lists and llSameGroup's should make it what you wanted. But its a good start for ya in my opinion!