Jump to content
  • 0
Tio Akima

skill basic atack

Question

Skill basic atack
 
What code to count how many basic attacks were hit on the enemy?
 
I want to make a skill that after 10 basic attacks, he bid a skill.
 
thanks

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Something like this?

 

find in battle.c - 

struct Damage battle_calc_attack

 

Add the following right before #ifdef HMAP_ZONE_DAMAGE_CAP_TYPE

if(target && !skill_id && attack_type == BF_WEAPON && bl->type == BL_PC){	npc->event((TBL_PC*)src,"CalcBasicAttack::OnBasicAttack",0);}

 

And then make an npc :

 

-	script	CalcBasicAttack	-1,{end;OnBasicAttack:	@attackcount++;	if(@attackcount == 10) {	// Dance for me.	}}

 

Just a rough idea , I haven't tested this.

Edited by Smokexyz

Share this post


Link to post
Share on other sites
  • 0

Something like this?

 

find in battle.c - 

struct Damage battle_calc_attack

 

Add the following right before #ifdef HMAP_ZONE_DAMAGE_CAP_TYPE

if(target && !skill_id && attack_type == BF_WEAPON && bl->type == BL_PC){	npc->event((TBL_PC*)src,"CalcBasicAttack::OnBasicAttack",0);}

 

And then make an npc :

 

-	script	CalcBasicAttack	-1,{end;OnBasicAttack:	@attackcount++;	if(@attackcount == 10) {	// Dance for me.	}}

 

Just a rough idea , I haven't tested this.

 

hi Smokexyz

 

Where is "dance for me" should I replace the skill to be cast?

 

if not there, where I'm going to set the skill to be cast?

Share this post


Link to post
Share on other sites
  • 0

Dance for me is where you make the script do what you want like autocast a skill or something and reset the counter, don't forget to reset the counter (set @attackcount,0;)

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.