Jump to content
  • 0

check if player has item to gain extra hp.


DairyPresto

Question


  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   2
  • Joined:  04/03/17
  • Last Seen:  

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 🙂

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2357
  • Joined:  10/28/11
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  19
  • Reputation:   4
  • Joined:  04/18/23
  • Last Seen:  

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
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  5
  • Topics Per Day:  0.00
  • Content Count:  211
  • Reputation:   17
  • Joined:  12/23/11
  • Last Seen:  

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%

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  35
  • Topics Per Day:  0.01
  • Content Count:  150
  • Reputation:   2
  • Joined:  04/03/17
  • Last Seen:  

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

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