removed useless _ folders
This commit is contained in:
3
Money Tree/Money Tree.sol
Normal file
3
Money Tree/Money Tree.sol
Normal file
@@ -0,0 +1,3 @@
|
||||
<Solution name="Money Tree">
|
||||
<Project name="Money Tree" path="Money Tree\Money Tree.prj" active="true"/>
|
||||
</Solution>
|
||||
8
Money Tree/Money Tree/Money Tree.prj
Normal file
8
Money Tree/Money Tree/Money Tree.prj
Normal file
@@ -0,0 +1,8 @@
|
||||
<Project name="Money Tree" guid="4ec392c0-3199-4dfd-873c-7b38c94f75c6">
|
||||
<Object name="Object" guid="bad4c4ff-35f9-43bc-b080-75b33f8aaf97" active="true">
|
||||
<Script name="Leaf.lsl" guid="a9dc3f87-0f0b-491f-98b4-9890aa3faf56">
|
||||
</Script>
|
||||
<Script name="Tree.lsl" guid="a467be49-4d79-45d8-8f9e-99458c40a83a">
|
||||
</Script>
|
||||
</Object>
|
||||
</Project>
|
||||
42
Money Tree/Money Tree/Object/Leaf.lsl
Normal file
42
Money Tree/Money Tree/Object/Leaf.lsl
Normal file
@@ -0,0 +1,42 @@
|
||||
// :CATEGORY:Money Tree
|
||||
// :NAME:Money Tree
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-02-20 14:27:38
|
||||
// :EDITED:2014-02-20
|
||||
// :ID:1027
|
||||
// :NUM:1597
|
||||
// :REV:1
|
||||
// :WORLD:Opensim, SecondLife
|
||||
// :DESCRIPTION:
|
||||
// Makes a Money Tree. This is the Leaf Prim
|
||||
// :CODE:
|
||||
|
||||
// Put this in a a prim
|
||||
// Put this prim in the server
|
||||
// It will fall and if touched, send money
|
||||
|
||||
integer channel = -76576; // a very secret number/password also found in the boxes that fall.
|
||||
|
||||
integer ready = FALSE;
|
||||
|
||||
default
|
||||
{
|
||||
on_rez(integer param)
|
||||
{
|
||||
ready = param; // for safety, we make it so if rezzed with no param, it does not spend money
|
||||
llSetTimerEvent((float) param);
|
||||
llSetStatus(STATUS_PHYSICS,TRUE);
|
||||
}
|
||||
timer()
|
||||
{
|
||||
llDie();
|
||||
}
|
||||
touch_start(integer total_number)
|
||||
{
|
||||
if (ready) {
|
||||
llSay(channel,llDetectedKey(0));
|
||||
llDie();
|
||||
}
|
||||
}
|
||||
}
|
||||
67
Money Tree/Money Tree/Object/Tree.lsl
Normal file
67
Money Tree/Money Tree/Object/Tree.lsl
Normal file
@@ -0,0 +1,67 @@
|
||||
// :CATEGORY:Money Tree
|
||||
// :NAME:Money Tree
|
||||
// :AUTHOR:Ferd Frederix
|
||||
// :KEYWORDS:
|
||||
// :CREATED:2014-02-20 14:27:38
|
||||
// :EDITED:2014-02-20
|
||||
// :ID:1027
|
||||
// :NUM:1598
|
||||
// :REV:1
|
||||
// :WORLD:Opensim, SecondLife
|
||||
// :DESCRIPTION:
|
||||
// Makes a Money Tree. This is the Tree Prim
|
||||
// :CODE:
|
||||
// Add a prim to this prims inventory with the FallingScript in it.
|
||||
|
||||
integer Amount = 1; // Give one Linden each time.
|
||||
integer Max = 100; // the max $L to give away, then stop giving
|
||||
|
||||
integer rezTime = 10; // The boxes will rez for 10 seconds, then die
|
||||
float DIST = 10; // Boxes will be rezzed within this radius of the giver. (!!! MAX = 10 )
|
||||
// How often to rez objects
|
||||
float min = 60; // one minute minimum
|
||||
float max = 300; // 5 minutes sometimes
|
||||
integer channel = -76576; // a very secret number/password also found in the boxes that fall.
|
||||
integer Given;
|
||||
default
|
||||
{
|
||||
state_entry()
|
||||
{
|
||||
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
|
||||
}
|
||||
|
||||
run_time_permissions(integer permissions)
|
||||
{
|
||||
if (permissions & PERMISSION_DEBIT)
|
||||
{
|
||||
llListen(channel,llGetInventoryName(INVENTORY_OBJECT,0),"",""); // listen for givers we rezzed by name
|
||||
llSetTimerEvent(llFrand(max - min) + min);
|
||||
}
|
||||
}
|
||||
|
||||
timer()
|
||||
{
|
||||
vector myPos = llGetPos(); // this giver is HERE
|
||||
myPos.x = llFrand(DIST*2) - DIST + myPos.x; // Make it +/- DIST away
|
||||
myPos.y = llFrand(DIST*2) - DIST + myPos.z;
|
||||
|
||||
// And rez it with a start parameter
|
||||
llRezObject(llGetInventoryName(INVENTORY_OBJECT,0),myPos,ZERO_VECTOR, ZERO_ROTATION,rezTime);
|
||||
}
|
||||
|
||||
listen(integer channel, string name, key id, string message)
|
||||
{
|
||||
if (Given > Max) {
|
||||
llSetTimerEvent(0); // stop giving
|
||||
llInstantMessage(llGetOwner(), "Out of money to give");
|
||||
llSetText("Balance: 0 " , <1,0,0>,1.0); // red text
|
||||
return;
|
||||
}
|
||||
|
||||
Given += Amount;
|
||||
key avatarKey = (key) message;
|
||||
llGiveMoney(avatarKey, Amount);
|
||||
llSetText("Balance: " + (string) (Max - Given), <0,0,1>,1.0);// Green text
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user