|
Gus Trommler
Registered User
Join date: 16 Nov 2007
Posts: 7
|
06-13-2008 11:32
Im new to scripting and cant figure out how to make a transaction tester. what i would like it to do is to let the AVI pay L$1 and get back L$1 i have seem some examples of how the givemoney works but i cant figure it out. plase help. with all the issues lately in SL and transactions it would be nice to have this to offer customers to test before they buy. thank you for your time
|
|
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
|
06-13-2008 12:08
look into llGiveMoney and strings have it send 1L$ to somone then have it send the 1L$ back if it gose threw have it instant message or whisper that it when threw else if it didnt have it say it didnt srry cant e much more help not in a scripting mind atm
|
|
Incoherendt Randt
Skank
Join date: 13 Dec 2007
Posts: 85
|
06-13-2008 13:33
Sent one to you!
|
|
Gus Trommler
Registered User
Join date: 16 Nov 2007
Posts: 7
|
06-13-2008 14:39
Thanks again. I owe ya!
|
|
Toritoys Tigerpaw
Registered User
Join date: 26 Jun 2008
Posts: 1
|
06-26-2008 19:17
More people asked for this so here! This isn't magic and it can't tell you that money events are gonna still be working in 2 minutes but maybe it makes buying stuff a little bit less scary? // Simple tester to see if money events are working today. // If everything is OK, it will refund the payment and send an IM saying so. // incoherendt randt April 2008
get_permission() { // don't offer to accept any money just yet. llSetText("Not enabled.", <1., 0., 0.>, 1.); llSetPayPrice(PAY_HIDE, [PAY_HIDE, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
llOwnerSay("Requesting debit permission because I need it to issue refunds."); llRequestPermissions(llGetOwner(), PERMISSION_DEBIT); }
default { on_rez(integer number_we_dont_care_about_here) { get_permission(); }
state_entry() { get_permission(); }
run_time_permissions(integer perm) { if (perm & PERMISSION_DEBIT) {
// offer to accept 1L payments llSetPayPrice(PAY_HIDE, [1, PAY_HIDE, PAY_HIDE, PAY_HIDE]); llSetText( "Money transaction tester.\n" + "Pay me L$1. I will return it\nif transactions are working.\n"+ "Please tell my owner if they are not!", <0., 1., 0.>, 1. ); llOwnerSay("payment dialog enabled."); } }
touch_start(integer num_detected) { // If the owner touches, re-request debit permissions. Quick // way to disable if things are going badly. if (llDetectedKey(0) == llGetOwner()) { get_permission(); } }
money(key whopaid, integer amount) { llGiveMoney(whopaid, amount); // return what was paid llInstantMessage(whopaid, "I have just returned your L$" + (string) amount); }
}
|