Jump to content
  • 0

Item bonus with current HP condition


Question

Posted (edited)

Hello, I am trying to figure out if it's possible to make an item grant a bonus depending on current HP. I would like an armor item to grant 20% damage to all classes when the character is below 50%. 

 

I tried if(Hp < MaxHp / 100 * 50) { ... } but it did not work. Is this kind of condition even possible or would it require the player to equip the item when below 50%?

Edited by Roku

2 answers to this question

Recommended Posts

  • 0
Posted (edited)

 if(Hp < MaxHp / 100 * 50) { ... } is working, my bad. It just takes a few seconds when the char has crossed the threshold for the client to realize.

 

Can be closed.

Edited by Roku

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

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