EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Tried Everything I can think of but i cant get my charm file working right (https://www.eqemulator.org/forums/showthread.php?t=32081)

Astal 09-10-2010 10:20 PM

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

Hmm 09-11-2010 01:54 AM

err nevermind. :D

I wonder if items have qglobal enable flag like npcs do though?

Astal 09-11-2010 11:29 AM

Probably not, but i tried it without qglobals also it doesnt work. Its like the timer isnt triggering correctly. Im sure there is somthing im missing.

Im gonna just change it to a clicky, and change it from an augment to fit in the powersource field.


Guess powersource field doesnt work. Its set to the ammo field lol

Shadow-Wolf 09-13-2010 01:19 AM

Why have a timer? The item scale function itself works like a timer, just have it check the global at every scale event(which is every minute I believe). Not sure if qglobals work in items yet though.


All times are GMT -4. The time now is 08:40 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.