Jump to content
  • 0

Fix Skill different functions with item id


Question

Posted (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

ra2.PNG

Edited by naruto10890

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.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...