Buffs.inc

A forum for macro code snippets to be used in writing other macros. Post routines or .inc files here only, completed macros go to the Macro Depot.

Moderator: MacroQuest Developers

User avatar
Leezard
a ghoul
a ghoul
Posts: 81
Joined: Wed Feb 04, 2004 12:54 pm

Buffs.inc

Post by Leezard » Fri Feb 06, 2004 12:36 pm

Just a simple buff tracking macro converted for use in a bot mac. Originally by koad iirc.

Code: Select all

| buffs.inc
| Code by Koad 
| List the buffs you have and the time left on them 
| if you specify a buff name, it only reports that one
| Useage: /call buffs 

Sub Buffs 
  /declare time_sec local 
  /declare time_min local 
  /declare time_hou local 
  /declare i local 
  /for i 1 to 15 
    /if "$char(buff,@i,spellid)"!="NULL" { 
      /if $defined(Param0)==true /if "$char(buff,@i,spellid)"!~"@Param0" /next i 
      /varcalc time_sec $char(buff,@i,duration)*6 
      /varcalc time_hou @time_sec\3600 
      /varcalc time_min @time_sec%3600\60 
      /varcalc time_sec @time_sec%60 
      /1 $char(buff,@i,spellid) (Level $char(buff,@i,level)) @time_hou hrs @time_min mins @time_sec secs remaining 
    } 
  /next i 
/return 
Death is merely a doorway, for a god!