Graal Forums

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

hydralisk150 11-12-2005 11:41 AM

help
 
what is the hat format?

Yen 11-13-2005 05:39 AM

GS1, it's #P1
GS2, it's attr[0]

setplayerprop #P1,hat1.png;
attr[0] = "hat1.png";

Skyld 11-13-2005 11:10 AM

Quote:

Originally Posted by Yen
attr[0] = "hat1.png";

player.attr[0]

napo_p2p 11-16-2005 09:29 PM

Isn't it player.attr[1]?

Yen 11-16-2005 09:46 PM

No, arrays start at 0..
The #P attributes weren't an array.

Fry 11-16-2005 09:52 PM

Must've been fixed recently, because the last time I used it, it did start at 1.

napo_p2p 11-16-2005 09:54 PM

I just tried it. It's starting at 1.

Yen 11-16-2005 10:12 PM

Really?
My Tailor reads attr[0] as the player's hat and it works..

napo_p2p 11-16-2005 10:22 PM

Quote:

Originally Posted by Yen
Really?
My Tailor reads attr[0] as the player's hat and it works..

Wierd because...

player.attr[0] = "hat1.png"; //Will NOT work

player.attr[1] = "hat1.png"; //Works!

Admins 11-18-2005 01:41 PM

It's player.attr[1], to match the #P1 / #P(1) thing since that is not starting at zero either.

ApothiX 11-20-2005 02:39 AM

Did he mean the variable for it, or how the actual format of the image is? (like which areas are shown as what)

If he wants the actual format of the image:

HTML Code:

                              X    Y    W    H
SPRITE  40          ATTR1    0    0  48  48 hat up
SPRITE  41          ATTR1  48    0  48  48 hat left
SPRITE  42          ATTR1  96    0  48  48 hat down
SPRITE  43          ATTR1  144    0  48  48 hat right
SPRITE  44          ATTR1    0  48  48  48 hat pull up
SPRITE  45          ATTR1  48  48  48  48 hat pull left
SPRITE  46          ATTR1  96  48  48  48 hat pull down
SPRITE  47          ATTR1  144  48  48  48 hat pull right
SPRITE  48          ATTR1    0  96  48  48 hat dead

** Taken from idle.gani


Kronan 11-20-2005 03:16 PM

I noticed player.hat works also :P


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

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