Buffs-inc.mac and Buffs.inc

A forum for you to dump all the macros you create, allowing users to use, modify, and comment on your work.

Moderator: MacroQuest Developers

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Buffs-inc.mac and Buffs.inc

Post by YKW-28983 » Thu Jan 01, 2004 12:14 am

Macro: Buffs-inc
Type: Include or Self Run macro.
Syntax: /macro Buffs-inc Help
Setup: To setup BuffSlots And Their Spells -
/macro Buffs-inc Setup Buff# "BuffName"
NOTE: Buff# has nothing to do with their slot in your buff list.
When your desired buffs are setup type -
/macro Buffs-inc Setup ActiveChecks BuffChecks

Example:
/macro Buffs-inc Setup Buff1 "Spirit Of Wolf"
/macro Buffs-inc Setup Buff2 "Regrowth"
/macro Buffs-inc Setup Buff3 "Harnessing Of Spirit"
/macro Buffs-inc Setup ActiveChecks 3

Will set to re-cast spirit of wolf, regrowth, and harnessing of spirit. Auto memorizes if not memorized, and auto puts back the gem that was originally there.


Include: After running the setup you are good to include it in your scripts.
I.E: #include Buffs.inc
Run By "/call CheckBuffs"
YOU MUST ALSO INCLUDE SpellCast.inc which can be found using the search button.


Self Run: Run the macro with the syntax of Alone
I.E: /macro Buffs-Inc Alone

----Buffs-inc.mac----

Code: Select all

| Name: 	Buffs-Inc
| Author: 	YKW-28983
| Type: 	Include/Seperate
| Setup:	Run the macro first with these paramaters, in this order.
| Setup:	Setup Buff# "BuffName"
| Setup:	I.E: /macro Buffs-Inc Setup Buff1 "Spirit Of Wolf"
| Setup:	I.E: /macro Buffs-Inc Setup Buff2 "Regrowth"
| Setup:	After Inputting All Your Buffs type /macro Buffs-Inc Setup ActiveChecks <Last Buff You Entered>
| Setup:	I.E: /macro Buffs-Inc Setup ActiveChecks 2
| Include:	After running that you are good to include it in your scripts.
| Include:  I.E: #include Buffs.inc
| Include:	Run By "/call CheckBuffs"
| Alone:	Run the macro with the syntax of Alone
| Alone:     I.E: /macro Buffs-Inc Alone

#turbo
#include SpellCast.inc
#include Buffs.inc

Sub Main(Setup,BuffNumber,BuffName)

/if @Setup==Help {
  /echo Syntax: /macro Buffs-inc Setup "Buff#" "BuffName"
  /echo Syntax: /macro Buffs-inc Alone
/return
}

/if @Setup==Setup {
  /ini "Buffs-inc.ini" "$char(name)" "Setup" "yes"
  /ini "Buffs-inc.ini" "$char(name)" "@BuffNumber" "@BuffName"
  /echo Buffs Script: Set @BuffNumber To @BuffName 
/return
}

/if $ini(Buffs-inc.ini,$char(name),Setup)!=Yes {
  /echo Warning: You did not setup the default variables!
  /echo Warning: Please type /macro Buffs-inc Help
  /echo Warning: Failure to do so will make this script run improperly.
/return
}

/if @Setup==Alone {
   /call CheckBuffs
}

/return
 
----Buffs.inc----

Code: Select all

| Name: 		Buffs.inc
| Author: 		YKW-28983
| Type: 		Include
| Required Macro: 	Buffs-inc.mac
| Setup:		/macro Buffs-inc Help
#Event Spellnohold "Your spell did not take hold."

Sub CheckBuffs
:SetupCheck
/if $ini(Buffs-inc.ini,$char(name),Setup)!=Yes {
/echo Warning: You did not setup the default variables!
/echo Warning: Please type /macro Buffs-inc Help
/echo Warning: Failure to do so will make this script run improperly.
/return
}
:Check
/declare CheckBuffNumber Local
/varset CheckBuffNumber 1
/for CheckBuffNumber 1 to $ini(Buffs-inc.ini,$char(name),ActiveChecks)
/if $char(buff,"$ini(Buffs-inc.ini,$char(name),Buff@CheckBuffNumber)")==0 {
  /if $char(gem,"$ini(Buffs-inc,$char(name),Buff@CheckBuffNumber)")==0 {
    /declare ForgottenSpell Local
    /varset ForgottenSpell $char(gem,8)
    /memspell 8 "$ini(Buffs-inc.ini,$char(name),Buff@CheckBuffNumber)"
    /delay 3s
    /sit off
    /press ESC
    /press F1
    /call Cast "$ini(Buffs-inc.ini,$char(name),Buff@CheckBuffNumber)"
    /memspell 8 "@ForgottenSpell"
    /delay 3s
    /goto :next
  }
  /if $char(state)==SIT /sit off
  /press esc
  /press F1
  /call Cast "$ini(Buffs-inc.ini,$char(name),Buff@CheckBuffNumber)"
}
:next
/next CheckBuffNumber 

/return


McTisuk
orc pawn
orc pawn
Posts: 11
Joined: Thu Jan 01, 2004 6:46 am

buff monitoring rocks!

Post by McTisuk » Thu Jan 01, 2004 1:49 pm

looks like more than just I want buff monitoring!
You might check out one of my posts in the new genbot thread, I posted addon code to that to monitor your buffs, and either recast your own when they fade, or request them on channel if you can't cast them yourself.

If you do use stand-alone, you might consider adding did combat buffs -) - they are temporary things like DS or short lived things like yalups, you only want recast on you when you are fighting :-)
McTisuk ... just another macro writer~

YKW-28983
a hill giant
a hill giant
Posts: 252
Joined: Sun Dec 01, 2002 11:37 pm

Post by YKW-28983 » Fri Jan 02, 2004 7:05 am

If you would like to modify the code to do that go for it, but this code is what I use in all of my scripts, and works fine for me. I don't dual account so no need to write to channel.