La Bibliothèque de Neverwinter Nights
Aide et informations diverses sur Neverwinter Nights ainsi que D&D3.
Aide et informations diverses sur Neverwinter Nights ainsi que D&D3.
FAQ
Rechercher
Liste des Membres
Groupes d'utilisateurs
S'enregistrer Se connecter pour vérifier ses messages privés Connexion
S'enregistrer Se connecter pour vérifier ses messages privés Connexion
La date/heure actuelle est 27/12/2024 03:35:54
La Bibliothèque de Neverwinter Nights Index du Forum »
La Bibliothèque Binaire du NWScript - Neverwinter Nights
Voir le sujet précédent ¤ Voir le sujet suivant | |
---|---|
Auteur | Message |
Paiste Ecuyer Messages: 65 Localisation: Montréal |
J'ai trouver un systeme sur vault qui semble faire en sorte qu'un coffre soit lootable pour differente personne et qu'il respawn apres un certain temps...
Mais quand je test...le coffre est toujours vide... besoin d'aide svp merci!! voici le script dans le open! NWScript : //:///////////////////////// ///////////////////// //:: (T)reasure (R)espawn and (G)eneration (S)ystem //:: trgs_i0_respawn //:///////////////////////// //////////////////// /* This script is intended to manage the respawn aspect of treasure generation while being compatible with any existing method of actual treasure generation. By default, the system is tied to the HOTU treasure generation scripts. */ //:///////////////////////// //////////////////// //:: Created By: Mister_Leebo AKA Bent_Spear //:: Created On: June 14th, 2005 //:///////////////////////// //////////////////// // This file is safe to modify. #include "x2_inc_treasure" // ROOM FOR ADJUSTMENTS // You can easily adjust the values of the // following variables here. // Which method to use (see RESPAWNMETHODS) const int DEFAULT_RESPAWN_METHOD = 3; // How long to wait for returning treasure methods (in minutes) const int DEFAULT_RESPAWN_DELAY = 12; // Determines multiplier for unlock xp. In testing, I've found that 5 // produces a reasonable value for a module using an Official Campaign // rate of advancement. If you want it to take much longer to level, // reduce this value. const int DEFAULT_UNLOCK_XP = 5; // TREASURECLASS and TREASURETYPE: // Same as default HOTU constants with // memory-friendly labels. // // NOTE: If you modify the TRGS to use a system // other than the BioWare default HOTU // scripts, you may need to change these // constants. const int LOW = 0; const int MEDIUM = 1; const int HIGH = 2; const int NONE = 0; const int DISPOSABLES = 1; const int AMMUNITION = 2; const int GOLD = 4; const int EQUIPMENT = 8; // RESPAWN_METHODS // Explains the different ways a chest might determine if it // can respawn its treasure. Use the numeric value to the right // when selecting which method will become your default. // BioWare Default script effect: First User only, no respawn const int RESPAWNMETHOD_ONE_SHOT_NO_RETURN = 0; // First User only, will respawn const int RESPAWNMETHOD_ONE_SHOT_AND_RETURN = 1; // All users, no respawn const int RESPAWNMETHOD_CONTINUOUS_NO_RETURN = 2; // All users, will respawn const int RESPAWNMETHOD_CONTINUOUS_AND_RETURN = 3; // STRING CONSTANTS // These are all used to construct the names of // various local variables used by the system. // They're all listed here so that you may // find them easily and change them in the rare // instance that they match something you use. // // You do not have to modify these, and it is // not recommended that you do. const string ONE_SHOT = "TREASURE_DO_ONCE"; const string CONTINUOUS = "ONCE_FOR_"; const string AND_RETURN = "_UNTIL_LATER"; const string MINUTE_KEY = "TREASURE_RESPAWN_MINUTE"; // Wrapper function to call HOTU default treasure generation script. // To quickly and easily affix the Treasure Respawn System to ANY // treasure generation script, just modify this function, but leave // its name the same. void GenerateMyTreasure( object oCont, object oOpener, int CLASS, int TYPE ); void GenerateMyTreasure( object oCont, object oOpener, int CLASS, int TYPE ) { DTSGenerateTreasureOnContainer( oCont, oOpener, CLASS, TYPE ); } |
Revenir en haut | |
Paiste Ecuyer Messages: 65 Localisation: Montréal |
Je sais que la communauté n'est plus se qu'elle était...mais il doit bien y avoir un ame charitable pour m'aider non ?
|
Revenir en haut | |
Mythyzyn Héros Messages: 292 Localisation: Lyncya |
Essaie voir ça :
NWScript : //---------------------------- ------------------------------ -------// // Container Respawn // by Ahaneon // // Respawn container if it has been at least "respawntime" seconds // after the last time the container spawned. // // Script error: containter respawns at midnight too even if it last // respawned a second before midnight, might fix this later //---------------------------- ------------------------------ -------// #include "NW_O2_CONINCLUDE" void main() { object oItem = OBJECT_INVALID; int respawntime = 36000; // Check object for the time it was last opened and see if it is time to respawn int lastopened = GetLocalInt(OBJECT_SELF,"CS_Opened"); // CS_Openend = 0 on not found, GetLocalInt error return int currenttime = GetTimeSecond()+60*GetTimeMinute()+3600*GetTimeHour(); if (currenttime > lastopened + respawntime) { // respawntime seconds passed? SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0); } if (lastopened > currenttime) { // maybe a whole day passed? or it's midnight? SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0); } // Respawn chest if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") == 0) { oItem = GetFirstItemInInventory(); while ( oItem != OBJECT_INVALID ) { DestroyObject( oItem, 0.0 ); oItem = GetNextItemInInventory(); } object oLastOpener = GetLastOpener(); // See NW_O2_CONINCLUDE for more Treasure generating scripts, // Thisone generates high treasure depending on the lastopener level GenerateHighTreasure(oLastOpener, OBJECT_SELF); SetLocalInt(OBJECT_SELF,"CS_Opened",GetTimeSecond()+60*GetTimeMinute()+3600*GetTimeHour()); SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1); } } //---------------------------- ------------------------------ -------// _________________ NwN2 - Lyncya 3 - La Guerre du Crystium |
Revenir en haut | |
Paiste Ecuyer Messages: 65 Localisation: Montréal |
merci j'ai trouver mon probleme merci encore!!
|
Revenir en haut | |
La Bibliothèque de Neverwinter Nights Index du Forum »
La Bibliothèque Binaire du NWScript - Neverwinter Nights
Page 1 sur 1 ¤
Vous ne pouvez pas poster de nouveaux sujets dans ce forum
Vous ne pouvez pas répondre aux sujets dans ce forum
Vous ne pouvez pas éditer vos messages dans ce forum
Vous ne pouvez pas supprimer vos messages dans ce forum
Vous ne pouvez pas voter dans les sondages de ce forum