![]() |
Error changing body,head,shield
The idea here is to use a DB NPC to keep track of data for statues so players without RC can change statues has they see fit without frequently having to have staff update levels for them. This also prevents update levels/level overwrites/not being in the level for an extended amount of time from changing how the class looks.
However, right now, only the colors, hat, nick, and AP change effectively. The bodyimg, headimg, and shieldimg stay at head0.png, shield1.png, and body.png. Any ideas as to why? Class "statue" PHP Code:
PHP Code:
PHP Code:
|
Well, instead of this.level you should use this.level.name
|
this.level works fine and it would still generate unique keys, and seeing as the NPCs are returning the proper array when setting it to their chat, I don't see where this is going
The issue is not with the identifier itself, it's with passing the params into images |
I made something similar for a gang on Era. Generally just 'giving' a script to someone to solve their problem isn't always helpful, but see if this helps you:
DB_NPC Flags (Named: "TSAdmin_Functions"): PHP Code:
PHP Code:
PHP Code:
|
Quote:
I'm just confused as to why pars[5] clearly says classichead-ghosthawk.png yet setting this.headimg = pars[5]; fails to have the desired effect. |
You should be using variables head, body, and shield instead of headimg, bodyimg, and shieldimg.
Those ones ending in img are for compatability. And perhaps try echoing pars[5] the line before you set the head to it so you can see what the value is at the time? |
I had already tried using body/head/shield with no results.
checking the pars[5] (and the whole pars array as I did earlier, which is why I felt doing this wouldn't help debug) still shows the proper head, so I'm still vastly confused as to why this doesn't work. |
I use it for the player just fine, it should be no different for npcs.
|
still isn't fixing the issue :\
|
managed to fix this by moving the call to reload into the class itself.
Odd. |
PHP Code:
|
Uh, sure.
|
| All times are GMT +2. The time now is 06:43 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.