Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Affiliate script

Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
01-06-2007 12:25
I've recently started a system that is somewhat similar to hippiepay but without the surveys, everything is working great but I want to be able to let others take copies and put them up and get paid a percentage of everything the user gets.

Not sure how to post a link here, but just do an in game search for instant money machine to come see it.

I have everything on the server side working fine, the php and database, but the in game scripting still confuses me.
Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
?
01-07-2007 22:44
Any know how to do this? I know that the machine can only pay the users from the owner, so I know it's going to have to link somehow to a central prim that does the paying out to everyone. I just don't think I can write the script myself and need some help.
Hg Beeks
llGetElement(80);
Join date: 13 Apr 2006
Posts: 134
01-08-2007 00:36
Hey there - I came across your land some time back, and was interested in seeing where it went. I couldn't find it again afterwards, and didn't remember your name.
This has a multi-author vendor script - I assume it could be adapted to your needs.
/54/36/13457/1.html
CODE
// Distribute money to the object authors
list myAuthors = llParseString2List(llList2String(authors, currentItem), ["|"], []);

if (llGetListLength(myAuthors) > 0) {
integer shareAmount = (integer)llList2Integer(prices, currentItem) / llGetListLength(myAuthors);
// Eliminate my owner from the authors list
for (i = 0; i < llGetListLength(myAuthors); i++) {
llInstantMessage(llList2Key(myAuthors, i), name + " purchased " + llList2String(items, currentItem) + ". Your share is L$" + (string)shareAmount + ".");
if (llList2Key(myAuthors, i) == llGetOwner()) {
myAuthors = llDeleteSubList(myAuthors, i, i);
}
}
// Pay any remaining authors accordingly
if (shareAmount > 0 && llGetListLength(myAuthors) > 0) {
for (i = 0; i < llGetListLength(myAuthors); i++) {
llGiveMoney(llList2Key(myAuthors, i), shareAmount);
}
}
}

Being the specific lines I think you need. Do you still need a new design for your ATMs? I was beginning to brainstorm some stuff. :3
Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
New design
01-08-2007 15:04
I have a pretty good design now, but am willing to look at others. Until I get an affiliate script working the only machines will be on my land.
Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
hmm
01-09-2007 11:56
Okay, I'm confused as usual.. I really need someone with some scripting skill to help me get this going. If you need to see the current code or have any questions contact me.
Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
Well
01-19-2007 23:04
I'm still in need of this script. I've had a lot of people asking to get a copy of the Instant Money Machine for their businesses but without the affiliate script I can't do it. Like I've said before, I really suck at lsl and for the most part the whole system is done out of game, but this part is going to have to be done in game.

If anyone is interested in helping please contact me, leave an IM even if I'm not in game.
Soen Eber
Registered User
Join date: 3 Aug 2006
Posts: 428
01-19-2007 23:47
You might have better luck posting in the Products Wanted forum, you're more likely to find people who script for money instead of for fun, and who would put up with a client's tight schedule commitments.
Ina Centaur
IC
Join date: 31 Oct 2006
Posts: 202
01-20-2007 00:52
are you stuck on the track-saving bit? what part are you stuck on?

are you saving your tracked data into a list (inworld) or on some external web server?
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-20-2007 02:40
Post what you are having problems with and we can have a look.
Danx Daniels
Registered User
Join date: 22 Dec 2006
Posts: 99
Hmm
01-20-2007 22:54
Well the problem is pretty easy. I have no idea where to begin. Everything works perfectly as is. But I want to be able to allow others to place a copy of the machine on thier own land and recieve a percentage of the money that users make when they use it.
Newgate Ludd
Out of Chesse Error
Join date: 8 Apr 2005
Posts: 2,103
01-21-2007 03:15
From: Danx Daniels
Well the problem is pretty easy. I have no idea where to begin. Everything works perfectly as is. But I want to be able to allow others to place a copy of the machine on thier own land and recieve a percentage of the money that users make when they use it.


You say everything is working fine, define 'everything' ?

The problem is that any script can only pay out from its owners account or into its owners account.

When the user earns payment the script communicates the amount and their key back to your database. It also sends the key of the owner of the machine.
The database works out what ever it needs to do and then sends a request to an in world server prim/script which makes the actual payments.