1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | /* // HOW-TO-USE .@item = F_checkitem( 5022,607,608,5353 ); if ( .@item ) { mes "Please remove "+getitemname( .@item ); close; } */ function script F_checkitem { .@arg_count = getargcount(); .@has_cart = checkcart(); __OnCheckItem: .@item = getarg( .@i ); if ( countitem( .@item ) ) { return .@item; } else if ( .@has_cart ) { if ( cartcountitem( .@item ) ) return .@item; } .@i++; jump_zero( .@i >= .@arg_count, __OnCheckItem ); return 0; } |