View Full Version: How To Keep The Item

DimensioneX Forum > Developers' Pub > How To Keep The Item



Title: How To Keep The Item


call - May 29, 2007 08:06 AM (GMT)
Hi:

If players save the game, can players keep personal items after restarting the game server?

If everything restarts except players' score after restarting server ?


Cris - May 29, 2007 06:45 PM (GMT)
The game engine does not guarantee this (but check out the section about AutoRestore feature in the DevRef).

You can however trap the onRestore event to dynamically rebuild all the original player's inventory.

The problem is:

how can you be sure that he is not going out and in more and more time just to produce endless supply of inventory items? Consider the following trick to accoumulate money:

- Log in
- Buy sword
- Save game
- Sell sword... + 10 coins!
- Logoff
- Log in (zap) here's a brand new sword
- Sell sword +10 coins!
- Save game
- Logoff
- Log in (zap) here's a brand new sword
- Sell sword +10 coins!
- Save game
- Logoff
....

Can you handle this?

call - May 31, 2007 04:19 PM (GMT)
sorry! Maybe I express the wrong meaning.

My question is how change the game code without restarting the game.

For example, the game started for a while, but now I want to add some npc or some item into game. How can I do this without restarting the game.

Cris - June 14, 2007 11:41 AM (GMT)
Oh now I see.

This cannot be done at present.

There's a way to execute commands interactively at run-time via the admin panel.

This method *could* be used to add functions (.. or even replace them) in the future.

But I think it will lead to practical problems.

Much better to arrange a way to store the game situation, and restart for a 'clean' environment.





Hosted for free by InvisionFree