jOpenSimWorld

Grid Status: Online
Total Regions: 23
Visitors (30 Days): 12
Total Residents: 485
Online Now: 0
Hypergriders online: 0

Working on a solution to manage your grid outside

12 years 1 month ago - 12 years 1 month ago #1343 by DJ Devil
Ok we all know this, we are on a other grid like for example Second Life/OsGrid or any other, we get a message one of the sims is messing up but the terminal region restart likes to throw error messages and after it doesnt works as expected, what now?

Right now i am working on a Terminal that Reads the Grid Stats from thr JopenSim Splash Page and is able to restart regions, unfortunatly i am not that god in reading from notecard sso my question is:

lets assume i have a notecard in this format
//Regions list
|Region UUID|Region Name|
|Region UUID|Region Name|

how do i get the region name to display in a menu and when clicked uses the according uuid?
Of Course this is in LSL.
any help is appreciated

Please Log in or Create an account to join the conversation.

12 years 1 month ago #1351 by loralai
Hey DJ,

I am not good at Notecard reading either but I was able to piece something together for you to use. You will need to apply some modifications to your menu reader to get only the region name but this should work for you.
key GET_LINES;
key GET_LINE;
//Notecard data
string file = "regions";
integer currentLine;
integer totalLines;
list regions = [];
list spacers = ["  "];
list separators = ["|"];
default
{
    state_entry()
    {
        GET_LINES = llGetNumberOfNotecardLines(file);
    }

    dataserver(key query_id, string data)
    {
        if(query_id == GET_LINES)
        {
            llOwnerSay(data + " lines in this notecard");
            totalLines = (integer)data;
            if(totalLines > 0)
            {
                currentLine = 0;
                GET_LINE = llGetNotecardLine(file, currentLine);
            }    
        }
        else
        if(query_id == GET_LINE)
        {
           integer length = llGetListLength(regions);
           if(length < 1)
           {
               regions = llParseString2List(data, separators, spacers);
           }
           else
           {
               string dump = llDumpList2String(regions, llList2String(separators, 0));
               string newlist = dump +"|"+data;
               regions = llParseString2List(newlist, separators, spacers);
           }
            currentLine += 1;
            if(currentLine < totalLines)
            {
               GET_LINE = llGetNotecardLine(file, currentLine);
            }
            else
            {
                llOwnerSay("End Of NoteCard");
                string stuff = llDumpList2String(regions, llList2String(separators, 0));
                llOwnerSay(stuff);
            }    
        }    
    }
}

Please Log in or Create an account to join the conversation.

Time to create page: 0.077 seconds

Search

Donate jOpenSim

Please consider supporting our efforts.

Amount

Our Regions

Region: Loc X: Loc Y:
Agora 1000 998
BareBad… 997 997
Bohemas 996 998
BoraBor… 1002 999
Crystal… 1001 1000
DeepTho… 1005 998
FoToSan… 999 995
jCity 1001 997
jOpenWe… 1000 999
JuniorT… 1002 1001
Kanadah… 1002 1000
LindaKe… 1000 997
LittleC… 996 997
MonteSc… 1001 1001
Naos 999 999
Pangaea 1005 1003
RiverSi… 999 1000
Sakani 999 998
Snambin 1001 998
Tartola 997 998
ViewerH… 1002 998
WaterWo… 1001 999
WilderK… 1000 1000

jOpenSimWorld

Grid Status: Online
Total Regions: 23
Visitors (30 Days): 12
Total Residents: 485
Online Now: 0
Hypergriders online: 0