Graal Forums

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

mystic_pheonix 04-12-2001 11:26 AM

could someone tell me how to make a health/magic bar sort of like faheria?

kyle0654 04-12-2001 11:32 AM

NPC Code:

showimg indexhere, bar.imgfile, xonscreen, yonscreen;
changeimgvis indexhere, 4;
setimgpart indexhere, topleftx, toplefty, int((hpnow/hpmax)*barwidth), barheight;


now, three lines adds up to...21 gralat! hehe, j/k ;)

mystic_pheonix 04-12-2001 11:37 AM

ok, ill try that

mystic_pheonix 04-12-2001 11:39 AM

er... how about you make the WHOLE thing... im feeling lazy =^P

kyle0654 04-12-2001 11:45 AM

uh...that is the whole thing...you just need to pick an index above 200, and do the other variables based on where on the screen you want it and how the graphic is made...

mystic_pheonix 04-12-2001 11:46 AM

i dont want to pick anything... i want someone to do all that for me =^P

kyle0654 04-12-2001 11:48 AM

oh, you're gonna have to pay me 1K in gralat on newmain then

mystic_pheonix 04-12-2001 11:49 AM

that would be like giving you a bomy

kyle0654 04-12-2001 11:51 AM

No, it would be like paying me 1K

so...you can either work with, and learn, the script I gave you, or give me 1000 gralat on newmain and have me do it all for you. The choice is yours

mystic_pheonix 04-12-2001 11:53 AM

i think ill find someone to do it for me out of the goodness in their heart

kyle0654 04-12-2001 11:56 AM

I did! It's right up there!

You see, if I just made it for you, if it ever had a problem in the future, you would have no idea how to fix it. However, if you take it and learn how it works, you can fix it in the future, or even make it kick butt more than it could now (try making it go up like in a bottle when you have more health)

but...if you want me to script it for you my offer still stands...

mystic_pheonix 04-12-2001 12:00 PM

jeez, all i want is just a script that makes a little bar on your screen, and when you get hit it goes down

kyle0654 04-12-2001 12:04 PM

Quote:

Originally posted by kyle0654
NPC Code:

showimg indexhere, bar.imgfile, xonscreen, yonscreen;
changeimgvis indexhere, 4;
setimgpart indexhere, topleftx, toplefty, int((hpnow/hpmax)*barwidth), barheight;


have you plugged that in yet?

indexhere = 200
bar.imgfile = (your status bar picture)
x/yonscreen = where on the screen (in pixels) you want the top left of the bar, from the top left of the screen.
topleftx/ywhere in the image file the top left of your bar is (probably 0,0)
barwidth/barheight how wide / tall your bar is
hpnow the player's current hp
hpmax the player's max hp

mystic_pheonix 04-12-2001 12:05 PM

if i actually scripted that often i might know some of this stuff

mystic_pheonix 04-12-2001 12:18 PM

besides i learn best by observing and watching others =^P


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

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