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 07-19-2008, 11:10 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Unhappy [help] health sys gui

i got the gui image for it and uploaded it but how do i replace the normal gui with the new gui??


heres the gui

Reply With Quote
  #2  
Old 07-19-2008, 11:29 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
Start by disabling the default one:
PHP Code:
showstats1024 ); 
then show yours:
PHP Code:
showimg200"image.png"0);
changeimgvis200); 
Change the 0, 0 at the end to the x and y. GraalControl.width will give you the far right, GraalControl.height will give you the bottom of the screen.

The 200 is the index; all your images need a unique index and must be over 200 (in this case).

The changeimgvis puts the image on the 4th layer, which is the screen.

Then, show your text where you need it:
PHP Code:
showtext201xy"Font Face""options""Text" ); 
For example:
PHP Code:
showtext20110030"Verdana""b"clientr.hp_cur "/" clientr.hp_max ); 
For those bars, you need to use something like this:
PHP Code:
showimg202"bar.png"3040 );
temp.= ( width clientr.hp_max ) * clientr.hp_cur// Replace width with the width of the bar, and change the vars to what you need.
changeimgpart20200n); // Replace 8 with the height of the bar. 
If you need to show the image of the players current weapon, use:
PHP Code:
showimg203player.weaponsselectedweapon ].image30100 ); 
I recommend splitting all the images into separate images instead of one since it is much simpler to deal with.
__________________
Reply With Quote
  #3  
Old 07-19-2008, 11:54 PM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
where do i find graal control.width
Reply With Quote
  #4  
Old 07-19-2008, 11:57 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 GULTHEX View Post
where do i find graal control.width
GraalControl.width is the variable.
__________________
Reply With Quote
  #5  
Old 07-20-2008, 12:14 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
Angry i got an error

this is the script but when i hit apply

PHP Code:
if (playeronline || weaponfired) {
showstats1024 );
showimg200"kudosai_gui1.png"0);
changeimgvis200);
showtext20110030"Verdana""b"clientr.hp_cur "/" clientr.hp_max ); 
showimg202"kudosai_gui1.png"3040 );
temp.= ( 86 clientr.hp_max ) * clientr.hp_cur
changeimgpart20200n); 
showimg203player.weaponsselectedweapon ].image30100 ); 
i get this error

PHP Code:
Script compiler output for -health:
errorunexpected token:  at line 9showimg203player.weaponsselectedweapon ].image30100 );
Weapon/GUI-script -health added/updated by GULTHEX 
Reply With Quote
  #6  
Old 07-20-2008, 12:15 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
Lol. Sorry, but...

http://wiki.graal.net

Try to learn some of the basics before trying this.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #7  
Old 07-20-2008, 12:16 AM
GULTHEX GULTHEX is offline
Registered User
Join Date: Jul 2008
Posts: 148
GULTHEX can only hope to improve
dude just tell me how to fix the error
Reply With Quote
  #8  
Old 07-20-2008, 12:23 AM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally Posted by GULTHEX View Post
dude just tell me how to fix the error
It appears you stepped a rather crucial step in the process of replacing the default GUI with a custom one, namely "learning some basic programming"! It is usually expected that you gain some basic scripting experience before approaching such a complex task, because scripting is not going to be as easy as copy&pasting together chunks of code you got off the forums.

The "error" is that you have obviously no idea what you are doing, and the recommended way to fix that is to follow the link that was given to you. Alternatively you could convince someone with more clue to show you the ropes, but I suggest you do not try to harass them into doing your all work.
Reply With Quote
  #9  
Old 07-20-2008, 12:08 PM
Zanzel Zanzel is offline
<insert title here>
Zanzel's Avatar
Join Date: Dec 2006
Posts: 35
Zanzel is on a distinguished road
I agree with the others, learn to script before taking steps.
Try scripting up your first few graphic user interface in GUIControls.
You will probably find it much easier to do than trying something
you probably won't get unless you really do want to learn.

Judging by your demands "dude just tell me how to fix the error"
you obviously don't want to teach yourself these things.
__________________
  • N-Pulse / N-Pulse Reborn Scripter
  • Graal Kingdoms Player
  • N-Pulse Player
Reply With Quote
  #10  
Old 07-20-2008, 08:42 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 GULTHEX View Post
this is the script but when i hit apply

PHP Code:
if (playeronline || weaponfired) {
showstats1024 );
showimg200"kudosai_gui1.png"0);
changeimgvis200);
showtext20110030"Verdana""b"clientr.hp_cur "/" clientr.hp_max ); 
showimg202"kudosai_gui1.png"3040 );
temp.= ( 86 clientr.hp_max ) * clientr.hp_cur
changeimgpart20200n); 
showimg203player.weaponsselectedweapon ].image30100 ); 
i get this error

PHP Code:
Script compiler output for -health:
errorunexpected token:  at line 9showimg203player.weaponsselectedweapon ].image30100 );
Weapon/GUI-script -health added/updated by GULTHEX 
It seems to me that you just copied and pasted exactly what I said, and barely changed anything.

Try to learn some basic scripting before trying to do something like this.

I know I'll get flamed if I tell you the error, but check out your functions. Also, replace your GS1 functions with GS2 (no, this isn't the error). Check out the wiki, especially this page:

__________________
Reply With Quote
  #11  
Old 09-29-2008, 02:26 AM
BonzaiXxXSRStudios BonzaiXxXSRStudios is offline
Since 2001
BonzaiXxXSRStudios's Avatar
Join Date: Jul 2007
Location: Atlanta, Georgia USA
Posts: 108
BonzaiXxXSRStudios is on a distinguished road
Send a message via MSN to BonzaiXxXSRStudios
I know this is an old post but i dont want to start a new one. So how would you go about making the hp and mana bars decrease when a player is hit or when a player uses his mana for example?
__________________


Nutos (Jasler) and Yoke (lDarkDragonl) at Bonzai and Storm Reach Studios
Reply With Quote
  #12  
Old 09-29-2008, 02:38 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Easiest way would be having a timeout
then something like
PHP Code:
temp.img "block.png";
showimg(200img2020);
changeimgvis(2004);
changeimgpart(20000, (player.hearts player.fullhearts) * getimgwidth(img), getimgheight(img)); 
Pretty basic math.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
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 11:53 PM.


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