|
Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
|
07-03-2008 15:18
looking for a sample code that when an avatar touches an object the object will do 1 of several things (like a switch statement in c ) such as
object says : Hello, you get nothing or object says : Nope, not this time or object says : Score! (and then it pays out some set amount of lindens)
This object can be worn my any avatar but the linden payout needs to come from my account. Is this possible?
thanks ya-all
|
|
Nichiren Dinzeo
Registered User
Join date: 14 Feb 2007
Posts: 203
|
07-03-2008 15:19
to add......basically we are trying to make our members walking slot machines.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-03-2008 15:26
float value = llFrand(1.0);
// A < B < C if (value < A) { } else if (value < B) { } else if (value < C) { } else { }
|
|
Xhawkx Holden
Registered User
Join date: 1 Nov 2006
Posts: 86
|
07-03-2008 15:43
You can't make it pay from your account if someone else owns it
|
|
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
|
07-04-2008 04:44
From: Xhawkx Holden You can't make it pay from your account if someone else owns it And, to add to what xhawkx said, you can't attach something you don't own. A way around it would is to make the object a vehicle so that the avatar sits on it.
_____________________
I'm back......
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
07-04-2008 11:07
Oh. Missed that bit. Another possibility is to have it communicate to a server that you own, giving all the necessary data such as who wore the attachment and who won the prize. If this is all happening in the same sim, I suggest llRegionSay() with some authentication to ensure no one inserts payment messages from outside the script. If it's not in the same sim, I suggest llHTTPRequest() used to send messages through an outside web server (or object-to-object e-mail if you really must). Even with llHTTPRequest() and llEmail() some authentication would be a good idea, even if they are harder to eavesdrop on.
|
|
Daten Thielt
Registered User
Join date: 1 Dec 2006
Posts: 104
|
07-04-2008 18:20
one other problem, items that pay out money based on a random number are classed as a TOS violation under the gambling ban
|
|
Osgeld Barmy
Registered User
Join date: 22 Mar 2005
Posts: 3,336
|
07-04-2008 19:42
(stirs the cauldron of shi+)
is it gambling if there is no buy in? then is it not just a prize?
dunno, dont really care, but something to thing about
|