wallaby 1 Posted December 4, 2016 Hi everyone, So I have this: if(st->luk > 299) rate = 0; which gives me status ailment immunity at a total of 300 Luk, it works. Is there a way to set it to do the same but with a BASE Luk of 100? Does this work? if(bst->luk > 99) rate = 0; Thanks for your time. Quote Share this post Link to post Share on other sites
0 Kaleidoscope 0 Posted December 5, 2016 I have been wondering how to do that. What DB do you have that script in? Quote Share this post Link to post Share on other sites
0 Blinzer 6 Posted December 6, 2016 (edited) with a bit of thinking, we can find the solution. what kind of calculations are we familiar with that the source would do based off of your base stats? we use our brains and remember that weight is the easiest example of this, so we search for the strength modifier in weight. as we can see, they use sd->status.str*300 to access the base str. next, we identify what is making the status effect resistance. we simply search for luk* to find this, since we know it's going to be luck multiplied by some number. in status.c, we find sc_def2 under each of the status effects by doing this search: i'm not sure how much sc_def2 needs to make me immune, but it's safe to assume that if we plug in 300 luk(3000) and base our multiplier off of that we should be gucci. i do some more research and see if the source already uses an example of what we need since sd isn't being used here... we know the main difference here is that it's using a . instead of a ->, but it's not exactly what we need here, so we search for st. to see if they already use a shortcut which fits our needs, and with a bit of searching we find... bst.luk is what you're looking for. you may either choose to substitute in each individual status effect formula the st->luk*10(3000 at 300 luk) with bst.luk*30(3000 at 100 base luk), or use it however you see best fit. Edited December 6, 2016 by Blinzer Quote Share this post Link to post Share on other sites
Hi everyone,
So I have this:
if(st->luk > 299) rate = 0;
which gives me status ailment immunity at a total of 300 Luk, it works. Is there a way to set it to do the same but with a BASE Luk of 100? Does this work?
if(bst->luk > 99) rate = 0;
Thanks for your time.
Share this post
Link to post
Share on other sites