markdwags / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
https://www.razorce.com
GNU General Public License v3.0
139 stars 96 forks source link

[FEATURE] ClassicUO Linux: 'Target Closest Mobile' ignores invulnerable mobiles #189

Closed mythril closed 1 year ago

mythril commented 2 years ago

Summary I was running this script on a Ruins And Riches setup:

while not dead
    hotkey 'Target Closest Mobile'
    hotkey 'Last Target'
    menu 'last' 1
    pause 1000
endwhile

And I noticed that it never works on invulnerable mobiles, even when they have the menu index in question.

Steps to reproduce

  1. Open Razor & Client for Ruins & Riches
  2. Login
  3. Run above script to initiate "Talk" option on nearby mobiles
  4. Notice it never selects an invulnerable as the closest mobile (it always chooses the nearest non-invul mobile).

Expected Results Invulnerable mobiles are still counted as mobiles.

What actually happened Invulnerable mobiles are ignored.

markdwags commented 2 years ago

This isn't a bug, this is by design and has been this way in Razor at least a decade. Sounds like in your case, you'd like a feature that doesn't exclude blessed (invulnerable) mobiles from the targeting system.

mythril commented 2 years ago

Maybe it could be addressed with a new script command / expression that is in a format like:

mobile (closest/random/next/previous) (status) (criminal/enemy/friendly/gray/innocent/murderer/non-friendly/combatant/monster/humanoid/blessed) as varname

mobiletype (GraphicID) (hue) (closest/random/next/previous) (status) (criminal/enemy/friendly/gray/innocent/murderer/non-friendly/combatant/blessed) as varname

Are there build instructions for this project, I'd like to see what I can contribute, but I run on Linux.

mythril commented 2 years ago

I just realized I didn't read the docs for target so maybe this is already handled well.

mythril commented 2 years ago

I just tried it, there is no option that encompasses the blessed mobiles afaict.

markdwags commented 2 years ago

Right, it isn't a feature currently. It would need to be added, to allow you to bypass the blessed check. :)