angreusz Posted July 21, 2018 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 6 Reputation: 0 Joined: 07/23/14 Last Seen: March 20 Share Posted July 21, 2018 Hello guys, I'm trying to make the script for the item below but I can't seem to make it gain hp on kill when defeating mobs with ranged attacks. bHpGainValue only works for melee... *sigh* 19163,Catharina_Von_Brad_60th,Catharina Von Brad 60th,4,20,,0,,1,,1,0xFFFFFFFF,63,2,256,,0,1,1527,{bonus bHPGainValue,500; bonus bSPGainValue,50; bonus bMagicHPGainValue,500; bonus bMagicSPGainValue,50;},{},{} Quote Link to comment Share on other sites More sharing options...
0 Jarek Posted July 22, 2018 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 143 Reputation: 30 Joined: 12/23/11 Last Seen: March 9 Share Posted July 22, 2018 (edited) src\map\skil.cpp int skill_counter_additional_effect ... if( (attack_type&(BF_WEAPON|BF_SHORT)) == (BF_WEAPON|BF_SHORT) ) { sp += sd->bonus.sp_gain_value; sp += sd->sp_gain_race[status_get_race(bl)] + sd->sp_gain_race[RC_ALL]; hp += sd->bonus.hp_gain_value; } If you change condition like this if( attack_type&BF_WEAPON ) It will work with physical melee and ranged attacks Edited July 22, 2018 by Jarek 1 Quote Link to comment Share on other sites More sharing options...
0 angreusz Posted July 22, 2018 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 6 Reputation: 0 Joined: 07/23/14 Last Seen: March 20 Author Share Posted July 22, 2018 8 hours ago, Jarek said: src\map\skil.cpp int skill_counter_additional_effect ... if( (attack_type&(BF_WEAPON|BF_SHORT)) == (BF_WEAPON|BF_SHORT) ) { sp += sd->bonus.sp_gain_value; sp += sd->sp_gain_race[status_get_race(bl)] + sd->sp_gain_race[RC_ALL]; hp += sd->bonus.hp_gain_value; } If you change condition like this if( attack_type&BF_WEAPON ) It will work with physical melee and ranged attacks Thanks, it worked. Quote Link to comment Share on other sites More sharing options...
Question
angreusz
Hello guys,
I'm trying to make the script for the item below but I can't seem to make it gain hp on kill when defeating mobs with ranged attacks. bHpGainValue only works for melee...

*sigh*
Link to comment
Share on other sites
2 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.