Set the first time during setup.
This is what you would check every time you want to see if it is time to buff.
Code: Select all
DIFF_TIME = Minute(Now) - START_TIME + 1
If DIFF_TIME < 1 Then
DIFF_TIME = DIFF_TIME + 60
End If
Then when DIFF_TIME gets to the time that you wan to buff, buff then set
The thing that is messing you up I'm pretty sure is that lets say Start_time is 58 then five minutes later current time is going to be 3 which is going to give you a negative 55.
So If you check to see if Diff_time is less than 1 you add 60 to it.
In the same situation it will show five minutes has passed which is correct.
Another thing that had been causing trouble is set a sleep before you cast the buff, just to make sure your able to cast.
I also added a check to make sure the buffs had been actually cast by setting a flag when you buff.
Then when the timer reached 55 minutes it double checks your buffs.
Since adding all that I have not had any problems getting buffs on the bot.
It is all redone in the Blood Mage 2.3 I uploaded yesterday.
We are suppose to be able to see what all effects are on a character soon, it will make buffing a lot easier.
It will be nice as well to see if you invis or not on the Blood Mage.