I'm not really sure of how to do this, so I ask here in hope for some light.
I have a mysql database that I get some data from,
A list looking like this:
[4:47] Object: 25_128_NADJ|450|25|128|30
[4:47] Object: 50_128_ADJ1024|1450|50|128|1024
[4:47] Object: 50_128_ADJ512|1200|50|128|512
[4:47] Object: 50_128_ADJ256|1000|50|128|256
[4:47] Object: 50_128_NADJ|650|50|128|30
[4:47] Object: 100_128_ADJ1024|1800|100|128|1024
[4:47] Object: 100_128_ADJ512|1550|100|128|512
[4:47] Object: 100_128_ADJ256|1350|100|128|256
[4:47] Object: 100_128_NADJ|1000|100|128|30
[4:47] Object: 100_96_NADJ|750|100|96|30
[4:47] Object: 100_96_ADJ256|1100|100|96|256
[4:47] Object: 100_96_ADJ512|1300|100|96|512
[4:47] Object: 100_96_ADJ1024|1550|100|96|1024
[4:47] Object: 50_96_ADJ256|800|50|96|256
[4:47] Object: 50_96_ADJ512|1000|50|96|512
[4:47] Object: 50_96_ADJ1024|1250|50|96|1024
[4:47] Object: 100_64_NADJ|550|100|64|30
[4:47] Object: 100_64_ADJ256|900|100|64|256
[4:47] Object: 100_64_ADJ512|1100|100|64|512
[4:47] Object: 100_64_ADJ1024|1350|100|64|1024
[4:47] Object: 50_64_NADJ|300|50|64|30
[4:47] Object: 50_64_ADJ256|650|50|64|256
[4:47] Object: 50_64_ADJ512|850|50|64|512
[4:47] Object: 50_64_ADJ1024|1100|50|64|1024
[4:47] Object: 50_96_NADJ|450|50|96|30
[4:47] Object: 50_192_NADJ|1200|50|192|0
[4:47] Object: 100_192_NADJ|1650|100|192|0
The script I am using is this:
string planrequest;
string server = "http://my-server/";
integer x;
default
{
state_entry()
{
llWhisper(0, "requestion data, please wait"

planrequest = llHTTPRequest(server + "custom/info.php", [ HTTP_METHOD, "GET"], ""

}
http_response(key request_id, integer status, list metadata, string body)
{
if (request_id == planrequest)
{
list datalist = llParseString2List(body, ["#"], []);
integer length = llGetListLength(datalist);
for ( x = 0; x < length; x++)
{
llOwnerSay(llList2String(datalist, x)); // for testing purpouse only
}
llOwnerSay((string)llGetListLength(datalist)); // for testing purpouse only
// state set_info;
}
}
}
// state set_info;
//{
// use touch_start to set info here, but how to set/change info?
//}
The first item is the item name and also the name of the teture, second is price, and the s3 is other info that will be used later.
What I need is, when someone is clicking the object, the texture should change accordingly, and then set the price.
So, from start, the texture "Welcome" will be used.
When clicking (according to the list above) texture should be changed to: "25_128_NADJ" and the variables:
name = 25_128_NADJ
price = 450
var1 = 25
var2 = 128
var3 = 30
Next click, should shange everything to:
texture "50_128_ADJ1024"
name = 50_128_ADJ1024
price = 1450
var1 = 50
var2 = 128
var3 = 1024
I hope someone can help me with this. as I have no clue of how to do this.