Urusula Zapata
I love my Pugs!
Join date: 20 Mar 2004
Posts: 1,340
|
05-23-2005 17:00
I'm using this free vendor script and I have noticed that when people try to buy something both the Pay and Buy options show up in the pie. A lot of people will select Pay instead of Buy. Is there a way to disable the Pay option or is there another free script that works better?
string name = "Nameofpersonbuying"; integer price = 25; // adjust accordingly string item = "nameofitem";
default { state_entry() { llRequestPermissions( llGetOwner(), PERMISSION_DEBIT ); } run_time_permissions(integer perms) { if (perms & PERMISSION_DEBIT) state run; } }
state run { money(key id, integer amount) { if (llKey2Name(id) == name) { if (amount != price) { llWhisper(0,"Sorry! The price is $" + (string)price); llGiveMoney(id,amount); } else { llGiveInventory(id,item); llInstantMessage(llGetOwner(),name + " bought their item." ; state sold; } } else { llWhisper(0,"To purchase this item right click and select Buy" ; llGiveMoney(id,amount); } } }
state sold { state_entry() { } }
_____________________
Get your decorated jeans, shorts and shirts at Jeans & Things by Urusula. Don't forget to check out Lecktor's Crappy T's while you are there. Jeans & Things by Urusula at Healy (190, 247) Shorts and shirts on SLBoutique.
|
Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
|
05-23-2005 17:05
Open the edit window for the vendor prim and turn off General/For Sale/Contents.
You don't need to set the contents of the prim for sale if you are using a script to set the Pay... option.
|
Laukosargas Svarog
Angel ?
Join date: 18 Aug 2004
Posts: 1,304
|
05-23-2005 17:08
forgot to mention, people should select Pay... and not Buy... if you are using the script. Because they are "Pay"ing money to you, ( via the money() event. Hope this helps 
|
Urusula Zapata
I love my Pugs!
Join date: 20 Mar 2004
Posts: 1,340
|
05-24-2005 05:31
Thanks. Will give it a try today. 
_____________________
Get your decorated jeans, shorts and shirts at Jeans & Things by Urusula. Don't forget to check out Lecktor's Crappy T's while you are there. Jeans & Things by Urusula at Healy (190, 247) Shorts and shirts on SLBoutique.
|