Jump to content
  • 0

[Item Script] Low HP Trigger


LordJasz

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

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

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 1

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

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

  • 0

  • Group:  Developer
  • Topic Count:  50
  • Topics Per Day:  0.02
  • Content Count:  763
  • Reputation:   227
  • Joined:  02/11/17
  • Last Seen:  

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

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

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!

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

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?

Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   381
  • Joined:  02/03/12
  • Last Seen:  

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.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  24
  • Reputation:   0
  • Joined:  05/21/18
  • Last Seen:  

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.

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