Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Gui Help (https://forums.graalonline.com/forums/showthread.php?t=134263518)

patrickp2p 06-10-2011 01:59 AM

Gui Help
 
I've been looking up on Google, the forum, wiki, and everything else that has to do with Graal for a solid Gui tutorial! I can not find any site AT ALL that even remotely has a solid tutorial.. Can someone please give me a solid template or something? I need a new one please or a link to a solid tutorial.
Thanks,
P@TR!CK :cry:

Astram 06-10-2011 03:26 AM

Not a tutorial, just kind of help
http://www.graal.net/index.php/Creat...iControls_List
;)

patrickp2p 06-10-2011 03:48 AM

Thanks but as I mentioned I have looked at it... D: It tells you what to put, but what does it mean, where do I put the things? You know? It's as if you need a teacher, which I'm sure alot of scripters had.

Cubical 06-10-2011 04:06 AM

Most scripters learned from trial and error, the wiki, the forums, irc and asking other scripters advice.

patrickp2p 06-10-2011 08:20 AM

I know D:
Care to help? (:
All I really need is a template.

Tricxta 06-10-2011 09:14 AM

Just use the in-game gui builder, F6 all the way lol. It gives you the source so you can see what it does then you just go from there. I used this along with a bit of help from the wiki and got guis under control in 1 and a bit hours lol =P gl dude

patrickp2p 06-11-2011 12:48 AM

Thanks! That helped me a bunch XP. What do I put so it will show up to all players when they log on (It's basically a gui telling players about hirings and how to contact me).

iBeatz 06-11-2011 03:57 AM

Quote:

Originally Posted by patrickp2p (Post 1654270)
Thanks! That helped me a bunch XP. What do I put so it will show up to all players when they log on (It's basically a gui telling players about hirings and how to contact me).

I suppose you could call a function inside the GUI script from the NPC-Control when the player logs in ie. this goes in the NPC-Control:

PHP Code:

function onActionPlayerOnline(){
 
findWeapon("your weapon name").Test();


Replace the function Test() with the function that shows/activates the GUI in the script, and make sure that the function in the GUI script is a public function so that other NPCs can access it.

patrickp2p 06-11-2011 04:12 AM

*Gets confused* D:

cbk1994 06-11-2011 04:20 AM

Quote:

Originally Posted by patrickp2p (Post 1654270)
Thanks! That helped me a bunch XP. What do I put so it will show up to all players when they log on (It's basically a gui telling players about hirings and how to contact me).

Add the weapon to players when they log on, and show the window in the onCreated event of the weapon on clientside.

Mark Sir Link 06-11-2011 05:01 AM

Quote:

Originally Posted by iBeatz (Post 1654308)
I suppose you could call a function inside the GUI script from the NPC-Control when the player logs in ie. this goes in the NPC-Control:

PHP Code:

function onActionPlayerOnline(){
 
findWeapon("your weapon name").Test();


Replace the function Test() with the function that shows/activates the GUI in the script, and make sure that the function in the GUI script is a public function so that other NPCs can access it.

excessively wasteful, should just be in a weapon players have upon login, and the showing of the GUI should be done in onCreated event clientside

patrickp2p 06-11-2011 01:19 PM

PHP Code:

//#CLIENTSIDE
function onCreated() {
  new 
GuiWindowCtrl("MyGUI_Window4") {
    
profile GuiBlueWindowProfile;
    
clientrelative true;
    
clientextent "320,240";

    
canmove false;
    
canresize false;
    
closequery false;
    
destroyonhide false;
    
text "UPDATE";
    
509;
    
203;

    new 
GuiTextCtrl("MyGUI_Text2") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "HIRINGS";
      
width 70;
      
7;
      
4;
    }
    new 
GuiTextCtrl("MyGUI_Text3") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "--------------------------------------";
      
width 380;
      
18;
    }
    new 
GuiTextCtrl("MyGUI_Text4") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "|";
      
width 10;
      
79;
    }
    new 
GuiTextCtrl("MyGUI_Text5") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "|";
      
width 10;
      
79;
      
11;
    }
    new 
GuiTextCtrl("MyGUI_Text6") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "BY: P@TR!CK (Owner)";
      
width 190;
      
105;
      
2;
    }
    new 
GuiTextCtrl("MyGUI_Text7") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "DATE:";
      
width 50;
      
12;
      
31;
    }
    new 
GuiTextCtrl("MyGUI_Text8") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "------------------------------------";
      
width 360;
      
45;
    }
    new 
GuiTextCtrl("MyGUI_Text9") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "|";
      
width 10;
      
79;
      
23;
    }
    new 
GuiTextCtrl("MyGUI_Text10") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "|";
      
width 10;
      
79;
      
36;
    }
    new 
GuiTextCtrl("MyGUI_Text11") {
      
profile GuiBlueTextProfile;
      
height 20;
      
text "June 10th 2011";
      
width 140;
      
110;
      
30;
    }
    new 
GuiScrollCtrl("MyGUI_MultiLine1_Scroll") {
      
profile GuiBlueScrollProfile;
      
height 171;
      
hscrollbar "dynamic";
      
vscrollbar "dynamic";
      
width 320;
      
67;

      new 
GuiMLTextCtrl("MyGUI_MultiLine1") {
        
profile GuiBlueMLTextProfile;
        
horizsizing "width";
        
text "Hello and welcome to Bellview! We are currently undergoing HEAVY cunstruction and we need a strong staff team. We are currently hiring all Development positions. Please contact P@TR!CK at [email][email protected][/email]. Thanks.";
        
width 295;
      }
    }
  }



patrickp2p 06-11-2011 01:19 PM

Idk howto do the php tag thing so there it is, can someone please format it?

skillmaster19 06-11-2011 04:09 PM

do [.PHP] [./PHP] without the dots.

patrickp2p 06-11-2011 07:52 PM

Oh thank you! (:


All times are GMT +2. The time now is 05:46 AM.

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