Jump to content

mod resource tranfer armor to a container without modify hp


betto212

Recommended Posts

ScN test

 

 

int counter

ref rCurrentItem

int iIndex

int itemselected

float armorhp

float equipedhealth

float basehealth

 

Begin GameMode

if (Player.GetinCell MegatonPlayerHouse == 1)

if itemselected == 0

label 10

set iIndex to player.GetNumItems - 1

Label 20

set rCurrentItem to player.GetInventoryObject iIndex

endif

 

if rCurrentItem

; Do stuff

if rCurrentItem == ArmorCombat

player.equipitem rCurrentItem 0 0

 

set equipedhealth to 0

set equipedhealth to player.GetEquippedCurrentHealth 2

 

set counter to counter + 1

if equipedhealth > 0 || counter > 1

set basehealth to GetHealth rCurrentItem

showmessage worked , iIndex , basehealth

set armorhp to equipedhealth / basehealth

MEGATONcontainerREF.Additemhealthpercent rCurrentItem 1 armorhp

player.removeitem rCurrentItem 1

set itemselected to 0

set counter to 0

goto 10

else

set itemSelected to 1

endif

 

endif

 

else

set iIndex to iIndex - 1

Goto 20

endif

 

 

endif

 

END

Edited by betto212
Link to comment
Share on other sites

  • Recently Browsing   0 members

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