Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

A-Z List Menu for URLS

Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
08-16-2007 14:35
Hello,

I am trying to build a A-Z List Menu for URLs (that I got from my website http://seeknlink.110mb.com), that I put in notecards(A-Z notecards). So far a have an object and when touched, it brings up a dialog menu that lists the notecards that correspond with the buttons, but can't seem to integrate a notecard reader into it. This script is Newgate Ludd's Multi Landmark Menu Script. Hope he doesn't mind. I like this script, because it displays the notecards how I want them in a list format.
I am trying to integrate a notecard reader into it(sorry don't know where I got it, Thanks), so it will display on touch, a menu that will display a list of options(notecards(A-Z notecards), then you can press the corresponding button, to display another dialog to list the URLs in that certain notecard. with Next (displays next link in that notecard) and Previous(displays previous link in that notecard) and Back (displays the list of options(1 menu). and open (displays "Load Webpage" dialog). From there anyone can click on "go to page" or click on "Cancel" Once either on of those buttons are clicked, it still keeps the position of where that person was in the notecards(dialog that was up when they clicked open.) I am just getting confused.

Thanks for any and all help,
Kenn Nilsson
AeonVox
Join date: 24 May 2005
Posts: 897
08-16-2007 20:19
Well, you will want to start reading the notecard with something like:

line = 0;
query = llGetNotecardLine(NOTECARD, line);
++line;

Then...you receive the data through the dataserver event...

dataserver(key id, string data)
{
if(query != id) return;
if(data == EOF) return;
//add your data to your list


Then...before you close the dataserver event...you'll want to get the next notecard line (if any):

query = llGetNotecardLine(NOTECARD, line);
++line;

Once you've read a card...you'll want to list the available URLs in your dialog without:

a) Going over the max limit for dialog-text length

and

b) Going over the max limit for button-name length (24 characters)

You'll want to do it in probably a set of 10 URL options with a "forward" and "back" option...possibly even a "forward", "Back", and "New Set" option with only 9 URL options so users can choose from a different notecard without going back out of the menu.

You'll need some integers to keep track of your indexes on your lists...and to keep track of which notecard you're reading from. You'll also want to be very careful with memory management and possibly run several scripts inside the object, each with separate URL lists (depending on if you want to read-on-the-fly or store the notecard URL lists after reading them at startup).
_____________________
--AeonVox--

Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms chasing ghosts, eating magic pills, and listening to repetitive, addictive, electronic music.
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
08-17-2007 00:16
From: Kenn Nilsson
Well, you will want to start reading the notecard with something like:

line = 0;
query = llGetNotecardLine(NOTECARD, line);
++line;

Then...you receive the data through the dataserver event...

dataserver(key id, string data)
{
if(query != id) return;
if(data == EOF) return;
//add your data to your list


Then...before you close the dataserver event...you'll want to get the next notecard line (if any):

query = llGetNotecardLine(NOTECARD, line);
++line;

Once you've read a card...you'll want to list the available URLs in your dialog without:

a) Going over the max limit for dialog-text length

and

b) Going over the max limit for button-name length (24 characters)

You'll want to do it in probably a set of 10 URL options with a "forward" and "back" option...possibly even a "forward", "Back", and "New Set" option with only 9 URL options so users can choose from a different notecard without going back out of the menu.

You'll need some integers to keep track of your indexes on your lists...and to keep track of which notecard you're reading from. You'll also want to be very careful with memory management and possibly run several scripts inside the object, each with separate URL lists (depending on if you want to read-on-the-fly or store the notecard URL lists after reading them at startup).



Hello, Thank You for responding,

I have everything except for your last paragraph. This is where I think I'm having the trouble.

In the last paragraph you said "You'll also want to be very careful with memory management and possibly run several scripts inside the object, each with separate URL lists (depending on if you want to read-on-the-fly or store the notecard URL lists after reading them at startup)" are you saying that, since I have notecards A,B,C,D,....X,Y,Z, with links inside each one. I will have to have a script for each notecard. Meaning notecards A,B,C,D,....X,Y,Z + Scripts A,B,C,D,....X,Y,Z + a main script to control those scripts, to be able to read each notecard and display the links, Right?

Now about keeping track of the notecards I have no clue on how to do this.


Memory Management now it is starting to sound like this idea might be over my head at the moment.

Thanks for your help and pointing me in the right direction.
I think I need to do some more research on Wiki.
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
A-Z List Menu for URLs
08-23-2007 20:04
Hello,

I finally almost have it. I have made this script from scratch this time. I got it where: I build a object, put the script in it, click on the object. Brings up a dialog with buttons A-K on first dialog and then click on the button next and brings up second dialog with L-V and click on next and brings up third dialog with W-Z. Let me mention that when one dialog comes up the other dialog, if one was open, closes. Just in case you were thinking that all the dialogs stay up and don't close.

Well anyway,
When a click on the button "A". loads the notecard "A", which contain the URLs. Displays link info as floating text on object. It also, brings up a Dialog(the other closes(A-Z dialog), with buttons "Open", "Prev" and "Next". My problem or problems is when I click on the "Open" button it displays a script error "Object: llLoadURL - can't find avatar". I have tried to change
llLoadURL - llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs, pointer));.
I have also tried this llLoadURL(llDetectedKey(0), "Load "+llList2String(Hover, pointer), llList2String(URLs, pointer));. That does not seem to work either.

Other than that Next and Prev buttons work, sluggish, but works.
Next Displays the next link in the notecard. Example: Click on next button, it gets the next links' info from the notecard and displays it on the object. Click on the prev button, it get the prev links' info and displays it on the object. It seems you have to wait between links, when clicking on "Next" or "Prev" buttons. Takes a while to get the info. or something like that(Some Reason).

Not sure exactly what the problem or problems is.

Thank You for all your help,

Mikemmax Benford
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
Not Quite There
08-24-2007 21:18
Hello,

I have it almost there. I have been only using two notecards, since I been working on the script.

Well it works with two notecards, Open -opens loadURL dialog, next and previous buttons and A, B,(only two notecards) Notecard buttons work. I would like for all the letters(A-Z) to work.

I got it where it works with only two notecards(or strings), but when I tried to list more strings into the mix I get :

Function Args: Null
Local List: Null

I was wondering, if this meant that I can't use that many notecards or strings in one script ?

Is there a limit to how many strings I can list in a script?


Appreciate your help,

Mikemmax Benford
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
Ok heres the code
08-25-2007 13:44
I finally decided to post all the code in my script I been working on. I would like to mention that this is my first script, Ok, second script, because of Hello World was my first. lol.

Anyway I got everything working, except that when I try to put more than 2 strings in it, I get the following:

Function Args: Null
Local List: Null
Function Args: i
Local List: k

and so on. I just can't figure it out.

Ok here's my script. I know it is not lag free, if someone can help me on that it would be greatly appreciated. Thank You.

Working Script:
<code>
string card="D";
string cardE="E";
integer i=0;
integer pointer=0;
list URLs;
list Hover;
integer randomChannel = 0;
string temp;
key id = llDetectedKey;



list MENU_MAIN = ["A","B","C","D","E","F","G","H","I","J","K","MENU2"];
list MENU_MAIN2 = ["L","M","N","O","P","Q","R","S","T","MENU3","Back"];
list MENU_MAIN3 = ["U","V","W","X","Y","Z","MENU2","MENU1"];
list MENU_LINKS = ["Open","Prev","Next","MAIN 1","MAIN 2","MAIN 3"];


integer listen_id;
integer RE_PRESENT_MAIN_MENU=TRUE;

default
{
state_entry()
{
//Set Up a Listen
llListenRemove(listen_id);
// Add a random channel
randomChannel = 10 + (integer)llFrand(100000);
listen_id=llListen(randomChannel, "", NULL_KEY, "";);


}


touch_start(integer times)
{
key id = llDetectedKey(0);
llDialog(id, "What would you like?", MENU_MAIN, randomChannel);

}

listen(integer CHANNEL, string name, key id, string message)
{
if ( message == "A" )
{

state ALinks;
}
else if ( message == "B" )
{

state B;
}
else if ( message == "C" )
{

state C;
}
else if ( message == "D" )
{

state D;
}
else if ( message == "E" )
{

state E;
}
else if ( message == "F" )
{

state F;
}
else if ( message == "G" )
{

state G;
}
else if ( message == "H" )
{

state H;
}
else if ( message == "I" )
{

state I;
}
else if ( message == "J" )
{

state J;
}
else if ( message == "K" )
{

state K;
}
else if ( message == "L" )
{

state L;
}
else if ( message == "M" )
{

state M;
}
else if ( message == "N" )
{

state N;
}
else if ( message == "O" )
{
;
state O;
}
else if ( message == "P" )
{

state P;
}
else if ( message == "Q" )
{

state Q;
}
else if ( message == "R" )
{

state R;
}
else if ( message == "S" )
{

state S;
}
else if ( message == "T" )
{

state T;
}
else if ( message == "U" )
{

state U;
}
else if ( message == "V" )
{

state V;
}
else if ( message == "W" )
{

state W;
}
if ( message == "X" )
{

state X;
}
else if ( message == "Y" )
{

state Y;
}
else if ( message == "Z" )
{

state Z;
}
else if ( message == "Back" )
{

llDialog(id, "What would you like?", MENU_MAIN, randomChannel);

}

else if ( message == "MENU1" )
{

llDialog(id, "What would you like?", MENU_MAIN, randomChannel);

}

else if ( message == "MENU2" )
{

llDialog(id, "What would you like?", MENU_MAIN2, randomChannel);

}

else if ( message == "MENU3" )
{

llDialog(id, "What would you like?", MENU_MAIN3, randomChannel);

}

}
}


state ALinks
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(card, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);

}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(card, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));


} else if(message=="Prev";)
{

pointer++;

{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

if(pointer==llGetListLength(Hover))

{
pointer=0;

}
} else if(message=="Next";)
{

pointer--;

{

}

if(pointer<0)

{
pointer=llGetListLength(Hover);

pointer--;

}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

else if(message=="MAIN 1";)
{

llDialog(id, "What would you like?", MENU_MAIN, randomChannel);


}

else if(message=="MAIN 2";)
{

llDialog(id, "What would you like?", MENU_MAIN2, randomChannel);

}

else if(message=="MAIN 3";)
{

llDialog(id, "What would you like?", MENU_MAIN3, randomChannel);

}

}

changed(integer CHANGE)

{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}




state B
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(cardE, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);

}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(cardE, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));


} else if(message=="Prev";)
{

pointer++;

{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

if(pointer==llGetListLength(Hover))

{
pointer=0;

}
} else if(message=="Next";)
{

pointer--;

{

}

if(pointer<0)

{
pointer=llGetListLength(Hover);

pointer--;

}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}

else if(message=="MAIN 1";)
{

llDialog(id, "What would you like?", MENU_MAIN, randomChannel);


}

else if(message=="MAIN 2";)
{

llDialog(id, "What would you like?", MENU_MAIN2, randomChannel);

}

else if(message=="MAIN 3";)
{

llDialog(id, "What would you like?", MENU_MAIN3, randomChannel);

}

}

changed(integer CHANGE)

{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}

state C
{
state_entry()
{
}
}
state D
{
state_entry()
{
}
}
state E
{
state_entry()
{
}
}
state F
{
state_entry()
{
}
}
state G
{
state_entry()
{
}
}
state H
{
state_entry()
{
}
}
state I
{
state_entry()
{
}
}
state J
{
state_entry()
{
}
}
state K
{
state_entry()
{
}
}
state L
{
state_entry()
{
}
}
state M
{
state_entry()
{
}
}
state N
{
state_entry()
{
}
}
state O
{
state_entry()
{
}
}
state P
{
state_entry()
{
}
}
state Q
{
state_entry()
{
}
}
state R
{
state_entry()
{
}
}
state S
{
state_entry()
{
}
}
state T
{
state_entry()
{
}
}
state U
{
state_entry()
{
}
}state V
{
state_entry()
{
}
}state W
{
state_entry()
{
}
}state X
{
state_entry()
{
}
}state Y
{
state_entry()
{
}
}state Z
{
state_entry()
{
}
}
</code>
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
Non Working Script
08-25-2007 14:18
Ok Here is the Non-Working One the one I have been trying to put more strings into.

<code>
string Card1="A"; //Set to the name of the invetory iten.
string Card2="B";
string Card3="C";
integer i=0;
integer pointer=0;
list URLs;
list Hover;
integer randomChannel = 0;
key id = llDetectedKey;
list MAIN_Window = ["A","B","C","D","E","F","G","H","I","J","K","MENU 2"];
list Window2 = ["L","M","N","O","P","Q","R","S","T","U","MENU 3","Back"];
list Window3 = ["V","W","X","Y","Z","MENU 2","MENU 1"];
list MENU_LINKS = ["Open","Prev","Next","MAIN 1","MAIN 2","MAIN 3"];

integer listen_id;
integer RE_PRESENT_MAIN_MENU=TRUE;

default
{
state_entry()
{
//Set Up a Listen
llListenRemove(listen_id);
// Add a random channel
randomChannel = 10 + (integer)llFrand(100000);
listen_id=llListen(randomChannel, "", NULL_KEY, "";);
}
touch_start(integer times)
{
key id = llDetectedKey(0);
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
listen(integer CHANNEL, string name, key id, string message)
{
if ( message == "A" )
{
state ALinks;
}
else if ( message == "B" )
{
state B;
}
else if ( message == "C" )
{
state C;
}
else if ( message == "D" )
{
state D;
}
else if ( message == "E" )
{

state E;
}
else if ( message == "F" )
{

state F;
}
else if ( message == "G" )
{
state G;
}
else if ( message == "H" )
{
state H;
}
else if ( message == "I" )
{
state I;
}
else if ( message == "J" )
{
state J;
}
else if ( message == "K" )
{
state K;
}
else if ( message == "L" )
{
state L;
}
else if ( message == "M" )
{
state M;
}
else if ( message == "N" )
{
state N;
}
else if ( message == "O" )
{
state O;
}
else if ( message == "P" )
{
state P;
}
else if ( message == "Q" )
{
state Q;
}
else if ( message == "R" )
{
state R;
}
else if ( message == "S" )
{
state S;
}
else if ( message == "T" )
{
state T;
}
else if ( message == "U" )
{
state U;
}
else if ( message == "V" )
{
state V;
}
else if ( message == "W" )
{
state W;
}
if ( message == "X" )
{
state X;
}
else if ( message == "Y" )
{
state Y;
}
else if ( message == "Z" )
{
state Z;
}
else if ( message == "Back" )
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if ( message == "MENU 1" )
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if ( message == "MENU 2" )
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if ( message == "MENU 3" )
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
}
state ALinks
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card1, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card1, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);

pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state B
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
}
else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);

pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state C
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card3, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card3, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state D
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state E
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state F
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state G
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state H
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state I
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)

{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state J
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state K
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
</code>

Here's part 1.
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
Part 2
08-25-2007 14:20
Sorry too big, for 1 post.

<code>
state L
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state M
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state N
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state O
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state P
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state Q
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state R
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state S
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state T
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state U
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state V
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state W
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}

state X
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state Y
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
state Z
{
state_entry()
{
listen_id = llListen(randomChannel, "", NULL_KEY, "";);
llSetText("Loading Websites NoteCard", <1,1,1>, 1.0);
llGetNotecardLine(Card2, i);
}
touch_start(integer number)
{
key id = llDetectedKey(0);
{
llDialog(id,"Open URL or select new target?", MENU_LINKS, randomChannel);
}
}
dataserver(key query, string data)
{
if(data!=EOF)
{
list temp=llCSV2List(data);
Hover+=llList2String(temp, 0);
URLs+=llList2String(temp, 1);
i++;
llOwnerSay("This notecard has" + (string)i + " links.";);
llGetNotecardLine(Card2, i);
}
else{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
}
listen(integer DialogCHANNEL, string name, key id, string message)
{
llListenRemove(listen_id);
llSetTimerEvent(60);
}
listen(integer CHANNEL, string name, key id, string message)
{
if(message=="Open";)
{
llLoadURL(id, "Load "+llList2String(Hover, pointer), llList2String(URLs,pointer));
} else if(message=="Prev";)
{
pointer++;
{
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
if(pointer==llGetListLength(Hover))
{
pointer=0;
}
} else if(message=="Next";)
{
pointer--;
{
}
if(pointer<0)
{
pointer=llGetListLength(Hover);
pointer--;
}
llSetText(llList2String(Hover, pointer), <1,1,1>, 1.0);
}
else if(message=="MAIN 1";)
{
llDialog(id, "What would you like?", MAIN_Window, randomChannel);
}
else if(message=="MAIN 2";)
{
llDialog(id, "What would you like?", Window2, randomChannel);
}
else if(message=="MAIN 3";)
{
llDialog(id, "What would you like?", Window3, randomChannel);
}
}
changed(integer CHANGE)
{
if (CHANGED_INVENTORY)
{
llResetScript();
}
}
}
</code>

I am just getting fed up with it, at the moment. All that I want to do is be able to put more strings in the script. So I can load more notecards.

Thank You for all your help,

Mikemmax Benford
Mikemmax Benford
Registered User
Join date: 1 Jun 2006
Posts: 14
Leaning towards Memory
08-25-2007 14:49
Hello,

I have been working on this script and I finally got an error which says:

byte code assembly failed ---- Out of Memory.

I haven't been able to get much info on Second Life forums, or Wiki or LSLWiki, about memory and was wondering, if someone can enlighten me about it.

I just can't seem to understand how to link scripts together, if someone help me with that I will be grateful.

Thank You,

Mikemmax Benford
Ynot Fenua
Registered User
Join date: 11 Oct 2006
Posts: 18
Memory
08-30-2007 08:48
The compiler is running out of memory when it tries to compile your code - which basically suggests that your code is far too complex and in-efficient.

if you look at each of your states - the code is almost exactly the same - apart from one string (or so it seems to me) - so do away with the states - all they are acheiving is duplicated code - and more potential bugs.

So put the common code into functions - and have the "state" stored in a variable - not as a state.

as a general rule states should be used for times when the behaviour is fundamentally different, and in your case they are not - a good example of a state is where a property rental does different things depending on whether the property is already rented or is vacant - you could do this with variables as well - but the behaviour is so different that states work here.

Get back to me in world if you need further help.