logo logo

 Back to main page

The NWNX Community Forum

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
What to store...what to store
Goto page Previous  1, 2
 
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related
View previous topic :: View next topic  
Author Message
Roo



Joined: 28 Jul 2006
Posts: 6

PostPosted: Mon Sep 04, 2006 12:42    Post subject: Reply with quote

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
View user's profile Send private message
fgetce



Joined: 04 Jun 2006
Posts: 23

PostPosted: Mon Sep 04, 2006 18:39    Post subject: Thanks for the replies Reply with quote

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
View user's profile Send private message
Senalaya



Joined: 29 Dec 2004
Posts: 82
Location: Germany

PostPosted: Mon Sep 04, 2006 22:23    Post subject: Reply with quote

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
View user's profile Send private message
Frang



Joined: 22 May 2005
Posts: 32

PostPosted: Sun Oct 15, 2006 17:55    Post subject: Reply with quote

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
View user's profile Send private message
fgetce



Joined: 04 Jun 2006
Posts: 23

PostPosted: Thu Oct 19, 2006 15:59    Post subject: Reply with quote

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
View user's profile Send private message
Frang



Joined: 22 May 2005
Posts: 32

PostPosted: Thu Oct 19, 2006 19:36    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    nwnx.org Forum Index -> Database related All times are GMT + 2 Hours
Goto page Previous  1, 2
Page 2 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group