Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

money ball

Jacob Thatch
Senior Member
Join date: 31 Mar 2005
Posts: 146
06-14-2005 10:33
I am trying to make a script that will give out money to people in a certain area and also give out a certain ammount depending on how many ppl are in the area, kinda like moonshines but with a little less. Well being new to scripting, i havent realy worked with the reading from notecard whitch isn where i want it to get the info for how much per person in area and range for it to give money out. And the other thing i need to know how to do is how it detects how MANY people are in the area.
Davy Flytrap
Registered User
Join date: 21 Feb 2005
Posts: 146
06-14-2005 10:54
hi Jacob, i have made one in the game, ill pass it onto you WHEN it comes back up.

Regards Davy
Alex Edo
Insert Brain Here...
Join date: 27 Feb 2005
Posts: 108
Me too.
06-14-2005 10:56
I too would like a system like moonshines but settable:

Timing
Amount
Min People
Range
Jacob Thatch
Senior Member
Join date: 31 Mar 2005
Posts: 146
06-14-2005 11:03
Thnx dave, yeah with sl being down right now im lost lol, im just kinda sitten here twiddlen my thumbs.
cell Neutra
That's L$50k please
Join date: 26 Sep 2004
Posts: 28
06-14-2005 11:36
reading from notecards = ewww :P

scripts not too hard with llSensor()

mine is a little more complicated and might give you some ideas for your own.
It actually has a simple mapping system that verifies that the person is not only within range of the raffler, but is actually within your parcel borders.
Also, it has a weighting system in which the longer a person is in my parcel, the greater chance they have of winning.
Jacob Thatch
Senior Member
Join date: 31 Mar 2005
Posts: 146
06-14-2005 12:01
wouled u be willing to share it, or is it somethin u sell.
Erelas Night
was eaten by dingoes.
Join date: 11 Apr 2005
Posts: 56
06-14-2005 12:39
oh yeah, though I am stuck at RL work and SL is down so I am jonesing horribly, I'd be interested in such a script as well.
Zindorf Yossarian
Master of Disaster
Join date: 9 Mar 2004
Posts: 160
06-14-2005 21:55
You can use llSensor to get the number of people nearby. Then just tell the thing what range to look in and the amount of money you want to give out - or let it figure those things out itself based on the sensor data. Any way you do it, llSensor will be an important element.
_____________________
Badass Ninja Penguin: Killing stuff it doesn't like since sometime in May 2004.
cell Neutra
That's L$50k please
Join date: 26 Sep 2004
Posts: 28
06-15-2005 15:47
I don't really sell scripts, though I probably should, I'd be rich by now :P.

But I odn't give them out, either, I give the theory and some main methods and have ppl do it themselves hehe.

A big part of the "money ball" is just like a visitor list.

In a visitor list, you scan every x seconds and compare each person found to a list, then eliminate the duplicates.

In my auto-raffler, I use this technique to buld my entrant list, but dont' delete duplicates.

This way every time a visitor is sensed within the raffle timeframe they will be aded to the list again.

As another twist, each time the person was sensed I used llGetDetectedPos(i) to retrieve the persons local position and compare it to a long string of compares which simulate a map of my place.

Then you just need a timer event so that your money ball gives out money at a certain rate and give money to an ID randomly selected from the list.

Hope that helps anyone.

Rayve Mendicant
cell Neutra
Pushing The Limits
Simon Metalhead
Rock Star
Join date: 26 May 2003
Posts: 187
06-25-2005 07:14
Hmm, anyway to make a money ball with all the default options but rather than using a radius scan, it will just pick an avatar in the current property? This way people who might fall in the radius outside your land or if you have an irregularly shaped plot, it'll still work... I tested out a radius script and unless you live in a place that's circular, it misses the corners on the scan etc...
_____________________
Come visit me at Natoma (0,0)
_________________________________
Come check out www.rock66.com and sign up! We have given away lots of L$ in our SL Arcade contests! Keep an eye out for more upcoming contests!
Antagonistic Protagonist
Zeta
Join date: 29 Jun 2003
Posts: 467
06-25-2005 11:39
I dont have any postable scripts, but here are a coupla pointers.

for filtering out those AVs who are on your property, use http://secondlife.com/badgeo/wakka.php?wakka=llOverMyLand (llOverMyLand)

When using sensors, bear in mind that there is a cap on the number of AVs it will detect in one sweep. So to get around this, you need to rotate the "money ball" in certain directions and scan with a narrow arc. Do this a few times for each "scan" until you make a full 360 degree scan. Add the results to a list as you go.

For reference, check out
http://secondlife.com/badgeo/wakka.php?wakka=llSensor
http://secondlife.com/badgeo/wakka.php?wakka=llSetRot

and unless you are comfortable using quaternions, I also suggest checking out:
http://secondlife.com/badgeo/wakka.php?wakka=llEuler2Rot because it will make your life easier.

You'll also want to be familiar with lists and their related functions:
http://secondlife.com/badgeo/wakka.php?wakka=lists

And of course, the sensor related stuff, particularly the llDetected* functions
http://secondlife.com/badgeo/wakka.php?wakka=sensors
http://secondlife.com/badgeo/wakka.php?wakka=detected

And um, thats all I can think of right now.

With a little research, it should be pretty easy to make a "money ball" with at least as much functionality as mine or Moonshines. It's pretty basic stuff.

Happy scripting!

-AP
cell Neutra
That's L$50k please
Join date: 26 Sep 2004
Posts: 28
06-29-2005 17:12
llOverMyLand();
group land = can't deed object + pay :(

solution
if(llGetLandOwnerAt(llDetectedPos(0)) == [insert key for group here])