Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Tech Support (https://forums.graalonline.com/forums/forumdisplay.php?f=7)
-   -   NPC DB not saving on disconnect. Alternative? (https://forums.graalonline.com/forums/showthread.php?t=83045)

Novo 12-07-2008 04:32 PM

NPC DB not saving on disconnect. Alternative?
 
When the npcserver crashes or is disconnected by evil people with RC's, the variables in the database npcs are rolled back to some arbitrary past date. As such, a lot of information is being lost.

To reiterate: Information as money in banks, members in guilds, etc etc... Are being reset to the previous value (and thus, duping can occur) when the NPC Server crashes or is forcefully restarted.

I was wondering if this is a bug... And what is the best procedure to go forward with this?

Thanks

Soala 12-07-2008 04:40 PM

Wow this suck o_O !

xXziroXx 12-07-2008 04:40 PM

Can always only use database NPC's as cache, and store the actual information in files. Upon a server crash, the DB simply reloads the information stored in those files.


http://forums.graalonline.com/forums...ad.php?t=81961

Check functions_cached_database.txt if you want an awesome system for it.

Admins 12-07-2008 06:16 PM

If the npc is inactive or doesn't have a script, remember to wake it up when you add or modify data: a simple trigger("update", "") or similar will solve the problem.

Inactive npcs are not saved. It's the same problem when changing x or y of an inactive npc, you need to activate the npc so that the modifications are sent to the players.

Novo 12-08-2008 01:07 PM

Hrm... In this case, there was scripts in the database npc (it managed the database), but it was on a reactionary bases (via function calls).

I'll just add a trigger after setting functions!

Thanks by the way (this bug wasn't an easy find!)


All times are GMT +2. The time now is 08:41 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.