bob_the_builder
Well-Known Member
This is what I am trying to use. Problem is it loops once through each action then never goes past Action 1
And then my combat:
Seems to go through each action once then gets stuck in action 1
Bob
Code:
function Combat_Init()
{
Action[1]:Set[Nuke2]
SpellRange[1,1]:Set[61]
Action[2]:Set[Nuke1]
SpellRange[2,1]:Set[60]
Action[3]:Set[Melee_Attack1]
SpellRange[3,1]:Set[151]
Action[4]:Set[Melee_Attack2]
SpellRange[4,1]:Set[152]
}
Code:
function Combat_Routine(int xAction)
{
AutoFollowingMA:Set[FALSE]
if ${Me.ToActor.WhoFollowing(exists)}
{
EQ2Execute /stopfollow
}
switch ${Action[${xAction}]}
{
case Nuke1
if ${Me.Ability[${SpellType[${SpellRange[${xAction},1]}]}].IsReady}
{
call CastSpellRange ${SpellRange[${xAction},1]} 0 0 0 ${KillTarget}
eq2echo Nuke1 Action ${xAction}
}
break
case Nuke2
if ${Me.Ability[${SpellType[${SpellRange[${xAction},1]}]}].IsReady}
{
call CastSpellRange ${SpellRange[${xAction},1]} 0 0 0 ${KillTarget}
eq2echo Nuke2 Action ${xAction}
}
break
case Melee_Attack1
if ${Me.Ability[${SpellType[${SpellRange[${xAction},1]}]}].IsReady}
{
call CastSpellRange ${SpellRange[${xAction},1]} 0 1 0 ${KillTarget}
eq2echo Melee_Attack1 Action ${xAction}
}
break
case Melee_Attack2
if ${Me.Ability[${SpellType[${SpellRange[${xAction},1]}]}].IsReady}
{
call CastSpellRange ${SpellRange[${xAction},1]} 0 1 0 ${KillTarget}
eq2echo Melee_Attack2 Action ${xAction}
}
break
Default
xAction:Set[4]
break
}
}
Bob