Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-12-2008, 02:07 AM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
[Help] Message to all players through GUI

What I'm trying to do here is make a chat system such as Maloria has. The box instead of the chat bar. I know I didn't disable the chat bar, there's a reason for that.

PHP Code:
//#CLIENTSIDE

function onCreated()
{
  new 
GuiWindowCtrl( "Opening_Window1" )
  {
    
profile = GuiBlueWindowProfile;
    
clientrelative = true;
    
clientextent = "909,145";
    
canmove = false;
    
canresize = false;
    
closequery = false;
    
canclose = false;
    
destroyonhide = false;
    
canmaximize = false;
    
canminimize = false;
    
text = "Chat Box";
    
y = 535;
    
// Text Stuff
    
new GuiTextEditCtrl( "Opening_TextEdit1" )
    {
      
profile = GuiBlueTextEditProfile;
      
height = 20;
      
width = 795;
      
y = 125;
      
text = "Enter your message here then press send";
    }
    
// Send Button
    
new GuiButtonCtrl( "Opening_Button1" )
    {
      
profile = GuiBlueButtonProfile;
      
text = "Send";
      
width = 54;
      
x = 795;
      
y = 115;
    }
    
// Clear Button
    
new GuiButtonCtrl( "Opening_Button2" )
    {
      
profile = GuiBlueButtonProfile;
      
text = "Clear";
      
width = 59;
      
x = 849;
      
y = 115;
    }
    
// Text Scroll
    
new GuiScrollCtrl( "Opening_MultiLine1_Scroll" )
    {
      
profile = GuiBlueScrollProfile;
      
height = 113;
      
hscrollbar = "dynamic";
      
vscrollbar = "dynamic";
      
width = 909;
      
// Text
      
new GuiMLTextCtrl( "Opening_MultiLine1" )
      {
        
profile = GuiBlueMLTextProfile;
        
height = 16;
        
horizsizing = "width";
        
text = "";
        
width = 884;
      }
    }
  }
}

// Send Button
function Opening_Button1.onAction()
{
  if ( 
Opening_MultiLine1.text == "" )
  {
    
Opening_MultiLine1.text = player.account @ ":" SPC Opening_TextEdit1.text;
    
sleep( 0.05 );
    
Opening_TextEdit1.text = "";
  }
    else
  {
    
Opening_MultiLine1.text = Opening_MultiLine1.text NL player.account @ ":" SPC Opening_TextEdit1.text;
    
sleep( 0.05 );
    
Opening_TextEdit1.text = "";
  }
}

// Clear Button
function Opening_Button2.onAction()
{
  
Opening_MultiLine1.text = "";
} 
If you can help out with this, thanks in advance.
Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 11:09 AM.


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