Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Health Bar (https://forums.graalonline.com/forums/showthread.php?t=82762)

Ngoc999 11-12-2008 09:27 PM

Health Bar
 
how i get another health bar than that round things x_X i maked an health bar but i dunno how to upload it in game

Soala 11-12-2008 09:30 PM

What server are you playing ?
It actually depends of the server you want to change the health to.
If it's your own server then try to script a complete health system / hire a scripter

If it's a server like Unholy Nation / Classic then just go in Graal/levels/images then just edit the image called state.png (should always be in the bottom of your files)

Hope this helped ^^

napo_p2p 11-12-2008 09:55 PM

Quote:

Originally Posted by alexandralove (Post 1441676)
If it's your own server then try to script a complete health system / hire a scripter

If it's a server like Unholy Nation / Classic then just go in Graal/levels/images then just edit the image called state.png (should always be in the bottom of your files)

If it's just replacing states.png, then you could use setstatusimage().
Example:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setstatusimage("newstate.png");


However, if you want an actual health bar, then that requires a more complex script. Sadly, this isn't a place where you could request full scripts. This is the code gallery, and only meant for showcasing complete scripts of your own.

Soala 11-12-2008 09:56 PM

Quote:

Originally Posted by napo_p2p (Post 1441687)
If it's just replacing states.png, then you could use setstatusimage().
Example:
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setstatusimage("newstate.png");



I'm not a scripter ^^

xXziroXx 11-12-2008 10:25 PM

Quote:

Originally Posted by alexandralove (Post 1441676)
If it's a server like Unholy Nation / Classic then just go in Graal/levels/images then just edit the image called state.png (should always be in the bottom of your files)

No, no and NO!

We don't want yet another server replacing default images so you have to reinstall Graal to get back the default, there's a command to change state for a reason.

Quote:

Originally Posted by alexandralove (Post 1441689)
I'm not a scripter ^^

Then stop giving bad advice in our forum.

cbk1994 11-12-2008 10:49 PM

This post might help.

Soala 11-13-2008 01:28 PM

Quote:

Originally Posted by xXziroXx (Post 1441715)
No, no and NO!

We don't want yet another server replacing default images so you have to reinstall Graal to get back the default, there's a command to change state for a reason.



Then stop giving bad advice in our forum.

I just thought he wanted to edit his state.png img himself, this thread is so details-less

Crow 11-13-2008 06:23 PM

Quote:

Originally Posted by alexandralove (Post 1441881)
I just thought he wanted to edit his state.png img himself, this thread is so details-less

If you have no idea what the OP wants, don't post.

Inverness 11-13-2008 08:59 PM

Quote:

Originally Posted by alexandralove (Post 1441676)
If it's a server like Unholy Nation / Classic then just go in Graal/levels/images then just edit the image called state.png (should always be in the bottom of your files)

Absolutely not.

Soala 11-13-2008 09:08 PM

Quote:

Originally Posted by Inverness (Post 1441974)
Absolutely not.

:whatever:

Tolnaftate2004 11-14-2008 01:57 AM

Quote:

Originally Posted by xXziroXx (Post 1441715)
No, no and NO!

Quote:

Originally Posted by Inverness (Post 1441974)
Absolutely not.

client != server

So calm down.

xXziroXx 11-14-2008 06:09 AM

Quote:

Originally Posted by Tolnaftate2004 (Post 1442059)
client != server

So calm down.

Quote:

Originally Posted by Ngoc999 (Post 1441673)
how i get another health bar than that round things x_X i maked an health bar but i dunno how to upload it in game

And judging from the thread in the playerworld section, it's for his newly acquired playerworld.


So no, we were merely helping.

Tolnaftate2004 11-14-2008 09:02 AM

Quote:

Originally Posted by xXziroXx (Post 1442102)
And judging from the thread in the playerworld section, it's for his newly acquired playerworld.


So no, we were merely helping.

Yet you both quoted:
Quote:

Originally Posted by alexandralove (Post 1441676)
If it's a server like Unholy Nation / Classic then just go in Graal/levels/images then just edit the image called state.png (should always be in the bottom of your files)

When was the last time you ever heard anyone refer to RC file browser as the Graal/ folder? On the other hand, for that to cause ANY sort of damage, some folder "Graal" would have to be listed in the folder options; if someone were asking for help uploading a file to a server, I'm thinking they wouldn't know how to set up a new folder either. Otherwise, a useful solution has been posted already.

So please read carefully, use common sense, and happy posting.

DustyPorViva 11-14-2008 09:20 AM

There are two ways to do this, depending on what you're trying to do exactly.

> Replace it for only yourself. If you want to change the way your hearts and such look on classic servers like UN, it's simply a matter of replacing state.png. Go into the directory...
Graal/levels/images/
and you'll find a state.png. Rename it to like state2.png and then move your replacement file into the same folder. Rename your custom file to state.png(if it is indeed a PNG file, if not make it one... it can't be GIF or JPG or any other file format).

> Replace the state for your server. If you want to make the state look different for everyone playing on your server then it's a different matter. Save the file as yourservername_state.png, NOT state.png. Then upload it to your server images folder. Then in one of your weapons(like a system weapon)...
PHP Code:

//#CLIENTSIDE
function onCreated() {
  
setstatusimage("yourservername_state.png"); 



xXziroXx 11-14-2008 09:55 AM

Quote:

Originally Posted by Tolnaftate2004 (Post 1442122)
Yet you both quoted:


When was the last time you ever heard anyone refer to RC file browser as the Graal/ folder? On the other hand, for that to cause ANY sort of damage, some folder "Graal" would have to be listed in the folder options; if someone were asking for help uploading a file to a server, I'm thinking they wouldn't know how to set up a new folder either. Otherwise, a useful solution has been posted already.

So please read carefully, use common sense, and happy posting.

Come to think about it, I only meant to quote "just edit the image called state.png".

Soala 11-14-2008 04:19 PM

Quote:

Originally Posted by xXziroXx (Post 1442125)
Come to think about it, I only meant to quote "just edit the image called state.png".

I actually did it on UN :whatever:

Inverness 11-14-2008 04:58 PM

Quote:

Originally Posted by Tolnaftate2004 (Post 1442122)
When was the last time you ever heard anyone refer to RC file browser as the Graal/ folder?

I thought it was quite obvious that he was pointing out that you could find state.png on your own computer to edit then upload.
Quote:

Originally Posted by Tolnaftate2004 (Post 1442122)
So please read carefully, use common sense, and happy posting.

You seem to have missed the sentence before the one you quoted.
Quote:

Originally Posted by alexandralove
If it's your own server then <GOOD THING HERE>

If it's a server like Unholy Nation / Classic then <BAD THING HERE>

It seemed to me if he was suggesting that you have a server that is using the default HUD then you should take the state.png from your own computer, edit it, and then upload it onto the server to replace the default GUI, which you obviously should not be doing.

Soala 11-14-2008 07:29 PM

Quote:

Originally Posted by Inverness (Post 1442163)
I thought it was quite obvious that he was pointing out that you could find state.png on your own computer to edit then upload.
You seem to have missed the sentence before the one you quoted.
It seemed to me if he was suggesting that you have a server that is using the default HUD then you should take the state.png from your own computer, edit it, and then upload it onto the server

You don't need to upload it on the server, jus replace it in your own folders then reconnect.
I did it xxxx times.

Chompy 11-14-2008 08:52 PM

Quote:

Originally Posted by alexandralove (Post 1442180)
You don't need to upload it on the server, jus replace it in your own folders then reconnect.
I did it xxxx times.

Hmm?
Quote:

Originally Posted by alexandralove (Post 1442151)
I actually did it on UN :whatever:

You didn't do it on UN, you did it locally on your computer for your own client.

Ngoc999 11-21-2008 03:22 PM

i need help??? -_-

super_matt89 10-27-2009 10:18 AM

Hmm
 
hey mate, if you just want to change your hearts and etc for your own client not for people that go on a whole server then just locate state.png in your graal folder then name the image you made state.png and drag your image into the same directory as state.png then overwrite it. :)

TSAdmin 10-27-2009 11:55 AM

Quote:

Originally Posted by super_matt89 (Post 1534438)
hey mate, if you just want to change your hearts and etc for your own client not for people that go on a whole server then just locate state.png in your graal folder then name the image you made state.png and drag your image into the same directory as state.png then overwrite it. :)

This thread is nearly a year old... :whatever:

Quote:

Originally Posted by cbk1994 (Post 1516227)


alskdjfhg 10-27-2009 12:03 PM

Quote:

Originally Posted by TSAdmin (Post 1534443)
This thread is nearly a year old... :whatever:

LOL, when on earth did you make that Paul? and how long did it take? D: cute though.

TSAdmin 10-27-2009 12:17 PM

Quote:

Originally Posted by alskdjfhg (Post 1534445)
LOL, when on earth did you make that Paul? and how long did it take? D: cute though.

Chris made it. The quote links back to the first one I could find of him posting it. :p

Samposse 11-27-2009 12:14 PM

i used that help i got from
Quote:

This post might help.
but it didnt work :(

(the Bar thing )

Switch 11-27-2009 10:44 PM

Quote:

Originally Posted by Samposse (Post 1540763)
i used that help i got from
but it didnt work :(

(the Bar thing )

PHP Code:

//#CLIENTSIDE
function onCreated() {
  
this.healthbar "healthbarimg.png"//make a health bar image, as high and wide as it should show for anyone
  
this.width getImgWidth(this.healthbar);
  
this.height getImgHeight(this.healthbar);
  
this.fullhearts 3//max full hearts on the server so it replicates the regular stats but with a bar
  
onTimeout();
}
function 
onTimeout() {
  
showImg(200this.healthbarplayer.x-this.width/32player.y-this.height/16); //change x and y coords to whatever you want them, but try to keep them relevant to the player
  
changeImgPart(20000this.width/(player.hearts/this.fullhearts), this.height);
  
changeImgVis(2003);
  
setTimer(0.05);


Something like this. You'll need to do some work.


All times are GMT +2. The time now is 11:14 PM.

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