2009年8月23日日曜日

venderが完成しました

ようやく、完成しました。
1パネルと9パネル(というか10パネルなんですけど、これを9パネルと呼んでるのかな?)

50個まで動作確認できましたので、MAX50ということで・・・。

タイマーなどのスクリプト無しでlow lagが売りです。
形状が同じになってくるので、特に1prim化もしておりません。

また、フリーのオブジェクト、ノートカード、ランドマークを各1つ渡せるものが標準装備です。






LISAVendor 1P ver1.0
=============================
An edited version of Multi-author vendor.

====
ABOUT
====
MONO Script
A one screen "low lag" (No timers/listen) version of my multipanel vendor.
The code is similar and simpler as all mutlipanel elements have been removed.
Easy to customise as there is no link order beyond main screen being the root.
Lots of error checking on the "objectList" notecard. (Name capitalisation, presence, type and price are checked for validity.)
Only one price is presented to the user for the buy dialog, mostly removing under/over payment.
A notecard can be set for each item to be given on touch.

====
SETUP
====

Put object to be sold inside the main vendor panel
(Automatically selected when you select the vendor if Edit Linked Parts is off, it contains the "objectList" notecard) then fill out the notecard.

*********************************************************
WARNING
* One object per line
* Max object count around 50 Objects (Stack overflow)
- Do not let free memory go too low (Under 200~)
*********************************************************

==================
=== NOTECARD FORMAT ===
==================

Standard Item:
ObjectNAME, TEXTURE UUID KEY, PRICE

Item with a notecard to be given on touch:
ObjectNAME, TEXTURE UUID KEY, PRICE, NOTECARD NAME

Name - EXACT inventory name of the item to be sold (Right click, choose properties and copy the name field, then press Control + V to paste into the notecard).
Texture Key - Asset key of the texture (Select in inventory and choose Copy Asset UUID and then press Control + V to paste into the notecard).
Price - Price in $L (0 is not accepted as the Pay field won't accept it as a value. Anything set to 0 will be changed to 1).
Notecard Name - Optional entry, makes the vendor give out a notecard when touched to explain items. The notecard has to be inside the vendor's inventory.

"Cannot find texture" errors mean either you set an invalid asset key or your notecard format is wrong,
three entries (Name, Texture Key, Price) are requred for every item, seperated by commas and on the same line
(New lines only occur when you press return, not when text wraps around).

There is now a lot of error checking when the notecard is read.
Most failures will cause the vendor to shutdown with a warning.

====
CUSTOMISATION
====

The logo prim is located below the large preview panel, it is intended for a 256x128 or 512x256 texture.

You can move and change the buttons, just make sure to keep the script inside them.

To set the automatic vendor name change the section inside speech marks " " on line 4 of the "LISAVendor script":
string VendorName = "LISAVendor 1P ver1.0";

If you wish to give commission on sales it should be done around line 322, an example is included in the comments.
This will be applied to ALL sales.

Examples:
llGiveMoney("AVATAR KEY", (currentPrice / 10));
This would give 10% of the sale to the avatar

llGiveMoney("AVATAR KEY", (currentPrice / 5));
llGiveMoney("AVATAR KEY2", (currentPrice / 5));
This would give 20% of the sale to each of the avatars.

** Warning - Make sure you don't try to give more than 100% of the sale or you will be losing money.

Changing the look of any part of the vendor is easy using Edit Linked Parts.
Only the display screen texture is changed by the script so you can resize/retexture anything else.
You can unlink the vendor but just make sure the display screen is the link root when you relink.
Make sure to keep the script inside the forwards/backwards buttons if you change them.

Lisa Vender 1Panel 9Panel Multi 

0 件のコメント:

コメントを投稿