Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Vendor Vendor_One_Person_Only  

Vendor_One_Person_Only

Vendor (One Person Only).lsl

Category: Vendor
By : Ama Omega
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Vendor_One_Person_Only
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Vendor_One_Person_Only_1.lsl
1
2 //Title: Vendor to Sell to Only One Person
3 //Date: 01-28-2004 04:38 PM
4 //Version: 1.0.0
5 //Scripter: Ama Omega
6 //
7 string name = "Nameofpersonbuying";
8 integer price = 10; // adjust accordingly
9 string item = "nameofitem";
10
11 default
12 {
14 {
16 }
18 {
19 if(perms & PERMISSION_DEBIT)
20 state run;
21 }
22 }
23
24 state run
25 {
26 money(key id, integer amount)
27 {
28 if(llKey2Name(id) == name)
29 {
30 if(amount != price)
31 {
32 llWhisper(0,"Sorry! The price is $" + (string)price);
33 llGiveMoney(id,amount);
34 }
35 else
36 {
37 llGiveInventory(id,item);
38 llInstantMessage(llGetOwner(),name + " bought their item.");
39 state sold;
40 }
41 }
42 else
43 {
44 llWhisper(0,"Sorry I'm only selling this to " + name);
45 llGiveMoney(id,amount);
46 }
47 }
48 }
49
50 state sold
51 {
52 state_entry() { }
53 }// END //

Back to the Best Free Tools in Second Life and OpenSim.