Im trying to make the augment (it uses a charmfile) to cast a spell every 5 minutes (for testing, it will be 3 hours when i get it working.
It doesnt work it casts every update. It seems like the timer is going off before it should. The global is changing to 0 every 1-2 minutes instead of 5. I cant figure out whats wrong.
Code:
#Mark of the Guardian
sub EVENT_SCALE_CALC {
#initialize timer.
quest::settimer("guardianspellItimer", 300);
#check if the qglobal is = 1 and if the player doesnt have the buff yet cast it, set the timer and set the local variable to 1
if ($qglobals{MarkOfTheGuardianI} == 1) {
quest::selfcast(10057);
quest::settimer("guardianspellItimer", 300);
quest::setglobal("MarkOfTheGuardianI",0,4,"F");
}
}
sub EVENT_TIMER {
#set the local variable back to 0
if ($timer == "guardianspellItimer"){
quest::setglobal("MarkOfTheGuardianI",1,4,"F");
}
}
The only thing i can assume is the qglobal wont work because there is no NPC