So Meteor Storm normally requires choosing a spot, but it doesn't when it autocasts from Shadow Spell or Lion Model Hat. I'm looking for coding to go one further than that. I have made Abracadabra autocast from a hat, but it keeps requesting me to target things for target skills. Is there a way to code so that all skills from abracadabra that target the ground will auto-select the spot directly below me and cast? In the same light, is there a way to make all buff skills auto-select me and autocast from it? I imagine it would be rather easy to do this for one skill that Abracadabra casts, because I could follow the coding that Meteor Storm or Heal follows, but doing it for every skill that Abra can cast would be very tedious. Thanks for any pointers!
I imagine that this code from skill.c has some relation to what I'm looking for.
Spoiler
if ((type = skill_get_casttype(skill)) == CAST_GROUND) {
if (!skill_pos_maxcount_check(src, tbl->x, tbl->y, skill, autospl_skill_lv, BL_PC, false))
continue;
}
if (battle_config.autospell_check_range &&
!battle_check_range(bl, tbl, skill_get_range2(src, skill, autospl_skill_lv, true)))
continue;
// if (skill == AS_SONICBLOW)
// pc_stop_attack(sd); //Special case, Sonic Blow autospell should stop the player attacking.
else if (skill == PF_SPIDERWEB) //Special case, due to its nature of coding.
type = CAST_GROUND;
Question
Humble_Bee
So Meteor Storm normally requires choosing a spot, but it doesn't when it autocasts from Shadow Spell or Lion Model Hat. I'm looking for coding to go one further than that. I have made Abracadabra autocast from a hat, but it keeps requesting me to target things for target skills. Is there a way to code so that all skills from abracadabra that target the ground will auto-select the spot directly below me and cast? In the same light, is there a way to make all buff skills auto-select me and autocast from it? I imagine it would be rather easy to do this for one skill that Abracadabra casts, because I could follow the coding that Meteor Storm or Heal follows, but doing it for every skill that Abra can cast would be very tedious. Thanks for any pointers!
I imagine that this code from skill.c has some relation to what I'm looking for.
if ((type = skill_get_casttype(skill)) == CAST_GROUND) {
if (!skill_pos_maxcount_check(src, tbl->x, tbl->y, skill, autospl_skill_lv, BL_PC, false))
continue;
}
if (battle_config.autospell_check_range &&
!battle_check_range(bl, tbl, skill_get_range2(src, skill, autospl_skill_lv, true)))
continue;
// if (skill == AS_SONICBLOW)
// pc_stop_attack(sd); //Special case, Sonic Blow autospell should stop the player attacking.
else if (skill == PF_SPIDERWEB) //Special case, due to its nature of coding.
type = CAST_GROUND;
sd->state.autocast = 1;
skill_consume_requirement(sd,skill,autospl_skill_lv,1);
skill_toggle_magicpower(src, skill);
switch (type) {
case CAST_GROUND:
skill_castend_pos2(src, tbl->x, tbl->y, skill, autospl_skill_lv, tick, 0);
break;
case CAST_NODAMAGE:
skill_castend_nodamage_id(src, tbl, skill, autospl_skill_lv, tick, 0);
break;
case CAST_DAMAGE:
skill_castend_damage_id(src, tbl, skill, autospl_skill_lv, tick, 0);
break;
}
Link to comment
Share on other sites
0 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.