LordJasz Posted July 5, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 05/21/18 Last Seen: August 13, 2023 Share Posted July 5, 2018 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 Quote Link to comment Share on other sites More sharing options...
1 Skorm Posted July 10, 2018 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted July 10, 2018 (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 July 10, 2018 by Skorm 1 1 Quote Link to comment Share on other sites More sharing options...
0 crazyarashi Posted July 6, 2018 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 3 hours ago Share Posted July 6, 2018 if(readparam(MaxHp) <= 50){ percentheal 10,0; sc_start SC_KYRIE,60000,10; } Quote Link to comment Share on other sites More sharing options...
0 LordJasz Posted July 6, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 05/21/18 Last Seen: August 13, 2023 Author Share Posted July 6, 2018 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? Quote Link to comment Share on other sites More sharing options...
0 LordJasz Posted July 10, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 05/21/18 Last Seen: August 13, 2023 Author Share Posted July 10, 2018 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! Quote Link to comment Share on other sites More sharing options...
0 LordJasz Posted July 20, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 05/21/18 Last Seen: August 13, 2023 Author Share Posted July 20, 2018 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; }"; everytime i get hit this message popsup. what could it be? Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted July 21, 2018 Group: Forum Moderator Topic Count: 33 Topics Per Day: 0.01 Content Count: 1282 Reputation: 393 Joined: 02/03/12 Last Seen: Sunday at 10:43 PM Share Posted July 21, 2018 17 hours ago, LordJasz said: 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. Quote Link to comment Share on other sites More sharing options...
0 LordJasz Posted July 21, 2018 Group: Members Topic Count: 7 Topics Per Day: 0.00 Content Count: 24 Reputation: 0 Joined: 05/21/18 Last Seen: August 13, 2023 Author Share Posted July 21, 2018 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. Quote Link to comment Share on other sites More sharing options...
Question
LordJasz
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.