Jump to content
  • 0

Damage flag


deitalk

Question


  • Group:  Members
  • Topic Count:  6
  • Topics Per Day:  0.00
  • Content Count:  14
  • Reputation:   0
  • Joined:  01/27/15
  • Last Seen:  

I'd like to know a way to check if a player dealt damage (any positive amount, any target) and use it as a condition to cast certain buff on skill.c. The check would reset if the player warps to another map, dies or receives dispell.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Developer
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  802
  • Reputation:   229
  • Joined:  01/30/13
  • Last Seen:  

I can't give you a full solution, but the function you are looking for is:

int status_damage(struct block_list *src,struct block_list *target,int64 dhp, int64 dsp, int walkdelay, int flag)

All damage goes through here and you have "src" available. So you can check if src is BL_PC and then do something.

The cleanest solution would probably be to add a new status change that lasts very long but gets dispelled on map change.

  • Like 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  18
  • Topics Per Day:  0.01
  • Content Count:  98
  • Reputation:   74
  • Joined:  12/04/14
  • Last Seen:  

On 10/2/2017 at 6:53 AM, deitalk said:

I'd like to know a way to check if a player dealt damage (any positive amount, any target) and use it as a condition to cast certain buff on skill.c. The check would reset if the player warps to another map, dies or receives dispell.

 

i think bAutoSpell can work that way.

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