View previous topic :: View next topic |
Author |
Message |
ironhorse
Joined: 02 May 2005 Posts: 13 Location: uk
|
Posted: Mon May 02, 2005 2:06 Post subject: little help please? |
|
|
I have setup nwnx and tested the demo and it worked, but when I try to start using it in my own file the scripting site doesnt work.
all I want it to do is when someone joins my server it takes their details (name, character name, etc...) so then I can use it to save peoples locations when server restarts.
Can anyone help me on this please?
Ironhorse
p.s. I want to use mySQL for the database, I dont know if you need to change anything apart form puting the details in the file. |
|
Back to top |
|
|
DarkstarsDad
Joined: 17 Jan 2005 Posts: 59 Location: Overland Park, Kansas USA
|
Posted: Mon May 02, 2005 14:20 Post subject: Need some more details |
|
|
Need more details on what you did/did not do? Did you put the aps on load in your onload script? then you need to write a script to save the data to the data base. more information is needed on what you have done for us to help you. Try the tutorials on the main page for help also. _________________ Just because you think you can't. Is the best reason to try it anyway. |
|
Back to top |
|
|
ironhorse
Joined: 02 May 2005 Posts: 13 Location: uk
|
Posted: Mon May 02, 2005 16:16 Post subject: its working now |
|
|
I have got it working now and someone sent me a script that saves the persons location, but it doesnt seem to work after the server has reset?
Here is the script
#include "aps_include"
void main()
{
object oPC = GetEnteringObject();
// don't run this script on monsters or NPC's
if (!GetIsPC(oPC)) return;
// Is this the first time the PC has come here?
if (!GetPersistentInt(oPC, "Stripped"))
{
SetPersistentInt(oPC, "Stripped", 1);
// Strip items, set initial DB vars
SetPersistentLocation(oPC, "SavePoint", GetLocation(oPC));
}
// If this isn't the first login, send the PC directly to the savepoint
location lPC = GetPersistentLocation(oPC, "SavePoint");
DelayCommand(2.0f, AssignCommand(oPC, ActionJumpToLocation(lPC)));
} |
|
Back to top |
|
|
Papillon x-man
Joined: 28 Dec 2004 Posts: 1060 Location: Germany
|
Posted: Tue May 03, 2005 17:57 Post subject: |
|
|
Do you have the players location on client leave ? Also check the odbc log file if it finds the location upon login. _________________ Papillon |
|
Back to top |
|
|
NoMercy
Joined: 03 Jan 2005 Posts: 123 Location: UK
|
Posted: Wed May 04, 2005 1:50 Post subject: |
|
|
SetPersistentInt(oPC, "Stripped", 1);
I tend to rely on the fact new players have 0xp, in the event the database fails you don't really want level 40 players ending up nakid with no equipment :) |
|
Back to top |
|
|
|