When I try and use this in my quests the npc does not revert to default as if there was an error, but whenever I try and trigger the setglobal() or targlobal() it doesnt work, and people in #support have said my quest is correct, so any thoughts?
What happens is if I have,
Code:
#281099.pl
sub EVENT_SAY
{
if($npcvari1 == 0 && $text=~/hail/i)
{
quest::say("Hello! Would you be interested in helping me?");
}
if($npcvari1 == 1 && $text=~/helping/i)
{
quest::say("Thanks!");
quest::targlobal("npcvari1","1","Y5",281099,$charid,26);
quest::me("You have recieved a character flag!");
}
}
When this is run, and you /say helping, the only thing that shows is "Thanks!" and on rehail I get the same "0" message, even after #reloadquest, logging, and zoning.
Any thoughts?