Here's the login message that is used on Utopia. I'm releasing it to the public, since it's not getting too much use here.
The files are control/serverNews.txt, control/serverHirings.txt, control/serverStaff.txt, and control/serverInfo.txt. Change these files to change what text shows up when you log on.
Script of Weapon/GUI-Script -System/LoginMessage:
PHP Code:
function onActionServerSide( cmd )
{
if ( cmd == "getMessage" )
{
temp.n.loadLines( "control/serverNews.txt" );
temp.h.loadLines( "control/serverHirings.txt" );
temp.s.loadLines( "control/serverStaff.txt" );
temp.i.loadLines( "control/serverInfo.txt" );
triggerclient( "gui", name, "returnMessage", temp.n, temp.h, temp.s, temp.i );
}
}
//#CLIENTSIDE
function onCreated()
{
triggerserver( "gui", name, "getMessage" );
}
function onActionClientSide( cmd, n, h, s, i )
{
if ( cmd == "returnMessage" )
{
for ( temp.a : n )
{
temp.ne @= temp.a @ "\n";
}
for ( temp.a : h )
{
temp.hi @= temp.a @ "\n";
}
for ( temp.a : s )
{
temp.st @= temp.a @ "\n";
}
for ( temp.a : i )
{
temp.inf @= temp.a @ "\n";
}
showMessage( temp.ne, temp.hi, temp.st, temp.inf );
}
}
function showMessage( news, hirings, staff, info )
{
new GuiWindowCtrl( "LoginMessage_Window" )
{
profile = "GuiBlueWindowProfile";
width = 440;
height = 368;
x = screenwidth / 2 - ( width / 2 );
y = screenheight / 2 - ( height / 2 );
canMaximize = canResize = false;
canClose = canMinimize = visible = title = true;
text = "Welcome to" SPC servername @ "!";
new GuiScrollCtrl( "LoginMessage_NewsScroll" )
{
profile = "GuiBlueScrollProfile";
x = 15;
y = 54;
width = 410;
height = 300;
vScrollBar = "dynamic";
hScrollBar = "alwaysOff";
visible = false;
new GuiMLTextCtrl( "LoginMessage_NewsText" )
{
profile = "GuiBlueTextProfile";
x = 3;
y = 0;
width = 390;
height = 300;
text = news;
}
}
new GuiScrollCtrl( "LoginMessage_HiringsScroll" )
{
profile = "GuiBlueScrollProfile";
x = 15;
y = 54;
width = 410;
height = 300;
vScrollBar = "dynamic";
hScrollBar = "alwaysOff";
visible = false;
new GuiMLTextCtrl( "LoginMessage_HiringsText" )
{
profile = "GuiBlueTextProfile";
x = 3;
y = 0;
width = 390;
height = 300;
text = hirings;
}
}
new GuiScrollCtrl( "LoginMessage_StaffScroll" )
{
profile = "GuiBlueScrollProfile";
x = 15;
y = 54;
width = 410;
height = 300;
vScrollBar = "dynamic";
hScrollBar = "alwaysOff";
visible = false;
new GuiMLTextCtrl( "LoginMessage_StaffText" )
{
profile = "GuiBlueTextProfile";
x = 3;
y = 0;
width = 390;
height = 300;
text = staff;
}
}
new GuiScrollCtrl( "LoginMessage_InfoScroll" )
{
profile = "GuiBlueScrollProfile";
x = 15;
y = 54;
width = 410;
height = 300;
vScrollBar = "dynamic";
hScrollBar = "alwaysOff";
visible = false;
new GuiMLTextCtrl( "LoginMessage_InfoText" )
{
profile = "GuiBlueTextProfile";
x = 3;
y = 0;
width = 390;
height = 300;
text = info;
}
}
new GuiTabCtrl( "LoginMessage_Tab" )
{
profile = "GuiBlueTabProfile";
x = 35;
y = 30;
width = 450;
height = 24;
tabwidth = 90;
clearRows();
temp.r = {
{ "News", "LoginMessage_NewsScroll" },
{ "Hirings", "LoginMessage_HiringsScroll" },
{ "Staff", "LoginMessage_StaffScroll" },
{ "Info", "LoginMessage_InfoScroll" }
};
for ( temp.a : temp.r )
{
with ( addRow( 0, temp.a[0] ) )
{
this.iPane = temp.a[1];
}
}
thiso.catchevent( name, "onSelect", "onTabSelected" );
setSelectedRow( 0 );
}
}
}
function onTabSelected( tabs )
{
for ( temp.t : tabs.rows )
{
if ( temp.t == tabs.selected )
{
( @ temp.t.iPane[0] ).visible = true;
}
else
{
( @ temp.t.iPane[0] ).visible = false;
}
}
}
Attached are some screenshots. Please give me feedback!