// // NWN Dark Sun Random Armor Include // DS_RND_ARMOR_INC // // By: Jaysyn // //void main(){} void RndVAGrdArmor(object oNPC) { //Randomizes Armor int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "AR_APLTSL_DEARTH"; } else if(nResult == 2) { sItem = "AR_APLTSL_DFIRE"; } else if(nResult == 3) { sItem = "AR_APLTSL_DMAGMA"; } else if(nResult ==4) { sItem = "AR_APLTSL_DRAIN"; } else if(nResult == 5) { sItem = "AR_APLTSL_DSILT"; } else sItem = "AR_APLTSL_DWATER"; CreateItemOnObject(sItem, OBJECT_SELF, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndVAWizArmor(object oNPC) { //Randomizes Armor int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "AR_APCLRB_ESSENC"; } else if(nResult == 2) { sItem = "AR_AMCLRB_ADVENT"; } else if(nResult == 3) { sItem = "AR_AMCLRB_WIZBAT"; } else if(nResult ==4) { sItem = "AR_AMCLRB_MYSTIC"; } else if(nResult == 5) { sItem = "AR_AMCLRB_ENLIGH"; } else sItem = "AR_APCLTG_DSILT"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndPirateArmor(object oNPC) { //Randomizes Armor int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "DS_ALTSL_PIRATE1"; } else if(nResult == 2) { sItem = "DS_ALTSL_PIRATE2"; } else if(nResult == 3) { sItem = "DS_ALTSL_PIRATE3"; } else if(nResult ==4) { sItem = "DS_ALTSL_PIRATE4"; } else if(nResult == 5) { sItem = "DS_ALTSL_PIRATE5"; } else sItem = "AR_ACLCL_HARNESS"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); DelayCommand(0.2f, SetDroppableFlag(oItem, FALSE)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndBanditArmor(object oNPC) { //Randomizes Armor int nResult = d8(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "NW_AARCL009"; } //:: Padded Armor (NWN) else if(nResult == 2) { sItem = "AR_ALTSL_BONE01"; } //:: Bone-studded Leather Armor else if(nResult == 3) { sItem = "AR_ALTLT_CATSUIT"; } //:: Cat Suit (Leather) else if(nResult == 4) { sItem = "AR_ACLCL_HARNESS"; } //:: Harness (Padded) else if(nResult == 5) { sItem = "AR_ALTLT_LEATHER"; } //:: Leather Armor else if(nResult == 6) { sItem = "DS_ALTLT_BANDIT1"; } //:: Bandit Armor (Padded) else if(nResult == 7) { sItem = "DS_ALTLT_BANDIT2"; } //:: Bandit Armor (Leather) else sItem = "AR_ALTPD_CLOTH01"; //:: Padded Armor CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); DelayCommand(0.2f, SetDroppableFlag(oItem, FALSE)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndLightArmor(object oNPC) { //Randomizes Armor int nResult = d8(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "aarcl002"; } else if(nResult == 2) { sItem = "baleas_cloth019"; } else if(nResult == 3) { sItem = "aarcl004"; } else if(nResult ==4) { sItem = "zep_studdedleath"; } else if(nResult == 5) { sItem = "aarcl004"; } else if(nResult == 6) { sItem = "nw_aarcl001"; } else if(nResult == 7) { sItem = "nw_aarcl002"; } else sItem = "nw_aarcl009"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndDwarfGuardArmor(object oNPC) { //Randomizes Armor int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "AR_ALTSL_BONE01"; } else if(nResult == 2) { sItem = "AR_ALTSL_IVORY"; } else if(nResult == 3) { sItem = "DS_AMDBP_KLED001"; } else if(nResult ==4) { sItem = "AR_ALTLT_MEKILOT"; } else if(nResult == 5) { sItem = "DS_AMDBP_KLED002"; } else sItem = "DS_AMDBP_KLED003"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndGuardArmor(object oNPC) { //Randomizes Armor int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "AR_ALTSL_BONE01"; } else if(nResult == 2) { sItem = "AR_ALTSL_IVORY"; } else if(nResult == 3) { sItem = "AR_ALTLT_LEATHER"; } else if(nResult ==4) { sItem = "AR_ALTLT_MEKILOT"; } else if(nResult == 5) { sItem = "AR_ALTPD_CLOTH01"; } else sItem = "AR_ACLCL_HARNESS"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndFighterArmor(object oNPC) { //Randomizes Armor int nResult = d10(1); int nStackSize = 1; // Create 1 items; string sItem; if (nResult == 1) { sItem = "nw_aarcl011"; } else if(nResult == 2) { sItem = "nw_aarcl006"; } else if(nResult == 3) { sItem = "nw_aarcl005"; } else if(nResult ==4) { sItem = "nw_aarcl010"; } else if(nResult == 5) { sItem = "nw_aarcl004"; } else if(nResult == 6) { sItem = "nw_aarcl003"; } else if(nResult == 7) { sItem = "nw_aarcl012"; } else if(nResult == 8) { sItem = "chainmail_st"; } else if(nResult == 9) { sItem = "scale_st"; } else sItem = "aarcl007"; CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } } void RndEscortClothes(object oNPC) { //:: Randomizes "sexy" clothing for escorts int nGender = GetGender(oNPC); int nResult = d6(1); int nStackSize = 1; // Create 1 items; string sItem; if(nGender > 0) { if (nResult == 1) { sItem = "ds_aclcl_xotic01"; } else if(nResult == 2) { sItem = "ds_aclcl_xotic02"; } else if(nResult == 3) { sItem = "ds_aclcl_xotic03"; } else if(nResult ==4) { sItem = "ds_aclcl_xotic04"; } else if(nResult == 5) { sItem = "ds_aclcl_xotic05"; } else sItem = "ds_aclcl_xotic06"; } if(nGender < 1) { if (nResult == 1) { sItem = "ds_aclcl_xotic07"; } else if(nResult == 2) { sItem = "ds_aclcl_xotic08"; } else if(nResult == 3) { sItem = "ds_aclcl_xotic09"; } else if(nResult ==4) { sItem = "ds_aclcl_xotic10"; } else if(nResult == 5) { sItem = "ds_aclcl_xotic11"; } else sItem = "ds_aclcl_xotic12"; } CreateItemOnObject(sItem, oNPC, nStackSize); // Loop the object's inventory and equip the first object oItem = GetFirstItemInInventory(oNPC); while(GetIsObjectValid(oItem)) { // Check if armor, of course if(GetBaseItemType(oItem) == BASE_ITEM_ARMOR) { // Equip it and stop the script DelayCommand(0.1f, ActionEquipItem(oItem, INVENTORY_SLOT_CHEST)); return; } oItem = GetNextItemInInventory(oNPC); } }