Oklonir Posted December 24, 2023 Group: Members Topic Count: 12 Topics Per Day: 0.02 Content Count: 21 Reputation: 1 Joined: 08/27/22 Last Seen: 51 minutes ago Share Posted December 24, 2023 Hello community Could anyone help me, I searched all over the forum and I didn't find a solution to my problems. 1 - I would like the ninja to be able to dodge the PA_SACRIFICE skill when using the NJ_UTSUSEMI skill. 2 - How do I make the player freeze for 1 second at DEFM 99, just like when luk status + bonus = 330 stays for 1 second. 3 - How to make the PA_SACRIFICE skill always hit 100% without giving a miss Please help me! Quote Link to comment Share on other sites More sharing options...
0 Rivers Posted December 24, 2023 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 236 Reputation: 47 Joined: 12/04/13 Last Seen: Just now Share Posted December 24, 2023 16 hours ago, Oklonir said: 3 - How to make the PA_SACRIFICE skill always hit 100% without giving a miss Inside battle.cpp you will want to navigate to line 3771 where it says: switch (skill_id) { //Calc base damage according to skill Change the script to look something like the following, recompile, and test: (This is untested) switch (skill_id) { //Calc base damage according to skill case PA_SACRIFICE: wd->damage = sstatus->max_hp* 9/100; wd->damage2 = 0; hitrate += hitrate * 100; #ifdef RENEWAL wd->weaponAtk = wd->damage; wd->weaponAtk2 = wd->damage2; hitrate += hitrate * 100; #endif break; 1 Quote Link to comment Share on other sites More sharing options...
0 Oklonir Posted December 25, 2023 Group: Members Topic Count: 12 Topics Per Day: 0.02 Content Count: 21 Reputation: 1 Joined: 08/27/22 Last Seen: 51 minutes ago Author Share Posted December 25, 2023 (edited) Thanks for your attention, this happens. battle.cpp:3073:4: error: ‘hitrate’ was not declared in this scope hitrate += hitrate * 100; ^~~~~~~ battle.cpp:3073:4: note: suggested alternative: ‘getdate’ hitrate += hitrate * 100; ^~~~~~~ getdate @Rivers Edited December 25, 2023 by Oklonir Quote Link to comment Share on other sites More sharing options...
0 Rivers Posted December 25, 2023 Group: Members Topic Count: 50 Topics Per Day: 0.01 Content Count: 236 Reputation: 47 Joined: 12/04/13 Last Seen: Just now Share Posted December 25, 2023 I'll be home in a day or so. I'll run a test on it then. It will be after Christmas though. sorry for the delay in advance. I got this on reminder. On 12/24/2023 at 1:39 PM, Oklonir said: 3 - How to make the PA_SACRIFICE skill always hit 100% without giving a miss hitrate += hitrate * 100; proved to not be a variable in the list. That's totally okay though! We can manage with what we already have or we can add this into the existing list. switch (skill_id) { //Calc base damage according to skill case PA_SACRIFICE: wd->damage = sstatus->max_hp* 9/100; wd->damage2 = 0; hitrate += hitrate * 100; ... break; I built a server just now and tested this fully. It works well enough for now without adding anything extra to the character. For this example we will simply use an existing piece of ligoc already programmed into the Paladin. To make this never miss we will mimic the attack-defence mechanic used commonly on many magic spells. If this were to miss now, instead, it will deal an amount of damage instead. This damage is not the same as standard attack. battle.cpp Search for the following section of lines (9182 by default): status_zap(src, sstatus->max_hp*9/100, 0);//Damage to self is always 9% if( ret_val == ATK_NONE ) return ATK_MISS; return ret_val; } if (sc->getSCE(SC_MAGICALATTACK)) { if( skill_attack(BF_MAGIC,src,src,target,NPC_MAGICALATTACK,sc->getSCE(SC_MAGICALATTACK)->val1,tick,0) ) return ATK_DEF; return ATK_MISS; } We will change the lines that say "return ATK_MISS" with "return ATK_DEF" instead. This will grant a hit even when it misses. I hope you had a good Christmas! EDIT: If we need to add a specific variable to grant no-miss as attempted in the start, we can do that. If you're happy with this result let's work with it. 1 Quote Link to comment Share on other sites More sharing options...
-1 Lilori Posted December 25, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 8 Reputation: 1 Joined: 07/23/17 Last Seen: 19 hours ago Share Posted December 25, 2023 (edited) On 12/25/2023 at 5:08 AM, Rivers said: Inside battle.cpp you will want to navigate to line 3771 where it says: switch (skill_id) { //Calc base damage according to skill Change the script to look something like the following, recompile, and test: (This is untested) switch (skill_id) { //Calc base damage according to skill case PA_SACRIFICE: wd->damage = sstatus->max_hp* 9/100; wd->damage2 = 0; hitrate += hitrate * 100; #ifdef RENEWAL wd->weaponAtk = wd->damage; wd->weaponAtk2 = wd->damage2; hitrate += hitrate * 100; #endif break; better give attention to status.cpp Edited February 21 by Lilori Quote Link to comment Share on other sites More sharing options...
Question
Oklonir
Hello community
Could anyone help me, I searched all over the forum and I didn't find a solution to my problems.
1 - I would like the ninja to be able to dodge the PA_SACRIFICE skill when using the NJ_UTSUSEMI skill.
2 - How do I make the player freeze for 1 second at DEFM 99, just like when luk status + bonus = 330 stays for 1 second.
3 - How to make the PA_SACRIFICE skill always hit 100% without giving a miss
Please help me!
Link to comment
Share on other sites
4 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.