Making @clone into a skill

Louis T Steinhil

New member
Messages
172
Points
0
Age
35
Discord
Louis T Steinhil#8600
Emulator
Hercules
Hi does anyone know how can I make this a skill?

Code:
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;}
 
Last edited by a moderator:
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?

 
Back
Top