Yeah, other than the one qglobal you are setting, I don't see anywhere that you are pulling qglobal information in those scripts, just a bunch of variables. If you do ever need to pull qglobal values, just make sure to use the $qglobals{killed_overlord_mata_muram} way to do it instead of $killed_overlord_mata_muram. For example:
This is the correct way:
Code:
if (defined($qglobals{killed_overlord_mata_muram})) {
if ($qglobals{killed_overlord_mata_muram} == 1) {
#Do what you want here
}
}
This is the incorrect way to pull a qglobal value:
Code:
if ($killed_overlord_mata_muram == 1) {
#Do what you want here
}
Though the second way may work most of the time, it will definitely cause major issues in many different scenarios. The defined check I did for the correct way is not required, but I added that in there as an extra example.
Also, if you think the memory problem might be quest related, try enabling quest logging in your log.ini file and then check out your quest logs. If the quest log is getting flooded by errors, that could definitely cause some issues.