Jump to content

Looking for a way to trigger ship repair through console/macro


jacklul

Recommended Posts

I thought something like this would work but it doesn't:

if player.GetSpaceShip.GetItemCount 3fb19 > 0 ; player.GetSpaceShip.EquipItem 3fb19 ; else ; print "No repair item found!" ; endif

I don't think there is a way to grab a ref to ship in one-liner fashion?

Even if I go past that I have no idea how to "use" Ship Parts when ref'ed as the ship, equipitem doesn't seem to work.

Link to comment
Share on other sites

I am trying to have one button use best available healing item while on foot and repair the ship when in space, I have the healing part fully done.

[Macros]
HealBest=if Player.GetItemCount 2A9DE8 > 0 ; Player.EquipItem 2A9DE8 ; else ; if Player.GetItemCount 29A847 > 0 ; Player.EquipItem 29A847 ; else ; if Player.GetItemCount ABF9 > 0 ; Player.EquipItem ABF9 ; else ; print "No healing item found!" ; endif ; endif ; endif
HealPlayer=if Player.GetAV Health < Player.GetBaseAV Health ; HealBest ; else ; print "Already fully healed!" ; endif

RepairBest=if Player.GetSpaceShip.GetItemCount 3fb19 > 0 ; Player.GetSpaceShip.EquipItem 3fb19 ; else ; print "No repair item found!" ; endif
RepairShip=if Player.GetSpaceShip.GetAV Health < Player.GetSpaceShip.GetBaseAV Health ; RepairBest ; else ; print "Already fully repaired!" ; endif

[Hotkeys]
T=if Player.IsInSpaceship == 0 ; HealPlayer ; else ; RepairShip ; endif

There is a small flaw in Player.GetAV Health < Player.GetBaseAV Health as it doesn't account for buffs and modifiers but it will usually be close to full HP anyway so no point in healing.

Edited by jacklul
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...