View previous topic :: View next topic |
Author |
Message |
Roo
Joined: 28 Jul 2006 Posts: 6
|
Posted: Mon Sep 04, 2006 12:42 Post subject: |
|
|
I don't think it recognises the PC's location OnClientExit.
I tried something similar and had the same problem so I moved the location save to the rest script. That way after a reset/crash they can port back to the location they rested at last. |
|
Back to top |
|
|
fgetce
Joined: 04 Jun 2006 Posts: 23
|
Posted: Mon Sep 04, 2006 18:39 Post subject: Thanks for the replies |
|
|
That's interesting as were supposed to be able to get info on the character object just not on the exiting player on the onExit script.
Oh well, I moved the pclocation code to a delay command for every 2 minutes to get the pcs location into the database.
Now if there is a server reset, they will appear in the start here area which will check to see if they have a stored position and if they do it will jump them to it after 5 second otherwise they will arrive at the standard begin area for the module.
Something else, is there a way to make cleric spells persistent? Right now Rangers, Paladins and Priest spells are not perssitent, only wizard spells. Its not a big issue, but was wondering if there has been a fix or improvement on storing these. |
|
Back to top |
|
|
Senalaya
Joined: 29 Dec 2004 Posts: 82 Location: Germany
|
Posted: Mon Sep 04, 2006 22:23 Post subject: |
|
|
Roo wrote: | I don't think it recognises the PC's location OnClientExit.
I tried something similar and had the same problem so I moved the location save to the rest script. That way after a reset/crash they can port back to the location they rested at last. |
When OnClientExit fires, the location and other attributes like pcplayername are already cleared/reverted to 0.
A working solution is to store static data like pcplayerip, pcplayername or cdkey in local vars on the character during OnClientEnter. And for the location, you best use OnExit of your areas and store it also in a local var on the character.
When a player leaves, the OnExit of the current area fires first, while the location is still valid.
The local vars are still valid and can be accessed during OnClientExit for your scripting needs. |
|
Back to top |
|
|
Frang
Joined: 22 May 2005 Posts: 32
|
Posted: Sun Oct 15, 2006 17:55 Post subject: |
|
|
Anyone have a set of scripts for this already done that wouldnt mind sharing? I have been trying for the last three days to get something like this working but just can't figure it out. I would like to have Hp, Feats, Spells and Location saved at the least. Any help is greatly appreciated.
Frang |
|
Back to top |
|
|
fgetce
Joined: 04 Jun 2006 Posts: 23
|
Posted: Thu Oct 19, 2006 15:59 Post subject: |
|
|
I wouldn't mind sharing DB script stuff, but it will still require a decent grasp of the MySQL language and understand how NWNx2 works, incase of problems or if you want to store something different.
Give me some time because I am still working on my project adding new features and content. |
|
Back to top |
|
|
Frang
Joined: 22 May 2005 Posts: 32
|
Posted: Thu Oct 19, 2006 19:36 Post subject: |
|
|
Thats cool, I been messing around with a few other scripts I found on the vault.I found one that used bioware database I switched it over but not everything seems to work. I have it saving location, hp's feats and supose to save spells but the spells part is only half working. I can see where its storing the spells in mysql but its not staring a vaule for the spells so when players relog it just removes all there spells. But I am still interested to see what you have done when your finished. And thanks for the reply.
Frang |
|
Back to top |
|
|
|