I am have made this script which sends a http request for information, this is then returned through an instant message. However I am having problems when testing it with other avatars (with the object not responding), I realize this is probably because the script is looking for llGetOwner, however I cant seem to get it working with other alternatives. Also I am finding it hard to prompt with llSay when an option on a list is pressed. Finally does anyone know if there is a better way to display a http response - through a notecard for example?
I realize i am asking for the moon on a stick here, but any help with any of the problems would be a huge help, I love you all. thanks:
key http_request_id;
string url = "http......";
integer CHANNEL = 42;
key id;
list MENU = ["Summary"];
default
{
touch_start(integer total_number)
{
llListen(0,"",llGetOwner(),""
; llDialog(llDetectedKey(0), "Welcome to the .. terminal. \n\nPLEASE SELECT AN OPTION THEN ENTER YOUR NUMBER.", MENU, CHANNEL);
}
listen(integer channel, string name, key id, string message)
{
if (message == "Summary"
{
llListen(0,"",llGetOwner(),""
; llSay(0, "Please enter your number"
; // this llSay does not happen for some reason}
}
listen(integer channel, string name, key id, string message)
{
llSay(0, "Your borrower number is:" + message);
{
http_request_id = llHTTPRequest(url+ llEscapeURL(message) + "&Summary", [HTTP_METHOD, "GET"], ""
;}
}
http_response(key request_id, integer status, list metadata, string body)
{
if ( request_id == http_request_id )
{
llInstantMessage ( llGetOwner(), "INFORMATION" + body );
}
}
}