Well, here is the relevant script that gets appended to the area .bcs file, but what is strange is the fact that if you begin a new game or load a save in which the area has not been visited prior to the installation of the mod, everything works like a charm, but if you load a save game in which the area was visited before the mod was installed, nothing in the following script works. There should be nothing wrong with the script itself, but is looks as if the game uses the unextended version of the area script if the area has been visited previously (when the mod was not yet installed). I know that some information about previously visited areas is included in the save game, but I don't think that the whole area script gets saved. Could it be an issue with cache or something...?
So here's the script: (and yes, we have checked that it really gets added to the relevant .bcs file)
IF
Global("M#PrisonKDeact","AR1005",0)
!Dead("prisonk1")
GlobalGT("M#AmberRescue","GLOBAL",0)
GlobalLT("M#AmberRescue","GLOBAL",7)
THEN
RESPONSE #100
Deactivate("prisonk1")
SetGlobal("M#PrisonKDeact","AR1005",1)
END
IF
Global("M#AmberRescue","GLOBAL",1)
Global("M#MaxTGSpawn","AR1005",0)
THEN
RESPONSE #100
CreateCreature("m#maxtg",[907.486],0)
SetGlobal("M#MaxTGSpawn","AR1005",1)
END
IF
Global("M#AmberRescue","GLOBAL",1)
Global("M#AmberSpawn","AR1005",0)
!Dead("m#amber")
XPLT(Player1,300000)
THEN
RESPONSE #100
SetGlobal("M#AmberSpawn","AR1005",1)
SetGlobal("M#AmberLvl","GLOBAL",10)
CreateCreature("m#ambr10",[775.415],13)
END
IF
Global("M#AmberRescue","GLOBAL",1)
Global("M#AmberSpawn","AR1005",0)
!Dead("m#amber")
XPGT(Player1,299999)
XPLT(Player1,800000)
THEN
RESPONSE #100
SetGlobal("M#AmberSpawn","AR1005",1)
SetGlobal("M#AmberLvl","GLOBAL",12)
CreateCreature("m#ambr12",[775.415],13)
END
IF
Global("M#AmberRescue","GLOBAL",1)
Global("M#AmberSpawn","AR1005",0)
!Dead("m#amber")
XPGT(Player1,799999)
XPLT(Player1,1000000)
THEN
RESPONSE #100
SetGlobal("M#AmberSpawn","AR1005",1)
SetGlobal("M#AmberLvl","GLOBAL",14)
CreateCreature("m#ambr14",[775.415],13)
END
IF
Global("M#AmberRescue","GLOBAL",1)
Global("M#AmberSpawn","AR1005",0)
!Dead("m#amber")
XPGT(Player1,999999)
THEN
RESPONSE #100
SetGlobal("M#AmberSpawn","AR1005",1)
SetGlobal("M#AmberLvl","GLOBAL",15)
CreateCreature("m#ambr15",[775.415],13)
END
IF
OR(4)
Global("M#AmberRescue","GLOBAL",1)
Global("M#AmberRescue","GLOBAL",2)
Global("M#AmberRescue","GLOBAL",3)
Global("M#AmberRescue","GLOBAL",4)
!Global("M#CellDoorL","GLOBAL",1)
THEN
RESPONSE #100
CloseDoor("DOOR06")
Lock("DOOR06")
SetGlobal("M#CellDoorL","GLOBAL",1)
END