Index: atcommand.c =================================================================== --- atcommand.c (revision 16920) +++ atcommand.c (working copy) @@ -8786,6 +8786,41 @@ #undef MC_CART_MDFY } +/*========================================== + * ported from Xantara's homunculus_mutate + * scriptcommand [clydelion] + *------------------------------------------*/ +ACMD_FUNC(hommutate) +{ + int homun_id, m_class = 0, m_id; + int homun_array[5] = {6048,6049,6050,6051,6052}; + nullpo_retr(-1, sd); + + if ( !merc_is_hom_active(sd->hd) ) { + clif_displaymessage(fd, msg_txt(1254)); // You do not have a homunculus. + return -1; + } + + if( sd == NULL ) + return -1; + if (!message || !*message) + homun_id = homun_array[rnd() % 5]; + else + homun_id = atoi(message); + + m_class = hom_class2mapid(sd->hd->homunculus.class_); + m_id = hom_class2mapid(homun_id); + + if ( m_class != -1 && m_id != -1 && m_class&HOM_EVO && m_id&HOM_S && sd->hd->homunculus.level >= 99 ) + hom_mutate(sd->hd, homun_id); + else + { + clif_displaymessage(fd, "Your homunculus must be level 99 to mutate."); + clif_emotion(&sd->hd->bl, E_SWT); + } + return 0; +} + /** * Fills the reference of available commands in atcommand DBMap **/ @@ -8796,6 +8831,7 @@ * Command reference list, place the base of your commands here **/ AtCommandInfo atcommand_base[] = { + ACMD_DEF(hommutate), ACMD_DEF2("warp", mapmove), ACMD_DEF(where), ACMD_DEF(jumpto),