Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Library: Simple Update/Gift Based Server

Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
06-19-2008 08:56
another of my random scripts out of the back of my head i desided to release, it is beyond outdated but gives someone something to do :)

with some minor tweeking it can be a bit of anything

this has been retested before posting

//Item Server\\
CODE

integer items_sent;

items()
{
llSetText((string)items_sent + " Items Sent",<1,1,1>,1);
}

default
{
state_entry()
{
llSetTimerEvent(15); // check for new email every 15 seconds (do to delays) best performance preH4
llSetText("0 Items Sent",<1,1,1>,1);
}

timer()
{
llGetNextEmail("","");
items();
}

email( string time, string address, string version, string message, integer num_left )
{
if ((integer)version < 2) // newest version +1
{
list info = llCSV2List(llDeleteSubString(message, 0, llSubStringIndex(message, "\n\n") + 1));
llGiveInventory(llList2Key(info,0),llList2String(info,1));
items_sent += 1; // adds a new number each time a item is sent
}

integer i;
for (i = 0; i < num_left; i++)
{
llGetNextEmail("","");
}
}
}


//Gift Item\\

CODE

string version = "1"; // version of this product
string type = "TestItem"; // name of item

default
{
on_rez(integer start_param)
{
llEmail("(servers key)",version,(string)llGetOwner()+","+type); // all the info to send to the server
}
}
Nada Epoch
The Librarian
Join date: 4 Nov 2002
Posts: 1,423
Library bump
06-23-2008 08:59
:)
_____________________
i've got nothing. ;)
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
06-23-2008 09:16
:o it acculy showed up
JenniferCustomer Luik
Registered User
Join date: 11 Jul 2008
Posts: 1
Syntax error
07-16-2008 15:06
(40, 0) : ERROR :Syntax error
Help please
chrismignon McDonnell
Registered User
Join date: 22 May 2008
Posts: 2
Error
07-20-2008 04:49
llGiveInventory(llList2Key(info,0),llList2String(i nfo,1));

I nfo !!!

info


P: Le script quand vous faite copier coller il fait modifier la ligne
Mrc Homewood
Mentor of Randomness
Join date: 24 Feb 2007
Posts: 779
07-21-2008 17:39
got to love the transfers from forums to sl always has the space thrown in somewhere