Aller au contenu

Photo

After crash you loose xp ,items,???


  • Veuillez vous connecter pour répondre
11 réponses à ce sujet

#1
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Not sure if this is a scripting thing or not .One of the DM's informed me after a crash couple of days go ...they and some players lost   levels,gold, basically anything they had done in the last 2 hours of gaming .What would be the fix for this ?:huh:

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
The Fix is to have the server export(save) the Characters at regular intervals. It will add to the lag potental, But will protect the PC from loss due to a crash.

#3
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
So maybe attach a script to the rest script or a recall stone ..something they would use regularly ?

Also when are the chars normally saved ...didnt see anything in the OnclientLeave slot.

Modifié par Knight_Shield, 27 septembre 2010 - 02:38 .


#4
Fester Pot

Fester Pot
  • Members
  • 1 394 messages
Characters are saved based on the script you write to save them.



FP!

#5
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Yes but when you login and play then log out normally ..then log back in yuor char has all their things.What saves them then ...is that hard coded ?

#6
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
void main()

{

ExportAllCharacters();

}





So basically just put this in a trigger or rest script ..something players use regularly?

#7
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Yes that would work. When one person rested that would save every PC on the server.



And yes it is hard coded that when a player leaves the server, thier charcter gets saved.

#8
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Thanks Lightfoot8 ....I dont know what this communnity would do without people like you .:)

Modifié par Knight_Shield, 28 septembre 2010 - 12:56 .


#9
Khuzadrepa

Khuzadrepa
  • Members
  • 188 messages
Something to note... Shifters/polymorphs can have issues with exports.

Here's what it says about this in the Lexicon:
"Exporting polymorphed characters causes the character to de-polymorph and re-polymorph. For the Hordes of the Underdark Shifter Prestige class, this causes all the equipment bonuses to be lost. (Early versions of Neverwinter Nights would incorrectly write out the data for the polymorphed creature causing character corruption.)"

So you might want to check them for polymorphs and export single non-polymorphed players instead.

Modifié par Khuzadrepa, 28 septembre 2010 - 04:41 .


#10
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Ok cant get the script right to not export poloymorphed characters..does anyone have an export all character script except if they are polymorph they would like to share ?

#11
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
Might have to do something like this:


int GetIsPolymorphed(object oPC)
{
    effect eCheck = GetFirstEffect(oPC);
    while(GetIsEffectValid(eCheck))
    {
        if(GetEffectType(eCheck) == EFFECT_TYPE_POLYMORPH)
        return TRUE;
        eCheck = GetNextEffect(oPC);
    }
    return FALSE;
}
void main()
{
    object oPC = GetFirstPC();
    while (GetIsObjectValid(oPC))
    {
        if (!GetIsPolymorphed(oPC))
        ExportSingleCharacter(oPC);
        oPC = GetNextPC();
    }
}

Hope that helps.

Modifié par GhostOfGod, 27 octobre 2010 - 09:53 .


#12
Knight_Shield

Knight_Shield
  • Members
  • 444 messages
Thanks again....its wonderful when you add a script and it not only compiles but works.
I call this "exportsave" and put it in my rest script with a delay so if shifter rests it polymorphs back before being saved.I seen that somewhere..Image IPB