Tauro Posted June 7, 2019 Posted June 7, 2019 (edited) Hello, my idea is that when you throw an item on a mob, do different actions. Skill: case SM_PROVOKE2: clif_skill_nodamage(src,bl,skill_id,skill_lv,1); if( sd == NULL ) break; if( dstsd ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } if (sd && dstmd) { skillidtest(sd, dstmd->mob_id); } break; skillidtest: int skillidtest(struct map_session_data *sd,int target_id) { struct mob_data* md; nullpo_retr(1, sd); md = (struct mob_data*)map_id2bl(target_id); if (sd->itemid == 33001) { clif_displaymessage(sd->fd, "perfect"); return 1; } else if(sd->itemid == 28606) { clif_displaymessage(sd->fd, "perfect2"); return 1; } else if(sd->itemid == 28607) { clif_displaymessage(sd->fd, "perfect3"); return 1; } else { clif_displaymessage(sd->fd, "perfect4"); //clif_emotion(&md->bl, ET_ANGER); return 1; } return 0; } I use the id 33001 33001,test,test,11,1000,500,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_PROVOKE2",1; },{},{} But he throws me the else, perfect4 How could I fix Edited June 7, 2019 by naruto10890 Quote
Question
Tauro
Hello, my idea is that when you throw an item on a mob, do different actions.
Skill:
case SM_PROVOKE2: clif_skill_nodamage(src,bl,skill_id,skill_lv,1); if( sd == NULL ) break; if( dstsd ) { clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); break; } if (sd && dstmd) { skillidtest(sd, dstmd->mob_id); } break;
skillidtest:
int skillidtest(struct map_session_data *sd,int target_id) { struct mob_data* md; nullpo_retr(1, sd); md = (struct mob_data*)map_id2bl(target_id); if (sd->itemid == 33001) { clif_displaymessage(sd->fd, "perfect"); return 1; } else if(sd->itemid == 28606) { clif_displaymessage(sd->fd, "perfect2"); return 1; } else if(sd->itemid == 28607) { clif_displaymessage(sd->fd, "perfect3"); return 1; } else { clif_displaymessage(sd->fd, "perfect4"); //clif_emotion(&md->bl, ET_ANGER); return 1; } return 0; }
I use the id 33001
33001,test,test,11,1000,500,10,,,,,0xFFFFFFFF,7,2,,,,,,{ itemskill "SM_PROVOKE2",1; },{},{}
But he throws me the else, perfect4
How could I fix
1 answer 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.