• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->

Bard Macro Help (1 Viewer)

Fozzieelf

New member
Joined
Jun 24, 2006
RedCents
I'm working on a new bard kiting macro and need some help with a snare line.
Was using varset snaresong and a sub snare. The problem is that if the macro checks the mobs health and then sets the varset snaresong to one and in the sub you say if snaresong is one then twist these songs the mac just keeps trying to cast the same twists over and over. Let me just link what i'm talking about.
Sub Snare
Main
/declare snaresong int outer 0

Main loop
/call Snare
/if (${Target.PctHPs}<=20) /varset snaresong 1



Sub Snare
/if (${snaresong}==1) {
/twist 1 2 3 4
/varset snaresong 0
}
/return
And a bunch of stuff inbetween but you get the picture kinda.
What I want it to do is start snareing mobs when they hit 20% health and then when they die to start with the normal twist line i have. But with the above everytime they hit 20 it tries to cast over and over the same twist line.
 
Last edited:
I think you left out a ) in your if statement
/if (${Target.PctHPs}<=20 /varset snaresong 1 - What you had

/if (${Target.PctHPs}<=20) { /varset snaresong } 1 - Should be - don't think you really need the {} around the /varset but i put it there just to make sure nothing leaks :)

Plus with the way you have it set, you keep changing the Varset each time it cycles thru once they hit 20% You might want to add a sub for when the mob dies to change the /varset snaresong back to 0. instead of during the Snaresong loop.
 
I was coping and pasting probable missed the extra ) and yes right now it is changeing everytime and I don't want that want to have it change back when mob dies how is a good way to add a sub in when mob dies?
 
what i would do is if you have a loot command in there, i would have it change in the same sub that you call your loot command. Or if you don't have a loot sub in there. Make a Sub Event_Slainmob or something and add

#event Slainmob "#*#You have slain#*#"

sub event_Slainmob
/varset Snaresong 0
/return
 
Woot its case sensetive!! Working so far that I can see. But still one problem the if statement in the main loop says /if (${Target.PctHPs}<=20) /varset snaresong 1 and then the sub snare says /if (${snaresong}==1) {/twist 1 2 3 4 /varset snaresong 0}. Then the mac goes through sub snare and starts to twist then gets back to main loop and sees target below 20 sets snaresong back to 1 and then the sub snare tries start a new twist. So once gets to 20 the mac toggles snaresong on and off trying to twist the same line of songs. Need something to set it once and only once and then when dies the slain will set it back to 0.
 
Ok here it is most of it is from icefall mac some is mine and some is from other macros its mostly working atm but I have to have a delay in the snare section so it just doesn't loop .. oh and potion belt don't seem to be working either.

PHP:
#turbo 20 
#include oc-utilities.inc
#event GMInTells "#*#tells you,#*# GM #*#" 
#event GMInTells "#*#tells you,#*# Guide #*#" 
#event GMInTells "#*#tells you,#*# Senior Guide #*#" 
#event GMInTells "#*#tells you,#*# gamemaster #*#" 
#event GMInTells "#*#tells you,#*# Game Master #*#" 
#event GMInTells "#*#tells you,#*# Customer Service #*#" 
#event GMInTells "#*#tells you,#*# CSR #*#" 
#event ExpTracker "#*#experience!#*#" 
#event AA "You have gained an ability point!#*#" 
#event tar "#*#You gain #*#" 
#event Slain "#*#You have slain#*#" 
#event tar "#*#You must first #*#" 
#event tar "You cannot see your target." 
#event invite "<Text that will trigger an invite of the person who sent the tell goes here>"  
#event dzadd "<Text that will trigger a task invite of the person who sent the tell goes here>" 
#event camp "<Insert tell based camp event of your preference>' 
#event Kills "#*#My Progress#*#" 

/echo ==The Bard Kiting Macro== 
/echo                                 '.' 
/echo Coding concepts shamelessly remembered and borrowed from many a great bard macro. 
/echo AFK macroing in a public zone is not advised. Please use this macro with caution in public areas. 
/echo unless of course you want to bring the wrath down from the thing up high. 

/popup ==Ruined City Bard Macro With Player Detection== 

Sub Main 
	|//Don't touch these. 
	/declare Kills int outer 0 
	/declare AA int outer 0 
	/declare AaDPS int outer 
	/declare regensong int outer 0  
	/declare snaresong int outer 0
	/declare dirgesong int outer 1
	/declare Exper float outer 
	/declare AAExp float outer 
	/declare LDRExp float outer  
	/varset Exper ${Me.PctExp} 
	/varset AAExp ${Me.PctAAExp} 
	/varset LDRExp ${Me.PctGroupLeaderExp} 
	|=== 
	|//~Alter the Hit Point percentage that will trigger the use of Potions, Regen song, & Evac; bellow here. 
	/declare RegenHps int outer 90 
	/declare ChugPotion int outer 60 
	/declare EvacHps int outer 1
	|//~Edit the player check radius bellow here 
	/declare PWRadius int outer 300 
	|=== 
	|//~Alter the ${Zone.ID} for the zone you are kiting in bellow here. 
	/declare KiteZoneID int outer 336 
	|//~Alter the zone you're bound in bellow here.    
	/if (${Zone.ID}==344) /call Died 
	/if (${Zone.ID}==${KiteZoneID}) /call KiteZone 
    
	:MainLoop 
	/if (${Zone.ID}==${KiteZoneID}) { 
		/doevents 
		/call GMcheck 
		/doevents 
		/call CheckHP 
		/doevents
		/delay 1s
		/call AaDPS 
		/doevents
		/call Tar 
		/doevents
		/call Dirgesong
		/doevents
		/call Snare
		/doevents
		/if (${Target.Distance}>=300) /tar npc next
		/doevents
		/if (${Me.CurrentMana}>=1800) /varset dirgesong 1
		/if (${Target.PctHPs}<=20) /varset snaresong 1
	} 
	/doevent 
	/goto :MainLoop 
/return 


Sub GMcheck  
	/if (${Spawn[gm].ID}) {  
	/echo Gm detected  
	/beep 
	/beep 
	/beep  
	/q 
	/endmac  
	}  
/return 

Sub Event_GMInTells 
	/twist off 
	/delay 1s 
	/alt act 212 
	/delay 2s 
	/q 
	/return 

Sub Devoted 
	/if (${Me.AltAbilityReady["481"]}==TRUE) { 
		/twist 6 
		/delay 5s 
		/twist end 
		/delay 1s 
		/alt act 481 
		/delay 7s 
		/if (${regensong} == 1)   /twist 1 2 3 4 1 5 6 7
		/if (${regensong} == 0)   /twist 2 3 4 5 6 7
	} 
/return 

Sub AaDPS 
	/if (${Me.AltAbilityReady[Boastful Bellow]}) /aa act Boastful Bellow
	/if (${Me.AltAbilityReady[Cacophony]}) /aa act Cacophony
	/return 

sub Dirgesong
	/if (!${Target.ID} && ${dirgesong}==0) /return
	/if (${Me.CurrentMana}>=1800 && ${dirgesong}==1) {
		/squelch /twist 9
		/delay 4S
		/if (${Me.CurrentMana}<1700) {
			/varset dirgesong 0
			/if (${regensong} == 1) /twist 1 2 3 4 1 5 6 7
			/if (${regensong} == 0) /twist 2 3 4 5 6 7
			/if (${snaresong} == 1) /twist 8 2 3 8 4 5 8 6 7
	}
	}
/return

sub Died 
	/twist end 
	/delay 1s 
	/keypress down 
	/delay 1s 
	/sit 
	/delay 1s 
	/camp desk 
	/q
/return 

sub CheckHP 
	/if (${Me.PctHPs}<=${RegenHps} && ${Me.PctHPs}>=${EvacHps} && ${regensong}==0 && ${Zone.ID}==${KiteZoneID}) { 
		/twist 1 2 3 4 1 5 6 7
		/varset regensong 1 
	} 
	/if (${Me.PctHPs}>${RegenHps} && ${regensong}==1 && ${Zone.ID}==${KiteZoneID}) { 
		/twist 2 3 4 5 6 7
		/varset regensong 0 
	} 
	/if (${Me.PctHPs}<=${ChugPotion} && ${Zone.ID}==${KiteZoneID}) { 
		/potionbelt activate 2 
		/twist 2 3 4 5 6 7
		/varset regensong 0 
	} 
	|/if (${Me.PctHPs} < ${EvacHps} && ${Zone.ID}==${KiteZoneID}) { 
	|/warp loc -2000, -1555, -172.13 
	|/circle off 
	|/keypress forward 
	|/band activate strings 
	|/twist 1 
	|/delay 10s 
	|/alt act 212 
	|/doevents 
	|/sit 
	|:HealLoop 
	|/doevents 
	|/delay 21s 
	|/if (${Me.PctHPs} > ${RegenHps}) { 
		|/if (${Me.Sitting}) /stand 
			|/call KiteZone 
			|/return 
	|} 
	|/goto :HealLoop 
	|} 
/return 
    
Sub Tar 
	/if (${Target.ID}==FALSE) /tar NPC radius 200
	/if (${Target.Type.Equal[corpse]}) /tar npc next 
	/if (${Target.Type.Equal[Discord Fluctuation]}) /tar npc next
/return 


Sub event_Slain
	/varset snaresong 0
	/return


Sub Snare
	/if (${snaresong}==1) {
	/twist 8 2 3 8 4 5 8 6 7
	/delay 28s
	/return
	}
	/return

Sub event_dzaddPerson 
	/dzadd 
/return 

Sub event_invite  
	/invite 
/return 

Sub event_camp 
	/twist end
	/delay 30s
	/alt act 212 
	|/warp succor 
	/circle off 
	/camp desktop 
	/endmac 
/return 


Sub KiteZone 
	/if (${Zone.ID}==${KiteZoneID}) { 
		/band activate percussion 
		/call moveto 2275 340 
		/face fast heading 320
		/circle on 90 
		/keypress forward hold 
		/call SafetyCheck
		/delay 1s
		/call Tar
		/twist 2 3 4 5 6 7
	} 
/return 
    
Sub SafetyCheck 
	/if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) { 
		/if (${Me.Moving}) { 
			/twist end
			/delay 25s
			/keypress FORWARD 
			/keypress BACK 
			/alt act 212 
			|/warp loc -2000, -1555, -172.13 
		} 
	/beep 
	/beep 
	/beep 
	/echo [${Time.Time24}] !!! Alert !!! 
	/popup [${Time.Time24}] !!! Alert !!! 
	/echo [${Time.Time24}] Another Player is near by, the Macro has been paused... 
	/popup [${Time.Time24}] Another Player is near by, the Macro has been paused... 
	/if (!${Me.AFK}) /afk 
	/twist 9
	/alt act 212
	:loop 
	/delay 10s (!${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) 
	/if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) /goto :loop 
	/echo [${Time.Time24}] Macro resumed... 
	/popup [${Time.Time24}] Macro resumed... 
	/call KiteZone 
	} 
/return 

Sub event_ExpTracker 
	/varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]} 
	/varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]} 
	/varset LDRExp ${Math.Calc[${Me.PctGroupLeaderExp}-${LDRExp}]} 
	/echo EXP: ${Exper} (${Me.PctExp}%) - AA: ${AAExp} (${Me.PctAAExp}%) : ${Time.Time12} : 
	/varset Exper ${Me.PctExp} 
	/varset AAExp ${Me.PctAAExp} 
	/varset LDRExp ${Me.PctGroupLeaderExp} 
	/varcalc Kills (${Kills}+1) 
/return 

Sub event_AA 
	/echo ${Time.Time12} 
	/varcalc AA (${AA}+1) 
/return 

Sub event_Kills              
	/echo ===================================== 
	/echo ======= Kill Count - ${Kills} ======= 
	/echo ========= AA Earned - ${AA} ========= 
	/echo ======= Time - ${Time.Time12} ======= 
	/echo ===================================== 
/return
 
Last edited:
Personally, I'd use the MQ2XPTracker plugin to handle the XP tracking. It will reduce the math that your macro needs to do.

And wow turbo 30 ... go with 20.

Also,

Rich (BB code):
   :MainLoop 
   /if (${Zone.ID}==${KiteZoneID}) { 
      /doevents 
      /call GMcheck 
      /doevents 
      /call CheckHP 
      /doevents
      /delay 1s
      /call AaDPS 
      /doevents
      /call Tar 
      /doevents
      /call Dirgesong
      /doevents
      /call Snare
      /doevents
      /if (${Target.Distance}>=300) /tar npc next
      /doevents
      /if (${Me.CurrentMana}>=1800) /varset dirgesong 1
      /if (${Target.PctHPs}<=20) /varset snaresong 1
   } 
   /doevent --> /doevents 
   /goto :MainLoop 
   /return


Rich (BB code):
Sub Snare
    /if (${snaresong}==1) {
    /twist 8 2 3 8 4 5 8 6 7
    /delay 28s --> You really want to wait this long?
    /return
    }
/return

Looks like it should work.
 
If it still doesn't work ...

Place
Rich (BB code):
/echo snaresong = ${snaresong}

right before your if statements. With how it is written you should get a lot of spam. Or you can setup a social button the does the same, that way you can check the value anytime you hit the button.

Now is the issue that ${snaresong} never == 1 or that it never returns to == 0?
 
Well it is working fine and no i don't want to wait that long but that is long enough to sing all the songs in the twist line. If I take the delay out it tries to cast the same first song over and over and over and never gets anywere.
 
Keep in mind that everytime you are calling /call Snare you start your twist and then pause the macro for 28 seconds. So if the mob dies in 15 seconds, the Slain event wont be ran for another 13 seconds.
 
once it goes to 1 it does reset to 0 after mob dies which is what i want but want to take the delay out of the sub snare but can't without casting the 8 over and over and ..... you get the picture.
 
Fozzieelf said:
Well it is working fine and no i don't want to wait that long but that is long enough to sing all the songs in the twist line. If I take the delay out it tries to cast the same first song over and over and over and never gets anywere.

Good point that is a lot of songs to twist ...
 
potionbelt is working again don't know what i did and the snaresong varset isn't changing after they die.... thought it was earlier

will also update what i've changed on the first post with the macro
 
Let me ask another question is there a way to see what your twisting(in the mac) and compare or tell it to twist something different depending on what the compare turns out? Just reaching for ideas here really want to get this going the right way.
 
Not sure on that. I tried doing the twist line as a variable string but couldn't get it working on one of my macros, but didn't spend a lot of time on it. If you could do that, then you might could build the twist line in a sub based on the flags that are set at the time, and if the built version differs, then start it twisting. Basically, you should only do a twist command when the parameters change. You can kinda do the same thing by testing the variables in the other event routines also, ie, testing for the snare variable in the regen sub, if its set including the snare song in with the regen songs. But like I said, it should only fire if something has changed. Let me think on it for a bit and see what I can come up with for it.
 
OK, here is the rewritten bard kiting macro here. Please be warned the code is untested so might have some typos or syntax errors. The main thing i did was put a SetTwist sub in that was only activated when it was told to reset the songs being twisted, otherwise it should carry on with the previous twist commands.

Rich (BB code):
|**********************************************************************************|
|
|	I am kinda making some assumptions about twist sets here, with 8 being the snare,
|	2-7 being runspeed and damage songs, and 1 being the regen Song, 
|	but you can reset the twist commands to what you wish them to be
|
|**********************************************************************************|


#turbo 20 
#include oc-utilities.inc
#event GMInTells "#*#tells you,#*# GM #*#" 
#event GMInTells "#*#tells you,#*# Guide #*#" 
#event GMInTells "#*#tells you,#*# Senior Guide #*#" 
#event GMInTells "#*#tells you,#*# gamemaster #*#" 
#event GMInTells "#*#tells you,#*# Game Master #*#" 
#event GMInTells "#*#tells you,#*# Customer Service #*#" 
#event GMInTells "#*#tells you,#*# CSR #*#" 
#event ExpTracker "#*#experience!#*#" 
#event AA "You have gained an ability point!#*#" 
#event tar "#*#You gain #*#" 
#event Slain "#*#You have slain#*#" 
#event tar "#*#You must first #*#" 
#event tar "You cannot see your target." 
#event invite "<Text that will trigger an invite of the person who sent the tell goes here>"  
#event dzadd "<Text that will trigger a task invite of the person who sent the tell goes here>" 
#event camp "<Insert tell based camp event of your preference>' 
#event Kills "#*#My Progress#*#" 

/echo ==The Bard Kiting Macro== 
/echo                                 '.' 
/echo Coding concepts shamelessly remembered and borrowed from many a great bard macro. 
/echo AFK macroing in a public zone is not advised. Please use this macro with caution in public areas. 
/echo unless of course you want to bring the wrath down from the thing up high. 

/popup ==Ruined City Bard Macro With Player Detection== 

Sub Main 
    |//Don't touch these. 
    /declare Kills int outer 0 
    /declare AA int outer 0 
    /declare AaDPS int outer 
    /declare regensong int outer 0  
    /declare snaresong int outer 0
    /declare dirgesong int outer 1
    /declare resettwist int outer 1
    /declare Exper float outer 
    /declare AAExp float outer 
    /declare LDRExp float outer  
    /varset Exper ${Me.PctExp} 
    /varset AAExp ${Me.PctAAExp} 
    /varset LDRExp ${Me.PctGroupLeaderExp} 
    |=== 
    |//~Alter the Hit Point percentage that will trigger the use of Potions, Regen song, & Evac; below here. 
    /declare RegenHps int outer 90 
    /declare ChugPotion int outer 60 
    /declare EvacHps int outer 1
    |//~Edit the player check radius below here 
    /declare PWRadius int outer 300 
    |=== 
    |//~Alter the ${Zone.ID} for the zone you are kiting in below here. 
    /declare KiteZoneID int outer 336 
    |//~Alter the zone you're bound in below here.    
    /if (${Zone.ID}==344) /call Died 
    /if (${Zone.ID}==${KiteZoneID}) /call KiteZone 
    
    :MainLoop 
    /if (${Zone.ID}==${KiteZoneID}) { 
        /doevents 
        /call GMcheck 
        /doevents 
        /call CheckHP 
        /doevents
        /delay 1s
        /call AaDPS 
        /doevents
        /call Tar 
        /doevents
        /call Dirgesong
        /doevents
        /call Snare
        /doevents
        /if (${Target.Distance}>=300) /call Tar
        /doevents
        /if (${Me.CurrentMana}>=1800) /varset dirgesong 1
        /if (${Target.PctHPs}<=20) /varset snaresong 1
        /call SetTwist
    } 
    /doevent 
    /goto :MainLoop 
/return 

Sub SetTwist
	/if (${resettwist}==1) {
		/if (${snaresong}==0 && ${regensong}==0 ) {
			/twist 2 3 4 5 6 7
			/varset resettwist 0			
	    }
		/if (${snaresong}==0 && ${regensong}==1 ) {
			/twist 1 2 3 4 1 5 6 7
			/varset resettwist 0			
	    }
		/if (${snaresong}==1 && ${regensong}==0 ) {
			/twist 8 2 3 8 4 5 8 6 7
			/varset resettwist 0			
	    }
		/if (${snaresong}==1 && ${regensong}==1 ) {
			/twist 8 2 3 1 8 4 5 1 8 6 7
			/varset resettwist 0			
	    }
	}
/return

Sub GMcheck  
    /if (${Spawn[gm].ID}) {  
    /echo Gm detected  
    /beep 
    /beep 
    /beep  
    /q 
    /endmac  
    }  
/return 

Sub Event_GMInTells 
    /twist off 
    /delay 1s 
    /alt act 212 
    /delay 2s 
    /q 
/return 

Sub Devoted 
    /if (${Me.AltAbilityReady["481"]}==TRUE) { 
        /twist 6 
        /delay 5s 
        /twist end 
        /delay 1s 
        /alt act 481 
        /delay 7s 
        /if (${regensong} == 1)   /twist 1 2 3 4 1 5 6 7
        /if (${regensong} == 0)   /twist 2 3 4 5 6 7
    } 
/return 

Sub AaDPS 
    /if (${Me.AltAbilityReady[Boastful Bellow]}) /aa act Boastful Bellow
    /if (${Me.AltAbilityReady[Cacophony]}) /aa act Cacophony
/return 

sub Dirgesong
    /if (!${Target.ID} && ${dirgesong}==0) /return
    /if (${Me.CurrentMana}>=1800 && ${dirgesong}==1) {
        /squelch /twist 9
        /delay 4S
        /if (${Me.CurrentMana}<1700) {
            /varset dirgesong 0
            /varset resettwist 1
    	}
    }
/return

sub Died 
    /twist end 
    /delay 1s 
    /keypress down 
    /delay 1s 
    /sit 
    /delay 1s 
    /camp desk 
    /q
/return 

sub CheckHP 
    /if (${Me.PctHPs}<=${RegenHps} && ${Me.PctHPs}>=${EvacHps} && ${regensong}==0 && ${Zone.ID}==${KiteZoneID}) { 
        |/twist 1 2 3 4 1 5 6 7
        /varset regensong 1 
        /varset resettwist 1
    } 
    /if (${Me.PctHPs}>${RegenHps} && ${regensong}==1 && ${Zone.ID}==${KiteZoneID}) { 
        |/twist 2 3 4 5 6 7
        /varset regensong 0 
        /varset resettwist 1
    } 
    /if (${Me.PctHPs}<=${ChugPotion} && ${Zone.ID}==${KiteZoneID}) { 
        /potionbelt activate 2 
        |/twist 2 3 4 5 6 7
        /varset regensong 0 
        /varset resettwist 1
    } 
    |/if (${Me.PctHPs} < ${EvacHps} && ${Zone.ID}==${KiteZoneID}) { 
    |/warp loc -2000, -1555, -172.13 
    |/circle off 
    |/keypress forward 
    |/band activate strings 
    |/twist 1 
    |/delay 10s 
    |/alt act 212 
    |/doevents 
    |/sit 
    |:HealLoop 
    |/doevents 
    |/delay 21s 
    |/if (${Me.PctHPs} > ${RegenHps}) { 
        |/if (${Me.Sitting}) /stand 
            |/call KiteZone 
            |/return 
    |} 
    |/goto :HealLoop 
    |} 
/return 
    
Sub Tar 
    /if (${Target.ID}==FALSE) /tar NPC radius 200
    /if (${Target.Type.Equal[corpse]}) /tar npc next 
    /if (${Target.Distance}>=300) /tar npc next
    /if (${Target.Type.Equal[Discord Fluctuation]}) /tar npc next
    /if (${Target.PctHPs}>80 && ${snaresong}==1 ) {
    	/varset snaresong 0
    	/varset resettwist 1
    }
/return 


Sub event_Slain
    /varset snaresong 0
    /varset resettwist 1
/return


Sub Snare
	/if (${Target.PctHPs}<=20){
		/varset snaresong 1
		/varset resettwist 1
    }
/return

Sub event_dzaddPerson 
    /dzadd 
/return 

Sub event_invite  
    /invite 
/return 

Sub event_camp 
    /twist end
    /delay 30s
    /alt act 212 
    |/warp succor 
    /circle off 
    /camp desktop 
    /endmac 
/return 


Sub KiteZone 
    /if (${Zone.ID}==${KiteZoneID}) { 
        /band activate percussion 
        /call moveto 2275 340 
        /face fast heading 320
        /circle on 90 
        /keypress forward hold 
        /call SafetyCheck
        /delay 1s
        /call Tar
        /twist 2 3 4 5 6 7
    } 
/return 
    
Sub SafetyCheck 
    /if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) { 
        /if (${Me.Moving}) { 
            /twist end
            /delay 25s
            /keypress FORWARD 
            /keypress BACK 
            /alt act 212 
            |/warp loc -2000, -1555, -172.13 
        } 
    /beep 
    /beep 
    /beep 
    /echo [${Time.Time24}] !!! Alert !!! 
    /popup [${Time.Time24}] !!! Alert !!! 
    /echo [${Time.Time24}] Another Player is near by, the Macro has been paused... 
    /popup [${Time.Time24}] Another Player is near by, the Macro has been paused... 
    /if (!${Me.AFK}) /afk 
    /twist 9
    /alt act 212
    :loop 
    /delay 10s (!${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) 
    /if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) /goto :loop 
    /echo [${Time.Time24}] Macro resumed... 
    /popup [${Time.Time24}] Macro resumed... 
    /call KiteZone 
    } 
/return 

Sub event_ExpTracker 
    /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]} 
    /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]} 
    /varset LDRExp ${Math.Calc[${Me.PctGroupLeaderExp}-${LDRExp}]} 
    /echo EXP: ${Exper} (${Me.PctExp}%) - AA: ${AAExp} (${Me.PctAAExp}%) : ${Time.Time12} : 
    /varset Exper ${Me.PctExp} 
    /varset AAExp ${Me.PctAAExp} 
    /varset LDRExp ${Me.PctGroupLeaderExp} 
    /varcalc Kills (${Kills}+1) 
/return 

Sub event_AA 
    /echo ${Time.Time12} 
    /varcalc AA (${AA}+1) 
/return 

Sub event_Kills              
    /echo ===================================== 
    /echo ======= Kill Count - ${Kills} ======= 
    /echo ========= AA Earned - ${AA} ========= 
    /echo ======= Time - ${Time.Time12} ======= 
    /echo ===================================== 
/return

I hope that solves the problems you are having.
 
Cool thank you very much just got home from work will take a look at it and try it out. I took out all the stuff that said what the gems were(regen runspeed dots....) just to make it smaller and easier to see. Once its working correctly will post it in the other section.
 
Well you left a space after the if statement in the sub snare no biggy and thats all that needed to get it going again. So i ran it worked great just like normal all the way to to 20 health then when the mob hit 20 health went to the twist for snare and then again and again so it was trying to twist the same set of songs over and over. What if in the main loop i do and if mob >20 twist this set of songs depending on regen and whatever else and then do another if mob <20 twist a different set depending on regen and whatever there also...... will try that out.
 
Ok i know why its doing that we are calling snare in main loop and snare sub says if mob 20 or less we are setting the resettwist back to one so then it goes to the sub resettwist and tryies to sing the twist line for the if statements and it does great. But the next cycle trough it will set the resettwist back to 1 and it starts all over again. I am begining to think that this can't be done.
 
you'll want to change these subs so that it does what you're looking for.
And yes, macros can do anything that you can do if you were a player. It just requires quite a bit of work and a lot of different logic subs in the macro.
Rich (BB code):
 Sub Snare 
	/if (${Target.PctHPs}<=20){
		/if (${snaresong}<=1) /varset snaresong 1
		/varset resettwist 1
}

Rich (BB code):
 Sub SetTwist 
	/if (${resettwist}==1) {
		/if (${snaresong}==0 && ${regensong}==0 ) {
			/twist 2 3 4 5 6 7
			/varset resettwist 0			
	 }
		/if (${snaresong}==0 && ${regensong}==1 ) {
			/twist 1 2 3 4 1 5 6 7
			/varset resettwist 0			
	 }
		/if (${snaresong}==1 && ${regensong}==0 ) {
			/twist 8 2 3 8 4 5 8 6 7
			/varset resettwist 0			
			/varset snaresong 2
	 }
		/if (${snaresong}==1 && ${regensong}==1 ) {
			/twist 8 2 3 1 8 4 5 1 8 6 7
			/varset resettwist 0
			/varset snaresong 2			
	 }
	}
/return
Rich (BB code):
Sub Tar 
/if (${Target.ID}==FALSE) /tar NPC radius 200
/if (${Target.Type.Equal[corpse]}) /tar npc next 
/if (${Target.Distance}>=300) /tar npc next
/if (${Target.Type.Equal[Discord Fluctuation]}) /tar npc next
/if (${Target.PctHPs}>80 && ${snaresong}>=1 ) {
	/varset snaresong 0
	/varset resettwist 1
}
/return

Rich (BB code):
sub CheckHP 
	/if (${Me.PctHPs}<=${RegenHps} && ${Me.PctHPs}>=${EvacHps} && ${regensong}==0 && ${Zone.ID}==${KiteZoneID}) { 
		|/twist 1 2 3 4 1 5 6 7
		/varset regensong 1 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	} 
	/if (${Me.PctHPs}>${RegenHps} && ${regensong}==1 && ${Zone.ID}==${KiteZoneID}) { 
		|/twist 2 3 4 5 6 7
		/varset regensong 0 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	} 
	/if (${Me.PctHPs}<=${ChugPotion} && ${Zone.ID}==${KiteZoneID}) { 
		/potionbelt activate 2 
		|/twist 2 3 4 5 6 7
		/varset regensong 0 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	}
 
Last edited:
siddin your tha MAN!!!! That works great... though not sure why will try to follow the logic to see if I can understand it! Great thank you all for your help now to just get it cleaned up and tested some more and then will post.
 
Thanks Siddin, I was going to look at it this morning, but you beat me to the fixes :) I was thinking about using another variable to use as a flag, but your method is simpler I do believe, and probably a little less memory used.
 
Ok its working pretty good but got a problem still and would like ya'll to take a look at it and maybe run it. So to us this macro run to The Ruined City of Dranik and then head way back close to were Bowlord spawns and take a right just before his room. You will follow and corridor back to a big room and from anywere in that room type /mac ruined or whatever you name it. The problem I am having is that it will occasionally go to target a new mob after one dies and there will be atleast 5 behind me and it will start targeting mobs all over the zone. Eventually it gets one close enough to start killing again. And then sometimes when that happens I die though wasn't right infront of the keyboard so don't know exactly what happened. Anyway heres the most recent code and file needed to run it.

Ruined.mac
HTML:
|*************************************************  *********************************|
|
|	I will put more info here once everything is running good.
|	8 is snare, 2 is runspeed
|	3-7 damage songs, and 1 being the regen Song, 
|	but you can reset the twist commands to what you wish them to be
|
|*************************************************  *********************************|


#turbo 20 
#include oc-utilities.inc
#event GMInTells "#*#tells you,#*# GM #*#" 
#event GMInTells "#*#tells you,#*# Guide #*#" 
#event GMInTells "#*#tells you,#*# Senior Guide #*#" 
#event GMInTells "#*#tells you,#*# gamemaster #*#" 
#event GMInTells "#*#tells you,#*# Game Master #*#" 
#event GMInTells "#*#tells you,#*# Customer Service #*#" 
#event GMInTells "#*#tells you,#*# CSR #*#" 
#event ExpTracker "#*#experience!#*#" 
#event AA "You have gained an ability point!#*#" 
#event tar "#*#You gain #*#" 
#event Slain "#*#You have slain#*#" 
#event tar "#*#You must first #*#" 
#event tar "You cannot see your target." 
#event invite "<Text that will trigger an invite of the person who sent the tell goes here>"  
#event dzadd "<Text that will trigger a task invite of the person who sent the tell goes here>" 
#event camp "<Insert tell based camp event of your preference>' 
#event Kills "#*#My Progress#*#" 

/echo ==The Bard Kiting Macro== 
/echo                                 '.' 
/echo Coding concepts shamelessly remembered and borrowed from many a great bard macro. 
/echo AFK macroing in a public zone is not advised. Please use this macro with caution in public areas. 
/echo unless of course you want to bring the wrath down from the thing up high. 

/popup ==Ruined City Bard Macro With Player Detection== 

Sub Main 
    |//Don't touch these. 
    /declare Kills int outer 0 
    /declare AA int outer 0 
    /declare AaDPS int outer 
    /declare regensong int outer 0  
    /declare snaresong int outer 0
    /declare dirgesong int outer 1
    /declare resettwist int outer 1
    /declare Exper float outer 
    /declare AAExp float outer 
    /declare LDRExp float outer  
    /varset Exper ${Me.PctExp} 
    /varset AAExp ${Me.PctAAExp} 
    /varset LDRExp ${Me.PctGroupLeaderExp} 
    |=== 
    |//~Alter the Hit Point percentage that will trigger the use of Potions, Regen song, & Evac; below here. 
    /declare RegenHps int outer 90 
    /declare ChugPotion int outer 60 
    /declare EvacHps int outer 1
    |//~Edit the player check radius below here 
    /declare PWRadius int outer 300 
    |=== 
    |//~Alter the ${Zone.ID} for the zone you are kiting in below here. 
    /declare KiteZoneID int outer 336 
    |//~Alter the zone you're bound in below here.    
    /if (${Zone.ID}==344) /call Died 
    /if (${Zone.ID}==${KiteZoneID}) /call KiteZone 
    
    :MainLoop 
    /if (${Zone.ID}==${KiteZoneID}) { 
	/if (${Zone.ID}==344) /call Died 
        /doevents 
        /call GMcheck  
        /call CheckHP 
        /delay 1s
        /call AaDPS 
        /doevents
        /call Tar 
        |/call Dirgesong
        /call Snare
        /doevents
        /if (${Me.CurrentMana}>=1800) /varset dirgesong 1
        /call SetTwist
    } 
    /doevent 
    /goto :MainLoop 
/return 

 Sub SetTwist 
	/if (${resettwist}==1) {
		/if (${snaresong}==0 && ${regensong}==0 ) {
			/twist 2 3 4 5 6 7
			/varset resettwist 0			
	 }
		/if (${snaresong}==0 && ${regensong}==1 ) {
			/twist 1 2 3 4 1 5 6 7
			/varset resettwist 0			
	 }
		/if (${snaresong}==1 && ${regensong}==0 ) {
			/twist 8 2 3 8 4 5
			/varset resettwist 0			
			/varset snaresong 2
	 }
		/if (${snaresong}==1 && ${regensong}==1 ) {
			/twist 8 2 1 8 3 5 8 1 6
			/varset resettwist 0
			/varset snaresong 2			
	 }
	}
/return

Sub GMcheck  
    /if (${Spawn[gm].ID}) {  
    /echo Gm detected  
    /beep 
    /beep 
    /beep  
    /q 
    /endmac  
    }  
/return 

Sub Event_GMInTells 
    /twist off 
    /delay 1s 
    /alt act 212 
    /delay 2s 
    /q 
/return 

Sub Devoted 
    /if (${Me.AltAbilityReady["481"]}==TRUE) { 
        /twist 6 
        /delay 5s 
        /twist end 
        /delay 1s 
        /alt act 481 
        /delay 7s 
        /varset resettwist 1
    } 
/return 

Sub AaDPS 
    /if (${Me.AltAbilityReady[Boastful Bellow]}) /aa act Boastful Bellow
    /if (${Me.AltAbilityReady[Cacophony]}) /aa act Cacophony
/return 

sub Dirgesong
    /if (!${Target.ID} && ${dirgesong}==0) /return
    /if (${Me.CurrentMana}>=1800 && ${dirgesong}==1) {
        /squelch /twist 9
        /delay 4S
        /if (${Me.CurrentMana}<1700) {
            /varset dirgesong 0
            /varset resettwist 1
    	}
    }
/return

sub Died 
    /delay 600s
    /twist end 
    /delay 1s 
    /keypress down 
    /delay 1s 
    /sit 
    /delay 1s 
    /camp desk 
    /q
    /exit
/return 

Sub CheckHP 
	/if (${Me.PctHPs}<=${RegenHps} && ${Me.PctHPs}>=${EvacHps} && ${regensong}==0 && ${Zone.ID}==${KiteZoneID}) { 
		|/twist 1 2 3 4 1 5 6 7
		/varset regensong 1 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	} 
	/if (${Me.PctHPs}>${RegenHps} && ${regensong}==1 && ${Zone.ID}==${KiteZoneID}) { 
		|/twist 2 3 4 5 6 7
		/varset regensong 0 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	} 
	/if (${Me.PctHPs}<=${ChugPotion} && ${Zone.ID}==${KiteZoneID}) { 
		/potionbelt activate 2 
		|/twist 2 3 4 5 6 7
		/varset regensong 0 
		/varset resettwist 1
		/if (${snaresong}>=1) /varset snaresong 1
	}
/return 
    
Sub Tar 
	/if (${Target.ID}==FALSE) /tar NPC radius 200
	/if (${Target.Type.Equal[corpse]}) /tar npc next 
	/if (${Target.Distance}>=300) /tar npc next
	/if (${Target.Type.Equal[Discord Fluctuation]}) /tar npc next
	/if (${Target.PctHPs}>80 && ${snaresong}>=1 ) {
	/varset snaresong 0
	/varset resettwist 1
}
/return 


Sub event_Slain
    /varset snaresong 0
    /varset resettwist 1
/return


 Sub Snare 
	/if (${Target.PctHPs}<=20) {
		/if (${snaresong}<=1) /varset snaresong 1
		/varset resettwist 1
}
/return

Sub event_dzaddPerson 
    /dzadd 
/return 

Sub event_invite  
    /invite 
/return 

Sub event_camp 
    /twist end
    /delay 30s
    /alt act 212 
    |/warp succor 
    /circle off 
    /camp desktop 
    /endmac 
/return 


Sub KiteZone 
    /if (${Zone.ID}==${KiteZoneID}) { 
        /band activate percussion 
        /call moveto 2275 340 
        /face fast heading 320
        /circle on 90 
        /keypress forward hold 
        /call SafetyCheck
        /delay 1s
        /call Tar
        /twist 2 3 4 5 6 7
    } 
/return 
    
Sub SafetyCheck 
    /if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) { 
        /if (${Me.Moving}) { 
            /twist end
            /delay 25s
            /keypress FORWARD 
            /keypress BACK 
            /alt act 212 
            |/warp loc -2000, -1555, -172.13 
        } 
    /beep 
    /beep 
    /beep 
    /echo [${Time.Time24}] !!! Alert !!! 
    /popup [${Time.Time24}] !!! Alert !!! 
    /echo [${Time.Time24}] Another Player is near by, the Macro has been paused... 
    /popup [${Time.Time24}] Another Player is near by, the Macro has been paused... 
    /if (!${Me.AFK}) /afk 
    /twist 9
    /alt act 212
    :loop 
    /delay 10s (!${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) 
    /if (${SpawnCount[pc radius ${PWRadius} notid ${Me.ID}]}) /goto :loop 
    /echo [${Time.Time24}] Macro resumed... 
    /popup [${Time.Time24}] Macro resumed... 
    /call KiteZone 
    } 
/return 

Sub event_ExpTracker 
    /varset AAExp ${Math.Calc[${Me.PctAAExp}-${AAExp}]} 
    /varset Exper ${Math.Calc[${Me.PctExp}-${Exper}]} 
    /varset LDRExp ${Math.Calc[${Me.PctGroupLeaderExp}-${LDRExp}]} 
    /echo EXP: ${Exper} (${Me.PctExp}%) - AA: ${AAExp} (${Me.PctAAExp}%) : ${Time.Time12} : 
    /varset Exper ${Me.PctExp} 
    /varset AAExp ${Me.PctAAExp} 
    /varset LDRExp ${Me.PctGroupLeaderExp} 
    /varcalc Kills (${Kills}+1) 
/return 

Sub event_AA 
    /echo ${Time.Time12} 
    /varcalc AA (${AA}+1) 
/return 

Sub event_Kills              
    /echo ===================================== 
    /echo ======= Kill Count - ${Kills} ======= 
    /echo ========= AA Earned - ${AA} ========= 
    /echo ======= Time - ${Time.Time12} ======= 
    /echo ===================================== 
/return

oc-utilities.inc
HTML:
#define DEBUG false
#define CAST_LAG 30

Sub CheckSwapCastWaitSwap(string itemName, string slot, int delay, swapItem)
    /if (!${Me.Buff[${FindItem[${itemName}].Spell}].ID}) {
        /call SwapCastWait "${itemName}" ${slot} ${delay}
	    /squelch /exchange "${swapItem}" ${slot}    
    }   
/return

Sub CheckSwapCastWait(string itemName, string slot, int delay)
    /if (!${Me.Buff[${FindItem[${itemName}].Spell}].ID}) {
        /call SwapCastWait "${itemName}" ${slot} ${delay}
    }
/return

Sub SwapCastWait(string itemName, string slot, int delay)
	/squelch /exchange "${itemName}" ${slot}	
    /call CastWait "${itemName}" ${slot}
/return

Sub SwapCast(string itemName, string slot)
	/squelch /exchange "${itemName}" ${slot}
	/cast item "${itemName}"
/return

Sub CheckCastWait(string itemName, int delay)
    /if (!${Me.Buff[${FindItem[${itemName}].Spell}].ID}) {
        /call CastWait "${itemName}" ${delay}
    }
/return

Sub CastWait(string itemName, int delay)
    /declare tmp int local 0
    /varcalc tmp ${delay} + CAST_LAG
    
    /cast item "${itemName}"
    /delay ${tmp} ${Me.Buff[${FindItem[${itemName}].Spell}].ID}
/return

Sub CastSongWait(string songName, int delay)
    /declare tmp int local 0
    /varcalc tmp ${delay} + CAST_LAG
        
    /cast "${songName}"
    /delay CAST_LAG ${Me.Casting.ID} == ${Spell[${songName}].ID}
    /delay ${tmp} ${Me.Casting.ID} != ${Spell[${songName}].ID}
/return

Sub StopTwistWait
    /squelch /twist off
    
    :Loop
    	/if (${Me.Casting.ID} || !${Me.SpellReady[1]}) {
    		/delay 1
    		/goto :Loop
    	}
/return

Sub MoveTo(int yLoc, int xLoc)
	/squelch /moveto loc ${yLoc} ${xLoc}
	
    :MoveToLoop
        /delay 1
    /if (${MoveTo.Moving}) /goto :MoveToLoop
    
    /squelch /moveto off
/return

Gl and thx for the help all.
 
Bard Macro Help

Users who are viewing this thread

Back
Top