UOOutlands / Razor

Razor is a free tool designed to help with simple tasks while playing Ultima Online.
http://www.uor-razor.com
GNU General Public License v3.0
9 stars 6 forks source link

Fixed razor "lost/blocked target cursor" bug with script targeting #91

Open Tranq1 opened 2 years ago

Tranq1 commented 2 years ago

Fixed bug where previous natural target would be lost if a script first executed the Set Last Target hotkey and use the target <serial> script command

To reproduce the bug:

  1. Cast a spell
  2. Add a variable "mytarget" to the script variables and set it to anything in sight, close and not yourself
  3. When the target cursor is up, execute the script.
  4. The last target hotkey is executed, but your previous target is gone.

Note: If you remove the second line and target the hotkey manually, your previous spell target will return Note: If you cancel the "Set Last Target" hotkey by pressing ESC, the previous spell target will also return Note: This situation happens every time you target an intercepted target via the target command, not just with the Set Last Target hotkey

The script:

hotkey "Set Last Target"
target mytarget

What this fix does

With this fix, the target will also be returned after executing a target by the script, thus making it consistent with manually targeting the intercepted targets or canceling the intercepted target with ESC

Tranq1 commented 2 years ago

Apparently there's still some cases where the fix doesn't work, I'll look into it again

Tranq1 commented 2 years ago

Fixed second instance of the bug appearing when having a non-intercept target cursor up (for example a spell), then using the Set Last Target followed by the Last Hotkey hotkey. Now the previous target gets regenerated.

anethus commented 2 years ago

Merged to Client 11/22.2021 by Jaedan