Code: |
#include "NW_O2_CONINCLUDE"
#include "fonctions_coffre" //Declare Variables int xLootChance1, xLootChance2, xRoll; string xLoot1, xLoot2, xLoot3; //Declare Custom Script void RandomLoot(string xLoot1, string xLoot2, string xLoot3, int xLootChance1, int xLootChance2); //RandomLoot creates the loot based on specified chance void RandomLoot(string xLoot1, string xLoot2, string xLoot3, int xLootChance1, int xLootChance2) { xRoll = Random(100) + 1; if (xRoll <= xLootChance1) CreateItemOnObject(xLoot1,OBJECT_SELF,1); else if ((xRoll > xLootChance1) && (xRoll <= xLootChance2)) CreateItemOnObject(xLoot2,OBJECT_SELF,1); else if (xRoll > xLootChance2) CreateItemOnObject(xLoot3,OBJECT_SELF,1); } void main() { //WriteTimestampedLogEntry("CORPS_CRYPTE2"); if (GetLocalInt(OBJECT_SELF,"NW_DO_ONCE") == 0) { Enleve_Invis(GetLastOpenedBy()); DelayCommand(10.0, Enleve_Invis(GetLastOpenedBy())); int iD100 = Random(100) + 1; if (iD100 <= 21) // Ecu + 3, Pavois + 3, Rondache + 3 6900 RandomLoot("NW_ASHMLW009","NW_ASHMTO009","NW_ASHMSW009",33,66); else if ((iD100 > 21) && (iD100 <= 43)) // Armure a plaque + 3 7400, Crevice + 3 7000, Harnois + 3 8300 RandomLoot("NW_MAARCL081","NW_MAARCL076","maarcl085",33,66); else if ((iD100 > 43) && (iD100 <= 64)) // Armure de Peau + 3, Armure d'écailles + 3, Cotte de mailles + 3 6900 RandomLoot("NW_MAARCL082","NW_MAARCL085","NW_MAARCL078",33,66); else if ((iD100 > 64) && (iD100 <= 78)) // Cuir + 3 , Robe de mage + 3 6800, Harnois + 3 8300 RandomLoot("NW_MAARCL083","zep_wizrobes001","armuredesarev001",33,66); else if (iD100 > 78) // Clouté + 3, Matelassée + 3, Chemise de mailles + 3 6800 RandomLoot("NW_MAARCL087","NW_MAARCL084","NW_MAARCL079",33,66); // Rune des Elementaires 9000 CreateItemOnObject("runedeselementai",OBJECT_SELF,1); // Total de 15800 a 17300 SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",1); ShoutDisturbed(); DelayCommand(3600.0, SetLocalInt(OBJECT_SELF,"NW_DO_ONCE",0)); } } |
Code: |
void Enleve_Invis(object oPC);
void Enleve_Invis(object oPC) { //WriteTimestampedLogEntry("FONCTIONS_COFFRE"); // Tue un joueur invisible effect eEffet = GetFirstEffect(oPC); while (GetIsEffectValid(eEffet)) { if ( (GetEffectType(eEffet) == EFFECT_TYPE_IMPROVEDINVISIBILITY) || (GetEffectType(eEffet) == EFFECT_TYPE_INVISIBILITY) ) { ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectDeath(0, 1), oPC); SendMessageToPC(oPC, "Piller des tresors en abusant du sort invisibilite est considere comme une tentative de triche. Cela est, comme vous le constatez, fortement sanctionne."); } eEffet = GetNextEffect(oPC); } } |
Code: |
nw_02_coninclude |
Code: |
if ( (GetEffectType(eEffet) == EFFECT_TYPE_IMPROVEDINVISIBILITY) || |
Code: |
if ( (GetEffectType(eEffet) == EFFECT_TYPE_SANCTUARY) || |