Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   player.swordimg with custom swords (https://forums.graalonline.com/forums/showthread.php?t=134262612)

AlexanderK 03-29-2011 08:42 PM

player.swordimg with custom swords
 
I just switched my custom swords from player.attr[3] to player.swordimg and it doesn't work at all.

Setting the swordimg (player.swordimg=...) serverside will do nothing and setting it clientside will only change it for the player, all the others still see sword1.png.

Do the swords have to have special names? Right now they're named like "sorna_sword_sword1.png". Is there any other way to do this?

cbk1994 03-29-2011 08:44 PM

try player.setSword("swordimg.png", 0); maybe? Serverside.

ffcmike 03-29-2011 08:53 PM

Are you using the V6 beta?
Graphics set Clientside in V6 don't seem to be saved Serverside.

AlexanderK 03-29-2011 08:58 PM

Quote:

Originally Posted by cbk1994 (Post 1639940)
try player.setSword("swordimg.png", 0); maybe? Serverside.

That's not working with my filenames.
player.setSword("swordimg.png", 0); seems to set player.swordimg to NULL for every string, player.setSword("swordimg.png", 1); works for strings like "sword2.png" or "sword3.png", but not with "sorna_sword_sword1.png".
Quote:

Originally Posted by ffcmike (Post 1639942)
Are you using the V6 beta?
Graphics set Clientside in V6 don't seem to be saved Serverside.

That's why I'm trying to set them on the Serverside.

cbk1994 03-29-2011 09:02 PM

Add them as swords in folder config.

PHP Code:

sword     graphics/swords/sorna_sword-*.png 


AlexanderK 03-29-2011 09:04 PM

Quote:

Originally Posted by cbk1994 (Post 1639945)
Add them as swords in folder config.

PHP Code:

sword     graphics/swords/sorna_sword-*.png 


It works now! Thank you!!! :D


All times are GMT +2. The time now is 09:40 AM.

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