View previous topic :: View next topic |
Author |
Message |
Campbell
Joined: 29 Jul 2008 Posts: 9
|
Posted: Tue Jul 29, 2008 8:59 Post subject: Help with store/get persistentobject npc |
|
|
I recently converted my server from XP to Linux and am having issues with a script that worked fine in XP with SQlite, but isn't working in Linux with MySQL. The player is copied for an NPC and used as a statue. The statue is then stored into MySQL with the SetPersistentObject. On reload of the mod, I want the NPC to be spawned again and turned into a statue with the GetPersistentObject. I used a invisible object as the reference object to call the script from . It looks like it's being stored in MySQL, but I seem to be having a problem recalling it. Do I need to put something else as the owner besides a WP. It seemed to work fine in SQLite, having it spawn right on top of it.
Code: |
#include "aps_include"
void main()
{
object oWP = GetWaypointByTag("wp_statue");
object oObject = GetObjectByTag("NPC_holder");
effect eStone = SupernaturalEffect(EffectVisualEffect(VFX_DUR_PROT_STONESKIN));
effect Vfx = SupernaturalEffect(EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION));
effect ghost = SupernaturalEffect(EffectCutsceneGhost ());
object oClone = GetPersistentObject(oObject, "Statue", oWP, "statue");
DelayCommand(1.0, ApplyEffectToObject (DURATION_TYPE_PERMANENT, Vfx, oClone));
DelayCommand(1.5, ApplyEffectToObject (DURATION_TYPE_PERMANENT, eStone, oClone));
DelayCommand(2.0, ApplyEffectToObject (DURATION_TYPE_PERMANENT, ghost, oClone));
DelayCommand(2.5, SetPlotFlag(oClone, TRUE));
}
|
Hopefully someone can help. Thanks in advanced. |
|
Back to top |
|
|
FunkySwerve
Joined: 02 Jun 2005 Posts: 377
|
Posted: Tue Jul 29, 2008 11:04 Post subject: |
|
|
For Get and Set PersistentObject, you need to use virusman's version of the plugin, rather than the default one on the download's page. Seek out one of his 1.69 status threads for a link to his collected works.
Funky |
|
Back to top |
|
|
Campbell
Joined: 29 Jul 2008 Posts: 9
|
Posted: Tue Jul 29, 2008 22:01 Post subject: |
|
|
Thanks Funky. I had originally tried using the plugins from the current list that Virusman has up for 1.69, but I was having problems with them requiring libstdc++.so.5. I believe I have the more recent libstdc++.so.6. I also tried compiling them myself from the NWNX2Core that he has posted on the same page as his other plugins. With those ones I get a segmentation fault. I'm currently using the ones from nwnx-easy but just that curent script doesn't work. Any other ideas? I also had a strange error occuring that was happening when I did a GetPersistant in the aps_demo mod to test. The items that spawned in the chest filled the chest up to 25 containers worth of items instead of just the 3. I'm not sure what was happening there. It seemed to fix itself when I reset the database table by recreating it. |
|
Back to top |
|
|
|
|
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
|