
07-24-2005, 07:32 AM
|
Graal Administration
|
Join Date: Jan 2000
Location: Admins
Posts: 11,693
|
|
NPCServer updates (6)
There are new versions of gserver and npcserver, they are uploaded to all machines, but might need to be restarted manually. There are a few updates for the new scripting engine:
- Fixed Switch-in-switch commands, before the switch command was eating the case label that was in front of it
- new onInitialized() event for database npcs when the server has been restarted
- You can create scriptable objects now (besides players and npcs):
this.item1 = new TStaticVar();
this.item1.join("itemfunctions");
...
this.item1.destroy();
Differences to normal objects:
- they are never copied, they are only linked - same behaviour like with GUI objects and players or npcs, if you do pl = player then pl will not recreate the player, if you access pl.account then it will actually access player.account
- they are scriptable, which means they can join classes and run scripts (think of living inventory objects)
- they are destroyed once no variable is linking to it anymore (e.g. if you do this.item1 = NULL; this is using a garbage collector system like in Java), or if you call destroy() for the object
- they can have a name, you can do this.item1 = new TStaticVar("MyFirstItem") and then also access it directly by name, e.g. MyFirstItem.subvar = 123 |
|
|