Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Showimg/showtxt (https://forums.graalonline.com/forums/showthread.php?t=55776)

Raelyn 10-23-2004 10:36 AM

Showimg/showtxt
 
I am trying to do a showimg/showtxt in relation to the screen's position, and not a grid of the level, something that would display basically like a GUI, like "in the center of the screen" as opposed to "the center of the level".

This is what I have, but it's still level based and not screen based.

NPC Code:

if (created) {

showtext 1,3,18,fixedsys,, blahblah;
showtext 2,3,20,fixedsys,, blahblah;
showtext 3,3,22,fixedsys,, blahblah;
showtext 4,3,24,fixedsys,, blahblah;
showtext 5,3,26,fixedsys,, blahblah;
changeimgcolors 1,211,1,21,255;
changeimgcolors 2,211,1,21,255;
changeimgcolors 3,211,1,21,255;
changeimgcolors 4,211,1,21,255;
changeimgcolors 5,211,1,21,255;
changeimgzoom 1,1.5;
changeimgzoom 2,1.5;
changeimgzoom 3,1.5;
changeimgzoom 4,1.5;
changeimgzoom 5,1.5;

}



Any suggestions?

Python523 10-23-2004 11:29 AM

changeimgvis

osrs 10-23-2004 03:01 PM

And if you still have no clue about what Jagen is taking about, just read newfeatures, it explains quite well about changeimgvis.

Slash-P2P 10-23-2004 04:41 PM

You can use
NPC Code:
changeimgvis index,layer;

.
A layer of 4 or higher (up to 12 or something. Not sure exactly how high it goes unless it was raised...) will display on the screen position.
If you are trying to show something on the direct center of the screen, put 'c' for Center in the formatting part of showtext and use screenwidth/2 and screenheight/2.
Images can use:
NPC Code:

x: screenwidth/2-(imgwidth(image name.png)/2)
y: screenheight/2-(imgheight(image name.png)/2)



If thats for a GUI, use indexes for showimg/showtext that are 200 or higher.

If you don't want it level-based, make it an NPC Weapon.
offline: toweapons -System; (or something) (clientside)
online: addweapon -System; (or something) (serverside)

Python523 10-23-2004 05:20 PM

Quote:

Originally Posted by Slash-P2P
NPC Code:

x: screenwidth/2-(imgwidth(image name.png)/2)
y: screenheight/2-(imgheight(image name.png)/2)


NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)

Slash-P2P 10-23-2004 05:23 PM

Quote:

Originally Posted by Python523
NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)

Yes it does ^^

Raelyn 10-27-2004 09:27 AM

Wow, thanks you guys. Newfeatures annoys the hell out of me, the way they added those is sloppy. >.>

Lance 10-27-2004 05:25 PM

Quote:

Originally Posted by Python523
NPC Code:

(screenwidth-imagewidthstuff)/2


Same effect, looks cleaner (in my opinion)

I don't really think it's a matter of opinion, here.

Salaisuus 11-12-2004 07:37 PM

Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?

Tolnaftate2004 11-12-2004 07:50 PM

Quote:

Originally Posted by Salaisuus
Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?

It needs to be clientside.

Dach 11-12-2004 07:52 PM

Quote:

Originally Posted by Salaisuus
Speaking of showtext,
I cant get it to work online.

if (created) {showtext 1,30,30,,,ehhh?;}

Uhm, it isnt deprecated or anything?

clientsided?
gmap?

showimg index,@font@style@text,x,y; is deprecated, since showtext replaced it

Salaisuus 11-12-2004 09:31 PM

Clientside, sure, yeah, I knew that, Im smart, Im realy smart, I shut up now, ignore me.


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

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