~~~~Manual for the script "item giver get data from NC for copyable objects (v: 1)"~~~~
* build a prim and modify it how u want (the script makes color of prim in red if it is empty and it will make it in white if it is ready to use)
* put the notecard input (or create a notecard and name it as the word input if u put the script in first u ll get a error message saying no notecard in prim), and the script item giver get data from NC for copyable objects (v: 1) in the prim
* adjust properties of notecard as no-modify
* put objects (only 10 objects can be put in prim and all must be COPYABLE for this script) that will be given after calculation of their average price by prim and script
* open the notecard that is named as input, type prices of each object in prim you have put in prim into the first line of notecard according to alphabetic order in prim, and put comma between prices.
* type name of the objects into the second line of notecard and put commas between each names
* type name of the object or give new names to the objects these names will be shown above prim that u created as hover text (be careful hover text has 143 characters to type so for 10 objects, naming each objects about 14 characters is the best way to show names of objects )
* save the notecard and be sure you adjusted its property as no-modify
This script calculate average price of items that are inside in the prim. and it is used for copyable items. It gives objects and remove the given object then makes new calculation for remaining objects. There are three list in script that give constants necessary for calculation so when u enter number or names in script u must obey alphabetic order in prim inventory. For example as item names name2, name1, name3 are located like that name1 is at top then name2 then name3, respectively in prim. so if type price of first item (name1), u must type its price instead of "price1" (price of the object that named as name1) in list. It works same for hovertext1 (given name for object, that is named as name1, to show as hover text above prim) too.
The script sends request permission to debit, so linden transferring can be provided.
CHANGING the SCRIPT;
To adjust prices and hover texts in script, you must add the notecard named as input or u must form a notecard named as input after putting objects in the prim to sell. In this notecard, you must type the prices of each object into the first line of the notecard according to alphabetic order. The second line must be filled with name of objects in the prim, and the third line must be filled with names that will be shown as hover-text above prim. As a result, if u have the objects that are copyable named as red-outfit (for 100L), black-dress (for 115L), 3-object (for 245L), after put them in prim they will be ordered in prim with this order, at top 3-object, the second one is black-dress and last one is red-outfit. In the notecard input, you must type prices like that first one is 8 then 13 and finally 5 by separating with commas. In the second line, you must type name of objects according to the order in prim inventory and the third line must include the names that will be shown above prim. If you want to show 3-object as First Dress, you must type First Dress in third line of notecard. After comma, the second object in prim can be named as any name that you want to show above prim as hover text. So notecard must be like that;
245,115,100
3-object,black-dress,red-outfit
First Dress,Black Dress,Red Dress
The script take average price like (245 + 115 + 100)/3 = 154L then gives one of them randomly for 154L and removes the given one from prim inventory after giving one of them it calculates average price for remaining objects. for example someone got red-outfit for 154L, new average price would be [(245+115)/2 = 180] for 180L. and if someone pays 180L, s/he will get one of remaining ones randomly.
After any change in inventory or notecard, the script will reset. and it will calculate and adjust average price. names that will be shown as hover text must be 143 letters, totally so names that ll be shown as hover text shouldn't pass 14 letters for each one , it is the best way to show. and hover text can includes only 10 items, so items that will be put in prim shouldn't pass 10 items.
Prim color turns into red color, if no item in it or someone add something that is out of list in script. if someone adds something, that is unwanted, script takes money of costumer then payback without giving any item. If everything is ok, color of prim turns into white so if there is texture on prim it wont be affected.
After paying script sends a message including prices and total gain up to the last purchasing, if it is not reseted if it is reseted script forgets last gain and makes calculation again starting from 0 linden dollar.
if the script reseted for any reason it sends an im to the owner that is "It is reseted", and send a "request permission" to start the script, again. So, it is safe.
- script
- gatcha