Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-24-2007, 12:20 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Custom Gui

hey can someone show me how to make a custom gui (I mean with like a custom gui images border, so on and so forth.) I already know how to build them, I just want to know how to put a custom skin (I suppose thats a good term for this) on it.
__________________
Deep into the Darkness peering...
Reply With Quote
  #2  
Old 02-24-2007, 12:25 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
PHP Code:
with ("GuiWindowProfile"bitmap "FILENAME"
By adding that somewhere in a clientsided script, all GuiWindowCtrl would look like the new image.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #3  
Old 02-24-2007, 12:32 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Nope :/
PHP Code:
 with ("Master_Gui_Niromia"bitmap "guiwood_niromia.png"
here the image file so you guys know what I mean.
Attached Images
 
__________________
Deep into the Darkness peering...
Reply With Quote
  #4  
Old 02-24-2007, 12:36 AM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
PHP Code:
temp.profile = new GuiWindowProfile("NiromiaWood");

with (temp.profile)
{
     
bitmap "guiwood_niromia.png";
}

new 
GuiWindowCtrl("GuiWindow")
{
     
profile NiromiaWood;
     
     
// . . .

__________________
What signature? I see no signature?
Reply With Quote
  #5  
Old 02-24-2007, 12:36 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
*sighs*

PHP Code:
with ("GuiWindowProfile"bitmap "guiwood_niromia.png"
Only change the bitmap name itself.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #6  
Old 02-24-2007, 12:38 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by xXziroXx View Post
*sighs*

Only change the bitmap name itself.
XD don't I feel dumb now , I haven't scripted in a month, give me a break. :P

EDIT : Nope neither way works, :/
__________________
Deep into the Darkness peering...
Reply With Quote
  #7  
Old 02-24-2007, 12:53 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiControlProfile"gui_window")
    
bitmap "guiwood_niromia.png";

  
showGui();
}
function 
showGui()
{
  new 
GuiWindowCtrl"Main_GUI")
  {
    
profile "gui_window";
    ...
  }

Something like that?

or
PHP Code:
//#CLIENTSIDE
function onCreated()
{
  new 
GuiWindowCtrl"Main_GUI")
  {
    ...
    
useownprofile true;
    
profile.bitmap "guiwood_niromia.png";
    ...
  }

Or maybe something like that, not sure :P
__________________
Reply With Quote
  #8  
Old 02-24-2007, 12:58 AM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
OR you do what I showed you and you wont have to set a profile on every damn GUI you make on the server.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #9  
Old 02-24-2007, 03:22 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
I tried both way and chompy I do it the first way, I tried moving the bitmap thing into the actual gui. Also the gui, background vanishes, all the other text and scroll box stays.
__________________
Deep into the Darkness peering...
Reply With Quote
  #10  
Old 02-24-2007, 08:37 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Show what you're testing. Make sure you have the weapon, and make sure it calls the profile before it draws it.
Reply With Quote
  #11  
Old 02-24-2007, 01:07 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Check out what godofwarares wrote please.

with ("Master_Gui_Niromia") is wrong, do with (Master_Gui_Niromia) please, also
Master_Gui_Niromia.bitmap = "guiwood_niromia.png"; would be much better
Reply With Quote
  #12  
Old 02-24-2007, 05:58 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Stefan View Post
Master_Gui_Niromia.bitmap = "guiwood_niromia.png"; would be much better
Yeah, some of you guys do a lot of pointless stuff when you don't need to since you're working with object-oriented programming.


Instead of doing, example:

PHP Code:
with (findNPC("Blah"))
{
  
player.chat this.test;

You can just do this:

PHP Code:
player.chat Blah.test
Reply With Quote
  #13  
Old 02-24-2007, 07:14 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Quote:
Originally Posted by Gambet View Post
Yeah, some of you guys do a lot of pointless stuff when you don't need to since you're working with object-oriented programming.


Instead of doing, example:

PHP Code:
with (findNPC("Blah"))
{
  
player.chat this.test;

You can just do this:

PHP Code:
player.chat Blah.test
The more correct way would be:

PHP Code:
player.chat findNPC("Blah").test
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #14  
Old 02-24-2007, 07:37 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Gambet View Post
Yeah, some of you guys do a lot of pointless stuff when you don't need to since you're working with object-oriented programming.


Instead of doing, example:

PHP Code:
with (findNPC("Blah"))
{
  
player.chat this.test;

You can just do this:

PHP Code:
player.chat Blah.test
I'm laughing. hahaha
Reply With Quote
  #15  
Old 02-24-2007, 08:13 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
godofwarares sent me this, it didn't work at first, but when I closed graal and logged back on it worked.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
     new 
GuiWindowCtrl("Window")
     {
          
useOwnProfile true;
          
profile.bitmap "whatever.png";
          
          
position = { 100100 };
          
extent = { 200300 };

          
title destroyOnHide true;
          
canMaximize canResize false;

          
text format("Hello, %s!"player.nick);
     }

just one question aswell, I've seen this
PHP Code:
position = { 100100 }; 
and this
PHP Code:
position "100 100"
which way is correct, they both do the same thing?
__________________
Deep into the Darkness peering...
Reply With Quote
  #16  
Old 02-24-2007, 08:24 PM
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
Quote:
Originally Posted by Angel_Light View Post
godofwarares sent me this, it didn't work at first, but when I closed graal and logged back on it worked.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
     new 
GuiWindowCtrl("Window")
     {
          
useOwnProfile true;
          
profile.bitmap "whatever.png";
          
          
position = { 100100 };
          
extent = { 200300 };

          
title destroyOnHide true;
          
canMaximize canResize false;

          
text format("Hello, %s!"player.nick);
     }

just one question aswell, I've seen this
PHP Code:
position = { 100100 }; 
and this
PHP Code:
position "100 100"
which way is correct, they both do the same thing?
Either is fine ... I just use
x = BLAH;
y = BLAH;
__________________
Reply With Quote
  #17  
Old 02-24-2007, 11:24 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by xXziroXx View Post
The more correct way would be:

PHP Code:
player.chat findNPC("Blah").test
I would say player.chat = Blah.test is the better way findnpc is mainly there for compatbility. The same goes for position = "100 100" - the preferred way is position = {100, 100} but it is accepting different ways for compatbility (so that gui creation scripts from torque work without modification in graal script).
Reply With Quote
  #18  
Old 02-25-2007, 03:06 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by xXziroXx View Post
The more correct way would be:

PHP Code:
player.chat findNPC("Blah").test
Quote:
Originally Posted by Chandler View Post
I'm laughing. hahaha

Yes, because it's logical to tell an NPC to search for information that is already accessible to it, right?


Quote:
Originally Posted by Stefan View Post
I would say player.chat = Blah.test is the better way

Reply With Quote
  #19  
Old 02-25-2007, 03:12 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Gambet View Post
PHP Code:
with (findNPC("Blah"))
{
  
player.chat this.test;

You can just do this:

PHP Code:
player.chat Blah.test
It's funny cause I've only just recently showed you that on N-Pulse Dev
Reply With Quote
  #20  
Old 02-25-2007, 03:13 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Twinny View Post
It's funny cause I've only just recently showed you that on N-Pulse Dev

Yeah, but that's like a teacher telling a student they can't teach other people what they've taught them (regarding your hostile approach).


Thanks, though.


Oh, and it was on AIM. Sometime last week I think :P
Reply With Quote
  #21  
Old 02-25-2007, 03:17 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
I just thought it was very quick to use this,

Quote:
Originally Posted by Gambet
Yeah, some of you guys do a lot of pointless stuff when you don't need to since you're working with object-oriented programming.
Novo taught me the concepts of Object-Orientated programming. I'm happy to show anyone the concepts. I still have the stuff Novo used to teach me .

Maybe I should just finish the interactive lessons....and the website......
Reply With Quote
  #22  
Old 02-25-2007, 03:21 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Twinny View Post
I just thought it was very quick to use this,


Why? That's how you taught me x-x


Turns out it worked...
Reply With Quote
  #23  
Old 02-25-2007, 07:28 AM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Gambet View Post
Yeah, but that's like a teacher telling a student they can't teach other people what they've taught them (regarding your hostile approach).


Thanks, though.


Oh, and it was on AIM. Sometime last week I think :P
But you do not "teach". You act like the person who does not know what you are saying is an idiot, and you down talk them like you are superior, when Twinny just even taught you it!
__________________
Reply With Quote
  #24  
Old 02-25-2007, 08:49 AM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Kristi View Post
But you do not "teach". You act like the person who does not know what you are saying is an idiot, and you down talk them like you are superior, when Twinny just even taught you it!

Not at all.


That's the way Twinny taught me, and I learned, so I figured it would work for others.


I simply said that some people do useless stuff and then explained why via example. I didn't make any offensive comments toward anyone.


And it doesn't matter when I learned it. Why? Because even if I learned it 5 minutes ago or 5 years ago (obviously an exaggeration since GS2 hasn't been around to the public for 5 years), I'd still know the same information, so when I learned it is irrelevant.
Reply With Quote
  #25  
Old 02-25-2007, 09:25 AM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
PHP Code:
with (findNPC("Blah"))
{
  
player.chat this.test;

I was laughing at this part.
Reply With Quote
  #26  
Old 02-25-2007, 11:12 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Kristi View Post
But you do not "teach". You act like the person who does not know what you are saying is an idiot, and you down talk them like you are superior, when Twinny just even taught you it!
Sometimes unconstructive critism is the best motivator, That how Invern got me to learn GS2. :o lol
__________________
Deep into the Darkness peering...
Reply With Quote
  #27  
Old 02-26-2007, 02:22 AM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
What, am I famous or something?
Quote:
Originally Posted by xXziroXx View Post
The more correct way would be:

PHP Code:
player.chat findNPC("Blah").test
Do you use findnpc("this").variable also?
Note: That was sarcasm, it doesn't work.
__________________
Reply With Quote
  #28  
Old 02-26-2007, 10:50 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
I use
resize(x, y, w, h);
Much more clean
__________________
Do it with a DON!
Reply With Quote
  #29  
Old 02-26-2007, 11:35 PM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Quote:
Originally Posted by Inverness View Post
What, am I famous or something?
Yes you are. ;]
__________________
Deep into the Darkness peering...
Reply With Quote
  #30  
Old 02-27-2007, 01:44 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Wow what is this? This thread got a little off topic . . . Oh well.

PHP Code:
player.chat findNpc("Control-NPC").whatever
Thats how I do it.
__________________
What signature? I see no signature?
Reply With Quote
  #31  
Old 02-27-2007, 06:59 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by godofwarares View Post
Wow what is this? This thread got a little off topic . . . Oh well.

PHP Code:
player.chat findNpc("Control-NPC").whatever
Thats how I do it.

Stefan already backed up my example in saying that my way was the better way of doing it.
Reply With Quote
  #32  
Old 02-27-2007, 07:45 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
Quote:
Originally Posted by Gambet View Post
Stefan already backed up my example in saying that my way was the better way of doing it.
So what? That's his way of doing it.
Reply With Quote
  #33  
Old 02-27-2007, 08:04 PM
Gambet Gambet is offline
Registered User
Join Date: Oct 2003
Posts: 2,712
Gambet is on a distinguished road
Quote:
Originally Posted by Chandler View Post
So what? That's his way of doing it.

Oh, sorry, I thought it read "Thats how u do it"
Reply With Quote
  #34  
Old 02-28-2007, 12:21 AM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Well it's not necessary better, it's shorter, but to show to readers that Control-NPC is a db-npc is can be ok to use findnpc() I guess.
Reply With Quote
  #35  
Old 02-28-2007, 01:14 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
shorter saves more bytes, less bytes, USUALLY the quicker the script runs.
__________________
Deep into the Darkness peering...
Reply With Quote
  #36  
Old 02-28-2007, 05:00 AM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Angel_Light View Post
shorter saves more bytes, less bytes, USUALLY the quicker the script runs.
There's no discernable correlation between script size and execution time. A larger file just takes more time to send to the client.
__________________
◕‿‿◕ · pfa · check yer syntax! · src

Killa Be: when i got that locker in 6th grade the only thing in it was a picture of a midget useing a firehose :/
Reply With Quote
  #37  
Old 02-28-2007, 07:35 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
It's compiled into a low level language anyway isn't it?
Reply With Quote
Reply


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 03:36 AM.


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