• 0
Sign in to follow this  
Followers 0
luizragna

Where can i add trigger for my custom label? (OnUseSkillEvent)

Question

Hello guys!

I'm creating a custom label, OnUseSkillEvent

I need add this trigger: (probabily in the skill.c)

npc->script_event(sd, NPCE_USESKILL);

I added in the cases (for exmple: MG_FIREBOLT) but i want for all skills.

 

i already created the code for others files.

 

npc.c:

{"Use Skill Event",script->config.useskill_event_name},

npc.h:

NPCE_USESKILL,

script.c

script->config.useskill_event_name = "OnUseSkillEvent";

and script.h

const char *useskill_event_name;

 

Test script:

-	script	OnUseTest	FAKE_NPC,{

OnUseSkillEvent:

mes "Do you used a skill";
close;


}

 

Edited by luizragna

Share this post


Link to post
Share on other sites

2 answers to this question

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0