Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-25-2007, 02:48 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Login Message

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 onActionServerSidecmd )
{
  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.ntemp.htemp.stemp.);
  }
}
//#CLIENTSIDE
function onCreated()
{
  
triggerserver"gui"name"getMessage" );
}
function 
onActionClientSidecmdnhs)
{
  if ( 
cmd == "returnMessage" )
  {
    for ( 
temp.)
    {
      
temp.ne @= temp."\n";
    }
    
    for ( 
temp.)
    {
      
temp.hi @= temp."\n";
    }
    
    for ( 
temp.)
    {
      
temp.st @= temp."\n";
    }
    
    for ( 
temp.)
    {
      
temp.inf @= temp."\n";
    }
    
    
showMessagetemp.netemp.hitemp.sttemp.inf );
  }
}
function 
showMessagenewshiringsstaffinfo )
{
  new 
GuiWindowCtrl"LoginMessage_Window" )
  {
    
profile "GuiBlueWindowProfile";
    
    
width 440;
    
height 368;
    
    
screenwidth - ( width );
    
screenheight - ( height );
    
    
canMaximize canResize false;
    
canClose canMinimize visible title true;
    
    
text "Welcome to" SPC servername "!";
    
    new 
GuiScrollCtrl"LoginMessage_NewsScroll" )
    {
      
profile "GuiBlueScrollProfile";
      
      
15;
      
54;
      
      
width 410;
      
height 300;
      
      
vScrollBar "dynamic";
      
hScrollBar "alwaysOff";
      
      
visible false;
      
      new 
GuiMLTextCtrl"LoginMessage_NewsText" )
      {
        
profile "GuiBlueTextProfile";
        
        
3;
        
0;
        
        
width 390;
        
height 300;
        
        
text news;
      }
    }
    
    new 
GuiScrollCtrl"LoginMessage_HiringsScroll" )
    {
      
profile "GuiBlueScrollProfile";
      
      
15;
      
54;
      
      
width 410;
      
height 300;
      
      
vScrollBar "dynamic";
      
hScrollBar "alwaysOff";
      
      
visible false;
      
      new 
GuiMLTextCtrl"LoginMessage_HiringsText" )
      {
        
profile "GuiBlueTextProfile";
        
        
3;
        
0;
        
        
width 390;
        
height 300;
        
        
text hirings;
      }
    }
    
    new 
GuiScrollCtrl"LoginMessage_StaffScroll" )
    {
      
profile "GuiBlueScrollProfile";
      
      
15;
      
54;
      
      
width 410;
      
height 300;
      
      
vScrollBar "dynamic";
      
hScrollBar "alwaysOff";
      
      
visible false;
      
      new 
GuiMLTextCtrl"LoginMessage_StaffText" )
      {
        
profile "GuiBlueTextProfile";
        
        
3;
        
0;
        
        
width 390;
        
height 300;
        
        
text staff;
      }
    }
    
    new 
GuiScrollCtrl"LoginMessage_InfoScroll" )
    {
      
profile "GuiBlueScrollProfile";
      
      
15;
      
54;
      
      
width 410;
      
height 300;
      
      
vScrollBar "dynamic";
      
hScrollBar "alwaysOff";
      
      
visible false;
      
      new 
GuiMLTextCtrl"LoginMessage_InfoText" )
      {
        
profile "GuiBlueTextProfile";
        
        
3;
        
0;
        
        
width 390;
        
height 300;
        
        
text info;
      }
    }
    new 
GuiTabCtrl"LoginMessage_Tab" )
    {
      
profile "GuiBlueTabProfile";
      
      
35;
      
30;
      
      
width 450;
      
height 24;
      
      
tabwidth 90;
      
      
clearRows();
      
      
temp.= {
                 { 
"News""LoginMessage_NewsScroll" },
                 { 
"Hirings""LoginMessage_HiringsScroll" },
                 { 
"Staff""LoginMessage_StaffScroll" },
                 { 
"Info""LoginMessage_InfoScroll" }
               };
      
      for ( 
temp.temp.)
      {
        
with addRow0temp.a[0] ) )
        {
          
this.iPane temp.a[1];
        }
      }
      
thiso.catcheventname"onSelect""onTabSelected" );
      
setSelectedRow);
    }
  }
}
function 
onTabSelectedtabs )
{
  for ( 
temp.tabs.rows )
  {
    if ( 
temp.== tabs.selected )
    {
      ( @ 
temp.t.iPane[0] ).visible true;
    }
    else
    {
      ( @ 
temp.t.iPane[0] ).visible false;
    }
  }

Attached are some screenshots. Please give me feedback!
Attached Thumbnails
Click image for larger version

Name:	graal_1195951532.png
Views:	804
Size:	73.1 KB
ID:	43371  
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.