Jump to content
  • 0
Sign in to follow this  
Louis T Steinhil

Making @clone into a skill

Question

Hi does anyone know how can I make this a skill?

 

ACMD(clone){	int x=0,y=0,flag=0,master=0,i=0;	struct map_session_data *pl_sd=NULL;	if (!message || !*message) {		clif->message(sd->fd,msg_txt(1323)); // You must enter a player name or ID.		return true;	}	if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) {		clif->message(fd, msg_txt(3));	// Character not found.		return true;	}	if(pc->get_group_level(pl_sd) > pc->get_group_level(sd)) {		clif->message(fd, msg_txt(126));	// Cannot clone a player of higher GM level than yourself.		return true;	}	if (strcmpi(command+1, "clone") == 0)		flag = 1;	else if (strcmpi(command+1, "slaveclone") == 0) {		flag = 2;		if(pc_isdead(sd)){		    clif->message(fd, msg_txt(129+flag*2));		    return true;		}		master = sd->bl.id;		if (battle_config.atc_slave_clone_limit			&& mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {			clif->message(fd, msg_txt(127));	// You've reached your slave clones limit.			return true;		}	}	do {		x = sd->bl.x + (rnd() % 10 - 5);		y = sd->bl.y + (rnd() % 10 - 5);	} while (iMap->getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10);	if (i >= 10) {		x = sd->bl.x;		y = sd->bl.y;	}	if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, 0, flag?1:0, 0)) > 0) {		clif->message(fd, msg_txt(128+flag*2));	// Evil Clone spawned. Clone spawned. Slave clone spawned.		return true;	}	clif->message(fd, msg_txt(129+flag*2));	// Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.	return true;}
Edited by Mad Walker

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

 

Hi does anyone know how can I make this a skill?

 

ACMD(clone){	int x=0,y=0,flag=0,master=0,i=0;	struct map_session_data *pl_sd=NULL;	if (!message || !*message) {		clif->message(sd->fd,msg_txt(1323)); // You must enter a player name or ID.		return true;	}	if((pl_sd=iMap->nick2sd((char *)message)) == NULL && (pl_sd=iMap->charid2sd(atoi(message))) == NULL) {		clif->message(fd, msg_txt(3));	// Character not found.		return true;	}	if(pc->get_group_level(pl_sd) > pc->get_group_level(sd)) {		clif->message(fd, msg_txt(126));	// Cannot clone a player of higher GM level than yourself.		return true;	}	if (strcmpi(command+1, "clone") == 0)		flag = 1;	else if (strcmpi(command+1, "slaveclone") == 0) {		flag = 2;		if(pc_isdead(sd)){		    clif->message(fd, msg_txt(129+flag*2));		    return true;		}		master = sd->bl.id;		if (battle_config.atc_slave_clone_limit			&& mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) {			clif->message(fd, msg_txt(127));	// You've reached your slave clones limit.			return true;		}	}	do {		x = sd->bl.x + (rnd() % 10 - 5);		y = sd->bl.y + (rnd() % 10 - 5);	} while (iMap->getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10);	if (i >= 10) {		x = sd->bl.x;		y = sd->bl.y;	}	if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, 0, flag?1:0, 0)) > 0) {		clif->message(fd, msg_txt(128+flag*2));	// Evil Clone spawned. Clone spawned. Slave clone spawned.		return true;	}	clif->message(fd, msg_txt(129+flag*2));	// Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone.	return true;}

did make it? i mean  you done  to make it a skill?  how any guide?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

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