Aller au contenu

Photo

Script request.


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

#1
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
Would someone out there be able to write me a save on rest script? I have tried myself but with no joy. Hope someone can help.

#2
GhostOfGod

GhostOfGod
  • Members
  • 863 messages
All you need to do for that is add a single line to your modules "OnPlayerRest" script at the bottom, just above the last curly bracket "}".

ExportSingleCharacter(oPC);
}

And if you want you can add a line that tells the player that they were just saved:

ExportSingleCharacter(oPC);
SendMessageToPC(oPC, "Your character has been saved.");
}


As far as making a module "OnPlayerRest" script from scratch, if that is what you are looking for, it completely depends on a lot of other things that you want to happen or not happen in your module when a player rests.

Hope that helps. Good luck.

Modifié par GhostOfGod, 10 janvier 2011 - 04:00 .


#3
Bazilbrush

Bazilbrush
  • Members
  • 28 messages
That works perfectly, thank you very much Ghost. :-)

#4
Baaleos

Baaleos
  • Members
  • 1 330 messages
Note - I know this accomplishes what you require it to, but ExportSingleCharacter is Asynchronous - meaning it will not pause the execution of your code, while your character is saving.



Possible instances where you dont want to use ExportSingleCharacter include things such as

Letoscript changes that use GetNewestBic



The ExportAllServerCharacters (or whatever it is) method however, does stop execution of the code, and waits for the save to complete before moving on - which may be useful for certain things