Skip to content

Commit

Permalink
- Added more handler for "cannot see target" to try backing up if you…
Browse files Browse the repository at this point in the history
… are super close to the mob.
  • Loading branch information
DerpleMQ2 committed Mar 8, 2024
1 parent 7fb5324 commit 1f9df03
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion extras/version.lua
Original file line number Diff line number Diff line change
@@ -1 +1 @@
return { commitId = 'f6fe65b 2024-03-08' }
return { commitId = '7fb5324 2024-03-08' }
11 changes: 8 additions & 3 deletions utils/rgmercs_events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,14 @@ mq.event("CantSee", "You cannot see your target.", function()
if RGMercUtils.GetSetting('DoAutoEngage') then
if RGMercUtils.OkToEngage(mq.TLO.Target.ID() or 0) then
RGMercUtils.DoCmd("/squelch /face fast")
RGMercsLogger.log_debug("Can't See target (%s [%d]). Naving to %d away.", mq.TLO.Target.CleanName() or "", mq.TLO.Target.ID() or 0,
(mq.TLO.Target.MaxRangeTo() or 0) * 0.9)
RGMercUtils.NavInCombat(mq.TLO.Target.ID(), (mq.TLO.Target.MaxRangeTo() or 0) * 0.9, false)
if RGMercUtils.GetTargetDistance() < 15 then
RGMercsLogger.log_debug("Can't See target (%s [%d]). Moving back 15.", mq.TLO.Target.CleanName() or "", mq.TLO.Target.ID() or 0)
RGMercUtils.DoCmd("/stick 15 moveback")
else
RGMercsLogger.log_debug("Can't See target (%s [%d]). Naving to %d away.", mq.TLO.Target.CleanName() or "", mq.TLO.Target.ID() or 0,
(mq.TLO.Target.MaxRangeTo() or 0) * 0.9)
RGMercUtils.NavInCombat(mq.TLO.Target.ID(), (mq.TLO.Target.MaxRangeTo() or 0) * 0.9, false)
end
end
end
end
Expand Down

0 comments on commit 1f9df03

Please sign in to comment.