dubstep Posted June 1, 2017 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 07/25/15 Last Seen: October 8, 2021 Share Posted June 1, 2017 Hello, i would like to ask/request a modification for magnificat skill during the skill effect i want to have an additional effect to increase HP by % until the magnificat duration is finish it will be gone aswell. TIA. Quote Link to comment Share on other sites More sharing options...
0 Jhedzkie Posted June 2, 2017 Group: Members Topic Count: 43 Topics Per Day: 0.01 Content Count: 298 Reputation: 15 Joined: 11/17/11 Last Seen: February 18 Share Posted June 2, 2017 (edited) find in status.c static unsigned int status_calc_maxhp(struct block_list *bl, uint64 maxhp) and after int rate = 100; add this code below. int myrate = 20; // 100 = 100% if (sc->data[SC_MAGNIFICAT]) maxhp += maxhp * myrate / 100; so that your code would look like /** * Calculates a max HP based on status changes * Values can either be percentages or fixed, based on how equations are formulated * @param bl: Object's block_list data * @param maxhp: Object's current max HP * @return modified maxhp */ static unsigned int status_calc_maxhp(struct block_list *bl, uint64 maxhp) { int rate = 100; int myrate = 20; // 100 = 100% if (sc->data[SC_MAGNIFICAT]) maxhp += maxhp * myrate / 100; maxhp += status_get_hpbonus(bl,STATUS_BONUS_FIX); if ((rate += status_get_hpbonus(bl,STATUS_BONUS_RATE)) != 100) maxhp = maxhp * rate / 100; return (unsigned int)cap_value(maxhp,1,UINT_MAX); } Recompile. Edit: This is un-tested code but should probably work. Please provide feedback if anything fails. Edited June 2, 2017 by Jhedzkie comment Quote Link to comment Share on other sites More sharing options...
0 dubstep Posted June 2, 2017 Group: Members Topic Count: 16 Topics Per Day: 0.00 Content Count: 35 Reputation: 2 Joined: 07/25/15 Last Seen: October 8, 2021 Author Share Posted June 2, 2017 Thanks for the code provided but i guess it doesn't work for me a screenshot of error that i recieved after compiling Quote Link to comment Share on other sites More sharing options...
0 blinzer Posted August 8, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 12/11/14 Last Seen: April 19, 2024 Share Posted August 8, 2017 (edited) i know this is painfully late, but it's quite simple. i do the same thing for angelus, so you can just copy my angelus code. find the section in status.c where apple of idun increases max health, and add an entry for your SC effect as such : in this equation, sc->data[SC_ANGELUS]->val1 is the level of skill being used. 10 * sc->data[SC_ANGELUS]->val1 is a 10 flat health per level, whereas maxhp * sc->data[SC_ANGELUS]->val1 / 100 is 1% more max health per level. then, you have to tell the source to update your max HP when it interacts with your skill, as such: you add the SCB_MAXHP at the end with the rest of the SCB effects for your skill so that it knows to update your max health when this status is in play. you have to do this for any skill that you change the stat bonuses for, or your changes will not work. peace Edited August 8, 2017 by blinzer Quote Link to comment Share on other sites More sharing options...
Question
dubstep
Hello, i would like to ask/request a modification for magnificat skill during the skill effect i want to have an additional effect to increase HP by % until the magnificat duration is finish it will be gone aswell.
TIA.
Link to comment
Share on other sites
3 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.