Jump to content

Give player a buff when near death?


TerraMcCloud

Recommended Posts

Im sure this is doable, but me being a scripting newb, I dont know how to do it.

 

Im thinking of making 2 rings, one that gives a 50% shield effect when the player's health is 20% or lower, and another that fortifies strength by 40 when at 20% health or lower.

 

I'll try to figure it out on my own, but if anyone can assist that would be nice.

Link to comment
Share on other sites

Sorry if this doesn't work, I'm on my phone right now and just saw this question unanswered for 2 days...

 

 

float var1

float var2

ref target

 

begin scripteffectstart

set target to getself

set var1 to target.getactorvalue health

set var2 to target.getbaseactorvalue health

if var1/var2>=0.5

target.addspell spellref

endif

end

Link to comment
Share on other sites

sth quick not testede (pretty the same with the above)

 

 

ScriptName yourquestscript

short healthPL

begin gamemode

set HealthPL to (player.GetAV Health / player.GetBaseAV Health * 100)

if HealthPL <= 20 && player.isequiped yourring == 0

player.additem yourring 1

player.additem yourring2 1

player.equipitem yourring

player.equipitem yourring2

 

 

 

elseif (HealthPL > 40 && player.isequiped yourring ==1)

 

player.removeitem yourring 1

player.removeitem yourring2 1

endif

end

 

 

You have to attach this to a quest

 

you can put a condition like

if player.isincombat ; or and

if player.isweaponout

maybe a timer

set Timer to Timer + getSecondsPassed

Edited by kastano
Link to comment
Share on other sites

  • Recently Browsing   0 members

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