Jump to content
  • 0
luizragna

specialeffect in mob unit

Question

2 answers to this question

Recommended Posts

  • 0

you can try this...

src\custom\script.inc

BUILDIN_FUNC(specialeffect3)
{
	struct block_list *bl = NULL;
	int id = 0;
	int type = script_getnum(st,2);
	enum send_target target = script_hasdata(st,3) ? (send_target)script_getnum(st,3) : AREA;

	if (script_hasdata(st,4)) {
		id = script_getnum(st,4);
		bl = map_id2bl(id);
	}
	else {
		bl = st->rid ? map_id2bl(st->rid) : map_id2bl(st->oid);
	}

	if(bl == NULL)
		return SCRIPT_CMD_SUCCESS;

	if( type <= EF_NONE || type >= EF_MAX ){
		ShowError( "buildin_specialeffect: unsupported effect id %d\n", type );
		return SCRIPT_CMD_FAILURE;
	}

	if (target == SELF) {
		TBL_PC *sd;
		if (script_rid2sd(sd))
			clif_specialeffect_single(bl,type,sd->fd);
	} else {
		clif_specialeffect(bl, type, target);
	}
	return SCRIPT_CMD_SUCCESS;
}

src\custom\script_def.inc

BUILDIN_DEF(specialeffect3,"i??"),

usage example

// GID examples...
[email protected] = getcharid(3);
//[email protected] = [email protected][0];
//[email protected] = killerrid;
//[email protected] = killergid;

specialeffect3 EF_HIT1,AREA,[email protected];

 

  • Love 1
  • MVP 1
Link to comment
Share on other sites

  • 1

It definitly works because i was using it with my meteor assault mod

 

	case ASC_METEORASSAULT:
		if (unit_movepos(src,x,y,1,1)) {
			clif_snap(src, src->x, src->y);
			skill_unitsetting(src,skill_id,skill_lv,x,y,0);
			clif_specialeffect(src, 923, AREA);
			} else {
			if (sd)
				clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0);
		}
		break;

 

  • Like 1
Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.