• 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 --->

Question on if statements (1 Viewer)

Veyron

New member
Joined
Oct 30, 2006
RedCents
I have a question regarding if statements. I just want my monk to preform 1 of the following 6 moves until the skill is maxxed then move on to the next skill. Do I Need the else /if statement or just use an Else statement to get this to work properly? Or am i over complicating this and there's an easier way to facilitate this w/o chaning my macro Each time I max a skill? Thanks in advance.

Rich (BB code):
/if (${Me.AbilityReady["Round Kick"]} && (${Me.Skill["Round Kick"]}<${Skill["Round Kick"].SkillCap}))  {
	/doability "Round Kick"
}

 else /if(${Me.AbilityReady["Dragon Punch"]} && (${Me.Skill["Dragon Punch"]}<${Skill["Dragon Punch"].SkillCap}))  {
	/doability "Dragon Punch"
}

 else /if(${Me.AbilityReady["Eagle Strike"]} && (${Me.Skill["Eagle Strike"]}<${Skill["Eagle Strike"].SkillCap})) {
	/doability "Eagle Strike"
}

 else /if(${Me.AbilityReady["Tiger Claw"]} && (${Me.Skill["Tiger Claw"]}<${Skill["Tiger Claw"].SkillCap})) {
	/doability "Tiger Claw"
}

 else /if(${Me.AbilityReady["Flying Kick"]} && (${Me.Skill["Flying Kick"]}<${Skill["Flying Kick"].SkillCap})) {
	/doability "Flying Kick"
}

 else /if(${Me.AbilityReady["Kick"]} && (${Me.Skill["Kick"]}<${Skill["Kick"].SkillCap})) {
	/doability "Kick"
}
 
personally i'd take out the else and just leave them all as if statements, might not work on just 1 skill at a time, but they will all eventually get up there as the one thats maxed won't fire anymore.
 
I am working on a combat skill macro that will do almost exactly what you are describing, it's not quiet ready for posting yet but i'll go ahead and place the code here for you to look at:

Rich (BB code):
|
|
|CombatSkills.mac by Hoosierbilly  
| 29 July 2007
|
|
|Purpose: To automatically use basic combat skills, ie: Kick, taunt...
|	Will attack the mob when it is within close range, use basic conbat skills,
|	use mend ability if health falls below 60% (if availible),
|	use feign death ability if health falls below 20% and availible.
|
|	Warriors will use the provoke discipline one time when engaging mob.
|
|	The macro will warn you and end if health falls below 20%
|
|	It will also follow the mob when it tries to run away due to low health
|
|Secondary purpose: Will check and train any monk skills that are not maxed.
|
|
|Useage: Pull target to camp and activate macro when ready to attack.
|
|
|Recommendation: Create a social with the command < /mac combatskills.mac >
|	Make the social a hotbutton to use when ready to attack.
|           I would also make a hotbutton to /end the macro.
|
|Note: The combat abilities must be selected on your abilities "ctrl A" or combat "ctrl C" page for this to work.
|
|
|


Sub Main

	/echo Combat Skills macro is active.
	/if (!${Target.ID}) /call endmacro
	/if (${Target.ID}==${Me.ID}) /call endmacro
	/if (${Target.Distance}>50) /call wait

	/if (!${Me.Moving}) {
		/if (${Target.Distance}>15) /call MoveToTarget
		/if (${Target.Distance}<5) /call MoveBack
	}

	/if (${Me.Class.ID}==1) {
		/if (${Me.Level}>62) /disc incite
		/if (${Me.Level}>51) /disc bellow
		/if (${Me.Level}>19) /disc provoke
		/if (${Me.AbilityReady[taunt]}) /doability taunt
	}

	/if (${Target.ID}) /face nolook
	/attack on

:Loop

	/if (${Me.Class.ID}==7) /call Monk

| Monks should enter their perfered combat ability on the next line
	/if (${Me.AbilityReady[Dragon Punch]}) /doability "Dragon Punch"

	/if (${Me.AbilityReady[taunt]}) /doability taunt
	/delay 1
	/if (${Me.AbilityReady[Kick]}) /doability Kick
	/delay 1
	/if (${Me.AbilityReady[Bash]}) /doability Bash
	/delay 1
	/if (${Me.AbilityReady[Backstab]}) /doability Backstab
	/delay 1
	/if (${Me.AbilityReady[Disarm]}) /doability Disarm
	/delay 1

	/if (${Me.PctHPs}<=20) {
		/echo You are near dead - TAKE ACTION NOW!
		/popup You are near dead - TAKE ACTION NOW!
	}

	/if (${Target.Distance}>50) /call wait

	/if (!${Me.Moving}) {
		/if (${Target.ID}) /face nolook
		/if (${Target.Distance}>15) /call MoveToTarget
		/if (${Target.Distance}<5) /call MoveBack
	} else {
		/call wait
	}

/goto :Loop
/return
/endmacro


Sub Monk

	/if (${Me.PctHPs}<=60) /doability Mend
	/if (${Me.PctHPs}<=20) {
		/doability "Feign Death"
		/Popup You have Feign Dead due to low health...
		/endmacro
	}

	/if (${Me.Skill[Mend]}<${Skill[Mend].SkillCap}) {
	/doability Mend
	}

	/if (${Me.Skill[Flying Kick]}<${Skill[Flying Kick].SkillCap}) {
	/doability "Flying Kick"
	/return
	}

	/if (${Me.Skill[Dragon Punch]}<${Skill[Dragon Punch].SkillCap}) {
	/doability "Dragon Punch"
	/return
	}

	/if (${Me.Skill[Eagle Strike]}<${Skill[Eagle Strike].SkillCap}) {
	/doability "Eagle Strike"
	/return
	}

	/if (${Me.Skill[Tiger Claw]}<${Skill[Tiger Claw].SkillCap}) {
	/doability "Tigar Claw"
	/return
	}

	/if (${Me.Skill[Round Kick]}<${Skill[Round Kick].SkillCap}) {
	/doability "Round Kick"
	/return
	}

/return


Sub wait

:wait
	/if (${Target.Distance}>50) {
	/if (!${Target.ID}) /call endmacro
	/if (${Target.ID}==${Me.ID}) /call endmacro
	/delay 5
	/goto :wait
	}
/return

Sub MoveToTarget

:KeepMoving 
	/if (!${Target.ID}) /Call Endmacro
	/if (${Target.ID}) /face nolook
	/delay 1 
	/keypress forward hold 
	/if (${Target.Distance}>15) /goto :KeepMoving 
|Stop Moving 
	/keypress forward 
	/return 

Sub MoveBack

:Backup
	/if (!${Target.ID}) /Call Endmacro
	/if (${Target.ID}) /face nolook
	/keypress back hold
	/delay 1
	/if (${Target.Distance}<5) /goto :backup
|Stop Moving
	/keypress back
	/return

Sub endmacro

	/echo You have an invalid target - Macro ending
	/if (${Me.Combat}) /attack off
	/squelch /endmacro
 
Last edited:
Question on if statements

Users who are viewing this thread

Back
Top