Index: npc.c===================================================================--- npc.c (revision 14608)+++ npc.c (working copy)@@ -4003,6 +4003,58 @@ map->list[m].flag.src4instance = (state) ? 1 : 0; } else if ( !strcmpi(w3,"nocashshop") ) { map->list[m].flag.nocashshop = (state) ? 1 : 0;+ } else if (!strcmpi(w3,"noitem")) {+ int id = 0, i = 0, j = 0, k = 0, l = strlen(w4);+ char *temp = (char*)aMalloc( strlen(w4) +1 );+ struct item_data *i_data;+ if ( l ) {+ while ( i <= l && k < MAX_RESTRICTED_LIST ) {+ if ( w4 != ' ' && w4 != ' ' && w4 != ',' && w4 != '0' ) {+ temp[j++] = w4;+ }+ else if ( w4[i-1] != ' ' && w4[i-1] != ' ' && w4[i-1] != ',' ) {+ temp[j] = '0';+ if ( !strcmp( temp, "IT_HEALING" ) || !strcmp( temp, "0" ) )+ map->list[m].noitemlist[k] = 0;+ else if ( !strcmp( temp, "IT_USABLE" ) || !strcmp( temp, "2" ) )+ map->list[m].noitemlist[k] = 2;+ else if ( !strcmp( temp, "IT_WEAPON" ) || !strcmp( temp, "4" ) )+ map->list[m].noitemlist[k] = 4;+ else if ( !strcmp( temp, "IT_ARMOR" ) || !strcmp( temp, "5" ) )+ map->list[m].noitemlist[k] = 5;+ else if ( !strcmp( temp, "IT_CARD" ) || !strcmp( temp, "6" ) )+ map->list[m].noitemlist[k] = 6;+ else if ( !strcmp( temp, "IT_DELAYCONSUME" ) || !strcmp( temp, "11" ) )+ map->list[m].noitemlist[k] = 11;+ else if ( !strcmp( temp, "IT_CASH" ) || !strcmp( temp, "18" ) )+ map->list[m].noitemlist[k] = 18;+ else if ( atoi(temp) == 0 ) {+ i_data = itemdb->search_name( temp );+ if ( i_data )+ map->list[m].noitemlist[k] = i_data->nameid;+ else {+ ShowWarning("npc_parse_mapflag: Item name "%s" does not exist.n Mapflag noitem: At %s (file '%s', line '%d').n", temp, map->list[m].name, filepath, strline(buffer,start-buffer) );+ map->list[m].noitemlist[k] = -1;+ }+ }+ else {+ id = atoi(temp);+ if ( itemdb->exists(id) )+ map->list[m].noitemlist[k] = id;+ else {+ ShowWarning("npc_parse_mapflag: Item ID "%s" does not exist.n Mapflag noitem: At %s (file '%s', line '%d').n", temp, map->list[m].name, filepath, strline(buffer,start-buffer) );+ map->list[m].noitemlist[k] = -1;+ }+ }+ k++;+ j = 0;+ }+ i++;+ }+ map->list[m].flag.noitem = state;+ }+ else+ ShowWarning("npc_parse_mapflag: no Item ID/type input.n Mapflag noitem: At %s (file '%s', line '%d').n", map->list[m].name, filepath, strline(buffer,start-buffer)); } else { ShowError("npc_parse_mapflag: unrecognized mapflag '%s' in file '%s', line '%d'.n", w3, filepath, strline(buffer,start-buffer)); if (retval) *retval = EXIT_FAILURE;