A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.
Moderator: MacroQuest Developers
-
|| Napolion ||
- a ghoul

- Posts: 96
- Joined: Sat Dec 28, 2002 7:45 am
Post
by || Napolion || » Wed Oct 08, 2003 5:41 am
I have done this so it works now.
Code: Select all
| Buffs.mac
| List the buffs you have and the time left on them
#Turbo
Sub Main
/declare time_sec local
/declare time_min local
/declare time_hou local
/declare loop local
/for loop 1 to 15
/if "$char(buff,@loop,spellid)"!="NULL" {
/varset time_sec $char(buff,@loop,duration)
/varcalc time_sec @time_sec*6
/varcalc time_min $int(@time_sec/60)
/varsub time_sec $calc(@time_min*60)
/varcalc time_hou $int(@time_min/60)
/varsub time_min $calc(@time_hou*60)
/varset time_sec $int(@time_sec)
/varset time_min $int(@time_min)
/varset time_hou $int(@time_hou)
/echo $char(buff,@loop,spellid) (Level $char(buff,@loop,level)) @time_hou hrs @time_min mins @time_sec secs remaining
}
/next loop
/return
|| Napolion ||
-
wassup
- Official Guardian and Writer of TFM

- Posts: 1487
- Joined: Sat Oct 26, 2002 5:15 pm
Post
by wassup » Wed Oct 08, 2003 1:28 pm
I sent you a PM with some cleaner time calcs. Didn't want to post it here unless you wanted me to.
-
Furiousness
- a lesser mummy

- Posts: 62
- Joined: Tue Aug 26, 2003 3:48 pm
Post
by Furiousness » Wed Oct 08, 2003 7:49 pm
If you could post it that would be handy, I was wondering if you could find that out about buffs.
Cheers
Fury
-
|| Napolion ||
- a ghoul

- Posts: 96
- Joined: Sat Dec 28, 2002 7:45 am
Post
by || Napolion || » Thu Oct 09, 2003 8:17 am
Tanks to Wassup. Here are his modify code.
Code: Select all
| Buffs.mac
| List the buffs you have and the time left on them
#Turbo
Sub Main
/declare time_sec local
/declare time_min local
/declare time_hou local
/declare loop local
/for loop 1 to 15
/if "$char(buff,@loop,spellid)"!="NULL" {
/varcalc time_sec $char(buff,@loop,duration)*6
/varcalc time_hou @time_sec\3600
/varcalc time_min @time_sec%3600\60
/varcalc time_sec @time_sec%60
/echo $char(buff,@loop,spellid) (Level $char(buff,@loop,level)) @time_hou hrs @time_min mins @time_sec secs remaining
}
/next loop
/return
|| Napolion ||
-
blueninja
- a grimling bloodguard

- Posts: 541
- Joined: Thu Aug 28, 2003 7:03 am
- Location: Göteborg, Sweden
Post
by blueninja » Fri Oct 10, 2003 5:24 am
Adding the line in red will make it only show the buffs with a name containing the string passed as an argument.
/macro buffs kazad
will show how much time you have left on symbol of kazad or kazad's mark.
Code: Select all
| Buffs.mac
| List the buffs you have and the time left on them
#Turbo
Sub Main
/declare time_sec local
/declare time_min local
/declare time_hou local
/declare loop local
/for loop 1 to 15
/if "$char(buff,@loop,spellid)"!="NULL" {
[color=red] /if $defined(Param0)==true /if "$char(buff,@loop,spellid)"!~"@Param0" /next loop[/color]
/varcalc time_sec $char(buff,@loop,duration)*6
/varcalc time_hou @time_sec\3600
/varcalc time_min @time_sec%3600\60
/varcalc time_sec @time_sec%60
/echo $char(buff,@loop,spellid) (Level $char(buff,@loop,level)) @time_hou hrs @time_min mins @time_sec secs remaining
}
/next loop
/return