Page 1 of 1

monk attack macro

Posted: Fri May 17, 2013 10:53 pm
by Goaty
Hi everyone, I have a macro here that was created by a friend of mine to be originally used with a rogue. However, my friend has quit playing and I have no way to contact him. I have attempted to modify the macro to work with a monk with some success. Sadly, I can't get the flying kick ability or the drunken monkey style disc to work. Any help getting it in working order would be awesome.

Code: Select all

#turbo

Sub Main

	/declare timeStart int outer
	/declare timeEnd int outer
	/declare timeElapsed int outer

	/declare myDmg int outer
	/declare nonDmg int outer
	/declare fltExp float outer
	/varset fltExp ${Me.PctExp}

	/echo Attacking ${Target.Name}, a ${Target.Level} ${Target.Class}

	/call MoveTo

	/call DoDrunk

	/varset timeStart ${Time.SecondsSinceMidnight}

	/if (${Me.AbilityReady[kick]}) /doability kick

	/doability "fists of wu"

	/attack on

	:Loop

		/doevents

|		/if (${Me.PctHPs}<30) /vtest 007

		/face fast
		/call DoBS
|		/if (${Me.AbilityReady[Intimidation]}) /doability Intimidation
|		/if (${Me.AbilityReady[Disarm]}) /doability Disarm
		/if (${Me.PctHPs}<30) /call SaveMyself
		/delay 2
		/call StayClose

	/if (${Target.ID}) /goto :Loop

|	/call AcquireNewTarget
	
	/attack off

	/varset timeEnd ${Time.SecondsSinceMidnight}
	/varset timeElapsed ${Math.Calc[${timeEnd} - ${timeStart}]}
|	/call LootHide

	/disc Fists of Wu
	/declare TotalDamage int inner
	/varset TotalDamage ${Math.Calc[${nonDmg} + ${myDmg}]}

	/echo Duration: ${timeElapsed} seconds.
	/echo Standard Damage: ${myDmg}
	/echo Non-melee Damage: ${nonDmg}
	/echo Total Damage: ${TotalDamage}
	/echo Damage Per Second: ${Math.Calc[${TotalDamage} / ${timeElapsed}]}
	/echo Exp: ${Me.PctExp}% of level. (+${Math.Calc[${Me.PctExp}-${fltExp}]}%)


/return

Sub AcquireNewTarget

	:FindTarget
	/squelch /target npc radius 30 next
	/if (${Target.ID}) {
		/if (${Target.DistanceZ}<15) {
			/attack on
			/goto :Loop
		} else {
			/goto :FindTarget
		}
	} else {
		/goto :FindTarget
	}

/return

Sub SaveMyself

		/attack off
		/doability mend
		/target clear
		/keypress down hold
		/delay 1
		/aa act Imitate Death
		/delay 2
		/keypress down
		/endmac

/return

Sub Event_Success(string Param1)
	/timed 10 /autoinv
	/echo Stole ${Param1}
/return

Sub FindNextTarget

	:FindTarget
	/squelch /target npc radius 30 next
	/if (${Target.ID}) {
		/if (${Target.DistanceZ}<15) {
			/attack on
			/goto :Loop
		} else {
			/goto :FindTarget
		}
	} else {
		/goto :FindTarget
	}

/return

Sub DoBS
	/if (${Me.AbilityReady[kick]}) {
		|/call MoveTo
		/doability kick
	}
/return

Sub DoDrunk
	/if (${Me.CombatAbilityReady[Drunk]}) {
		/doability Drunk
		/delay 5
	}
/return

Sub Event_MyDamage(string Line, string Mob, int Damage)
	|/echo Hit for ${myDamage}s
	/varset myDmg ${Math.Calc[${myDmg}+${Damage}]}
/return

Sub Event_NonMelDamage(string Line, string Mob, int Damage)
	|/echo Hit for ${myDamage}s
	/varset nonDmg ${Math.Calc[${nonDmg}+${Damage}]}
/return

Sub StayClose

	/declare intRange int inner
	/varcalc intRange ${Math.Calc[${Target.MaxRangeTo}-(${Target.MaxRangeTo}/4)]}

	:MoveToLoop

	/if (${Target.Distance}>${intRange}) /keypress up hold
	/face fast
	/delay 1

	/if (${Target.Distance}>${intRange}) /goto :MoveToLoop

	/keypress up

/return

Sub MoveTo

  :MoveToLoop

	/if (${Target.Distance}>3) /keypress up hold
	/face fast
	/delay 1

	/if (${Target.Distance}>3) /goto :MoveToLoop

	/keypress up

	/face nolook fast Heading ${Target.Heading.DegreesCCW}

	/keypress down hold

	:BackLoop
		/delay 1
	/if (${Target.Distance}<5) /goto :BackLoop
	
	/keypress down

	/delay 1

/return

Re: monk attack macro

Posted: Sat May 18, 2013 7:52 am
by Pax

Code: Select all

Sub DoBS
   /if (${Me.AbilityReady[kick]}) {
      |/call MoveTo
      /doability kick
   }
/return

Sub DoDrunk
   /if (${Me.CombatAbilityReady[Drunk]}) {
      /doability Drunk
      /delay 5
   }
/return
This is where your problem is, kick should be Flying Kick and Drunk should be something else (dont have a monk, so havent looked at the abilities for them)

Re: monk attack macro

Posted: Sat May 18, 2013 11:43 am
by Goaty
Yes, I have kick in there just so that the ability would function. When I put flying kick, flyingkick or Flying Kick in there I am told I don't have that ability. For the disc I have drunk there just so the macro will function as well trying to put in the actual disc name has caused the macro to not stop function.

If someone could tell me how to enter flying kick as an ability and the drunken monkey disc line into the code that'd be great. thanks for the fast replies. :)

Re: monk attack macro

Posted: Sat May 18, 2013 12:32 pm
by Pax

Re: monk attack macro

Posted: Mon May 27, 2013 3:49 pm
by Goaty
So after some forum diving I was able to get flying kick and drunken monkey style to work.

Code: Select all

Sub DoBS
   /if (${Me.AbilityReady["Flying Kick"]}) {
      |/call MoveTo
      /doability "Flying Kick"
   }
/return

Sub DoDrunk
   /if (${Me.CombatAbilityReady["Drunken Monkey Style"]}) {
      /doability "Drunken Monkey Style"
      /delay 5
   }
/return
Now I have hit run into another snag. Would anyone be able to tell me how to insert rank 2 discs and spells into a macro?

Code: Select all

/if (${Me.CombatAbilityReady["Whorl of Fists Rk.II]}) {
/doability "Whorl of Fists Rk.II
Any tips on how to get that working correctly would be awesome.

Re: monk attack macro

Posted: Mon May 27, 2013 3:54 pm
by Maskoi
You have a syntax error lose the " so its just Whorl of Fists Rk.II and not "Whorl of Fists Rk.II

also try /disc Whorl of Fists Rk.II