Tio Akima 74 Posted July 6, 2017 Hello guys. Can someone give support related to the file skill.c? I want to return the ID of a clicked cell. This code I know returns a mob id. Skill-> area_temp [1] = bl-> id; How to return the id of a cell?PS: Must be within the method skill_castend_pos2(){} I'm doing a damage skill in area. thanks Quote Share this post Link to post Share on other sites
0 meko 170 Posted July 6, 2017 I guess you meant (x,y) of a cell but if you really want an ID (of map->cell[]) you would do (x + y * map->list[m].xs). If you just want x,y then you don't need to do anything fancy since skill_castend_pos2 already has access to x,y Quote Share this post Link to post Share on other sites
0 Tio Akima 74 Posted July 6, 2017 11 minutes ago, meko said: I guess you meant (x,y) of a cell but if you really want an ID (of map->cell[]) you would do (x + y * map->list[m].xs). If you just want x,y then you don't need to do anything fancy since skill_castend_pos2 already has access to x,y Ah yes, I understood. I'm trying to do the following meko. Esou trying to make a similar skill LG_CANNONSPEAR However, the difference is that the click must be in the area. (the LG_CANNONSPEAR the click must be on some mob.) The idea is to get the x, y of the cell clicked, Get the x, y of the player And make a FOR () to go by checking cell by cell during that path. If find any ENEMY during this path, then it deals damage. The Cannon Spear skill performs the following function: And also her for the first Mobs she finds. It uses a foreachinpath () to traverse this path. skill->area_temp[1] = bl->id; map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), skill->splash_target(src), skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY); I'm really confused how to do this. I've been trying several functions for some days without success. Quote Share this post Link to post Share on other sites
Hello guys.
Can someone give support related to the file skill.c?
I want to return the ID of a clicked cell.
This code I know returns a mob id.
Skill-> area_temp [1] = bl-> id;
How to return the id of a cell?
PS: Must be within the method skill_castend_pos2(){}
I'm doing a damage skill in area.
thanks
Share this post
Link to post
Share on other sites