Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

XML-RPC type scripting help

Hatta Muir
Registered User
Join date: 25 Jun 2005
Posts: 11
07-08-2005 12:52
Hello,

I am absolutely new to LSL (although a veteran programmer). I want to implement a Second Life-based interface with one of my servers. I can do the server-side work (reading from email, processing, replying via XML-RPC) quite easily, what I can't do is the LSL side (yet). And real life pressures mean I can't devote the time to learn the language that I would like.

What I need is a script that does the following:
An object, when rezzed (created, sold, whatever) for the first time, associates itself with it's owner (so the final product can be 'sold'). When touched (or in final implementation, when a payment is made), the object listens for the owner to say something, preceeded by a keyword. Once, heard, the object them passes the entire heard string (keyword and all), along with the script's 'channel' (and/or owner name) out to my server via email. The object then needs to go into a wait state (disallowing the buy function, and ignoring everything the owner says) displaying a set piece of text until a reply is received, which will be come via XML-RPC. When the reply is received, the object needs to either IM the object owner, or set it's float-text to whatever the reply is.

Once a reply has been received, it should also reset itself and allow the entire script to be reset by the owner touching or otherwise interacting with the object, repeating the whole process. (i.e. the owner can reset the entire process once the message has been received)

I know in theory it's a fairly simple script (and I have it speudo-coded) but I don;t know enough about LSL to actually implement it properly (or safely). It's also as far as I know, unique in idea, if not delivery :)

If anyone's interested, please leave me a message here on the forums (I tend to be in-game in the early hours of the morning, SL time) and I'll explain a little more about what's on the outside, what the idea is (it's actually building on something I've been doing in the real world for more than 2 years), and what I hope to achieve.

There's no payment on offer unfortunately (or at least not up front), since I'm (a) a newbie, and (b) landless at the moment, although I'm happy to talk about sharing a percentage of the $L earned.

Failing that, any pointers would be appreciated :)
Jesrad Seraph
Nonsense
Join date: 11 Dec 2004
Posts: 1,463
07-08-2005 13:04
Did you check the Wiki for the examples of RPC usage ? There are also a couple threads in this forum dealing with this subject, that you may find useful :)
_____________________
Either Man can enjoy universal freedom, or Man cannot. If it is possible then everyone can act freely if they don't stop anyone else from doing same. If it is not possible, then conflict will arise anyway so punch those that try to stop you. In conclusion the only strategy that wins in all cases is that of doing what you want against all adversity, as long as you respect that right in others.
Hatta Muir
Registered User
Join date: 25 Jun 2005
Posts: 11
07-08-2005 13:10
From: Jesrad Seraph
Did you check the Wiki for the examples of RPC usage ? There are also a couple threads in this forum dealing with this subject, that you may find useful :)

Yes, it's from reading these (and most of the LSL wiki) that has lead me to making this initial post :) I have all the XML-RPC stuff bookmarked, but it's the practical implementation that's got me stuck :)
Erratic Rambler
Registered User
Join date: 27 May 2005
Posts: 4
07-08-2005 13:47
I'll probably try creating this script. It sounds fairly simple, but gives me a good excuse to play with email and RPC, which I haven't done yet.
Velox Severine
Network Slave
Join date: 19 May 2005
Posts: 73
07-09-2005 23:44
I have a working example I can drop on you inworld of XML-RPC, drop me an IM whenever your online and I'll goto my lab and pull out the script on it and send it over. I also have a PHP script server side that works well that I can give you.
_____________________
--BEGIN SIGNATURE STRING--
IkkgY2FtZSwgSSBzYXcsIEkgY29ucXVlcmVkLiIgLS1KdWxpdXMgQ2Flc2Fy
--END SIGNATURE STRING--
Hatta Muir
Registered User
Join date: 25 Jun 2005
Posts: 11
07-10-2005 09:30
From: Velox Severine
I have a working example I can drop on you inworld of XML-RPC, drop me an IM whenever your online and I'll goto my lab and pull out the script on it and send it over. I also have a PHP script server side that works well that I can give you.

Thanks Velox, I'll drop you an IM later today.

I think Iv'e figured out how to deal with the different things the script needs to do - using states for each part I guess. One thing I'm sure about though - if an object is rezzed (with embedded script), then started, what happens to the channelData value if the person puts it back in their inventory? Or will the object have to remain in the world until the reply is received?
Velox Severine
Network Slave
Join date: 19 May 2005
Posts: 73
07-10-2005 16:58
Yes it does need to wait. Whenever your online again drop me an IM, I put together a little Stock quote ball complete with the PHP script I use to handle the email.
_____________________
--BEGIN SIGNATURE STRING--
IkkgY2FtZSwgSSBzYXcsIEkgY29ucXVlcmVkLiIgLS1KdWxpdXMgQ2Flc2Fy
--END SIGNATURE STRING--
Hatta Muir
Registered User
Join date: 25 Jun 2005
Posts: 11
07-11-2005 09:52
From: Velox Severine
Yes it does need to wait. Whenever your online again drop me an IM, I put together a little Stock quote ball complete with the PHP script I use to handle the email.

My apologies for not IMing you yetserday - real life intruded. As soon as I can make it online I'll drop you a note.