Louis T Steinhil 4 Posted August 16, 2013 (edited) 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 August 16, 2013 by Mad Walker Quote Share this post Link to post Share on other sites
0 goddameit 52 Posted August 26, 2013 http://rathena.org/board/topic/86303-how-can-i-make-clone-a-skill/?view=findpost&p=217753 Quote Share this post Link to post Share on other sites
0 Batang Kuneho 0 Posted October 15, 2015 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? Quote Share this post Link to post Share on other sites
Hi does anyone know how can I make this a skill?
Share this post
Link to post
Share on other sites