Skip to content

[FEATURE] Smart Targeting Compatibility for Scripts #53

@ncskrypt

Description

@ncskrypt

Scripts currently lack integration with Razor's Smart Targeting system.
Several enhancements would allow scripts to work with the entire system.

Add All last Aliases

  • All aliases below should be accessible in scripts.
  • Aliases should update automatically whenever they change (via manually targeting/attacking, hotkeys, or if set elsewhere in scripts/macros).
last        // last any targeted         exists already
lastbenefit // last benefit              CURRENTLY INACCESSIBLE
lastharmful // last harmful              CURRENTLY INACCESSIBLE
lastcombat  // last combatant/aggressor  CURRENTLY INACCESSIBLE
lastobject  // last object used/dclick   exists already
lastitem    // last item targeted        NEW ALIAS
lasttile    // last tile targeted        NEW ALIAS

Add set unset for last Aliases

  • Set any last aliases to a specific [serial/var]
  • Prompts if [serial/var] omitted
  • Unset to clear
  • last | lastbenefit | lastharmful | lastcombat | lastobject | lastitem | lasttile
set   (...) [serial/var]
unset (...)

Add Smart Handling for target command

  • Normal Handling applies for [serials/vars] by default.
  • Smart Handling applies for all last & self aliases (if enabled).
  • Smart Handling applies Range check Last Target (if enabled).
  • Smart Handling applies Queue LastTarget and TargetSelf (if enabled).
  • target last should behave same as hotkey 'Last Target'.
  • target last directs cursors Benefit to lastbenefit, Harmful to lastharmful, Neutral to lastitem or lasttile.
  • Neutral cursors are overwhelming intended for items or tiles, thus lastitem | lasttile are new aliases added to solve the issue that last can potentially be anything.
// NORMAL HANDLING
target (serial/var)      // No Smart/Range/Queue

// SMART HANDLING
target last              // Goes to lastbeneficial, lastharmful, last (neutral)
target lastbeneficial    // Only Benefit Cursors (Else Skip)
target lastharmful       // Only Harmful Cursors (Else Skip)
target lastcombatant     // Only Harmful Cursors (Else Skip)
target lasttile          // Only Neutral Cursors (Else Skip)
target lastitem          // Only Neutral Cursors (Else Skip)
target lastobject        // Only Neutral Cursors (Else Skip)
target self              // Only Benefit Cursors (Else Skip)

Add Special Range Handling for target ... [range]

  • Special Handling applies if [range] parameter is specified whenever Smart Handling is in effect.
  • User's Range Check ## tiles setting should be overridden using [range] tiles for that specific target.
  • User's Queue Target setting should also apply using [range] tiles for that specific target.
  • Ex) Tossing Explo Pot (which is limited to 10 tiles)
// User's Range Check is 12 tiles with Target Queue On.
dclicktype 'explosion pot'
target last ground any any 10
// - Queued to lastharmful
// -- Tosses if lastharmful comes within 10 tiles.
// --- Otherwise blows up in hand.

Add Smart/Queue/Range Overrides for target command

  • Force enables Smart, Queue, or Range Check on [serials/vars] or if setting disabled.
  • Force enables Cursor Types on [serials/vars] or permit additional Cursors whenever Smart Handling is in effect.
  • Overrides can be combined if desired.
  • $ Enables Smart Handling.
  • ! Enables Queue Target.
  • # Enables Range Check.
  • [BHN] Permits specific Cursors Checks.
target$     (...) // Force Smart Handling
target!     (...) // Force Queue Target
target#     (...) // Force Range Check
target[B]   (...) // Permit Benefit Cursors
target[H]   (...) // Permit Harmful Cursors
target[N]   (...) // Permit Neutral Cursors
target[BHN] (...) // Permit All Cursors

set lastbeneficial 'PET1'
cast 'Magic Arrow'
target$[H] lastbeneficial // Force Smart & Permit Harmful

cast 'Telekinesis' 
target#[N] 'MyFrontDoor' ground any any 8 // Force Range & Permit Neutral

@target$!#[BHN] (...) [src] [hue] [qty] [range] // Quiet Mode + All Overrides

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions