View Single Post
  #1  
Old 09-10-2010, 10:20 PM
Astal
Hill Giant
 
Join Date: Mar 2010
Posts: 236
Default Tried Everything I can think of but i cant get my charm file working right

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
Reply With Quote