Little help at my butchered attempt at a macro /sigh

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

illus1on
orc pawn
orc pawn
Posts: 24
Joined: Wed Apr 14, 2004 3:32 pm

Little help at my butchered attempt at a macro /sigh

Post by illus1on » Sun Apr 18, 2004 2:06 am

Hello all. I am looking for some salvation as I keep getting crashes and errors. I do not know a lot about macro'ing as some of you can attest to from the PM's I have sent. But here is my Macro as of right now...

Code: Select all

|Shamanbot v1.1
|
|usage: /macro shamanbot <tank name>
|
|
|spell gem1: Focus of the Seventh
|spell gem2: Talisman of the Boar
|spell gem3: Blessing of Replenishment
|spell gem4: Ferine Avatar
|spell gem5: Quiescence
|spell gem6: Malos
|spell gem7: Turgur's Insects
|spell gem8: Blood of Saryn
|
|
|
|
|Commands:
|	/t <bot> Focus
|	/t <bot> Stam
|	/t <bot> Regen
|	/t <bot> FA
|	/t <bot> Heal
|	/t <bot> Malos
|	/t <bot> Slow
|	/t <bot> Dot
|

#turbo

#event groupFocus "Seventh"
#event groupBoar "Boar"
#event groupRegen "Regen"
#event Ferine "Ferine"
#event hot "Quiescence"
#event malos "Malos"
#event slow "Slow"
#event dot "Dot"

Sub Main
  /echo Go Go Shaman!

  /declare tankName global
  /declare engagedMob global
  /declare mobHealth global

  /varset tankName @Param0
  /varset engagedMob 0
  /varset mobHealth 95

  :Mainloop
    /call Combat
    /doevents
  /goto :Mainloop
/return

Sub Combat
  /echo Your main assist is @tankName

  /if "@engagedMob==1" {
    /assist @tankName
    /call Slow 
  }

  /if "@engagedMob==0" {
    /assist @tankName
    /if n "$target(hp,pct)<=@mobHealth" {
      /varset engagedMob 1 
    }
  }

   /if "$target()"=="FALSE" { 
      /delay 5s 
      /varset engagedMob 0
  } 
/return

Sub Slow
  /sit off
  /cast 7
  /delay 50
  /sit
/return
  

Sub Event_groupFocus
  /sit off
  /g Casting Focus of the Seventh
  /press F1
  /cast 1
  /delay 15s
  /sit
  /doevents flush
/return

Sub Event_groupBoar
  /sit off
  /g Casting Talisman of the Boar
  /press F1
  /cast 2
  /delay 8s
  /sit
  /doevents flush
/return

Sub Event_groupRegen
  /sit off
  /g Casting Blessing of Replenishment
  /press F1
  /cast 3
  /delay 6s
  /sit
  /doevents flush
/return

Sub Event_Ferine
  /sit off
  /rtarget
  /g Casting Ferine Avatar On %t
  /cast 4
  /delay 4s
  /sit
  /doevents flush
/return

Sub Event_hot
  /sit off
  /rtarget
  /g Casting Quiescence On %t
  /cast 5
  /delay 4s
  /sit
/return

Sub Event_malos
  /sit off
  /assist @tankName
  /pause 3
  /g Casting Malos
  /cast 6
  /delay 7s
  /sit
  /doevents flush
/return

Sub Event_slow
  /sit off
  /assist @tankName
  /pause 3
  /g Casting Turgur's Insects
  /cast 7
  /delay 10s
  /sit
  /doevents flush
/return

Sub Event_dot
  /sit off
  /assist @tankName
  /pause 3
  /g Casting Blood of Saryn
  /cast 8
  /delay 10s
  /sit
  /doevents flush
/return
Now, all I am trying to get this to do is.

1. Buff the group/person by a tell command and also relay that he is casting a spell.

2. Cast Malos on the mob that the tank is fighting upon incoming (when in range) and then immediately slow it as well. - Announcing in Group Chat that he has Slowed the mob, or Resisted and is trying again.

*** I would appreciate any help in this matter.

Goofmester1
a hill giant
a hill giant
Posts: 241
Joined: Thu Nov 06, 2003 4:26 am

Post by Goofmester1 » Sun Apr 18, 2004 3:06 am

To get it to respond to your request for buffs you need to set it to look at #chat tell then you will probly need to redo your subs.

The best thing I can tell you is look into the snippets section for the spellcast.inc this will cast the spell you want by name instead of hardcoding your spells to slot. (you might forget to mem them in the macro order) Also if the spell you want isn't memmed it will auto-mem it and even responds to resist depending on how you have it set.

s16z
a ghoul
a ghoul
Posts: 97
Joined: Thu Apr 01, 2004 12:03 pm

Post by s16z » Sun Apr 18, 2004 3:14 am

First, before Lax gets here, you need to reread the manual. Your 'if' statements are all wrong, and you need to simplify your logic. Example:

Code: Select all

/if "@engagedMob==1" {
    /assist @tankName
    /call Slow
  }

  /if "@engagedMob==0" {
    /assist @tankName
    /if n "$target(hp,pct)<=@mobHealth" {
      /varset engagedMob 1
    }
  } 
Since @engagedMob is a toggle, use an else statement.

Code: Select all

| You always assist, so move it out of the ifs
/assist @tankName
/if n @engagedMob==1 {
    /call Slow
} else {
    /if n $target(hp,pct)<=@mobHealth {
        /varset engagedMob 1
    }
}
Don't use " for numeric compares.

Also, take a look at the various spellcasting includes. They will get your spell cast for you, and cover all contingencies. Save yourself the work.

You also need to redo your events, as you don't want anyone to trigger your bot, just you. Plus you have nothing there to recover mana.

illus1on
orc pawn
orc pawn
Posts: 24
Joined: Wed Apr 14, 2004 3:32 pm

Post by illus1on » Sun Apr 18, 2004 6:25 pm

Thanks for the feedback, however, I don't even know what that means unfortunately. I have read elretardos scripting for dummies, and I have tried cutting and pasting other macros, no dice. I am just not processing the information. - I guess it's sort of like walking into a mechanics shop with zero knowledge of engines, and do a full head gasket replacement.

writing macros isnt in the cards for me. :roll: