genbot.mac Generic Bot macro for any class. V8 with ini

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

Moderator: MacroQuest Developers

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Fri Oct 24, 2003 11:20 pm

Quick info update for the code changes I made in Bothealer, it will now working cleaner if you set a healer mode on without setting the spells correctly.
I've added commands and function for patch healing, Patch healing will fire if you've set the patchhealer on and the target has gotten below 50 of the normal heal threshold - Simple example tank heal is set to ch and tank threshold is 51 - Patch heal will fire a fast heal if the tank is below 25. Patch heal doesn't fire the same way that other spells fire - if it's not ready well you tigger it - it drops out and moves on to the normal heal.
As part of the ablity to listen to the group channel and respond to commands there, there is now a command listengroup that will set the bot to to ignore that channel if you want to switch back.
Corpse looting uses the new $corpse(empty) functions to speed up looting greatly.
The new commans WatchTarget and resetwatch allow the bot's healer routines to monitor players outside your group. Great help if your bot is in a raid and needs to help monitor a MT as well as your own group. WatchTarget <name> adds a non-group player to monitor (unlimited adds) resetwatch will relink target names to Spawn id's - you shouldn't ever need to use the command resetwatch as the bot will auto perform this but it can be used to get a link to a PC if the healer is stuck monitoring a corpse.

Found a bug of sorts, in botcombat.inc after the declare set a default state for puller mode:

Code: Select all

 /varset IPuller 0

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Sat Oct 25, 2003 9:31 am

Just some typos i noticed and corrected below....

Personal.inc

Code: Select all

   /if "@BuffSpell[color=darkred]5[/color]"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell[color=darkred]6[/color]" 

Code: Select all

/declare BuffSpell5 global 
   /varset BuffSpell5 "$ini(@IniFile,"Personal",BuffSpell[color=red]15[/color])" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell5 

Code: Select all

 /declare GBuffSpell5 global 
   /varset GBuffSpell5 "$ini(@IniFile,"Personal",GBuffSpell[color=darkred]15[/color])" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell5 "Name of Group Buff spell 5" 


Botcore.ini

Code: Select all

Sub Do-[color=red]petback[/color] 
   /pet backoff 
/return 
should be

Code: Select all

   /pet back off 

Grim on the next update could you add the following to Personal.ini this will give 8 slots for each of the 3 types of buffs

Code: Select all

   /declare PetBuffSpell1 global 
   /varset PetBuffSpell1 "$ini(@IniFile,"Personal",PetBuffSpell1)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell1 "Name of Pet Buff spell 1" 
   /declare PetBuffSpell2 global 
   /varset PetBuffSpell2 "$ini(@IniFile,"Personal",PetBuffSpell2)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell2 "Name of Pet Buff spell 2" 
   /declare PetBuffSpell3 global 
   /varset PetBuffSpell3 "$ini(@IniFile,"Personal",PetBuffSpell3)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell3 "Name of Pet Buff spell 3" 
   /declare PetBuffSpell4 global 
   /varset PetBuffSpell4 "$ini(@IniFile,"Personal",PetBuffSpell4)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell4 "Name of Pet Buff spell 4" 
   /declare PetBuffSpell5 global 
   /varset PetBuffSpell5 "$ini(@IniFile,"Personal",PetBuffSpell5)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell5 "Name of Pet Buff spell 5" 
   /declare PetBuffSpell6 global 
   /varset PetBuffSpell6 "$ini(@IniFile,"Personal",PetBuffSpell6)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell6 "Name of Pet Buff spell 6" 
   /declare PetBuffSpell7 global 
   /varset PetBuffSpell7 "$ini(@IniFile,"Personal",PetBuffSpell7)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell7 "Name of Pet Buff spell 7" 
   /declare PetBuffSpell8 global 
   /varset PetBuffSpell8 "$ini(@IniFile,"Personal",PetBuffSpell8)" 
   /if "@PetBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal PetBuffSpell8 "Name of Pet Buff spell 8" 

Code: Select all

   /declare BuffSpell1 global 
   /varset BuffSpell1 "$ini(@IniFile,"Personal",BuffSpell1)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell1 "Name of Buff spell 1" 
   /declare BuffSpell2 global 
   /varset BuffSpell2 "$ini(@IniFile,"Personal",BuffSpell2)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell2 "Name of Buff spell 2" 
   /declare BuffSpell3 global 
   /varset BuffSpell3 "$ini(@IniFile,"Personal",BuffSpell3)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell3 "Name of Buff spell 3" 
   /declare BuffSpell4 global 
   /varset BuffSpell4 "$ini(@IniFile,"Personal",BuffSpell4)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell4 "Name of Buff spell 4" 
   /declare BuffSpell5 global 
   /varset BuffSpell5 "$ini(@IniFile,"Personal",BuffSpell5)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell5 "Name of Buff spell 5" 
   /declare BuffSpell6 global 
   /varset BuffSpell6 "$ini(@IniFile,"Personal",BuffSpell6)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell6 "Name of Buff spell 6" 
   /declare BuffSpell7 global 
   /varset BuffSpell7 "$ini(@IniFile,"Personal",BuffSpell7)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell7 "Name of Buff spell 7" 
   /declare BuffSpell8 global 
   /varset BuffSpell8 "$ini(@IniFile,"Personal",BuffSpell8)" 
   /if "@BuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal BuffSpell8 "Name of Buff spell 8" 

Code: Select all

    /declare GBuffSpell1 global 
   /varset GBuffSpell1 "$ini(@IniFile,"Personal",GBuffSpell1)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell1 "Name of Group Buff spell 1" 
   /declare GBuffSpell2 global 
   /varset GBuffSpell2 "$ini(@IniFile,"Personal",GBuffSpell2)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell2 "Name of Group Buff spell 2" 
   /declare GBuffSpell3 global 
   /varset GBuffSpell3 "$ini(@IniFile,"Personal",GBuffSpell3)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell3 "Name of Group Buff spell 3" 
   /declare GBuffSpell4 global 
   /varset GBuffSpell4 "$ini(@IniFile,"Personal",GBuffSpell4)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell4 "Name of Group Buff spell 4" 
   /declare GBuffSpell5 global 
   /varset GBuffSpell5 "$ini(@IniFile,"Personal",GBuffSpell5)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell5 "Name of Group Buff spell 5" 
   /declare GBuffSpell6 global 
   /varset GBuffSpell6 "$ini(@IniFile,"Personal",GBuffSpell6)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell6 "Name of Group Buff spell 6"
   /declare GBuffSpell7 global 
   /varset GBuffSpell7 "$ini(@IniFile,"Personal",GBuffSpell7)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell7 "Name of Group Buff spell 7"
   /declare GBuffSpell8 global 
   /varset GBuffSpell8 "$ini(@IniFile,"Personal",GBuffSpell8)" 
   /if "@GBuffSpell1"=="NOTFOUND" /ini "@IniFile" Personal GBuffSpell8 "Name of Group Buff spell 8"

Code: Select all

Sub Do-buff 
   /if $defined(Param1)==FALSE { 
      /assist @MasterName 
   } else /if "@Param1"=="me" { 
      /target pc @MasterName 
   } else /if "@Param1"=="yourself" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else /if "@Param1"=="$char(name)" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else { 
      /declare ParamString local 
      /declare ParamCount local 
      /varset ParamCount 2 
      /varset ParamString "@Param1" 
      :Do-buffParamLoop 
         /if $defined(Param$int(@ParamCount))==TRUE { 
            /varcat ParamString " @Param$int(@ParamCount)" 
            /varadd ParamCount 1 
            /goto :Do-buffParamLoop 
         } 
      /target @ParamString 
   } 
   /delay 5 
   /if $target()==FALSE { 
      /msg @MasterName I didn't get a target 
      /return 
   } 
   /if "@BuffSpell1"~~"Name of Buff" /got :EndBuffs 
   /tell @MasterName Buffing %t. 
   /call SpellSub "@BuffSpell1" 
   /if "@BuffSpell2"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell2" 
   /if "@BuffSpell3"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell3" 
   /if "@BuffSpell4"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell4" 
   /if "@BuffSpell5"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell5" 
   /if "@BuffSpell6"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell6"
   /if "@BuffSpell7"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell7"
   /if "@BuffSpell8"~~"Name of Buff" /got :EndBuffs 
   /call SpellSub "@BuffSpell8"
   :EndBuffs 
   /if "@SitAfterCast"=="1" /sit on 
/return 

Sub Do-groupbuff 
   /if $defined(Param1)==FALSE { 
      /assist @MasterName 
   } else /if "@Param1"=="me" { 
      /target pc @MasterName 
   } else /if "@Param1"=="yourself" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else /if "@Param1"=="$char(name)" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else { 
      /declare ParamString local 
      /declare ParamCount local 
      /varset ParamCount 2 
      /varset ParamString "@Param1" 
      :Do-groupbuffParamLoop 
      /if $defined(Param$int(@ParamCount))==TRUE { 
         /varcat ParamString " @Param$int(@ParamCount)" 
         /varadd ParamCount 1 
         /goto :Do-groupbuffParamLoop 
      } 
      /target @ParamString 
   } 
   /delay 5 
   /if $target()==FALSE { 
      /msg @MasterName I didn't get a target 
      /return 
   } 
   /if "@GBuffSpell1"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell1 on %t. 
   /call SpellSub "GBuffSpell1" 
   /if "@BuffSpell2"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell2 on %t 
   /call SpellSub "GBuffSpell2" 
   /if "@BuffSpell3"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell3 on %t 
   /call SpellSub "GBuffSpell3" 
   /if "@BuffSpell4"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell4 on %t 
   /call SpellSub "GBuffSpell4" 
   /if "@BuffSpell5"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell5 on %t 
   /call SpellSub "GBuffSpell5" 
   /if "@BuffSpell6"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell6 on %t 
   /call SpellSub "GBuffSpell6" 
   /if "@BuffSpell7"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell7 on %t 
   /call SpellSub "GBuffSpell7" 
   /if "@BuffSpell8"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell8 on %t 
   /call SpellSub "GBuffSpell8" 
   :EndGBuffs 
   /if "@SitAfterCast"=="1" /sit on 
/return 

Sub Do-petbuff 
   /if $defined(Param1)==FALSE { 
      /assist @MasterName 
   } else /if "@Param1"=="me" { 
      /target pc @MasterName 
   } else /if "@Param1"=="yourself" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else /if "@Param1"=="$char(name)" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else { 
      /declare ParamString local 
      /declare ParamCount local 
      /varset ParamCount 2 
      /varset ParamString "@Param1" 
      :Do-petParamLoop 
      /if $defined(Param$int(@ParamCount))==TRUE { 
         /varcat ParamString " @Param$int(@ParamCount)" 
         /varadd ParamCount 1 
         /goto :Do-petParamLoop 
      } 
      /target @ParamString 
   } 
   /delay 5 
   /if $target()==FALSE { 
      /msg @MasterName I didn't get a target 
      /return 
   } 
   /if "@PetBuffSpell1"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell1 on %t. 
   /call SpellSub "PetBuffSpell1" 
   /if "@BuffSpell2"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell2 on %t 
   /call SpellSub "PetBuffSpell2" 
   /if "@BuffSpell3"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell3 on %t 
   /call SpellSub "PetBuffSpell3" 
   /if "@BuffSpell4"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell4 on %t 
   /call SpellSub "PetBuffSpell4" 
   /if "@BuffSpell5"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell5 on %t 
   /call SpellSub "PetBuffSpell5" 
   /if "@BuffSpell6"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell6 on %t 
   /call SpellSub "PetBuffSpell6" 
   /if "@BuffSpell7"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell7 on %t 
   /call SpellSub "PetBuffSpell7" 
   /if "@BuffSpell8"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell8 on %t 
   /call SpellSub "PetBuffSpell8" 
   :EndGBuffs 
   /if "@SitAfterCast"=="1" /sit on 
/return 

i was noticing something

Code: Select all

   /if [color=darkred]"@PetBuffSpell1[/color]"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell1 on %t. 
   /call SpellSub "PetBuffSpell1" 
   /if [color=red]"@BuffSpell2[/color]"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell2 on %t 
   /call SpellSub "PetBuffSpell2"

in the /if syntex the first one is different from the second one... is that suppost to be like that ... in my personal.ini before you updated it it looks like this and it works for me

Code: Select all

   /if [color=darkred]"@PetbuffSpell1[/color]"~~"Name of Pet Buff" /got :EndPbuff 
   /tell @MasterName Buffing Pet. 
   /call SpellSub "@PetbuffSpell1" 
   /if [color=red]"@PetbuffSpell2[/color]"~~"Name of Pet Buff" /got :EndPbuff 
   /call SpellSub "@PetbuffSpell2" 

gnome001
a ghoul
a ghoul
Posts: 109
Joined: Fri Jan 24, 2003 1:01 am

Post by gnome001 » Sat Oct 25, 2003 10:46 am

thanks for tellin me how to do it. /cheer

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Update.

Post by grimjack » Sat Oct 25, 2003 12:30 pm

Reposted all files with what I currently use. Also fixed all the typos that where pointed out in this thread and added the extra buff stuff.

Updated loot code also to really use $corpse(empty). Also added lootall command which should loot all corpses that are near(From some of LordG's code).

Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

Guest

Post by Guest » Sat Oct 25, 2003 1:30 pm

I keep getting the following when I start the macro...

Cleared the following: Timer Vars Array
The current macro has ended.

Any idea what I'm doing wrong? All of my other macros work fine.

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sat Oct 25, 2003 2:20 pm

MoveToAnchor should have obstical check:

Code: Select all

Sub MoveToAnchor 
   /varset countdown 0 
   :AnchorMoveLoop 
   /if @IsAnchored==0 { 
      /sendkey up up 
      /return 
   } 
   /doevents 
   /if n @Combatstatus==1 { 
      /sendkey up up 
      /return 
   } 
   /if "$char(state)"=="SIT" /stand 
   /face loc @AnchorX,@AnchorY 
   /if n $distance(@AnchorX,@AnchorY)>11 /sendkey down up 
   /if n $distance(@AnchorX,@AnchorY)<=11 { 
      /sendkey up up 
      /return 
   } 
   /if n @countdown>=3 { 
      /call Detectobst 
      /varset countdown 0 
   } 
   /varadd countdown 1 
   /goto :AnchorMoveLoop 
/return 

LordGiddion
a snow griffon
a snow griffon
Posts: 352
Joined: Sat Sep 13, 2003 6:12 pm
Contact:

Post by LordGiddion » Sat Oct 25, 2003 2:30 pm

ChatOut has a space in it:

Code: Select all

Sub ChatOut (ChatPriority,ChatTarget,ChatText) 
should be

Code: Select all

Sub ChatOut(ChatPriority,ChatTarget,ChatText) 

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Update:

Post by grimjack » Sat Oct 25, 2003 2:56 pm

Updated botcore.inc
Fixes from thread are in.

Also added IgnoreInGroup ini setting. Any commands listed here will be ignored in group when listengroup is on. It will set a default list when you run it the first time.

Thanks
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Update:

Post by grimjack » Sat Oct 25, 2003 3:05 pm

New botspell.inc

Added some range checking from LordG. Bot will now ignore commands to cast spells on targets that are out of range.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

greggor
orc pawn
orc pawn
Posts: 28
Joined: Tue Jun 17, 2003 2:30 pm

Post by greggor » Sat Oct 25, 2003 5:20 pm

a blank personal.inc would be nice for those who don't want to erase all your stuff to make their own :)

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Post by grimjack » Sat Oct 25, 2003 5:31 pm

For those who can't take the 10 minutes to remove the crap from my personal.inc here is a blank personal.inc.

Code: Select all

|personal.inc
|Personal commands module.


Sub PersonalCommands
   /varset Commands(0,0) test
   /varset ArrayPers 0
/return

Sub TellCmds-personal
   /declare counter local
   /declare cmds local
   /varset cmds ""
   /for counter 0 to @ArrayPers
      /varcat cmds "@Commands(0,@counter), "
   /next counter
   /msg @MasterName @cmds
/return

|Things that you want to happen every loop through the macro go in this sub.
Sub PersonalMain
/return

Sub SetupPersonalVars
|Personal Variables
   /declare testvar123 global
   /varset testvar123 $ini(@IniFile,"Personal",testvar123)"
   /if "@testvar123"=="NOTFOUND" /ini "@IniFile" Personal testvar123 "This is the testvar"
/return

Sub Do-test
   /echo @testvar123
/return
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Sat Oct 25, 2003 10:18 pm

wow 10 miuntes I just use a macro with UltraEdit and it wipes out everything in less then 10 seconds.

RogerWilco
a ghoul
a ghoul
Posts: 86
Joined: Thu Aug 28, 2003 4:05 am

Post by RogerWilco » Sun Oct 26, 2003 12:23 am

hummmm my previous post was a copy and paste from your posted code in Personal.ini... and I just noticed something all the Red and Dar Red colored lines are miss -------> @

and the green word in petbuff is missing as well

Code: Select all

Sub Do-groupbuff 
   /if $defined(Param1)==FALSE { 
      /assist @MasterName 
   } else /if "@Param1"=="me" { 
      /target pc @MasterName 
   } else /if "@Param1"=="yourself" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else /if "@Param1"=="$char(name)" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else { 
      /declare ParamString local 
      /declare ParamCount local 
      /varset ParamCount 2 
      /varset ParamString "@Param1" 
      :Do-groupbuffParamLoop 
      /if $defined(Param$int(@ParamCount))==TRUE { 
         /varcat ParamString " @Param$int(@ParamCount)" 
         /varadd ParamCount 1 
         /goto :Do-groupbuffParamLoop 
      } 
      /target @ParamString 
   } 
   /delay 5 
   /if $target()==FALSE { 
      /msg @MasterName I didn't get a target 
      /return 
   } 
   /if "@GBuffSpell1"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell1 on %t. 
   /call SpellSub [color=darkred]"GBuffSpell1" [/color]
   /if "@BuffSpell2"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell2 on %t 
   /call SpellSub [color=darkred]"GBuffSpell2" [/color]
   /if "@BuffSpell3"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell3 on %t 
   /call SpellSub [color=red]"GBuffSpell3[/color]" 
   /if "@BuffSpell4"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell4 on %t 
   /call SpellSub [color=darkred]"GBuffSpell4"[/color] 
   /if "@BuffSpell5"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell5 on %t 
   /call SpellSub [color=red]"GBuffSpell5"[/color] 
   /if "@BuffSpell6"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell6 on %t 
   /call SpellSub[color=darkred] "GBuffSpell6" [/color]
   /if "@BuffSpell7"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell7 on %t 
   /call SpellSub [color=red]"GBuffSpell7"[/color] 
   /if "@BuffSpell8"~~"Name of Group" /got :EndGBuffs 
   /g @GBuffSpell8 on %t 
   /call SpellSub [color=darkred]"GBuffSpell8"[/color] 
   :EndGBuffs 
   /if "@SitAfterCast"=="1" /sit on 
/return 

Sub Do-petbuff 
   /if $defined(Param1)==FALSE { 
      /assist @MasterName 
   } else /if "@Param1"=="me" { 
      /target pc @MasterName 
   } else /if "@Param1"=="yourself" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else /if "@Param1"=="$char(name)" { 
      /press F1 
      /if n $char(id)!=$target(id) /press F1 
   } else { 
      /declare ParamString local 
      /declare ParamCount local 
      /varset ParamCount 2 
      /varset ParamString "@Param1" 
      :Do-petParamLoop 
      /if $defined(Param$int(@ParamCount))==TRUE { 
         /varcat ParamString " @Param$int(@ParamCount)" 
         /varadd ParamCount 1 
         /goto :Do-pet[color=green]buff[/color]ParamLoop 
      } 
      /target @ParamString 
   } 
   /delay 5 
   /if $target()==FALSE { 
      /msg @MasterName I didn't get a target 
      /return 
   } 
   /if "@PetBuffSpell1"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell1 on %t. 
   /call SpellSub [color=red]"PetBuffSpell1"[/color] 
   /if "@BuffSpell2"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell2 on %t 
   /call SpellSub [color=darkred]"PetBuffSpell2"[/color] 
   /if "@BuffSpell3"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell3 on %t 
   /call SpellSub [color=red]"PetBuffSpell3"[/color] 
   /if "@BuffSpell4"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell4 on %t 
   /call SpellSub [color=darkred]"PetBuffSpell4" [/color]
   /if "@BuffSpell5"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell5 on %t 
   /call SpellSub [color=red]"PetBuffSpell5"[/color] 
   /if "@BuffSpell6"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell6 on %t 
   /call SpellSub [color=darkred]"PetBuffSpell6"[/color] 
   /if "@BuffSpell7"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell7 on %t 
   /call SpellSub [color=red]"PetBuffSpell7" [/color]
   /if "@BuffSpell8"~~"Name of Pet" /got :EndGBuffs 
   /g @PetBuffSpell8 on %t 
   /call SpellSub [color=darkred]"PetBuffSpell8" [/color]
   :EndGBuffs 
   /if "@SitAfterCast"=="1" /sit on 
/return
Last edited by RogerWilco on Sun Oct 26, 2003 1:09 am, edited 1 time in total.

greggor
orc pawn
orc pawn
Posts: 28
Joined: Tue Jun 17, 2003 2:30 pm

Post by greggor » Sun Oct 26, 2003 1:52 am

hmm I can't figure out why but for some reason after complete healing the tank (warrior) the cleric I have using this mac sometimes complete heals me (the monk/always the leader of the group)... I'm trying to narrow it down now but no luck so far... hehe the new healer code is a little over my head atm but I'll figure it out.

User avatar
grimjack
Macro Author
Macro Author
Posts: 525
Joined: Thu Nov 07, 2002 6:51 am
Contact:

Healer code

Post by grimjack » Sun Oct 26, 2003 2:16 am

Healer code seems to be meesed up bigtime atm. Looking into it.
When they come to me, they're in trouble, or they want some. I bust people out of prison, hunt down vampires, fight alien gods -- All the fun jobs people are too squeamish or too polite to do themselves.

Call me a mercenary. Call me an assassin. Call me a villain. I am all that and more.

My name's John Gaunt, but out on the streets of Cynosure, I am called...
GrimJack