I first had some difficulty but I have been able to create a macro that will determine if I am duel wielding or playing an instrument. It is realy crude because it realy only looks to see if I have an item in primary and seconday or just an item in secondary. I am sure there is a better way to determine this but this is my first attempt to create a macro.
Now I want to incorpate code below into an group attack mac. I am running into some problems.
Code: Select all
Sub Main
| Check to see if inventory widow needs to be opened
/if $invpanel==false /press g
| If no item in primary equip slot goto equip_duelweapons
/if n $equip(primary,value)==false /goto :equip_duelweapons
| If there is an item in primary equip slot goto equip_instrument
/if n $equip(Primary,value)==true /goto :equip_instrument
|This will remove the primary and secondary items and add a new secondary item.
:equip_instrument
/click left equip Primary | removing primary weapon
/click left inv 7 | Primary weapon will be placed here
/click left inv 3 | Grabbing Instrument in this slot
/delay 3 | Placing a delay here so it does not look humanily imposible to switch out so fast.
/click left equip secondary | Place instrument in secondary slot and removing secondar weapon.
/click left inv 3 | Place secondary weapon in this slot
/if $invpanel==true /press g
/endm
| This will remove a secondary item and add a new primary and secondary items
:equip_duelweapons
/click left equip secondary | Removing instrument
/click left inv 3 | secondary | Grabbing secondary weapon and dropping Instrument in this slot
/click left equip secondary | Equiping secondary weapon
/delay 3 | Placing a delay here so it does not look humanily imposible to switch out so fast.
/click left inv 7 | Grabbing primary weapon from this slot
/click left equip primary | Equiping Primary weapon
/if $invpanel==true /press g
/endm
Below is a bard kitting swist marco that I borrowed from Pussyfoot. I have modified to play songs that I play while grouped. I created one for attack mode and one for heal/mana mode.
I have attempted to add part of the code above that will allow me to have weapons or instrument depending on what macro I am using.
If I have instrument in secondar slot and run the attack macro, all works great. I change from instrument only to duel wielding but when I am duel wielding and then play the heal macro, I end up with instrument equipted and one weapon left on my macro.
The code below is the code that does not work. I have split the code up so you can see where I have added my code from above. I was not sure how to change the color of the text inside a code brackets section.
This is the heal/mana macro that does not work correctly.
Code: Select all
| - bardtwist.mac - Used for group healing and mana regen.
| Twists the bard songs and watches for a missed note, if the note is
| missed restarts that song.
| By PussyFoot
#event MissedNote "You miss a note, bringing your song to a close!"
| #event MobDead "You gain experience"
#event Loading "LOADING"
#event Stunned "You cannot cast while stunned"
| #event OutOfRange "Your target is out of range, get closer!"
| #event NoTarget "You must first select a target for this spell"
#event EXP "You gain experience!!"
#event LOADING "LOADING"
#event stunoff "You are unstunned"
#define SingStatus v59
#define SONG_UNKOWN
#define SING_RESTART 2
#define OUT_OF_RANGE 3
#define STUNED 4
#define SONG_FINISHED 8
#define SongTimer t7
Sub Main
Code: Select all
/if n $equip(primary,value)==true /call instrument
Code: Select all
:SingLoop
/Call Sing "Cantata of Soothing"
/stop
/delay 0
/call Sing "Cassindra`s Chorus of Clarity"
/stop
|/delay 2
|/call Sing "Hymn of Restoration"
|/stop
/delay 2
/goto :SingLoop
Code: Select all
Sub instrument
/if $invpanel==false /press g
/click left equip Primary | removing primary weapon
/click left inv 7 | Primary weapon will be placed here
/click left inv 3 | Grabbing Instrument in this slot
/delay 3 | Placing a delay here so it does not look humanily imposible to switch out so fast.
/click left equip secondary | Place instrument in secondary slot and removing secondar weapon.
/click left inv 3 | Place secondary weapon in this slot
/if $invpanel==true /press g
/return
Code: Select all
Sub Sing
| /echo "Attempting to sing $p0"
:StartSong
/varset SingStatus 0
/stop
/delay 1
/cast "$p0"
/varset SongTimer 35
:WaitSing
/doevents
/doevents MissedNote
/if n $SingStatus==SING_RESTART /goto :StartSong
/if n $SingStatus>SING_RESTART /return $SingStatus
/if n $SongTimer>0 /goto :WaitSing
/varset SongTimer 0
/return SONG_FINISHED
Sub Event_MissedNote
/stop
/delay 4
/varset SingStatus SING_RESTART
/return
Sub Event_Stunned
/varset SingStatus STUNED
/return
Sub Event_OutOfRange
/stop
/delay 4
/varset SingStatus SING_RESTART
/return
|Sub Event_NoTarget
| /stop
|/endm
|Sub Event_EXP
| /stop
| /delay 5
| /stop
|/endm
Sub Event_stunoff
/stop
/goto :SingLoop
/endm
Sub Event_LOADING
/endm
