A common approach is to store your data in another script that is in the same prim (or a linked prim). Use llMessageLinked to set or retrieve your data.
For example, your primary script might list people's names and you want to store the list of people in another script. Your main script would look something like this:
touch_start(integer nDetected)
{
llMessageLinked(LINK_THIS,100,"",NULL_KEY);
}
..then in a new script in the same prim, so something like this...
list people;
link_message(integer sender_num, integer num, string str, key id)
{
integer i;
if(100==num)
{
for(i=llGetListLength(people) -1; i > -1; i--)
llSay(0,llList2String(people,i);
}
}
You could populate your other script by passing in a list of values...like this...
llMessageLinked(LINK_THIS,800,llList2CSV(people),NULL_KEY);
...and in your other script, populate a local variable like this....
link_message(integer sender_num, integer num, string str, key id)
{
if(800==num)
people=llCSV2List(str);
}
So it is sort of a game of ping pong between two scripts.
Repeat this pattern as many times as you like and you could end up with lots of usable memory.
-2fast