This might not help, but I have had some trouble getting the quest globals to work.
Below is what I had to do to get the quest global to work.
Code:
quest::setglobal("buff", $text, 0, "M5");
#I'm not sure why I need the next line, the line above should set the $qglobals{buff}, but it wouldn't work for me.
$qglobals{buff} = $text;
Also double/triple check that your npc has the qglobal is set to 1 in the database.
HTH