Jump to content
  • 0

Urgent help online server, please!


Oklonir

Question


  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.02
  • Content Count:  21
  • Reputation:   1
  • Joined:  08/27/22
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

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;

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.02
  • Content Count:  21
  • Reputation:   1
  • Joined:  08/27/22
  • Last Seen:  

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 by Oklonir
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  236
  • Reputation:   47
  • Joined:  12/04/13
  • Last Seen:  

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. 🙂

  • Like 1
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  8
  • Reputation:   1
  • Joined:  07/23/17
  • Last Seen:  

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 by Lilori
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...