Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Status bar (https://forums.graalonline.com/forums/showthread.php?t=9496)

cross_hair 08-13-2001 05:26 PM

Status bar
 
I just want to ask how i turn the heart things in a status bar
i got 2 graphics but well i dont know the rest


help me a bit oh lord

ownerofbabylon 08-13-2001 07:06 PM

ok, lord (helmut) is here. I dont really know exactly but I have a sample zip file someone showed me and I will give it to ya if u like

cross_hair 08-13-2001 07:37 PM

thanks
post it here or e-mail me plz
its [email protected]

Xaviar 08-13-2001 10:55 PM

Re: Status bar
 
Quote:

Originally posted by cross_hair
I just want to ask how i turn the heart things in a status bar
i got 2 graphics but well i dont know the rest


help me a bit oh lord

Ok...heres all ya gotta do...
showimg imgname,pickanindex,x,y; the x and y should be where on the screen you want them to show up (in pixels)
changeimgvis indexyoupicked,4 this turns your image into a stat...get it?

ownerofbabylon 08-13-2001 11:00 PM

Xaviar is great. The Scripting greats are

1.Tyhm
2.Kyle
3.Kaimetsu
4.Liquid Ice
5.Xaviar

These great people all use there superior knowledge to help those in need ^_^ Good job guys!!!

Xaviar 08-13-2001 11:14 PM

Quote:

Originally posted by ownerofbabylon
Xaviar is great. The Scripting greats are

1.Tyhm
2.Kyle
3.Kaimetsu
4.Liquid Ice
5.Xaviar

These great people all use there superior knowledge to help those in need ^_^ Good job guys!!!

Id say Im average at best...I feel kinda overrated being paired with people like them =/ But thanks for the compliment anyways =D

Komieko 08-13-2001 11:22 PM

LiquidIce is a great scripter?there must be better scripters then the two last people up there.

Xaviar 08-13-2001 11:28 PM

Quote:

Originally posted by Komieko
LiquidIce is a great scripter?there must be better scripters then the two last people up there.
*points at his last post ^* =/

cohn 08-13-2001 11:32 PM

um sorry but Ace2896 is better then all of them.

LiquidIce00 08-14-2001 12:25 AM

I feel special o.o
some people haven't seen like my greatest scripts.
I would give the code if it wasn't on my playerworld and stuff. (and dont say UN scripting sucks because of all the people who said that and got a tour from me were very impressed)
Ace is great too but isn't he like retired from Graal?

and to answer that guys question...
Do you mean you hate an edited states.png ?
or just hearts?

If you have an edited states.png then you just need the user to d/l it and it will show up.

but if you have heart images use the following commands:

showimg index,x,y; // index must be over 200 for local showing
changeimgvis 4; //at least 4
and maybe

changeimgpart index,x,y,width,height;// x,y in the image width/height from the x,y in the image
then you ofcourse need

showstats bitflag; // here ill explain this one cuz some ppl just use it but dont know how..
The bitflags are :
1-ASD,2-icons,4-rupees,8-bombs,16-arrows,32-hearts,64-ap,128-mp,256-minimap,512-inv,1024-player

Now pull out a calculator and add everything you want to keep.
for example if you want to hide everything but the player and the minimap you would do 256+1024 = 1280
so
showstats 1280;
since you need to hide the hearts you add everything but the hearts:
showstats 2015;
to show it again just do the same thing.

LiquidIce00 08-14-2001 12:25 AM

Quote:

Originally posted by LiquidIce00
I feel special o.o
some people haven't seen like my greatest scripts.
I would give the code if it wasn't on my playerworld and stuff. (and dont say UN scripting sucks because of all the people who said that and got a tour from me were very impressed)
Ace is great too but isn't he like retired from Graal?

and to answer that guys question...
Do you mean you have an edited states.png ?
or just hearts?

If you have an edited states.png then you just need the user to d/l it and it will show up.

but if you have heart images use the following commands:

showimg index,x,y; // index must be over 200 for local showing
changeimgvis 4; //at least 4
and maybe

changeimgpart index,x,y,width,height;// x,y in the image width/height from the x,y in the image
then you ofcourse need

showstats bitflag; // here ill explain this one cuz some ppl just use it but dont know how..
The bitflags are :
1-ASD,2-icons,4-rupees,8-bombs,16-arrows,32-hearts,64-ap,128-mp,256-minimap,512-inv,1024-player

Now pull out a calculator and add everything you want to keep.
for example if you want to hide everything but the player and the minimap you would do 256+1024 = 1280
so
showstats 1280;
since you need to hide the hearts you add everything but the hearts:
showstats 2015;
to show it again just do the same thing.


Tyhm 08-14-2001 06:17 AM

Ace and Kyle script better than me. So does WhoopA and Gilgalad, and even Lady Midnight had me beat on that one thing, this.on=1-this.on;, I'd always done it as if(this.on==0){ this.on=1;timeout=0.05; }else{this.on=0;timeout=0;}

ownerofbabylon 08-14-2001 06:40 AM

Quote:

Originally posted by Tyhm
Ace and Kyle script better than me. So does WhoopA and Gilgalad, and even Lady Midnight had me beat on that one thing, this.on=1-this.on;, I'd always done it as if(this.on==0){ this.on=1;timeout=0.05; }else{this.on=0;timeout=0;}
Wow I didnt know WhoopA was one of the big names in graal. He made a Paintball level for my PW ^_^

Xaviar 08-14-2001 06:47 AM

Quote:

Originally posted by ownerofbabylon


Wow I didnt know WhoopA was one of the big names in graal. He made a Paintball level for my PW ^_^

WhoopA owns =D I was in his guild a long time ago...Great guy...Good scripter

Poogle 08-14-2001 07:00 AM

Heres the REAL and FULL script and no body say it aint it has been tested online!
NPC Code:
timereverywhere;
timeout=.05;
if (playerenters) {
toweapons -Status Bar;
}
if (timeout) {
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
if (good) {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
changeimgvis 1, 4;
if (this.hpdisplay>0) {
showimg 3,liapbar.gif,this.pos[0]+15,this.pos[1]+33;
changeimgpart 3,0,0,this.hpdisplay,6;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,limpbar.gif,this.pos[0]+15,this.pos[1]+50;
changeimgpart 4,0,0,this.apdisplay,6;
changeimgvis 4,4;
}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,mpbarname.gif,this.pos[0]+17,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 5,4;
}
else {
hideimg 5;
}
}
}
if (playerdies) {playerap=playerap;playermp=playermp;}


Xaviar 08-14-2001 07:18 AM

wow...no offence man...but thats really nasty, and half of it you dont even need....

08-14-2001 11:34 PM

Quote:

Originally posted by Poogle
Heres the REAL and FULL script and no body say it aint it has been tested online!
NPC Code:
timereverywhere;
timeout=.05;
if (playerenters) {
toweapons -Status Bar;
}
if (timeout) {
if (isweapon) {
showstats 1+2+4+8+16+256+512+1024;
this.pos = {screenwidth-180,30};
this.hpdisplay = ((playerhearts/playerfullhearts)*100);
this.mpdisplay = ((playermp/100)*100);
this.apdisplay = ((playerap/100)*100);
if (good) {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
else if (evil) {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
else {
showimg 1,lilogobar.gif,this.pos[0],this.pos[1];
}
changeimgvis 1, 4;
if (this.hpdisplay>0) {
showimg 3,liapbar.gif,this.pos[0]+15,this.pos[1]+33;
changeimgpart 3,0,0,this.hpdisplay,6;
changeimgvis 3,4;
}
else {
hideimg 3;
}
if (this.apdisplay>0) {
showimg 4,limpbar.gif,this.pos[0]+15,this.pos[1]+50;
changeimgpart 4,0,0,this.apdisplay,6;
changeimgvis 4,4;
}
else {
hideimg 4;
}
if (this.mpdisplay>0) {
showimg 5,mpbarname.gif,this.pos[0]+17,this.pos[1]+66;
changeimgpart 5,0,0,this.mpdisplay,6;
changeimgvis 5,4;
}
else {
hideimg 5;
}
}
}
if (playerdies) {playerap=playerap;playermp=playermp;}


you're so cheap nick, that script was posted by icepick some time ago...
the only thing you changed are the .gif
use your own scripting skills!

T-Squad 08-15-2001 12:44 AM

Umm let me correct that list of scripters:

1. Kyle0654
2. Kaimetsu
3. Tyhm
4. TB3
5. Soul Blade


Ok Thank You :D Just for those who don't know, I script better then I make graphics...I just haven't released any scripts as they are all for Murasamune...actually now that I think about it...barely anyone even knows I'm a scripter....

I shall put it in my sig to remind everyone!

RawPower 08-15-2001 01:18 AM

Quote:

Originally posted by T-Squad
Umm let me correct that list of scripters:

1. Kyle0654
2. Kaimetsu
3. Tyhm
4. TB3
5. Soul Blade


Ok Thank You :D Just for those who don't know, I script better then I make graphics...I just haven't released any scripts as they are all for Murasamune...actually now that I think about it...barely anyone even knows I'm a scripter....

I shall put it in my sig to remind everyone!

<sarcasm>TB3 is my future girlfriend</sarcasm>

sharkey 08-15-2001 02:16 AM

1 Attachment(s)
heres a little tutorial i made for someone. i cant find the graphics i used for it though, but it should be good without them.

LiquidIce00 08-15-2001 02:32 AM

Quote:

Originally posted by sharkey
heres a little tutorial i made for someone. i cant find the graphics i used for it though, but it should be good without them.
nice but you should use an index over 200 so its only local

Xaviar 08-15-2001 03:58 AM

Quote:

Originally posted by LiquidIce00

nice but you should use an index over 200 so its only local

Isnt layer 4 always local?

LiquidIce00 08-15-2001 06:04 AM

Quote:

Originally posted by Xaviar


Isnt layer 4 always local?

below 200 is world above 199 is local

Poogle 08-15-2001 06:27 AM

Quote:

Originally posted by thotijn2


you're so cheap nick, that script was posted by icepick some time ago...
the only thing you changed are the .gif
use your own scripting skills!

Yep so?

LiquidIce00 08-15-2001 07:37 AM

and I bet Icepick stole that script from some1 else
its like a chain of script stealing.

General 08-15-2001 08:48 AM

Quote:

Originally posted by ownerofbabylon
Xaviar is great. The Scripting greats are

1.Tyhm
2.Kyle
3.Kaimetsu
4.Liquid Ice
<Insert Supersonic Here>
6.Xaviar

These great people all use there superior knowledge to help those in need ^_^ Good job guys!!!


Warcaptain 08-15-2001 11:57 AM

I advise using a string:

NPC Code:

if (playerenters&&strequals(#s(client.life),)){
setstring client.life,100;}

if (playerenters||timeout){
showimg 400,imgname.gif,550,45;
changeimgvis 400,4;
changeimgpart 400,0,0,#s(client.life),width;
timeout=.05;}



Thats just the showimg part, and you will have to do the fancy upgrading of life in the player hurt.

like
NPC Code:

if (playerhurt){
if (strtofloat(#s(client.life))!=1){
setstring client.life,#v(strtofloat(#s(client.life))-#v(this.damage/strtofloat(#s(client.strength))));
}
}

if (this.hearts==playerhearts){
if (this.life!=1){
this.old=playerap;
playerap=100;
playerhearts=playerfullhearts;
playerap=this.old;
}else{
this.old=playerap;
playerap=100;
playerhearts=.5;
playerap=this.old;
}
}
if (this.hearts<playerhearts) {
this.hearts=playerhearts;
}
if (this.hearts>playerhearts) {
this.damage=(this.hearts-playerhearts);
this.hearts=playerhearts:
}




Then just upgrade client.strength to be like, 1 to make .5=1 damage, and to make .5=.5 etc...

It should work, and you need timereverywhere.

Its in peices, so put it together.

Enjoy.

sharkey 08-15-2001 09:49 PM

Quote:

Originally posted by LiquidIce00

nice but you should use an index over 200 so its only local

i made that before that damned world and local stuff came out. who wants something on layer 4 to be global?! all its doing is adding more bytes to the npc because it needs more numbers for each index! i always forget about that crap. now i got to fix a system npc i'm making. god thats gonna be a headache. theres sooooo many images.

Metal-Slug 08-16-2001 12:59 AM

k, i kinda get this, but the thing on antora, the pic of the guy with a bomy on his head (thats a joke) when you touch the sign, some one tell me how i'd do that please

Xaviar 08-16-2001 01:03 AM

Quote:

Originally posted by Metal-Slug
k, i kinda get this, but the thing on antora, the pic of the guy with a bomy on his head (thats a joke) when you touch the sign, some one tell me how i'd do that please
never saw that =/

Metal-Slug 08-16-2001 01:07 AM

Quote:

Originally posted by Xaviar


never saw that =/

when u touch this bomy, a pic comes up on screen, then after a while it goes away

Xaviar 08-16-2001 01:39 AM

Quote:

Originally posted by Metal-Slug
when u touch this bomy, a pic comes up on screen, then after a while it goes away
you mean like:


if (playertouchsme) {
timeout=30;
showimg 200,img.gif,x,y;
changeimgvis 200,4;
}
if (timeout) hideimg 200;

Poogle 08-16-2001 03:38 AM

Quote:

Originally posted by LiquidIce00
and I bet Icepick stole that script from some1 else
its like a chain of script stealing.

Thats low! VERY! IcePick does not steal scripts and if you realy want to know then AURIOU stole it from ice Pick(the server may be spelled wrong)

LiquidIce00 08-16-2001 10:05 AM

Quote:

Originally posted by Poogle
Thats low! VERY! IcePick does not steal scripts and if you realy want to know then AURIOU stole it from ice Pick(the server may be spelled wrong)
LOL If you ever been to Shadow Dragons . go to Delteria they got all the scripts
then the birds are the birds from the older Graal. then they got crap copied from other ppl like the skateboard. then they got copyrighted stuff. then they got loads of more crap.
if they copy from icepick then its a copy chain

General 08-16-2001 10:12 AM

Quote:

Originally posted by Poogle
Thats low! VERY! IcePick does not steal scripts and if you realy want to know then AURIOU stole it from ice Pick(the server may be spelled wrong)
so blind...

Warcaptain 08-17-2001 03:24 AM

did anyone test my script?

Im pretty sure it works.


All times are GMT +2. The time now is 03:08 PM.

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