Difference between revisions of "User:Kuraiko Yoshikawa/sandbox/LSL Goodies/de"
m (copied from english version) |
m |
||
Line 1: | Line 1: | ||
{{multi-lang}} | {{multi-lang}} | ||
{{#vardefine:header|{{#var:header}} | <!--{{#vardefine:header|{{#var:header}} | ||
{{{!}} style="background-color:#AAAAAA; margin-bottom:10px;" cellpadding="3" cellspacing="1" | {{{!}} style="background-color:#AAAAAA; margin-bottom:10px;" cellpadding="3" cellspacing="1" | ||
{{!}} style="background:#F9F9F9;" valign="top" rowspan="2" {{!}} [[Image:Emblem-important-red.png]] | {{!}} style="background:#F9F9F9;" valign="top" rowspan="2" {{!}} [[Image:Emblem-important-red.png]] | ||
Line 7: | Line 7: | ||
{{!}} style="background:#F9F9F9;" {{!}} | {{!}} style="background:#F9F9F9;" {{!}} | ||
This page is unfinished o.o Don't use this Stuff!!! | This page is unfinished o.o Don't use this Stuff!!! | ||
{{!}}} }}{{#if:{{{inline|}}}<noinclude>t</noinclude>|{{#var:header}}}} | {{!}}} }}{{#if:{{{inline|}}}<noinclude>t</noinclude>|{{#var:header}}}}--> | ||
<table> | <table> | ||
<tr> | <tr> | ||
Line 14: | Line 14: | ||
<div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed;">Intro</div> | <div style="background-color: #cfc0e0; font-size: 1.2em; font-weight: bold; border-bottom: black 1px dashed;">Intro</div> | ||
<div style="padding: 10px 10px 10px 10px;"> | <div style="padding: 10px 10px 10px 10px;"> | ||
Inspiriert durch [[User:Zai Lynch/Sandbox/LSL Goodies|Zai's LSL Goodies]] werde ich von Zeit zu Zeit (hilfreiche) Scripte hier veröffentlichen. | |||
<p> | <p> | ||
Ich bin zwar kein LSL Guru aber alle Scripte sind getestet und ich hoffe sie arbeiten auch bei dir gut o.O | |||
<br> | <br> | ||
In case you got problems with one of my scripts nevertheless, send me an InWorld IM or post it at the [[{{TALKPAGENAME}}|talk page]]! | In case you got problems with one of my scripts nevertheless, send me an InWorld IM or post it at the [[{{TALKPAGENAME}}|talk page]]! | ||
Solltest du dennoch probleme mit einem meiner Scripte haben dann sende mir eine InWorld IM oder Poste dein problem in der [[{{TALKPAGENAME}}|talk page]]! | |||
</p> | </p> | ||
<p> | <p> | ||
Alle Scripte sind unter der [http://creativecommons.org/licenses/by-sa/3.0/ Creative Commons Attribution-Share Alike 3.0 License] veröffentlicht. | |||
</p> | </p> | ||
</div> | </div> | ||
Line 61: | Line 64: | ||
integer gPrice = 10; // set the price of the product in L$ | integer gPrice = 10; // set the price of the product in L$ | ||
string gFolder = "Advanced Vendor Box"; // set the name of folder you'd like to see created in the customers inventory o.o | string gFolder = "Advanced Vendor Box"; // set the name of folder you'd like to see | ||
integer gNotify = TRUE; // if you'd like to get a notification when an item is purchased then set this value to TRUE (the box will send you a mail) | // created in the customers inventory o.o | ||
integer gNotify = TRUE; // if you'd like to get a notification when an item is purchased | |||
// then set this value to TRUE (the box will send you a mail) | |||
string gMail = "foobar@example.com"; // is notify TRUE then set your mail addy here | string gMail = "foobar@example.com"; // is notify TRUE then set your mail addy here | ||
string gNoteCard = ""; // have you got an info notecard? Set the name of it. You have no info notecard? Leave it blank (example: string gNoteCard = "";) | string gNoteCard = ""; // have you got an info notecard? Set the name of it. | ||
integer gGiveNC = FALSE; // Give the notecard with other inventory content to the customer? When YES set it to TRUE | // You have no info notecard? Leave it blank | ||
//(example: string gNoteCard = "";) | |||
integer gGiveNC = FALSE; // Give the notecard with other inventory | |||
// content to the customer? When YES set it to TRUE | |||
// otherwise notecard is only for information on touch | // otherwise notecard is only for information on touch | ||
// set a hover text... leave it blank for no hover! (i hate hover text o.O) (\n = new line) | |||
string gHover = "I'm a KVNSB test box\nTouch me hard :P\nBuy me!!!\nPlease *_*"; | |||
vector gHoverColor = <255,255,255>; // set the hovertext color in RGB values (example: <255,255,255> for white) | vector gHoverColor = <255,255,255>; // set the hovertext color in RGB values (example: <255,255,255> for white) | ||
Line 186: | Line 199: | ||
if(gNotify) | if(gNotify) | ||
{ | { | ||
llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " + llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); | llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " | ||
+ llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); | |||
++gAktMail; | ++gAktMail; | ||
} | } | ||
Line 205: | Line 219: | ||
if(gNotify) | if(gNotify) | ||
{ | { | ||
llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " + llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); | llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " | ||
+ llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); | |||
++gAktMail; | ++gAktMail; | ||
} | } | ||
Line 248: | Line 263: | ||
</lsl> | </lsl> | ||
<b> | <b>Das Mail Script</b> (.MAIL ID (example: .MAIL 01 (dieses Format ist sehr wichtig!!! > "(punkt)MAIL Leerzeichen Zahl" beginnend bei eins (01))<br> | ||
Wenn gNotify TRUE ist musst du mindestens ein .MAIL Script in den Prim kopieren! Standard wären fünf Scripte (max. Verzögerung somit nur 2Sekunden). Solltest du weniger als fünf benutzen wollen dann passe den Wert von gMailScripts @ Advance Variables an. | |||
<lsl> | <lsl> | ||
integer gID; | integer gID; |
Revision as of 17:22, 5 July 2008
Intro
Inspiriert durch Zai's LSL Goodies werde ich von Zeit zu Zeit (hilfreiche) Scripte hier veröffentlichen.
Ich bin zwar kein LSL Guru aber alle Scripte sind getestet und ich hoffe sie arbeiten auch bei dir gut o.O
Alle Scripte sind unter der Creative Commons Attribution-Share Alike 3.0 License veröffentlicht. KVNSB (Kuraiko's VendorBox is not a Simple Box :P)
Summary:
Das KVNSB kann alles verkaufen! Egal ob du Scripte (du solltest sie auf not running setzen um Komplikationen mit dem/den Vendor Script(s) vorzubeugen), Notecards, Landmarks, Bodypars, Texturen, Gestures oder Sounds O_O. Es verkauft ALLES nur keine Freebies XD (wird vieleicht in einer folgenden Version ein Workaround eingebaut). Der Preis muss also mindestens auf 1L$ stehen.
Was kann das KVNSB ausser alles Verkaufen?
Ich glaube, das war das wichtigste! Solltest Du das KVNSB neu starten wollen (weil du z.B. die Permission-Debit-Anfrage abgelehnt hast oder etwas am Inventar geändert hast (nach Inventaränderungen MUSST du das KVNSB Neustarten ansonsten is der neue Inventarinhalt dem Script nicht bekannt!)) drücke einfach auf den Prim und halte mindestens 5 Sekunden den Left-Click. The Main Script (.VEND) integer gPrice = 10; // set the price of the product in L$ string gFolder = "Advanced Vendor Box"; // set the name of folder you'd like to see // created in the customers inventory o.o integer gNotify = TRUE; // if you'd like to get a notification when an item is purchased // then set this value to TRUE (the box will send you a mail) string gMail = "foobar@example.com"; // is notify TRUE then set your mail addy here string gNoteCard = ""; // have you got an info notecard? Set the name of it. // You have no info notecard? Leave it blank //(example: string gNoteCard = "";) integer gGiveNC = FALSE; // Give the notecard with other inventory // content to the customer? When YES set it to TRUE // otherwise notecard is only for information on touch // set a hover text... leave it blank for no hover! (i hate hover text o.O) (\n = new line) string gHover = "I'm a KVNSB test box\nTouch me hard :P\nBuy me!!!\nPlease *_*"; vector gHoverColor = <255,255,255>; // set the hovertext color in RGB values (example: <255,255,255> for white) //-------------------\\ // Advance Variables \\ //-------------------\\ integer gMailScripts = 5; // How many .MAIL <ID> scripts are in the PRIM inventory? //-------------------\\ // No Edit Variables \\ //-------------------\\ integer gPerms = FALSE; integer gTime; list gInventory; integer gListLength; integer gAktMail = 1; default { run_time_permissions(integer perm) { if (perm & 0x2) { gPerms = TRUE; state createInventory; } else { llSetText("Offline", <1,0,0>, 1.0); } } state_entry() { llSetText("Please Accept PERMISSION DEBIT", <0,1,0>, 1.0); if(!gNotify) gNotify = 0; if (llGetInventoryNumber(-1) > 1 + gMailScripts) llRequestPermissions(llGetOwner(), 0x2); else llSetText("Offline ~ Nothing @ Inventory o.O", <1,0,0>, 1.0); llResetTime(); } touch_start (integer t) { if (llDetectedKey(0) == llGetOwner()) { gTime = llGetUnixTime(); } } touch(integer t) { if (llDetectedKey(0) == llGetOwner()) { if (llGetUnixTime()-gTime > 5) { llResetScript(); } } } } state createInventory { state_entry() { llSetText("Read Inventory", <1,0.5,0>, 1.0); integer length = llGetInventoryNumber(-1); integer x; for (x = 0; x < length; x++) { if(llGetInventoryName(-1, x) == llGetScriptName()) { } else if (gNoteCard != "" && gGiveNC == TRUE && llGetInventoryName(-1, x) == gNoteCard) { gInventory += gNoteCard; } else { if (llGetInventoryName(-1, x) == gNoteCard || llGetSubString(llGetInventoryName(-1, x), 0, 5) == ".MAIL " ) { } else gInventory += llGetInventoryName(-1, x); } } state online; } } state online { state_entry() { llSetText(gHover, gHoverColor/255, 1.0); llSetPayPrice(gPrice, [gPrice, -1, -1]); } money(key giver, integer amount) { if (amount == gPrice) { llGiveInventoryList(giver, gFolder, gInventory); llWhisper(0, "Thanks " + llKey2Name(giver) + "!"); if (gAktMail == gMailScripts) gAktMail = 1; if(gNotify) { llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " + llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); ++gAktMail; }
} else if (amount > gPrice) { integer back = amount - gPrice; llGiveInventoryList(giver, gFolder, gInventory); llMessageLinked(LINK_THIS, 22, "You have payed too much. The excess amount will be refunded to you.", giver); llWhisper(0, "You have payed to much. The excess amount will be refunded to you."); llGiveMoney(giver, back); if (gAktMail == gMailScripts) gAktMail = 1; if(gNotify) { llMessageLinked(LINK_THIS, gAktMail, "[PURCHASER]: " + llKey2Name(giver) + "\n[PURCHASED ITEMS]: " + llList2CSV(gInventory), (key)gMail); ++gAktMail; } } else { llMessageLinked(LINK_THIS, 20, "Sorry, it's not enough.", giver); llWhisper(0, "Sorry, it's not enough."); llGiveMoney(giver, amount); } } touch_start(integer t) { if (llDetectedKey(0) == llGetOwner()) { gTime = llGetUnixTime(); } else { if(gNoteCard != "" && ~llGetInventoryType(gNoteCard) ) { llGiveInventory(llDetectedKey(0), gNoteCard); } else { llWhisper(0, "Sorry no information for this item found."); } } } touch(integer t) { if (llDetectedKey(0) == llGetOwner()) { if (llGetUnixTime()-gTime > 5) { llResetScript(); } } } } </lsl>
Das Mail Script (.MAIL ID (example: .MAIL 01 (dieses Format ist sehr wichtig!!! > "(punkt)MAIL Leerzeichen Zahl" beginnend bei eins (01)) default { state_entry() { gID = (integer)llGetSubString(llGetScriptName(), 5, -1); } link_message(integer send_num, integer num, string lmsg, key id) { if (num == gID) { llEmail(id, "[SOLD]: " + llGetObjectName(), lmsg); } } } </lsl> |
Sandbox SL Chatlog Wikifier | Kurai's LSL Goodies | Zai's LSL Goodies Lovely Stuff Zai's Page |