Tio Akima 74 Posted August 24, 2015 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 Quote Share this post Link to post Share on other sites
0 Sephus 203 Posted August 30, 2015 (edited) 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 August 30, 2015 by Smokexyz 1 Tio Akima reacted to this Quote Share this post Link to post Share on other sites
0 Tio Akima 74 Posted August 30, 2015 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? Quote Share this post Link to post Share on other sites
0 Sephus 203 Posted August 30, 2015 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;) Quote Share this post Link to post Share on other sites
Share this post
Link to post
Share on other sites