Tauro Posted June 7, 2019 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 16 Reputation: 3 Joined: 10/07/16 Last Seen: April 17 Share 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 Link to comment Share on other sites More sharing options...
0 Naruto Posted June 9, 2019 Group: Members Topic Count: 20 Topics Per Day: 0.01 Content Count: 416 Reputation: 74 Joined: 05/16/19 Last Seen: January 24, 2021 Share Posted June 9, 2019 keep playing with it Quote Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.