Rogue-assist.mac for pure warrior need bash/taunt help

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

Moderator: MacroQuest Developers

crisdan
a ghoul
a ghoul
Posts: 126
Joined: Mon Mar 24, 2003 1:56 pm

Rogue-assist.mac for pure warrior need bash/taunt help

Post by crisdan » Thu Nov 13, 2003 4:28 pm

This is a cut-up version of GrimJacks rogue-assist.mac script. However I need some help with the adjsutments I am trying to add. I am using this on a pure warrior and wanted to add bashing as an event for caster mobs ; and I wanted to add a taunt routine in that would constantly try to keep aggo for this bot. Can somone look at what I have done with the Bash events and DoTaunt variables and tell me what I need to change?

Any suggestions or edits to the code would be greatly appreciated with the DoTaunt and Basher adds I am trying to implement. I want the bash event to happen like the original enrage. It only bashes when target tries to cast spell..and stops on an interupt.

Code: Select all

|tank.mac
|
#Turbo 72
#Event Enraged "has become ENRAGED"
#Event Offrage "is no longer enraged"
#Event Basher "begins to cast a spell"
#Event OffBasher "spell is interupted"

Sub Main
   /declare RangeMin global
   /declare RangeMax global
   /declare FastRange global
   /declare Combatstatus global
   /declare EnrageVar global
   /declare DoTaunt global
   /declare BashVar global
   /varset RangeMin @Param0
   /varset RangeMax @Param1
   /varset FastRange @Param2
   /varset Combatstatus 0
   /varset EnrageVar 0
   /varset DoTaunt 0
   /varset BashVar 0
   :Mainloop
   /call Combatcheck
   /if @Combatstatus=="1" /call RangeSub
   /doevents
   /goto :Mainloop
/return


Sub Combatcheck
   /if @EnrageVar=="1" {
      /if $target()=="TRUE" {
         /return
      } else {
         /varset EnrageVar 0
         /varset Combatstatus 0
      }
   }
   /if @Basher=="1" {
      /if $target()=="TRUE" {
          /return
      } else {
          /varset Basher 0
      }   
    }


   /if $target()=="FALSE" {
      /varset Combatstatus 0
      /if $combat=="TRUE" {
         /attack off
      }
      /return

   }
   /if $target()=="TRUE" {
      /if $combat=="TRUE" {
         /varset Combatstatus 1
         /return
      }
   }
/varset Combatstatus 0
/return



Sub Rangesub
   /stand
   /face nolook fast
   /if n $target(distance)>=@FastRange /call Fastmove
   /if n $target(distance)>@RangeMax {
      /press up
   }
   /if n $target(distance)<@RangeMin {
      /press down
   }
/return

Sub DoTaunt
   /if n @DoTaunt==0 /return
   /if n $char(ability,"Taunt")!=-2 {
         /doability "Taunt"
   }   
/return

Sub Event_Enraged
   /if $target()=="TRUE" {
      /varset EnrageVar 1
      /attack off
   }
/return

Sub Fastmove
   :fastmoveloop
   /if $target()=="FALSE" {
      /varset Combatstatus 0
      /sendkey up up
      /if $combat=="TRUE" {
         /attack off
         /return
      }
   }
   /stand
   /face nolook fast
   /if n $target(distance)>@FastRange {
      /sendkey down up
      /attack off
   }
   /if n $target(distance)<=@FastRange {
         /if @Combatstatus=="1" {
            /if @EnrageVar=="0" {
               /attack on
            }
         }
      /sendkey up up
      /return
   }
   /goto :fastmoveloop
/return


Sub Event_Offrage
   /if $target()=="TRUE" {
         /varset EnrageVar 0
         /attack
      }
   }
/return

Sub Event_Basher
    /if $target()=="True" {
          /varset Basher 1
          /bash
      }
   }
    /return     
         
Sub Event_OffBasher
    /if $target()=="True" {
          /varset Basher 0
          /attack
      }
   }
     /return 

insanitywiz
a hill giant
a hill giant
Posts: 250
Joined: Mon Jul 08, 2002 7:50 am

Post by insanitywiz » Thu Nov 13, 2003 7:48 pm

Just took a quick look, but this should do what you are asking of it. It will taunt if you are in engaged, and it will bash when it detects a cast. Problem is it will bash when it detects anyone or anything begining to cast a spell. Fire up those chat filters to avoid it bashing whenever someone is trying to SoW you...

Code: Select all

|tank.mac 
| 
#Turbo 72 
#Event Enraged "has become ENRAGED" 
#Event Offrage "is no longer enraged" 
#Event Bash "begins to cast a spell" 

Sub Main 
   /declare RangeMin global 
   /declare RangeMax global 
   /declare FastRange global 
   /declare Combatstatus global 
   /declare EnrageVar global 
   /varset RangeMin @Param0 
   /varset RangeMax @Param1 
   /varset FastRange @Param2 
   /varset Combatstatus 0 
   /varset EnrageVar 0 
   :Mainloop 
   /call Combatcheck 
   /if "$combat"=="TRUE" {
   /if n $char(ability,"Taunt")>0 /doability "Taunt" 
  }
   /if @Combatstatus=="1" /call RangeSub 
   /doevents 
   /goto :Mainloop 
/return 


Sub Combatcheck 
   /if @EnrageVar=="1" { 
      /if $target()=="TRUE" { 
         /return 
      } else { 
         /varset EnrageVar 0 
         /varset Combatstatus 0 
      } 
   } 
   /if $target()=="FALSE" { 
      /varset Combatstatus 0 
      /if $combat=="TRUE" { 
         /attack off 
      } 
      /return 

   } 
   /if $target()=="TRUE" { 
      /if $combat=="TRUE" { 
         /varset Combatstatus 1 
         /return 
      } 
   } 
/varset Combatstatus 0 
/return 



Sub Rangesub 
   /stand 
   /face nolook fast 
   /if n $target(distance)>=@FastRange /call Fastmove 
   /if n $target(distance)>@RangeMax { 
      /press up 
   } 
   /if n $target(distance)<@RangeMin { 
      /press down 
   } 
/return 

Sub Event_Enraged 
   /if $target()=="TRUE" { 
      /varset EnrageVar 1 
      /attack off 
   } 
/return 

Sub Fastmove 
   :fastmoveloop 
   /if $target()=="FALSE" { 
      /varset Combatstatus 0 
      /sendkey up up 
      /if $combat=="TRUE" { 
         /attack off 
         /return 
      } 
   } 
   /stand 
   /face nolook fast 
   /if n $target(distance)>@FastRange { 
      /sendkey down up 
      /attack off 
   } 
   /if n $target(distance)<=@FastRange { 
         /if @Combatstatus=="1" { 
            /if @EnrageVar=="0" { 
               /attack on 
            } 
         } 
      /sendkey up up 
      /return 
   } 
   /goto :fastmoveloop 
/return 


Sub Event_Offrage 
   /if $target()=="TRUE" { 
         /varset EnrageVar 0 
         /attack on
      } 
   } 
/return 

Sub Event_Bash
    /if $target()=="True" { 
    /if n $char(ability,"Bash")>0 /dability "Bash"
      } 
   } 
    /return      

ml2517
a grimling bloodguard
a grimling bloodguard
Posts: 1216
Joined: Wed Nov 12, 2003 1:12 am

Post by ml2517 » Thu Nov 13, 2003 10:26 pm

Question:

Is there any way to do something like this?

Instead of this:
#Event Enraged "has become ENRAGED"

Do something like this:
#Event Enraged "$target(name)" has become ENRAGED""

Is it possible to merge a variable and text like that? If you could do something like this it should make it only react to events that are most likely the mob you have targeted. If its not possible it might be a nice feature improvement.

chimaera
a lesser mummy
a lesser mummy
Posts: 37
Joined: Fri Aug 01, 2003 4:14 pm

Post by chimaera » Fri Nov 14, 2003 6:57 am

You could just do a quick check on the mob health % instead. If its not below 9%, its not your target that enraged.

Guest

Post by Guest » Fri Nov 14, 2003 7:02 am

Adding an option of pressing backwards automatically would also be a good addition, as some mobs need to be corner tanked.

crisdan
a ghoul
a ghoul
Posts: 126
Joined: Mon Mar 24, 2003 1:56 pm

Post by crisdan » Fri Nov 14, 2003 9:15 am

insanitywiz...

Thanks for the re-write....I used it last night and it seems to work.

:>