Moderator: MacroQuest Developers
I'm brand new to scripting. I believe I've followed the codes flow and wound up here where it is deciding if a mob is dead or not. I dont think its parsing for a text string like "mob has been slain by x" but I'm not sure.Sub CombatSub
/echo Attacking Mob NOW!
/varset RV_Fighting 1
/varset RV_TargetDead 0
:CombatLoop
/doevents
/attack on
/call MoveToMob
/call SpecialIT
/if (!${Target.ID}) {
/attack off
/keypress forward
/keypress back
/varset RV_TargetDead 1
/varset RV_Fighting 0
/delay 1s
/target radius 30 corpse
/delay 1s
/if (!${Target.ID}) {
/call ResetSub
/return
}
/face fast
}
/if (!${RV_TargetDead}) {
/goto :CombatLoop
}
/return




Code: Select all
Sub CombatSub
/echo Attacking Mob NOW!
/varset RV_Fighting 1
/varset RV_TargetDead 0
/varset TempTarget ${Target.Name}
:CombatLoop
/doevents
/attack on
/call MoveToMob
/call SpecialIT
/if (${Target.Name.NotEqual[${TempTarget}]}) {
/attack off
/keypress forward
/keypress back
/varset RV_TargetDead 1
/varset RV_Fighting 0
/delay 1s
/target radius 30 corpse
/delay 1s
/if (!${Target.ID}) {
/call ResetSub
/return
}
/face fast
}
/if (!${RV_TargetDead}) {
/goto :CombatLoop
}
/returnCode: Select all