PDA

View Full Version : Scripting Help


RandomTask
08-16-2005, 03:55 PM
Hello chaps i'm having a spot of bother i'm trying to write a script that will unequip mandalore's armour and equip a jedi robe im aware that it will not change his appearance and he will still look the same and that he wont equip a jedi robe unless he has the rights feats but i believe i have taken care of all that any help greatly appreciated

stoffe
08-16-2005, 04:16 PM
Hello chaps i'm having a spot of bother i'm trying to write a script that will unequip mandalore's armour and equip a jedi robe im aware that it will not change his appearance and he will still look the same and that he wont equip a jedi robe unless he has the rights feats but i believe i have taken care of all that any help greatly appreciated

Something like this should work, provided that Mandalore is in the area where it is fired:


void main() {
object oMand = GetObjectByTag("mand");
if (GetIsObjectValid(oMand)) {
GrantFeat(FEAT_JEDI_DEFENSE, oMand);
object oArmor = GetItemInSlot(INVENTORY_SLOT_BODY, oMand);
AssignCommand(oMand, ActionUnequipItem(oArmor, TRUE));

oArmor = CreateItemOnObject("a_robe_08", oMand);
AssignCommand(oMand, ActionEquipItem(oArmor, INVENTORY_SLOT_BODY, TRUE));
}
}

RandomTask
08-16-2005, 04:30 PM
Thanks Alot Much Appreciated