//************************************************************************ // Custom Magic Treasure Function for generating magic treasure of varying types in placeable, store or creature // B W-Husey, 31st October 2003 // See cu_treasure and cu_magic for remaining categories // Treasure Types are: /* Scrolls56 - level 5 & 6 scrolls (Bookcases, stores & Wizards) Inputs: sTreasureSet - The name of the group of treasure as above oCreateIn - The object to contain the treasure nChance - Chance of any of this type nBonus - For Magic (improves treasure) - do not make nBonus negative. Max 79 (12 for Magic2). */ void GetMagichi(string sTreasureSet, object oCreateIn=OBJECT_SELF, int nChance=100, int nBonus=0) { if (Random(100)+11) {CreateItemOnObject(sItem, oCreateIn, nStack);} // All scrolls except last created by this line iNumb ++; } //End of While Loop } //End of Scrolls56 If CreateItemOnObject(sItem, oCreateIn,nStack); // Create the item } //End of nChance } //End of Void