Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

IM/Offline notification when items sells in world?

Princess Ivory
SL is my First Life
Join date: 17 Jan 2007
Posts: 720
01-02-2010 06:53
Is there some way to script an object that you are selling so that you receive an IM when it is sold? That way if you are offline, you will still receive an email notification that the item has sold. Right now, all you get is a notice that so and so has paid you money, if you are online. If you are offline, you don't even receive that much.

Any ideas?

Thanks,
Princess Ivory
_____________________
Princess Ivory
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-02-2010 06:58
If you choose the option in Preferences that sends your IMs to e-mail, then you ought to be able to simply script your vendor to send an IM with whatever details you wish. SL ought to forward it to your e-mail. I've avoided doing that with vendors myself because I check my account once a day anyway, but I have received forwarded IMs from other scripted objects, so I know it works.
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Princess Ivory
SL is my First Life
Join date: 17 Jan 2007
Posts: 720
01-02-2010 07:02
From: Rolig Loon
If you choose the option in Preferences that sends your IMs to e-mail, then you ought to be able to simply script your vendor to send an IM with whatever details you wish. SL ought to forward it to your e-mail. I've avoided doing that with vendors myself because I check my account once a day anyway, but I have received forwarded IMs from other scripted objects, so I know it works.


I do have the option selected in Preferences to send my IMs to email, so I know that part works. I just need a basic script for my vendor to send the details to me via IM. Anyone have a quick basic script available they are willing to share, or is it back to the drawing board to create one?! I fumble with LSL, and do far better editing other people's scripts than trying to create one from scratch!

Thanks for letting me know it is possible!

Princess Ivory
_____________________
Princess Ivory
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
01-02-2010 07:21
Add this to the existing vendor script:

llInstantMessage(llGetOwner(), "Your message goes here";);
_____________________
Argent Stonecutter - http://globalcausalityviolation.blogspot.com/

"And now I'm going to show you something really cool."

Skyhook Station - http://xrl.us/skyhook23
Coonspiracy Store - http://xrl.us/coonstore
Princess Ivory
SL is my First Life
Join date: 17 Jan 2007
Posts: 720
01-02-2010 07:28
From: Argent Stonecutter
Add this to the existing vendor script:

llInstantMessage(llGetOwner(), "Your message goes here";);


Cool. Thanks. I'll run it by hubby and see if it makes sense to him. He's my scripting guru when I am stumped. :)
_____________________
Princess Ivory
Rolig Loon
Not as dumb as I look
Join date: 22 Mar 2007
Posts: 2,482
01-02-2010 07:41
From: Princess Ivory
I just need a basic script for my vendor to send the details to me via IM. Anyone have a quick basic script available they are willing to share, or is it back to the drawing board to create one?

OK, here's a dirt-level vendor script, straight from the LSL Wiki. I've added a little to send you information by IM when an item is sold. You'll probably want a more sophisticated vendor, but at least this shows you the idea.

CODE

integer price = 10;

default
{
state_entry()
{
llSetPayPrice(PAY_HIDE, [PAY_HIDE ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_DEBIT)
state cash;
}
}

state cash
{
state_entry()
{
llSetPayPrice(price, [price, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
}
money(key id, integer amount)
{
if(amount != price)
{
llGiveMoney(id, amount);
llInstantMessage(id, "You paid "+(string)amount+", which is the wrong price, the price is: "+(string)price);
}
else
{
llGiveInventory(id,llGetInventoryName(INVENTORY_OBJECT,0));
llInstantMessage(llGetOwner(), llKey2Name(id) + " has just purchased "
+ llGetInventoryName(INVENTORY_OBJECT,0) + "from your vendor on "
+ llGetRegionName());

}
}
}
_____________________
It's hard to tell gender from names around here but if you care, Rolig = she. And I exist only in SL, so don't ask.... ;)

Look for my work in XStreetSL at
Princess Ivory
SL is my First Life
Join date: 17 Jan 2007
Posts: 720
01-02-2010 07:48
From: Rolig Loon
OK, here's a dirt-level vendor script, straight from the LSL Wiki. I've added a little to send you information by IM when an item is sold. You'll probably want a more sophisticated vendor, but at least this shows you the idea.

CODE

integer price = 10;

default
{
state_entry()
{
llSetPayPrice(PAY_HIDE, [PAY_HIDE ,PAY_HIDE, PAY_HIDE, PAY_HIDE]);
llRequestPermissions(llGetOwner(), PERMISSION_DEBIT);
}
run_time_permissions(integer perm)
{
if(perm & PERMISSION_DEBIT)
state cash;
}
}

state cash
{
state_entry()
{
llSetPayPrice(price, [price, PAY_HIDE, PAY_HIDE, PAY_HIDE]);
}
money(key id, integer amount)
{
if(amount != price)
{
llGiveMoney(id, amount);
llInstantMessage(id, "You paid "+(string)amount+", which is the wrong price, the price is: "+(string)price);
}
else
{
llGiveInventory(id,llGetInventoryName(INVENTORY_OBJECT,0));
llInstantMessage(llGetOwner(), llKey2Name(id) + " has just purchased "
+ llGetInventoryName(INVENTORY_OBJECT,0) + "from your vendor on "
+ llGetRegionName());

}
}
}


Rolig,

Thank you so MUCH! I'm sure this will be of much help to hubby and me! We just needed something to get us started, that we could tweak, and weren't sure where to start. I really appreciate the extra time you spent to find this for us! These forums and members ROCK!!

Have a happy New Year!
_____________________
Princess Ivory