Jump to content
  • 0

Custom Bonus Status Effects


junjun7981

Question


  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  04/14/12
  • Last Seen:  

Hello again everyone. I would like to ask if there is a script code for custom bonus status effects like "Hard Defense" Chance to inflict Fixed Damage" "Chance to receive no damage".

for example

A card that gives user to inflict 10,000 fixed damage to any class. < ---- More on like Chance to Deal Fixed damage on enemies.

and  a counter card that negates the enemy from the other card.

 

and a second one is the hard defense <---- more on like when the attacker deals 10,000 damage, the user with hard defense card or item will reduce the damage by 2% so it will become 9,800

 

thankyou, will try to explain more if someone has an interest on helping out.

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  54
  • Topics Per Day:  0.03
  • Content Count:  112
  • Reputation:   9
  • Joined:  09/22/19
  • Last Seen:  

In the item_bonus.txt that my rAthena has in the documents (doc) section, it shows these for your first request:

bonus2 bHPVanishRate,x,n;        Add a x/10% chance of decreasing enemy's HP amount by n% with a normal attack
bonus3 bHPVanishRate,x,n,bf;    Add a x/10% chance of decreasing enemy's HP amount by n% when attacking with trigger criteria bf

If you want to make an opposite one to this, you could just make a second copy of these in the source code every place you find it, and then change the target to yourself for the copies. Once you do that, you just change the -= for the hp to the += (from drain to gain).

I didn't find an item bonus for fixed damage, but you could make a copy of the ones above and change the % damage to a fixed damage.


For the second one, you can use these, and change X with the % you want to increase or reduce damage by. If you only want a chance of these happening, you will want to toss these into an autobonus on an item script. See script_commands.txt and look for autobonus in it to find out more. A sample is undernearth the first section here.

bonus2 bAddClass,Class_All,x;             +x% physical damage against all monsters
bonus2 bMagicAddClass,Class_All,x;        +x% magical damage against all monsters
bonus2 bSubClass,Class_All,x;             +x% damage reduction against all monsters

autobonus2 "{ bonus2 bSubClass,Class_All,60; }",50,10000,0,"{ }";

The above autobonus will trigger 5% of the time when attacked, and it will give 60% resistance to all damage for 10 seconds. If you want it to work when attacking, you just make it the first word autobonus instead of autobonus2.

Edited by Humble_Bee
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...