| | Base de Scripts | |
| | Auteur | Message |
---|
Ferimens
Nombre de messages : 57 Localisation : Dans le 5ème cercle des Enfers Date d'inscription : 23/12/2006
| Sujet: Base de Scripts Jeu 25 Jan - 0:12 | |
| Je propose que nous mettions nos scripts ici afin de pouvoir éventuellement les corrgiger ou les retoucher Par contre je crains que cette page ne soit resérvée qu'aux initiés Faîtes gaffe si vous ne voulez pas vous retrouver avec un mal de crâne... | |
| | | Ferimens
Nombre de messages : 57 Localisation : Dans le 5ème cercle des Enfers Date d'inscription : 23/12/2006
| Sujet: Re: Base de Scripts Jeu 25 Jan - 0:20 | |
| Voici mon set de script de lycanthropie : - lyc_heartbeat - lyc_onenter - lyc_variables - lyc_lycactive - lyc_vampactive 1/ lyc_heartbeat : A mettre dans l'évènement OnHeartbeat du module - Code:
-
//:://///////////////////////////////////////////// //:: Script de lycanthropie - Verification d'heure //:: lyc_heartbeat.nss //:: Copyright (c) 2007 Mythes et Legendes //::////////////////////////////////////////////// /*
*/ //::////////////////////////////////////////////// //:: Created By: Ferimens //:: Created On: 13/01/2007 //:://////////////////////////////////////////////
#include "lyc_variables" object oItem; object oTarget; effect incr_stre; effect incr_cons; effect incr_dext; effect incr_wisd; effect incr_inte; effect incr_char;
void main() {
int nInt; nInt = GetTimeHour(); if (nInt == int_hnight) //si il fait nuit { object oPC = GetFirstPC(); while (GetIsPC(oPC)) { if (GetItemPossessedBy(oPC, str_lycactive)!= OBJECT_INVALID) { func_lyc_morph(oPC); } else if (GetItemPossessedBy(oPC, str_vampactive)!= OBJECT_INVALID) { func_vamp_morph(oPC); } //Au suivant ! oPC = GetNextPC(); } }
else if (nInt == int_hday)//si il fait jour { object oPC = GetFirstPC(); while (GetIsPC(oPC)) { if (GetItemPossessedBy(oPC, str_islyc)!= OBJECT_INVALID) { func_lyc_unmorph(oPC); } else if (GetItemPossessedBy(oPC, str_isvamp)!= OBJECT_INVALID) { func_vamp_unmorph(oPC); } //Au suivant ! oPC = GetNextPC(); } } } 2/ lyc_onenter : A mettre dans l'évènement OnClientEnter du module - Code:
-
//:://///////////////////////////////////////////// //:: Script de lycanthropie - Verification d'entree //:: lyc_onenter.nss //:: Copyright (c) 2007 Mythes et Legendes //::////////////////////////////////////////////// /*
*/ //::////////////////////////////////////////////// //:: Created By: Ferimens //:: Created On: 13/01/2007 //:://////////////////////////////////////////////
#include "lyc_variables" object oItem; object oTarget; effect incr_stre; effect incr_cons; effect incr_dext; effect incr_wisd; effect incr_inte; effect incr_char; void main() {
int nInt; nInt = GetTimeHour(); if (nInt <= int_hday || nInt >= int_hnight) //si il fait nuit {
object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { if (GetItemPossessedBy(oPC, str_lycactive)!= OBJECT_INVALID) { func_lyc_morph(oPC); } else if (GetItemPossessedBy(oPC, str_vampactive)!= OBJECT_INVALID) { func_vamp_morph(oPC); } } }
else //si il fait jour { object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { if (GetItemPossessedBy(oPC, str_islyc)!= OBJECT_INVALID) { func_lyc_unmorph(oPC); } else if (GetItemPossessedBy(oPC, str_isvamp)!= OBJECT_INVALID) { func_vamp_unmorph(oPC); } } } } 3/ lyc_variables - Code:
-
//:://///////////////////////////////////////////// //:: Configuration du script de lycanthropie //:: lyc_variables.nss //:: Copyright (c) 2007 Mythes et Legendes //::////////////////////////////////////////////// /*
*/ //::////////////////////////////////////////////// //:: Created By: Ferimens //:: Created On: 13/01/2007 //:://////////////////////////////////////////////
//Variables globales int int_hday = 6; // Heure de debut du jour int int_hnight = 20; // Heure de debut du la nuit
//Variables lycanthrope int int_lyc_strength = 10; //Modificateurs : -Force int int_lyc_constitution = 10; // -Constitution int int_lyc_dexterity = 5; // -Dexterite int int_lyc_wisdom = -7; // -Sagesse int int_lyc_intelligence = -5; // -Intelligence int int_lyc_charisma = -10; // -Charisme
int int_lyc_appearance = APPEARANCE_TYPE_WEREWOLF; // Apparence du Loup-garou string str_lyc_portrait = "po_werewolf_"; // Blueprint du portrait du Loup-Garou
string str_islyc = "lyc_islyc"; // Tag et Blueprint du marqueur de metamorphose string str_lycactive = "lyc_lycactive"; // Tag et Blueprint du marqueur de lycanthropie string str_lyc_bdd = "werewolf"; // Nom de la base de donnes ou seront stockees les informations sur l'apparence du perso
//Variables vampire int int_vamp_strength = 6; //Modificateurs : -Force int int_vamp_constitution = 3; // -Constitution int int_vamp_dexterity = 0; // -Dexterite int int_vamp_wisdom = 8; // -Sagesse int int_vamp_intelligence = 8; // -Intelligence int int_vamp_charisma = 10; // -Charisme
int int_vamp_WingType = CREATURE_WING_TYPE_DEMON; // Type d'ailes du Vampire
string str_vampactive = "lyc_vampactive"; // Tag et Blueprint du marqueur de vampirisme string str_isvamp = "lyc_isvamp"; // Tag et Blueprint du marqueur de transformation
// Definition des fonctions
void func_lyc_morph(object oPC) { //suppression et creation des objets marqueurs oItem = GetItemPossessedBy(oPC, str_lycactive); if (GetIsObjectValid(oItem)) DestroyObject(oItem); CreateItemOnObject(str_islyc, oPC); //modification de l'apparence et effets visuels oTarget = oPC; SetCampaignInt( str_lyc_bdd, GetPCPlayerName(oPC) + "_PCAppearance", GetAppearanceType(oTarget), oTarget); SetCampaignString( str_lyc_bdd, GetPCPlayerName(oPC) + "_PCPortrait", GetPortraitResRef(oTarget), oTarget);//Stockage de l'apparence d'origine SetCreatureAppearanceType(oTarget, int_lyc_appearance); //Modification de l'apparence SetPortraitResRef(oTarget, str_lyc_portrait); int nInt; nInt = GetObjectType(oTarget); //effets visuels if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget)); //ajustement de la reputation SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 0, oPC); SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 0, oPC); SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 0, oPC); //modification des caracteristiques if( int_lyc_strength >= 0){incr_stre = EffectAbilityIncrease(ABILITY_STRENGTH, int_lyc_strength);} else {incr_stre = EffectAbilityDecrease(ABILITY_STRENGTH, int_lyc_strength * -1);} if(int_lyc_constitution >= 0){incr_cons = EffectAbilityIncrease(ABILITY_CONSTITUTION, int_lyc_constitution);} else{incr_cons = EffectAbilityDecrease(ABILITY_CONSTITUTION, int_lyc_constitution * -1);} if(int_lyc_dexterity >= 0){incr_dext = EffectAbilityIncrease(ABILITY_DEXTERITY, int_lyc_dexterity);} else{incr_dext = EffectAbilityDecrease(ABILITY_DEXTERITY, int_lyc_dexterity * -1);} if(int_lyc_wisdom >= 0){ incr_wisd = EffectAbilityIncrease(ABILITY_WISDOM, int_lyc_wisdom); } else{ incr_wisd = EffectAbilityDecrease(ABILITY_WISDOM, int_lyc_wisdom * -1); } if(int_lyc_intelligence >= 0){ incr_inte = EffectAbilityIncrease(ABILITY_INTELLIGENCE, int_lyc_intelligence); } else{ incr_inte = EffectAbilityDecrease(ABILITY_INTELLIGENCE, int_lyc_intelligence * -1); } if(int_lyc_charisma >= 0){ incr_char = EffectAbilityIncrease(ABILITY_CHARISMA, int_lyc_charisma); } else{ incr_char = EffectAbilityDecrease(ABILITY_CHARISMA, int_lyc_charisma * -1); } effect spel_fail = SupernaturalEffect(EffectSpellFailure(100, SPELL_SCHOOL_GENERAL)); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_stre, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_cons, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_dext, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_wisd, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_inte, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_char, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, spel_fail, oTarget); }
void func_lyc_unmorph(object oPC) { //suppression et creation des objets marqueurs oItem = GetItemPossessedBy(oPC, str_islyc); if (GetIsObjectValid(oItem)) DestroyObject(oItem); CreateItemOnObject(str_lycactive, oPC); //modification de l'apparence et effets visuels oTarget = oPC; SetCreatureAppearanceType(oTarget, GetCampaignInt( str_lyc_bdd, GetPCPlayerName(oPC) + "_PCAppearance", oTarget)); //Restauration de l'apparence d'origine SetPortraitResRef(oTarget, GetCampaignString( str_lyc_bdd, GetPCPlayerName(oPC) + "_PCPortrait", oTarget)); int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget)); //ajustement de la reputation SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 50, oPC); SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 50, oPC); SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 50, oPC); //modification des caracteristiques effect eEffect; eEffect = GetFirstEffect(oTarget); while (GetIsEffectValid(eEffect)) { if (GetEffectType(eEffect)==EFFECT_TYPE_SPELL_FAILURE) RemoveEffect(oTarget, eEffect); eEffect = GetNextEffect(oTarget); } eEffect = GetFirstEffect(oTarget); while (GetIsEffectValid(eEffect)) { if (GetEffectType(eEffect)==EFFECT_TYPE_ABILITY_INCREASE) RemoveEffect(oTarget, eEffect); eEffect = GetNextEffect(oTarget); } }
void func_vamp_morph(object oPC) { //suppression et creation des objets marqueurs oItem = GetItemPossessedBy(oPC, str_vampactive); if (GetIsObjectValid(oItem)) DestroyObject(oItem); CreateItemOnObject(str_isvamp, oPC); //modification de l'apparence et effets visuels oTarget = oPC; SetCreatureWingType(int_vamp_WingType, oPC); int nInt; nInt = GetObjectType(oTarget); //effets visuels if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget)); //ajustement de la reputation SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 0, oPC); SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 0, oPC); SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 0, oPC); //modification des caracteristiques if( int_vamp_strength >= 0){incr_stre = EffectAbilityIncrease(ABILITY_STRENGTH, int_vamp_strength);} else {incr_stre = EffectAbilityDecrease(ABILITY_STRENGTH, int_vamp_strength * -1);} if(int_vamp_constitution >= 0){incr_cons = EffectAbilityIncrease(ABILITY_CONSTITUTION, int_vamp_constitution);} else{incr_cons = EffectAbilityDecrease(ABILITY_CONSTITUTION, int_vamp_constitution * -1);} if(int_vamp_dexterity >= 0){incr_dext = EffectAbilityIncrease(ABILITY_DEXTERITY, int_vamp_dexterity);} else{incr_dext = EffectAbilityDecrease(ABILITY_DEXTERITY, int_vamp_dexterity * -1);} if(int_vamp_wisdom >= 0){ incr_wisd = EffectAbilityIncrease(ABILITY_WISDOM, int_vamp_wisdom); } else{ incr_wisd = EffectAbilityDecrease(ABILITY_WISDOM, int_vamp_wisdom * -1); } if(int_vamp_intelligence >= 0){ incr_inte = EffectAbilityIncrease(ABILITY_INTELLIGENCE, int_vamp_intelligence); } else{ incr_inte = EffectAbilityDecrease(ABILITY_INTELLIGENCE, int_vamp_intelligence * -1); } if(int_vamp_charisma >= 0){ incr_char = EffectAbilityIncrease(ABILITY_CHARISMA, int_vamp_charisma); } else{ incr_char = EffectAbilityDecrease(ABILITY_CHARISMA, int_vamp_charisma * -1); } ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_stre, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_cons, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_dext, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_wisd, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_inte, oTarget); ApplyEffectToObject(DURATION_TYPE_PERMANENT, incr_char, oTarget); }
void func_vamp_unmorph(object oPC) { //suppression et creation des objets marqueurs oItem = GetItemPossessedBy(oPC, str_isvamp); if (GetIsObjectValid(oItem)) DestroyObject(oItem); CreateItemOnObject(str_vampactive, oPC); //modification de l'apparence et effets visuels oTarget = oPC; SetCreatureWingType(CREATURE_WING_TYPE_NONE, oPC); // Suppression des ailes int nInt; nInt = GetObjectType(oTarget); if (nInt != OBJECT_TYPE_WAYPOINT) ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), oTarget); else ApplyEffectAtLocation(DURATION_TYPE_INSTANT, EffectVisualEffect(VFX_IMP_UNSUMMON), GetLocation(oTarget)); //ajustement de la reputation SetStandardFactionReputation(STANDARD_FACTION_COMMONER, 50, oPC); SetStandardFactionReputation(STANDARD_FACTION_DEFENDER, 50, oPC); SetStandardFactionReputation(STANDARD_FACTION_MERCHANT, 50, oPC); //modification des caracteristiques effect eEffect; eEffect = GetFirstEffect(oTarget); while (GetIsEffectValid(eEffect)) { if (GetEffectType(eEffect)==EFFECT_TYPE_ABILITY_INCREASE) RemoveEffect(oTarget, eEffect); eEffect = GetNextEffect(oTarget); } } | |
| | | Ferimens
Nombre de messages : 57 Localisation : Dans le 5ème cercle des Enfers Date d'inscription : 23/12/2006
| Sujet: Re: Base de Scripts Jeu 25 Jan - 0:21 | |
| 4/ lyc_lycactive - Code:
-
//:://///////////////////////////////////////////// //:: Morsure de Loup-Garou //:: lyc_lycactive.nss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Ce pouvoir est le pouvoir spcial du marqueur de metamorphose Attaque de contact sur la cible Si elle rate son jet de sauvegarde elle est paralysee et reoit un marqueur de lycanthropie
Jet de sauvegarde 14 + niveau du lanceur / 2
Vampires et loup-garous immunises */ //::////////////////////////////////////////////// //:: Created By: Ferimens //:: Created On: 24/01/07 //:://////////////////////////////////////////////
#include "lyc_variables" #include "NW_I0_SPELLS" object oItem; effect incr_stre; effect incr_cons; effect incr_dext; effect incr_wisd; effect incr_inte; effect incr_char; object oTarget;
void main() { //Declaration des variables object oTarget = GetSpellTargetObject(); int nCasterLvl = GetCasterLevel(OBJECT_SELF); int nMetaMagic = GetMetaMagicFeat(); int nRounds = d6(1) + 2;
//Declaration des effects effect ePara = EffectParalyze(); effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); effect eDur2 = EffectVisualEffect(VFX_DUR_ICESKIN); effect eDur3 = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION); int nDC = 14 + nCasterLvl / 2; eDur = EffectLinkEffects(eDur2,eDur); eDur = EffectLinkEffects(eDur3,eDur);
//Link effects effect eLink = EffectLinkEffects(ePara, eDur); if (TouchAttackMelee(oTarget,TRUE)>0) { // Vampires et loup-Garous non affectes par l'effet if ((GetItemPossessedBy(oTarget, str_islyc) == OBJECT_INVALID) || (GetItemPossessedBy(oTarget, str_isvamp)== OBJECT_INVALID)) { //Jet de sauvegarde if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE)) { //Application des effets au lanceur et a la cible ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nRounds)); // Creation des objets marqueurs CreateItemOnObject(str_islyc, oTarget, 1); } } else { FloatingTextStrRefOnCreature(85591,oTarget,FALSE); FloatingTextStrRefOnCreature(85591,OBJECT_SELF,FALSE); } } } 5/ lyc_vampactive - Code:
-
//:://///////////////////////////////////////////// //:: Morsure de Vampire //:: lyc_lycactive.nss //:: Copyright (c) 2001 Bioware Corp. //::////////////////////////////////////////////// /* Ce pouvoir est le pouvoir spcial du marqueur de transformation Attaque de contact sur la cible Si elle rate son jet de sauvegarde elle est paralysee et reoit un marqueur de vampirisme
Jet de sauvegarde 14 + niveau du lanceur / 2
Vampires et loup-garous immunises */ //::////////////////////////////////////////////// //:: Created By: Ferimens //:: Created On: 24/01/07 //:://////////////////////////////////////////////
#include "lyc_variables" #include "NW_I0_SPELLS" object oItem; effect incr_stre; effect incr_cons; effect incr_dext; effect incr_wisd; effect incr_inte; effect incr_char; object oTarget;
void main() { //Declaration des variables object oTarget = GetSpellTargetObject(); int nCasterLvl = GetCasterLevel(OBJECT_SELF); int nMetaMagic = GetMetaMagicFeat(); int nRounds = d6(1) + 2;
//Declaration des effects effect ePara = EffectParalyze(); effect eVis = EffectVisualEffect(VFX_IMP_NEGATIVE_ENERGY); effect eDur = EffectVisualEffect(VFX_DUR_CESSATE_NEGATIVE); effect eDur2 = EffectVisualEffect(VFX_DUR_ICESKIN); effect eDur3 = EffectVisualEffect(VFX_DUR_FREEZE_ANIMATION); int nDC = 14 + nCasterLvl / 2; eDur = EffectLinkEffects(eDur2,eDur); eDur = EffectLinkEffects(eDur3,eDur);
//Link effects effect eLink = EffectLinkEffects(ePara, eDur); if (TouchAttackMelee(oTarget,TRUE)>0) { // Vampires et loup-Garous non affectes par l'effet if ((GetItemPossessedBy(oTarget, str_islyc) == OBJECT_INVALID) || (GetItemPossessedBy(oTarget, str_isvamp)== OBJECT_INVALID)) { //Jet de sauvegarde if(!MySavingThrow(SAVING_THROW_FORT, oTarget, nDC, SAVING_THROW_TYPE_NEGATIVE)) { //Application des effets au lanceur et a la cible ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oTarget); ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eLink, oTarget, RoundsToSeconds(nRounds)); // Creation des objets marqueurs CreateItemOnObject(str_isvamp, oTarget, 1); } } else { FloatingTextStrRefOnCreature(85591,oTarget,FALSE); FloatingTextStrRefOnCreature(85591,OBJECT_SELF,FALSE); } } } Et je finirais en ajoutant qu'il n'y a pas de plus grande satisfaction pour un scripteur que de regarder son code et s'apercevoir que même lui n'y comprend plus rien | |
| | | Ferimens
Nombre de messages : 57 Localisation : Dans le 5ème cercle des Enfers Date d'inscription : 23/12/2006
| Sujet: Re: Base de Scripts Jeu 25 Jan - 10:12 | |
| Script de repositionnement après le Reboot 1/ wp_onenter - Code:
-
void main() { object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { string sName = GetName(oPC); string sArea = GetCampaignString("BDD", sName + "_Area"); object oWaypoint = GetWaypointByTag(sArea + "_WP"); AssignCommand(oPC, ActionJumpToObject(oWaypoint)); } } 2/ wp_city_onenter - Code:
-
void main() { object oPC = GetEnteringObject(); if (GetIsPC(oPC)) { string sName = GetName(oPC); string sArea = GetTag(GetArea(oPC)); SetCampaignString("BDD", sName + "_Area", sArea); } } | |
| | | arknax [Ancien DM]
Nombre de messages : 63 Date d'inscription : 27/07/2006
| Sujet: Re: Base de Scripts Jeu 25 Jan - 23:29 | |
| Script à insérer dans le "OnDying" du module. Celui-ci permettra aux joueurs d'avoir une seconde chance. En d'autres mots, ce script permet au joueurs d'avoir dix points de vie supplémentaire avant de mourir. Ainsi, un personnage peut maintenant atteindre un état d'inconscience avant de mourir. (Dans cet état le joueur peut encore profiter des sorts de soin pour se sortir de la bataille. ) Ce script est de ma création, alors je peux vous assurer qu'il fonctionne correctement. - Code:
-
void bleed(object oPC, effect eDamage) {
if (oPC != OBJECT_INVALID && GetCurrentHitPoints(oPC) <= 0 && GetCurrentHitPoints(oPC) > -10){
ApplyEffectToObject(DURATION_TYPE_INSTANT, eDamage, oPC); int hp = GetCurrentHitPoints(oPC); int nResult = d100(1); int iDC = 20 - GetCurrentHitPoints(oPC) - GetAbilityModifier(ABILITY_CONSTITUTION, oPC);
string sStabilized = "[DM]: Votre état se stabilise.";
if (nResult <= iDC) { AssignCommand(oPC,FloatingTextStringOnCreature(sStabilized, oPC)); DelayCommand(6.0, PopUpDeathGUIPanel(oPC, TRUE, TRUE, 0, "Votre personnage est inconscient.")); } else { DelayCommand(6.0, bleed(oPC, eDamage)); } } }
void main() { object oPC = GetLastPlayerDying(); effect eDamage = EffectDamage(1, DAMAGE_TYPE_POSITIVE, DAMAGE_POWER_PLUS_TWENTY);
DelayCommand(6.0, bleed(oPC, eDamage)); }
Dernière édition par le Jeu 25 Jan - 23:40, édité 1 fois | |
| | | arknax [Ancien DM]
Nombre de messages : 63 Date d'inscription : 27/07/2006
| Sujet: Re: Base de Scripts Jeu 25 Jan - 23:39 | |
| Voici mon script de restauration des points de vie : Petit passage à ajouter dans le "OnEnter" du module : - Code:
-
else { string sPlayerName=GetPCPlayerName(oPC);
string sVar = "Pv_"+ GetName(oPC); int iPvPj = GetCampaignInt("BBD_RE",sVar,GetModule()); int iEtat = iPvPj;
ApplyEffectToObject(DURATION_TYPE_INSTANT,EffectDamage(iEtat,DAMAGE_TYPE_DIVINE,DAMAGE_POWER_NORMAL),oPC); } Script à insérer dans le "OnExit" du module : - Code:
-
void main() { object oPC = GetExitingObject() ; string sVar = "Pv_"+ GetName(oPC); int iPv = GetMaxHitPoints(oPC)-GetCurrentHitPoints(oPC);
SetCampaignInt("BBD_RE", sVar, iPv, GetModule());
} P.S : Au fait, Férimens, j'ai trouver quelques amélioration à ajouter à ton système de Lycanthropie. Certaines fonctions que tu utilises sont déjà implanté dans l'éditeur et il serait plus facile pour toi de les utiliser. (De plus, au lieu de sauvegarder l'apparence de ton personnage dans la BDD, je te conseil fortement de sauvegarder le tout dans l'objet présent dans l'inventaire du joueur. ) | |
| | | Contenu sponsorisé
| Sujet: Re: Base de Scripts | |
| |
| | | | Base de Scripts | |
|
Sujets similaires | |
|
| Permission de ce forum: | Vous ne pouvez pas répondre aux sujets dans ce forum
| |
| |
| |