Jump to content
  • 0

Disable Knockback via script


namerpus18

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  106
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

Hi everyone,

Can i put a script in Equipscript{} that remove knock back effect of a skill? Like bowlingbash and magnum break? I know how to do it on item_db but i dont want to disable it permanently. I just want to disable it whenever you equip and item and toggle that effect when unequipped.

Thank you so muchh all

  - Id: 1101

    AegisName: Sword

    Name: Sword

    Type: Weapon

    SubType: 1hSword

    Buy: 100

    Weight: 500

    Attack: 25

    Range: 1

    Slots: 3

...

...

    Locations:

      Right_Hand: true

    WeaponLevel: 1

    EquipLevelMin: 2

    Refineable: true

Equipscript   |

         //disable knockback effect for magnumbreak skill

Unequipscript   |

   //Revert back to normal item

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  235
  • Reputation:   87
  • Joined:  06/30/18
  • Last Seen:  

When you know how to apply the bonus to ignore knockback to an item via the item db what is your problem?

I mean, when you put bonus bNoKnockback; in the script section of an item, it automatically enables the effect as long as you have the item equipped and removes it when you unequip the item.

So basically what you are asking for is the default behavior?

You could also just check an item that applies bonus bNoKnockback; and use it as a reference for your item.
For example, this one:
 

  - Id: 20730
    AegisName: Loyalists_Hood
    Name: Loyalists Hood
    Type: Armor
    Buy: 10
    Weight: 200
    Defense: 30
    Slots: 1
    Locations:
      Garment: true
    ArmorLevel: 1
    EquipLevelMin: 80
    Script: |
      bonus bStr,2;
      bonus bMaxHPrate,10;
      bonus bNoKnockback;
      bonus2 bSubEle,Ele_All,-20;

 

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  898
  • Reputation:   119
  • Joined:  05/23/12
  • Last Seen:  

43 minutes ago, Winterfox said:

When you know how to apply the bonus to ignore knockback to an item via the item db what is your problem?

I mean, when you put bonus bNoKnockback; in the script section of an item, it automatically enables the effect as long as you have the item equipped and removes it when you unequip the item.

So basically what you are asking for is the default behavior?

You could also just check an item that applies bonus bNoKnockback; and use it as a reference for your item.
For example, this one:
 

  - Id: 20730
    AegisName: Loyalists_Hood
    Name: Loyalists Hood
    Type: Armor
    Buy: 10
    Weight: 200
    Defense: 30
    Slots: 1
    Locations:
      Garment: true
    ArmorLevel: 1
    EquipLevelMin: 80
    Script: |
      bonus bStr,2;
      bonus bMaxHPrate,10;
      bonus bNoKnockback;
      bonus2 bSubEle,Ele_All,-20;

 

I think he will only disable knockback of Magnum break when the item is equipped. Not for the other 40+ skills.

 

U may need src modification.

 

Rynbef~

Edited by Rynbef
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  44
  • Topics Per Day:  0.01
  • Content Count:  898
  • Reputation:   119
  • Joined:  05/23/12
  • Last Seen:  

If u don't find another way u can add a check if target has equipped the item and then block Knockback but not for specified skill. Therefore u have to src mod it.

https://github.com/rathena/rathena/blob/master/src/map/skill.cpp#L3062

 

Rynbef~

Edited by Rynbef
Misspelling
  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  106
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

15 hours ago, Winterfox said:

When you know how to apply the bonus to ignore knockback to an item via the item db what is your problem?

I mean, when you put bonus bNoKnockback; in the script section of an item, it automatically enables the effect as long as you have the item equipped and removes it when you unequip the item.

So basically what you are asking for is the default behavior?

You could also just check an item that applies bonus bNoKnockback; and use it as a reference for your item.
For example, this one:
 

  - Id: 20730
    AegisName: Loyalists_Hood
    Name: Loyalists Hood
    Type: Armor
    Buy: 10
    Weight: 200
    Defense: 30
    Slots: 1
    Locations:
      Garment: true
    ArmorLevel: 1
    EquipLevelMin: 80
    Script: |
      bonus bStr,2;
      bonus bMaxHPrate,10;
      bonus bNoKnockback;
      bonus2 bSubEle,Ele_All,-20;

 

Sorry for the confusion, I want to modify a skill's flag using item script. bonus bNoKnockback effect makes the char immune to knock back.

What I am aiming is - giving an example -

I am a Knight and i use magnum break. I want to remove it's knockback effect if i equip certain item.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  106
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

12 hours ago, Rynbef said:

If u don't find another way u can add a check if target has equipped the item and then block Knockback but not for specified skill. Therefore u have to src mod it.

https://github.com/rathena/rathena/blob/master/src/map/skill.cpp#L3062

 

Rynbef~

Yeah, I am quite new in src editing. Been reading all src codes and analyzing what things do. Thank you

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.07
  • Content Count:  106
  • Reputation:   5
  • Joined:  11/15/22
  • Last Seen:  

On 8/12/2023 at 8:04 PM, namerpus18 said:

Equipscript   |

         //make SM_MAGNUMBREAK skill without knockback effect

Unequipscript   |

   //back to normal SM_MAGNUMBREAK

 

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