Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Horrible At Scipting and I Need Help (https://forums.graalonline.com/forums/showthread.php?t=32235)

faiola 06-24-2002 09:49 PM

Horrible At Scipting and I Need Help
 
I Am Horrible at Scripting and i need help changing my heartsinto a new hearts that i made wher umm....do i start? well this is what i have so far but it don't work........:grrr: :grrr: :grrr:


// NPC made by X.Draco.X
if (created || timeout) {
this.hearts = playershearts;
setstring heartsthing,this.hearts;
showimg 2,@Dancin LET@c@#s(heartsthing),playerx+.5,playery-1.5;
timeout = .05;
}
if (playertouchsme) {
}


there i am trying to get it to just say 3 above the damn guys head.......

jeff335 06-24-2002 10:05 PM

The following is the one line you need:
NPC Code:

showimg 2,@#v(playerhearts)/#v(playerfullhearts),playerx+.5,playery-1.5;


Cybnext 06-24-2002 10:10 PM

Quote:

Originally posted by jeff335
The following is the one line you need:
NPC Code:

showimg 2,@#v(playerhearts)/#v(playerfullhearts),playerx+.5,playery-1.5;


He is wanting to make a new HP system, not just use the current hearts.

NPC Code:

if (created || timeout) {
this.hearts = playershearts;
setstring heartsthing,#v(this.hearts);
showimg 2,@Dancin LET@c@#s(heartsthing),playerx+.5,playery-1.5;
timeout = .05;
}


faiola 06-24-2002 10:33 PM

Hmm yea that would be great Cybnext but um....it still is only giving me a 0 above my head?

jeff335 06-25-2002 01:59 AM

Actually, Cyb, it didn't look like an HP system. It looked like he was getting playerhearts ever .05 and displaying it

Logo 06-25-2002 02:02 AM

Quote:

Originally posted by jeff335
Actually, Cyb, it didn't look like an HP system. It looked like he was getting playerhearts ever .05 and displaying it
lies

faiola 06-25-2002 03:11 AM

all i want is to learn how to make a friggin thing that goes above somone's head and display's a hp status to all but i ended up wiht this



// NPC made by X.Draco.X
if (timeout) {
showimg 2,@#v(playerhearts*1255)/#v(playerfullhearts*1255),playerx-1.5,playery-2;
timeout = .05;
}
if (playerenters) {
timeout = .05;
}

Xbob42 06-28-2002 10:14 AM

umm looks as though there's a mixup. Draco can you explain a little more in detail as to what you mean?

user13-xo 06-28-2002 12:22 PM

Quote:

Originally posted by faiola
all i want is to learn how to make a friggin thing that goes above somone's head and display's a hp status to all but i ended up wiht this



// NPC made by X.Draco.X
if (timeout) {
showimg 2,@#v(playerhearts*1255)/#v(playerfullhearts*1255),playerx-1.5,playery-2;
timeout = .05;
}
if (playerenters) {
timeout = .05;
}

if (created || timeout) {
showimg 1,@#v(playerhearts)/#v(playerfullhearts),playerx+.5,playery-2;
timeout = .05;
}
Done

faiola 06-28-2002 09:16 PM

Quote:

if (created || timeout) {
showimg 1,@#v(playerhearts)/#v(playerfullhearts),playerx+.5,playery-2;
timeout = .05;
}
Done

lovely....
but
i already had that
now i need a know how to put my own hp / mp bars up?
anyone can help me .........spankz

user13-xo 06-28-2002 09:59 PM

Quote:

Originally posted by faiola



lovely....
but
i already had that
now i need a know how to put my own hp / mp bars up?
anyone can help me .........spankz

if (created) {
showimg 300,@#v(playerap) AP,15,90;
showimg 301,@#v(playermp) MP,15,110;
changeimgvis 300,4;
changeimgvis 301,4;
}

Just learn to use showimg its very useful.

showimg index,filename,x,y;

If you wish to show text use " showimg index,@text,x,y; "
If you wish to use fonts in the text use " showimg index,@Arial@text,x,y;

I think I am right but any index under 200 shows the showimg to everyone. Any index above 200 shows it only to the player but not anyone else.

There are also commands that you can use with showimg like:
changeimgpart index,x,y,width,height;
changeimgvis index,drawingheight;
changeimgcolors index,red,green,blue,alpha;
changeimgzoom index,zoomfactor;

If you want to learn anything else IM me, I'll help you out.

faiola 06-28-2002 10:29 PM

you almost sounded like serious person there alex....
that was wierd.....your not on aim at all or you have me on ignore?


All times are GMT +2. The time now is 06:46 PM.

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