Jump to content
  • 0

[Item Script] Low HP Trigger


Question

Posted

Can someone help me with a script for a item?

What I want is:
Script Basic for the Items
When a player suffer damage and  reach 'X'% HP he's healed by 'Y'% HP.

And...
If possible a buff trigger for the same item but 3 versions (3 different items but with the same above script + script below).

Like: 
Item 1: Heal 'Y'% HP + Cast : Kyrie Eleison [Lv. 10]
Item 2: Heal 'Y'% HP + Cast : Safety Wall [Lv. 10] (no need gems)
Item 3: Heal 'Y'% HP + Cast Blessing [Lv.10] + AgiUp [Lv. 10]
Trigger CoolDown: 5 Minutes

7 answers to this question

Recommended Posts

  • 1
Posted (edited)
On 7/5/2018 at 4:53 PM, LordJasz said:

Can someone help me with a script for a item?

What I want is:
Script Basic for the Items
When a player suffer damage and  reach 'X'% HP he's healed by 'Y'% HP.

And...
If possible a buff trigger for the same item but 3 versions (3 different items but with the same above script + script below).

Like: 
Item 1: Heal 'Y'% HP + Cast : Kyrie Eleison [Lv. 10]
Item 2: Heal 'Y'% HP + Cast : Safety Wall [Lv. 10] (no need gems)
Item 3: Heal 'Y'% HP + Cast Blessing [Lv.10] + AgiUp [Lv. 10]
Trigger CoolDown: 5 Minutes

autobonus2 "{ if( Hp <= MaxHp * 5 / 10 && @item_cooldown <= gettimetick(0) ){ set @item_cooldown, gettimetick(0) + 300000; percentheal 100,0; sc_start SC_KYRIE,6000000,10; } }",1000,1,BF_SHORT|BF_LONG,"{ specialeffect2 EF_FIRESPLASHHIT; }";

I had to use temporary character variables for the cooldown as the effect is triggered 100% of the time but with the condition that the players hp <= 50% of maxhp. So it is triggered but not activated. What this means is the cooldown will persist even after the player dies.

Edited by Skorm
  • Love 1
  • MVP 1
  • 0
Posted
11 hours ago, crazyarashi said:

if(readparam(MaxHp) <= 50){ percentheal 10,0; sc_start SC_KYRIE,60000,10; }

(MaxHp) is it right?
I tried but it didn't work fine.
Sometimes it heals a bunch of times, sometimes it casts Kyrie 6x.

Any Improvement?

  • 0
Posted
2 hours ago, Skorm said:

autobonus2 "{ if(readparam(Hp)<=readparam(MaxHp)*5/10){ percentheal 100,0; sc_start SC_KYRIE,60000,10; } }",1000,1,BF_SHORT|BF_LONG,"{ specialeffect2 EF_FIRESPLASHHIT; }";

 

i doesn't have the trigger time, but it's better than i wanted!
Thank you so much!

  • 0
Posted
On 7/10/2018 at 3:04 PM, Skorm said:

autobonus2 "{ if( Hp <= MaxHp * 5 / 10 && @item_cooldown <= gettimetick(0) ){ set @item_cooldown, gettimetick(0) + 300000; percentheal 100,0; sc_start SC_KYRIE,6000000,10; } }",1000,1,BF_SHORT|BF_LONG,"{ specialeffect2 EF_FIRESPLASHHIT; }";

image.thumb.png.545dbbd712b8ef43eecfe8d7f7d5169d.png

everytime i get hit this message popsup.

what could it be?

  • 0
Posted
17 hours ago, LordJasz said:

image.thumb.png.545dbbd712b8ef43eecfe8d7f7d5169d.png

everytime i get hit this message popsup.

what could it be?

It looks like there is a hidden character between 0 and ) after gettimetick just open it in any text editor and retype that part.

  • 0
Posted
5 hours ago, Skorm said:

It looks like there is a hidden character between 0 and ) after gettimetick just open it in any text editor and retype that part.

Nicee, there was a hidden character.
but...
It's still not working

Reasons
1. cooldown not working
2. the effect is appearing almost all the time when i get hit.

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