Now I got Windows 98 working on my BG2-enabled computer again, I have decided to finally lift myself off my arse, and fix these bugs. And since I decided the same about three years ago, and even had something coded which I subsequently forgot to publish and then lost, I'm stickying this topic so people keep bugging me until I actually fix it this time.
The current script uses vars that are set in dialogues, so the idea now is to use those dialogues directly to do the appropriates. This should ensure that everything only happens once, gives us a chance to explain what's going on, and should unbreak Lilarcor (however I broke it in the first place). It would probably be good to also have Cor remove the heirlooms from Anomen, rather than replacing them with non-functioning versions. CamDawg has also suggested that we should have a script aswell as this, which just takes the items, as a backup for the case where the heirlooms are put down before talking to Cor, and picked up again afterward. I'm still undecided as to whether we should do this - opinions welcome.
So, without further masses of prose, the technical side of it. According to Near Infinity, we need to:
TakePartyItemAll("ANOHELM"); TakePartyItemAll("NPSHLD");At COR.DLG state 25 ("If you leave now you are forever banished from this place"), or 26 ("You are nothing, boy, nothing!"). Possibly want an extra state here to say about the items being taken - but the idea is possibly put well enough with what's there now.
GiveItemCreate("ANOPLAT", "Anomen", 0, 0, 0)
At HPRELATE.DLG, state 6 ("Go, then, Sir Anomen, and serve the cause"). We DO need something here to explain the armour. Something like "You are granted this armour, with which to serve." would work, although it's more than a little corny. But then, so is everything else Anomen - we stick with that, unless something better comes along.
Which only leaves writing some Real Code to achieve this, and scrapping completely the old AnoTweak.baf .