|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
04-25-2006 11:48
Is there a way to script a vendor so that it logs who baught what, as sometimes I have heard that lag can casue a vendor not to give an item. And I also want to prevent anyone from trying to pull something on me.
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
04-25-2006 11:55
Well, my own vendors (and lots of other devices) have a simple shout on a channel that is being listened to by an event logger object. The event logger records all the events shouted to it and emails them to me when it gets full. You could also have the vendor IM you - or you could look at your transactions page and see who'd paid what to a vendor. There's all sorts of things that are possible.
But there's no way of checking whether somebody has actually *received* an object, if that's what you mean, I'm afraid. If somebody pays your vendor L$500 and then says "oi, I never got that object from your vendor" there's no way of checking whether they did or not.
|
|
RaptonX Zorger
Registered User
Join date: 26 Jan 2006
Posts: 79
|
04-25-2006 12:01
From: Ordinal Malaprop Well, my own vendors (and lots of other devices) have a simple shout on a channel that is being listened to by an event logger object. The event logger records all the events shouted to it and emails them to me when it gets full. You could also have the vendor IM you - or you could look at your transactions page and see who'd paid what to a vendor. There's all sorts of things that are possible.
But there's no way of checking whether somebody has actually *received* an object, if that's what you mean, I'm afraid. If somebody pays your vendor L$500 and then says "oi, I never got that object from your vendor" there's no way of checking whether they did or not. Yeah, an event logger.....thats probably all I would need, becasue it does not really matter if they get 2, they already got it and it can't be resold.
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
04-25-2006 12:08
Well, I tell you what, I'll put up the code for mine, and stick it in my freebie boxes as well. It's pretty simple stuff. All you do is rez one in an area and then any time you want to log an event, just talk to it on channel -122. e.g. ... // something has been bought and hopefully delivered by av with key id llShout(-122, llKey2Name(id) + " bought " + objectName); llGiveInventory(id, objectName); ...
|
|
Ordinal Malaprop
really very ordinary
Join date: 9 Sep 2005
Posts: 4,607
|
04-25-2006 12:26
The main script: // Event Monitor script // Ordinal Malaprop // 2006-04-10
// Rez this somewhere, and shout to it on channel -122 to record an event // Needs to have the email subscript as well.
// ---LICENCE START--- // The latest version of this script is always available for free // from Ordinal Malaprop via dispenser in my home area or directly.
// This script may be distributed as desired and used as desired // under the condition that:
// - this header licence information is not altered; // - it is clear in the documentation of any item using it that // the script is being used, with author (just a quick mention // is fine, e.g. "Uses <script name> by Ordinal Malaprop"); // - it is not sold BY ITSELF, UNMODIFIED.
// I would appreciate it if you let me know if you are using the // script yourself, but that's not part of the licence. // ---LICENCE END---
string gReport = ""; string gDate = "";
dump_to_email() { if (gReport == "") return; llMessageLinked(LINK_THIS, 0, gReport, NULL_KEY); gReport = ""; }
default { on_rez(integer p) { llResetScript(); }
state_entry() { llListen(-122, "", NULL_KEY, ""); gDate = llGetDate(); llSetText(llGetObjectName(), <0.0, 0.7, 1.0>, 1.0); llOwnerSay("Ready"); }
listen(integer c, string name, key id, string msg) { if (llGetOwnerKey(id) != llGetOwner()) return; string add = llGetTimestamp() + ": " + msg + "\n"; gReport += add; string today = llGetDate(); if (today != gDate || llStringLength(gReport) > 3000) { dump_to_email(); gDate = today; } }
touch_start(integer total_number) { if (llDetectedKey(0) == llGetOwner()) dump_to_email(); } }
The email subscript - you need both of these in the same prim: // Email subscript // Ordinal Malaprop // 2006-04-10
// Used by the event monitor main script
// ---LICENCE START--- // The latest version of this script is always available for free // from Ordinal Malaprop via dispenser in my home area or directly.
// This script may be distributed as desired and used as desired // under the condition that:
// - this header licence information is not altered; // - it is clear in the documentation of any item using it that // the script is being used, with author (just a quick mention // is fine, e.g. "Uses <script name> by Ordinal Malaprop"); // - it is not sold BY ITSELF, UNMODIFIED.
// I would appreciate it if you let me know if you are using the // script yourself, but that's not part of the licence. // ---LICENCE END---
string gEmail = "";
warn() { if (gEmail == "") llOwnerSay("You have not set an email address - edit '" + llGetScriptName() + "' and set gEmail to be the address to send logs to"); }
default { state_entry() { warn(); }
on_rez(integer p) { warn(); }
link_message(integer s, integer n, string str, key id) { llOwnerSay("Sending email..."); string name = llGetObjectName(); llSetObjectName(name + "(" + llGetRegionName() + ")"); llEmail(gEmail, "Event log", str); llSetObjectName(name); llOwnerSay("Done."); } }
I'm going to stick it up in my freebie boxes as well.
|
|
Zalandria Zaius
Registered User
Join date: 17 Jan 2004
Posts: 277
|
using SL's excel to keep track
04-26-2006 06:31
I just redid my vendors. I have them llSetObjectName() to the current object, so when someone is flipping around and buys something, it shows up as them paying the actual item in the transaction history. Just a tip if you want to just download your transactions from the website.
However the .xls from the website will need to be converted to an actual .xls before you can import it into any kind of database because it's actually saved as some sort of html file.
|