skill basic atack

Tio Akima

New member
Messages
349
Points
0
Age
36
Discord
TioAkima#0636
Github
Tio Akima
Emulator
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
 
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.

 
Last edited by a moderator:
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?

 
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;)

 
Back
Top