Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   code to change hat (https://forums.graalonline.com/forums/showthread.php?t=87653)

EclipsedAngel 08-29-2009 02:04 AM

code to change hat
 
I don't know how to change the player's hat? What's the command?

Programmer 08-29-2009 02:11 AM

Quote:

Originally Posted by EclipsedAngel (Post 1519236)
I don't know how to change the player's hat? What's the command?

I believe it's player.attr[1] = "image_name.png".

Rufus 08-29-2009 02:23 AM

You're doing it offline right?

fowlplay4 08-29-2009 02:39 AM

Quote:

Originally Posted by Rufus (Post 1519241)
You're doing it offline right?

If that was the case then he'd have to do:

PHP Code:

if (created) {
  
// other npc script
  // hat1.png example
  
setcharprop #P1,hat1.png;
  // other npc script


Edit: Misread but as posted below, for future reference.

PHP Code:

if (created) {
  
// player hat example
  
setplayerprop #P1,hat1.png;



EclipsedAngel 08-29-2009 03:15 AM

Ya offline to test out a head.

And I mean on my player not an NPC. Neither of those are working.

Frankie 08-29-2009 03:27 AM

Quote:

Originally Posted by EclipsedAngel (Post 1519251)
Ya offline to test out a head.

And I mean on my player not an NPC. Neither of those are working.

just change setcharprop to setplayerprop and it should work.

EclipsedAngel 08-29-2009 04:59 AM

Thanks man it works

MysticX2X 08-30-2009 05:25 AM

shimmys gonna kick it in his offline world.


All times are GMT +2. The time now is 02:10 PM.

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