Jump to content
  • 0

check if player has item to gain extra hp.


Question

Posted

Hi Rathena, I need help with item db script. 

I want my YGGdrasil berry Increase percent when the certain item is equip. 

Sample this is my normal ygg percent heal. 

607,Yggdrasilberry,Yggdrasil Berry,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,0; },{},{}

If the player has XX item or certain item we say i wear Flapping Angelring ID 5334 the Percent heal of the YGG will be 40%. 

If the player doesnt have Angelring the ygg heal is default but if the Angelring hat is equip the ygg will be 40% healed. 


PS : the bAddItemHealRate item bonus is not working on my server thats why im requesting this kind of script or item bonus. 

Thank you 🙂

4 answers to this question

Recommended Posts

  • 0
Posted
percentheal((isequipped(5334) ? 40 : 20), 0);
if (isequipped(5334)) { percenthea(40, 0); } else { percentheal(20, 0); }
percentheal(20, 0); if (isequipped(5334)) { percenthea(20, 0); }

can use isequipped(...) or isequippedcnt(...) or getequippedid(...) or countitem(...) etc

  • Like 1
  • 0
Posted (edited)

607,Yggdrasilberry,Yggdrasil Berry,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,0; if (getequipid(EQI_HEAD_TOP) == 5334) { percentheal 40,0; } },{},{}

correcting

607,Yggdrasilberry,Yggdrasil Berry,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,0; if (getequipid(EQI_HEAD_TOP) == 5334) { percentheal 20,0; } },{},{}

Edited by xJohn
I made a mistake writing the script
  • 0
Posted
1 minute ago, xJohn said:

607,Yggdrasilberry,Yggdrasil Berry,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal 20,0; if (getequipid(EQI_HEAD_TOP) == 5334) { percentheal 40,0; } },{},{}

It`s 60%, no? First 20% and if with item - bonus 40%

 

  • 0
Posted
On 1/25/2024 at 1:26 AM, Emistry said:
percentheal((isequipped(5334) ? 40 : 20), 0);
if (isequipped(5334)) { percenthea(40, 0); } else { percentheal(20, 0); }
percentheal(20, 0); if (isequipped(5334)) { percenthea(20, 0); }

can use isequipped(...) or isequippedcnt(...) or getequippedid(...) or countitem(...) etc

Hi @Emistry, I got a little Problem. Is it only working ON Equip? what about on card? 

48337,ATKStone_Top4,Runes of Potion Mastery,6,20,,10,,,,,,,,136,,,,,{},{},{}
607,Yggdrasilberry,Yggdrasil Berry,0,1,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ percentheal((isequipped(48337) ? 40 : 15), 0); },{},{}

When the Runes of potion equip as a card nothing happens

Thanks

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...