
Aide et informations diverses sur Neverwinter Nights ainsi que D&D3.







La date/heure actuelle est 11/04/2025 12:58:56
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 |
zogzog59 Grand Chevalier ![]() Messages: 123 |
zog zog !
comment faire pour combiner les 2 premier script enssemble et les 2 suivants enssemble s'il vous plait ?? NWScript :
//: ![]() //:: Generic On Pressed Respawn Button //:: Copyright (c) 2001 Bioware Corp. //: ![]() /* // * June 1: moved RestoreEffects into plot include */ //: ![]() //:: Created By: Brent //:: Created On: November //: ![]() #include "nw_i0_plot" // * Applies an XP and GP penalty // * to the player respawning void ApplyPenalty(object oDead) { object oRespawner = GetLastRespawnButtonPresser(); SetCampaignInt("NOM_DE_TON_MOD","balise_mort",FALSE,oRespawner); int nXP = GetXP(oDead); int nPenalty = 50 * GetHitDice(oDead); int nHD = GetHitDice(oDead); // * You can not lose a level with this respawning int nMin = ((nHD * (nHD - 1)) / 2) * 1000; int nNewXP = nXP - nPenalty; if (nNewXP < nMin) nNewXP = nMin; SetXP(oDead, nNewXP); int nGoldToTake = FloatToInt(0.10 * GetGold(oDead)); // * a cap of 10 000gp taken from you if (nGoldToTake > 10000) { nGoldToTake = 10000; } AssignCommand(oDead, TakeGoldFromCreature(nGoldToTake, oDead, TRUE)); DelayCommand(4.0, FloatingTextStrRefOnCreature(58299, oDead, FALSE)); DelayCommand(4.8, FloatingTextStrRefOnCreature(58300, oDead, FALSE)); } ////////////////////////////// ////////////////////////////// /////////// // this function resets variabls and clears the arenas in the fighter // 'gauntlet' subplot in chapter one ////////////////////////////// ////////////////////////////// /////////// void ClearArena(object oPC,string sArena) { if(sArena == "Map_M1S4C") { DestroyObject(GetObjectByTag("M1S04CHRUSK02")); DestroyObject(GetObjectByTag("M1S4CBeast")); SetLocalInt(GetObjectByTag(sArena),"NW_A_M1S4HruskDef",0); } else if(sArena == "Map_M1S4D") { DestroyObject(GetObjectByTag("M1S04CFASHI02")); DestroyObject(GetObjectByTag("M1S4DBeast")); SetLocalInt(GetObjectByTag(sArena),"NW_A_M1S4FashiDef",0); CreateItemOnObject("M1S04IBADGELVL01",oPC); } else if(sArena == "Map_M1S4E") { DestroyObject(GetObjectByTag("M1S04CAGAR02")); DestroyObject(GetObjectByTag("M1S4EBeast")); SetLocalInt(GetObjectByTag(sArena),"NW_A_M1S4AgarDef",0); CreateItemOnObject("M1S04IBADGELVL02",oPC); } else if(sArena == "Map_M1S4F") { DestroyObject(GetObjectByTag("M1S04CCLAUDUS02")); DestroyObject(GetObjectByTag("M1S4FBeast",0)); DestroyObject(GetObjectByTag("M1S4FBeast",1)); SetLocalInt(GetObjectByTag(sArena),"NW_A_M1S4ClaudusDef",0); CreateItemOnObject("M1S04IBADGELVL03",oPC); } SetLocalInt(oPC,"NW_L_M1S4Won",FALSE); SetLocalInt(GetModule(),"NW_G_" + sArena + "_Occupied",FALSE); } ////////////////////////////// ////////////////////////////// ////////////////// void main() { object oRespawner = GetLastRespawnButtonPresser(); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oRespawner); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oRespawner)), oRespawner); RemoveEffects(oRespawner); //* Return PC to temple string sDestTag = "NW_DEATH_TEMPLE"; string sArea = GetTag(GetArea(oRespawner)); /* CHAPTER 1 SPECIAL CASE */ if (sArea == "MAP_M1S3B") { sDestTag = "M1_WIZSPAWN"; } else if (sArea == "Map_M1S4E" || sArea == "Map_M1S4C" || sArea == "Map_M1S4D" || sArea == "Map_M1S4F") { sDestTag = "M1_FIGSPAWN"; ClearArena(oRespawner,sArea); } else /* CHAPTER 2 SPECIAL CASE */ /* if (sArea == "MAP_M2Q2F2" && GetDistanceBetweenLocations(Ge tLocation(GetObjectByTag(" ;M2Q2F2_M2Q2G")), GetLocation(oRespawner)) < 5.0 && GetLocalInt(GetModule()," NW_M2Q2E_WoodsFreed") == 0) { sDestTag = "WP_M2Q2GtoM2Q2F"; } else */ // * Druid Match if (sArea == "MAP_M2Q2E2") { sDestTag = "WP_M2Q2E_ENDDCC"; DestroyObject(GetObjectByTag("M2Q2EWELCARFT")); DestroyObject(GetObjectByTag("M2Q2EHENNAFT")); DestroyObject(GetObjectByTag("M2Q2EJANKENFT")); DestroyObject(GetObjectByTag("M2Q2EELGARFT")); // * June 2002: Destroy pets as well DestroyObject(GetObjectByTag("M2Q2EWELCARFTPET")); DestroyObject(GetObjectByTag("M2Q2EHENNAFTPET")); DestroyObject(GetObjectByTag("M2Q2EJANKENFTPET")); DestroyObject(GetObjectByTag("M2Q2EELGARFTPET")); SetLocalInt(GetObjectByTag("M2Q2EJAER"),"NW_M2Q2E_LFIGHT",FALSE); } /* CHAPTER 3 SPECIAL CASE */ else // * time travel dungeon past - Dungeon if (sArea == "M3Q2G") { sDestTag = "WP_ALTERNATE_SPWN"; } // * time travel dungeon past - Grove else if (sArea == "M3Q2I") { sDestTag = "WP_ALTERNATE_SPWN"; } if (GetIsObjectValid(GetObjectByTag(sDestTag))) { if (sDestTag == "NW_DEATH_TEMPLE") { object oPriest = GetObjectByTag("NW_DEATH_CLERIC"); //SetLocalInt(oPriest, "NW_L_SAYONELINER", 10); //AssignCommand(oPriest, DelayCommand(3.0,ActionStartCo nversation(oRespawner))); AssignCommand(oPriest, DelayCommand(2.1, PlayVoiceChat(VOICE_CHAT_TALKTOME, oPriest))); SetLocalLocation(oRespawner, "NW_L_I_DIED_HERE", GetLocation(GetLastRespawnButtonPresser())); SetLocalInt(oRespawner, "NW_L_I_DIED", 1); SetLocalObject(oPriest, "NW_L_LASTDIED", GetLastRespawnButtonPresser()); // * April 2002: Moved penalty here, only when going back to the death temple ApplyPenalty(oRespawner); } object oSpawnPoint = GetObjectByTag(sDestTag); AssignCommand(oRespawner,JumpToLocation(GetLocation(oSpawnPoint))); // * mak } else { // * do nothing, just 'res where you are. } } 2eme script NWScript :
void main() { object oRespawner = GetLastRespawnButtonPresser(); //---------------------------- ----------------------------// // Positionement des balises a " FALSE " // //---------------------------- ----------------------------// SetCampaignInt("NOM_DE_TON_MOD","balise_mort",FALSE,oRespawner); } merci d'avance... pour la deuxieme compilation: NWScript :
void main() { object oPlayer = GetLastPlayerDied(); //---------------------------- ------------------------------ -------------// // On met une balise de mort au pj qui vient de mourir. // //---------------------------- ------------------------------ -------------// // sert a declarer une balise pour "marquer" le pj a la mort. SetCampaignInt("NOM_DE_TON_MOD","balise_mort",TRUE,oPlayer); //---------------------------- ------------------------------ -----------// } NWScript :
//: ![]() //:: Death Script //:: NW_O0_DEATH.NSS //:: Copyright (c) 2001 Bioware Corp. //: ![]() /* This script handles the default behavior that occurs when a player dies. BK: October 8 2002: Overriden for Expansion */ //: ![]() //:: Created By: Brent Knowles //:: Created On: November 6, 2001 //: ![]() /* void ClearAllFactionMembers(object oMember, object oPlayer) { // AssignCommand(oMember, SpeakString("here")) ; AdjustReputation(oPlayer, oMember, 100); SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad&qu ot;, 10); // * Player bad object oClear = GetFirstFactionMember(oMember, FALSE); while (GetIsObjectValid(oClear) == TRUE) { ClearPersonalReputation(oPlaye r, oClear); oClear = GetNextFactionMember(oMember, FALSE); } } */ void Raise(object oPlayer) { effect eVisual = EffectVisualEffect(VFX_IMP_RESTORATION); effect eBad = GetFirstEffect(oPlayer); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectResurrection(),oPlayer); ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectHeal(GetMaxHitPoints(oPlayer)), oPlayer); //Search for negative effects while(GetIsEffectValid(eBad)) { if (GetEffectType(eBad) == EFFECT_TYPE_ABILITY_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_AC_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_ATTACK_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_DAMAGE_IMMUNITY_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_SAVING_THROW_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_SPELL_RESISTANCE_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_SKILL_DECREASE || GetEffectType(eBad) == EFFECT_TYPE_BLINDNESS || GetEffectType(eBad) == EFFECT_TYPE_DEAF || GetEffectType(eBad) == EFFECT_TYPE_PARALYZE || GetEffectType(eBad) == EFFECT_TYPE_NEGATIVELEVEL) { //Remove effect if it is negative. RemoveEffect(oPlayer, eBad); } eBad = GetNextEffect(oPlayer); } //Fire cast spell at event for the specified target SignalEvent(oPlayer, EventSpellCastAt(OBJECT_SELF, SPELL_RESTORATION, FALSE)); ApplyEffectToObject(DURATION_TYPE_INSTANT, eVisual, oPlayer); } void main() { object oPlayer = GetLastPlayerDied(); // * increment global tracking number of times that I died SetLocalInt(oPlayer, "NW_L_PLAYER_DIED", GetLocalInt(oPlayer, "NW_L_PLAYER_DIED") + 1); // * BK: Automation Control. Autopcs ignore death if (GetLocalInt(oPlayer, "NW_L_AUTOMATION") == 10) { Raise(oPlayer); DelayCommand(1.0, ExecuteScript("crawl", OBJECT_SELF)); return; // Raise and return } // * Handle Spirit of the Wood Death string sArea = GetTag(GetArea(oPlayer)); /* if (sArea == "MAP_M2Q2F2" && GetDistanceBetweenLocations(Ge tLocation(GetObjectByTag(" ;M2Q2F2_M2Q2G")), GetLocation(oPlayer)) < 5.0 && GetLocalInt(GetModule()," NW_M2Q2E_WoodsFreed") == 0) { int bValid; Raise(oPlayer); string sDestTag = "WP_M2Q2GtoM2Q2F"; object oSpawnPoint = GetObjectByTag(sDestTag); AssignCommand(oPlayer,JumpToLo cation(GetLocation(oSpawnPoint ))); return; } */ // * in last level of the Sourcestone, move the player to the beginning of the area // * May 16 2002: or the main area of the Snowglobe (to prevent plot logic problems). // * May 21 2002: or Castle Never if (sArea == "M4Q1D2" || sArea == "M3Q3C" || sArea == "MAP_M1Q6A") { //Raise(oPlayer); //string sDestTag = "M4QD07_ENTER"; //object oSpawnPoint = GetObjectByTag(sDestTag); // AssignCommand(oPlayer, DelayCommand(1.0, JumpToLocation(GetLocation(oSp awnPoint)))); // * MAY 2002: Just popup the YOU ARE DEAD panel at this point DelayCommand(2.5, PopUpDeathGUIPanel(oPlayer,FALSE, TRUE, 66487)); return; } // * make friendly to Each of the 3 common factions AssignCommand(oPlayer, ClearAllActions()); // * Note: waiting for Sophia to make SetStandardFactionReptuation to clear all personal reputation if (GetStandardFactionReputation(STANDARD_FACTION_COMMONER, oPlayer) <= 10) { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 80, oPlayer); } if (GetStandardFactionReputation(STANDARD_FACTION_MERCHANT, oPlayer) <= 10) { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 80, oPlayer); } if (GetStandardFactionReputation(STANDARD_FACTION_DEFENDER, oPlayer) <= 10) { SetLocalInt(oPlayer, "NW_G_Playerhasbeenbad", 10); // * Player bad SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 80, oPlayer); } DelayCommand(2.5, PopUpGUIPanel(oPlayer,GUI_PANEL_PLAYER_DEATH)); } merci d'avance .... _________________ Les vaux module rp |
Revenir en haut | ![]() ![]() ![]() |
PsyCalimero Ecuyer ![]() Messages: 44 |
Dans les premiers scripts, auxquels tu veux rajouter un autre script, tu rajoute la commande :
NWScript :
Note : le code affiché ci-dessus n'est pas rendu tel qu'il devrait l'être réellement, en particulier des sauts de lignes sont automatiquement insérés pour éviter de casser la mise en page. En le copiant/collant, vous résoudrez ce problème. tout simplement. |
Revenir en haut | ![]() ![]() ![]() |


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