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.
Script request.
Débuté par
Bazilbrush
, janv. 10 2011 02:15
#1
Posté 10 janvier 2011 - 02:15
#2
Posté 10 janvier 2011 - 03:57
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.
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
Posté 12 janvier 2011 - 01:00
That works perfectly, thank you very much Ghost. :-)
#4
Posté 12 janvier 2011 - 10:44
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
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





Retour en haut







