src\map\atcommand.c

Код:

/*==========================================
* @autolootitem | Autoloot an specific item
*------------------------------------------
*by danielkza
*/

int atcommand_autolootitem(const int fd, struct map_session_data* sd, const char* command, const char* message)
{
    struct item_data *item_data;
    nullpo_retr(-1, sd);

    if (!message || !*message) {
        if (!sd->state.autolootitem) clif_displaymessage(fd, "Please enter an item to loot (usage: @autolootitem <item_name or id>)");
        else clif_displaymessage(fd, "Autolootitem is now OFF");
        sd->state.autolootitem = 0;
        return 0;
    }
    if (!strcmp(message, "off")) {
        sd->state.autolootitem = 0;
        clif_displaymessage(fd, "Autolootitem is now OFF");
        return 1;
    }
    if((item_data = itemdb_searchname(message)) != NULL ||
        (item_data = itemdb_exists(atoi(message))) != NULL ) {
        sd->state.autolootitem = item_data->nameid;
        snprintf(atcmd_output, sizeof atcmd_output, "Autolooting %s.", item_data->name);
        clif_displaymessage(fd, atcmd_output);       
        return 1;
    }
    else {
        clif_displaymessage(fd, "Invalid item name or ID.");
        sd->state.autolootitem = 0;
        return 0;
    }
}

Прописываем команду.

Код:

{ "autolootitem",        0, atcommand_autolootitem },  //danielkza

src\map\Map.h

После
Код:

unsigned short autoloot;

Это
Код:

unsigned short autolootitem;

Всё компельнулось на ура