jamesandrew Posted August 25, 2023 Posted August 25, 2023 How to make an item script for this? If the user is poisoned, reduce physical damage by 20% Quote
0 Winterfox Posted August 25, 2023 Posted August 25, 2023 (edited) 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 August 25, 2023 by Winterfox Quote
0 jamesandrew Posted August 26, 2023 Author Posted August 26, 2023 (edited) 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. Untitled video - Made with Clipchamp.mp4 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 August 26, 2023 by jamesandrew Quote
Question
jamesandrew
How to make an item script for this?
If the user is poisoned, reduce physical damage by 20%
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.