Secondary target mez and re-mez problem

Need some help with that macro you're working on or aren't quite sure how to get your macro to do something? Ask here!

Moderator: MacroQuest Developers

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Secondary target mez and re-mez problem

Post by blakbelt » Fri Oct 17, 2003 12:05 pm

Anyone help with a problem:

Have the following code (all of which has the variables declared etc)

Code: Select all

Sub Do-add 
  /assist @MasterName
  /varset closetarget $target(id) 
  /target notid @closetarget npc
  /varset addtarget $target(id)
  :castloop
    /stand
    /cast @MezSpell
    /doevents
      /if n @ismezzed==1 {
         /tell @MasterName $target(name,clean) is Mezzed! 
      /delay @MezTime
      /target @addtarget
       /goto :castloop
/return
}
/return
What i want to do is target a mob which isnt the current target of the tank, mez it and keep on mezzing it until mez is broken and the target dies. The code i have correctly identifies the target mezzes it and continues to do - and tries to mez it during combat :( Also the code above does not action the /tell command.

If you have any ideas or can solve my problem - would me much appreciative.

Thanks
Blakbelt

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Fri Oct 17, 2003 1:17 pm

I think this should work, but try it out and let me know, i dont have a chanterbot or i would myself. If it does work im gonna mod this to be barduseable :twisted:

Code: Select all

Do-add
  /declare MezTimer timer
  /varset MezTimer 0
  /assist @MasterName
  /varset closetarget $target(id)
  /target notid @closetarget npc
  /varset addtarget $target(id)
  :castloop
    /if n @MezTimer<=30 {     |3secs should be enough right?
      /target id @addtarget
      /stand
      /cast @MezSpell
      /varset @MezTimer @MezTime 
      /tell @MasterName $target(name,clean) is Mezzed!
      /doevents
    }
    /assist @MasterName
    /if n $target(id)==@addtarget /return
    /goto :castloop
/return

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Oct 17, 2003 1:30 pm

I have the mez part sorted and it works using the code above - what i cant seem to do is stop the casting when the tank breaks the mez correctly.
Blakbelt

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Fri Oct 17, 2003 1:37 pm

yeah i understand, try out what i put in there, it should do that

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Oct 17, 2003 1:49 pm

Gonna give it a go now will post results
Blakbelt

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Oct 17, 2003 2:07 pm

OK it ends the macro during the first cast:

bad variable in /var function
personal.inc@116(Do-add): /varset @MezTimer @MezTime
botcore.inc@139 (Event_Chat): /call Do-@Commands(0,@tempvar) @Param2
genbot.mac@81 (Main): /call PersonalMain
Blakbelt

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Oct 17, 2003 2:13 pm

Found the culprit

Code: Select all

/varset @meztimer @meztime 
should be without the first @

so it now mezzes and tells me that it has mezzed, it still doesnt re-mez.
Blakbelt

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Fri Oct 17, 2003 2:14 pm

hard to tell without seeing all the files, but make sure both MezTime and MezTimer have been declared, and i would move them both to the personal variables section in Personal.inc other than that i dunno

blakbelt
a lesser mummy
a lesser mummy
Posts: 70
Joined: Wed Aug 27, 2003 12:40 pm
Location: Scotland UK

Post by blakbelt » Fri Oct 17, 2003 2:20 pm

am using Grimjacks Genbot :) latest version
Blakbelt

theafkxper
a hill giant
a hill giant
Posts: 207
Joined: Sun Sep 08, 2002 6:41 pm

Post by theafkxper » Fri Oct 17, 2003 2:57 pm

is MezTimer declared as a timer variable?
and if so, what are you assigning MezTime to be?