Jump to content
  • 0

script that reads player status effect


jamesandrew

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.07
  • Content Count:  59
  • Reputation:   3
  • Joined:  06/21/23
  • Last Seen:  

How to make an item script for this?

If the user is poisoned, reduce physical damage by 20%
 

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

The best solution I came up with would be to use autobonus2, it will add a script that will execute every time the player using the item is attacked, run a check if he is poisoned and if he is, it will apply a physical damage reduction by 20% for 10 seconds.

I didn't test it, but it should look similar to this:

autobonus2("{ if(checkoption2(1)) bonus bNoWeaponDamage, 20; }", 1000, 10000, BF_WEAPON|BF_MAGIC|BF_MISC);

 

Edited by Winterfox
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.07
  • Content Count:  59
  • Reputation:   3
  • Joined:  06/21/23
  • Last Seen:  

11 hours ago, Winterfox said:

The best solution I came up with would be to use autobonus2, it will add a script that will execute every time the player using the item is attacked, run a check if he is poisoned and if he is, it will apply a physical damage reduction by 20% for 10 seconds.

I didn't test it, but it should look similar to this:

autobonus2("{ if(checkoption2(1)) bonus bNoWeaponDamage, 20; }", 1000, 10000, BF_WEAPON|BF_MAGIC|BF_MISC);

 

Thanks for the answer. I tested it and It's working just like what you described.

But the damage reduction only triggered after the user gets attacked a few times even though he already poisoned at first place.

Any others solution?

 

Edited by jamesandrew
Link to comment
Share on other sites

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.

×
×
  • Create New...