Jump to content
  • 0

use skill in target [status.c]


Question

Posted (edited)

Hi guys

take this doubt from me
I'm trying to call a skill through status.c
But I do not know which function to use to use a skill on the target.
It may be any skill, but I'm testing the NPC_SELFDESTRUCTION

What function can I use to call a skill on the target?

 

@EDIT I tried:
             unit->skilluse_id(bl, bl, NPC_SELFDESTRUCTION,1 ); 
             but it did not work
 

Edited by Tio Akima

9 answers to this question

Recommended Posts

  • 0
Posted

I don't really remember things clearly, Try removing the unit->

You don't need that, also make sure that bl is the target,

And is that the right function for using skill?

  • 0
Posted (edited)
9 minutes ago, benching said:

I don't really remember things clearly, Try removing the unit->

You don't need that, also make sure that bl is the target,

And is that the right function for using skill?

I thought I needed to use unit->
for the path of the function to be correct.

Yes, the target is correct, including, I change the speed of the target without problems.

Yes, it is in the correct function, I made a debug by putting a printf () and issuing a message in the console to know if it was accessing.



@EDIT yes, you must use unit-> for the path to be correct.

Edited by Tio Akima
  • 0
Posted
4 minutes ago, benching said:

In which function in status.c are you calling that line?

A small snippet would be good

I'm calling inside the case of SC_RUN
in the function status_change_end  (in the status.c file)

when this status in target ends, I want to call a skill (on the same target).
But I do not know the function to use a skill

this is the doubt
It seems very simple, but I do not know hahahaha

  • 0
Posted (edited)
14 minutes ago, Tio Akima said:

I'm calling inside the case of SC_RUN
in the function status_change_end  (in the status.c file)

when this status in target ends, I want to call a skill (on the same target).
But I do not know the function to use a skill

this is the doubt
It seems very simple, but I do not know hahahaha

Let me check...

Device too slow for me to check on GitHub,

Edited by benching
  • 0
Posted
1 hour ago, benching said:

Check skill_castend_damage_id and skill_castend_nodamage_id

Yes, this is the correct function
nodamage_id

The skill is being called now, but not on the target I want.
She is being called in the player
Must be on target. (mob) But it's already a big evolution.

From what I can see, the first two arguments of the function define the target :D 

  • 0
Posted (edited)
10 hours ago, Tio Akima said:

Yes, this is the correct function
nodamage_id

The skill is being called now, but not on the target I want.
She is being called in the player
Must be on target. (mob) But it's already a big evolution.

From what I can see, the first two arguments of the function define the target :D 

The first arg is the second of the skill or the caster,

The 2nd arg is the target,

I'm not sure how to call it on mob that it bump into.

Edited by benching
  • 0
Posted
16 hours ago, benching said:

The first arg is the second of the skill or the caster,

The 2nd arg is the target,

I'm not sure how to call it on mob that it bump into.

I even managed to call, but I'm not hitting the target. :(

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...