Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   [Help] Message to all players through GUI (https://forums.graalonline.com/forums/showthread.php?t=82287)

devilsknite1 10-12-2008 02:07 AM

[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";
    
535;
    
// Text Stuff
    
new GuiTextEditCtrl"Opening_TextEdit1" )
    {
      
profile GuiBlueTextEditProfile;
      
height 20;
      
width 795;
      
125;
      
text "Enter your message here then press send";
    }
    
// Send Button
    
new GuiButtonCtrl"Opening_Button1" )
    {
      
profile GuiBlueButtonProfile;
      
text "Send";
      
width 54;
      
795;
      
115;
    }
    
// Clear Button
    
new GuiButtonCtrl"Opening_Button2" )
    {
      
profile GuiBlueButtonProfile;
      
text "Clear";
      
width 59;
      
849;
      
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;
    
sleep0.05 );
    
Opening_TextEdit1.text "";
  }
    else
  {
    
Opening_MultiLine1.text Opening_MultiLine1.text NL player.account ":" SPC Opening_TextEdit1.text;
    
sleep0.05 );
    
Opening_TextEdit1.text "";
  }
}

// Clear Button
function Opening_Button2.onAction()
{
  
Opening_MultiLine1.text "";


If you can help out with this, thanks in advance.

Deas_Voice 10-12-2008 02:47 AM

Quote:

Originally Posted by devilsknite1 (Post 1432004)
Great Wall of Text

uhm just wondering, i noticed that you won the VĂ*i, and in your signature u have "Nintendo Wii? Where? " so as we all thought, u dident get 1?

devilsknite1 10-12-2008 04:14 AM

A bit off topic, but yes, I haven't received the Wii yet. I'm thinking about just trading it in for life time gold or something if I don't get it in another month z.z

cbk1994 10-12-2008 04:24 AM

What do you need help with?

devilsknite1 10-12-2008 04:44 AM

I'm trying to change the player chat system into a GUI chat box system.

Skyld 10-31-2008 02:24 PM

Undeleted for reference.


All times are GMT +2. The time now is 10:59 AM.

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