![]() |
Chest class
So I made my own custom chest and I think its pretty good (for my abilities at least). I'm curious as to how I can improve it or if anyone sees anything wrong with it.
Thank you :D PHP Code:
|
You can add any weapon to yourself if you replace the string sent to the server.
|
You should probably make checks serverside to make sure the player has the weapon and if the chest has it.
|
Won't the use of the same GUI control names within multiple different level NPCs cause problems?
For instance opening a chest in one level will also invoke the actions within chests you've seen within different levels. You could either move the GUI scripts into a weapon and communicate with that weapon from the class, or create GUIs with dynamic names and use catchevent(); to be able to receive the action. |
Use a DB-NPC to store chest contents instead of serverr flags.
You can do that like this: PHP Code:
PHP Code:
|
| All times are GMT +2. The time now is 02:49 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.