Alright, I need help.
I've been on these stupid scripts for three days now, and I can not, for the life of me, figure out why it's creating a copy of the original lightsaber that's fired in Atton's dialog with "a_give_item".
void main() {
object oPC = GetFirstPC();
object oAtton = GetObjectByTag("Atton", 0);
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_130"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_130", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_130", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_131"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_131", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_131", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_132"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_132", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_132", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_133"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_133", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_133", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_134"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_134", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_134", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_135"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_135", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_135", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_136"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_136", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_136", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_137"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_137", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_137", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_138"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_138", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_138", 1), 0.0);
}
else {
if (GetIsObjectValid(GetItemPossessedBy(oPC, "sbla_lghtsbr_139"))) {
AssignCommand(oAtton, ActionEquipItem(GetObjectByTag("sbla_lghtsbr_139", 0), 4, 0));
DestroyObject(GetObjectByTag("sbla_lghtsbr_139", 1), 0.0);
}
}
}
}
}
}
}
}
}
}
DelayCommand(8.0, SetLightsaberPowered(oAtton, 1, 0, 1));
}
I have the DestroyObject() command in there right now to destroy the copy that's not in his hand at the end of the dialog, hence the (sbla_lghtsbr_13*, 1).
If anyone has a better idea on how to equip whichever Atton saber you made in the dialog and not have another one copied into your inventory, that'd be great.
Thanks in advance!